:root {
    --header-bg: #eef3f7;
    --border: #cfd8e3;
    --text: #1d2a36;
    --accent: #2f6fa3;
    --accent-dark: #24557c;
    --page-bg: #f7f9fb;
    --card-bg: #ffffff;
    --danger-bg: #ffe7e7;
    --success-bg: #e7f8ee;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: var(--page-bg);
    color: var(--text);
    padding-bottom: 58px;
}

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: 96px;
    max-height: 96px;
    overflow: hidden;
    background: var(--header-bg);
    border-bottom: 1px solid var(--border);
    display: grid;
    grid-template-columns: 100px 1fr 220px;
    align-items: center;
    padding: 10px 28px;
    transition: all .25s ease;
}

.site-header.shrunk {
    height: 78px;
    max-height: 78px;
    padding-top: 6px;
    padding-bottom: 6px;
}

.tag-img {
    max-width: 62px !important;
    max-height: 62px !important;
    width: auto !important;
    height: auto !important;
    display: block;
    object-fit: contain;
}

.logo-img {
    max-width: 235px !important;
    width: 100%;
    height: auto !important;
    display: inline-block;
}

.header-left {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    max-width: 92px;
    overflow: hidden;
}

.header-center {
    text-align: center;
}

.page-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-top: 4px;
}

.header-right {
    text-align: right;
    font-size: .92rem;
    line-height: 1.45;
}

.current-user {
    font-weight: 700;
}

.nav-bar {
    position: fixed;
    top: 96px;
    left: 0;
    right: 0;
    z-index: 999;
    height: 38px;
    background: #ffffff;
    border-bottom: 1px solid var(--border);
    padding: 5px 28px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.site-header.shrunk + .nav-bar {
    position: fixed;
    top: 96px;
    left: 0;
    right: 0;
    z-index: 999;
    height: 38px;
    background: #ffffff;
    border-bottom: 1px solid var(--border);
    padding: 5px 28px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.nav-button,
.button,
button {
    display: inline-block;
    border: none;
    background: var(--accent);
    color: #fff;
    text-decoration: none;
    padding: 7px 12px;
    border-radius: 7px;
    cursor: pointer;
    font-weight: 700;
    font-size: 0.92rem;
}

.nav-button:hover,
.button:hover,
button:hover {
    background: var(--accent-dark);
}

.page-wrap {
    max-width: 1120px;
    margin: 158px auto 24px auto;
    padding: 0 18px;
}

.card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 22px;
    box-shadow: 0 8px 22px rgba(29, 42, 54, .06);
    margin-bottom: 20px;
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.form-row {
    margin-bottom: 14px;
}

label {
    display: block;
    font-weight: 700;
    margin-bottom: 6px;
}

input,
select,
textarea {
    width: 100%;
    padding: 11px;
    border-radius: 8px;
    border: 1px solid var(--border);
    font-size: 1rem;
}

.flash {
    border-radius: 10px;
    padding: 12px 14px;
    margin-bottom: 16px;
    border: 1px solid var(--border);
}

.flash-error {
    background: var(--danger-bg);
}

.flash-success {
    background: var(--success-bg);
}

.site-footer {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    min-height: 48px;
    background: var(--header-bg);
    border-top: 1px solid var(--border);
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    align-items: center;
    padding: 8px 24px;
    font-size: .92rem;
}

.site-footer div:nth-child(2) {
    text-align: center;
    font-weight: 700;
}

.site-footer div:nth-child(3) {
    text-align: right;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    border-bottom: 1px solid var(--border);
    padding: 10px;
    text-align: left;
}

@media (max-width: 760px) {
    .site-header {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 8px;
    }

    .header-right {
        text-align: center;
    }

    .nav-bar {
    position: fixed;
    top: 96px;
    left: 0;
    right: 0;
    z-index: 999;
    height: 38px;
    background: #ffffff;
    border-bottom: 1px solid var(--border);
    padding: 5px 28px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

    .grid-2 {
        grid-template-columns: 1fr;
    }

    .site-footer {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 4px;
    }

    .site-footer div:nth-child(3) {
        text-align: center;
    }
}


.product-list {
    display: grid;
    gap: 20px;
}

.price-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin-top: 14px;
}

.price-card {
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px;
    background: #fbfdff;
}

.price-card strong {
    display: block;
    font-size: 1.15rem;
    margin-bottom: 6px;
}

.status-pill {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 999px;
    background: #e9f1f8;
    font-weight: 700;
    font-size: .85rem;
}


/* Sticky header/navigation patch v1.2.4 */

@media (max-width: 760px) {
    .site-header {
        position: relative;
        height: auto;
        max-height: none;
        grid-template-columns: 1fr;
        text-align: center;
        gap: 8px;
    }

    .header-left {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    max-width: 92px;
    overflow: hidden;
}

    .header-right {
        text-align: center;
    }

    .nav-bar {
    position: fixed;
    top: 96px;
    left: 0;
    right: 0;
    z-index: 999;
    height: 38px;
    background: #ffffff;
    border-bottom: 1px solid var(--border);
    padding: 5px 28px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

    .site-header.shrunk + .nav-bar {
    position: fixed;
    top: 96px;
    left: 0;
    right: 0;
    z-index: 999;
    height: 38px;
    background: #ffffff;
    border-bottom: 1px solid var(--border);
    padding: 5px 28px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

    .page-wrap {
    max-width: 1120px;
    margin: 158px auto 24px auto;
    padding: 0 18px;
}
}


/* Compact navigation and smaller tag image patch v1.2.6 */
.tag-img {
    max-width: 62px !important;
    max-height: 62px !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain;
}

.header-left {
    max-width: 92px;
}

.nav-bar {
    height: 38px;
    padding-top: 5px;
    padding-bottom: 5px;
    gap: 8px;
}

.nav-button {
    padding: 7px 12px;
    border-radius: 7px;
    font-size: 0.92rem;
}

.page-wrap {
    margin-top: 158px;
}

@media (max-width: 760px) {
    .tag-img {
        max-width: 58px !important;
        max-height: 58px !important;
    }

    .nav-bar {
        height: auto;
        padding: 7px 14px;
    }

    .page-wrap {
        margin-top: 24px;
    }
}


/* Header/Nav fit patch v1.2.7 */
.site-header {
    height: 118px !important;
    max-height: 118px !important;
    min-height: 118px !important;
    padding: 12px 28px !important;
    overflow: hidden !important;
    grid-template-columns: 110px 1fr 220px !important;
}

.site-header.shrunk {
    height: 92px !important;
    max-height: 92px !important;
    min-height: 92px !important;
    padding-top: 8px !important;
    padding-bottom: 8px !important;
}

.header-left {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    max-width: 100px !important;
    height: 100%;
    overflow: hidden !important;
}

.tag-img {
    max-width: 70px !important;
    max-height: 70px !important;
    width: auto !important;
    height: auto !important;
    display: block !important;
    object-fit: contain !important;
}

.logo-img {
    max-width: 235px !important;
    max-height: 72px !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
}

.nav-bar {
    top: 118px !important;
    height: 48px !important;
    min-height: 48px !important;
    padding: 6px 28px !important;
    gap: 8px !important;
    align-items: center !important;
    align-content: center !important;
    overflow: hidden !important;
}

.site-header.shrunk + .nav-bar {
    top: 92px !important;
}

.nav-button {
    padding: 6px 13px !important;
    min-height: 34px !important;
    line-height: 20px !important;
    border-radius: 7px !important;
    font-size: 0.92rem !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.page-wrap {
    margin-top: 190px !important;
}

@media (max-width: 760px) {
    .site-header {
        position: relative !important;
        height: auto !important;
        max-height: none !important;
        min-height: 0 !important;
        grid-template-columns: 1fr !important;
    }

    .header-left {
        justify-content: center !important;
        max-width: none !important;
    }

    .tag-img {
        max-width: 64px !important;
        max-height: 64px !important;
    }

    .nav-bar {
        position: sticky !important;
        top: 0 !important;
        height: auto !important;
        min-height: 0 !important;
        padding: 8px 14px !important;
        overflow: visible !important;
        justify-content: center !important;
    }

    .site-header.shrunk + .nav-bar {
        top: 0 !important;
    }

    .page-wrap {
        margin-top: 24px !important;
    }
}


/* Automation Workflow UI v3.4.0 */
.automation-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 78px;
    padding: 5px 9px;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 800;
    background: #e9f1f8;
}

.automation-status.success {
    background: #e7f8ee;
    color: #1f6b3a;
}

.automation-status.failed {
    background: #ffe7e7;
    color: #9d2525;
}

.automation-status.skipped {
    background: #fff6d8;
    color: #7c5b00;
}
