* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
    font-family:
        Arial,
        Helvetica,
        sans-serif;
    background: #f5f6f7;
    color: #17191c;
}

body {
    min-height: 100vh;
}

button,
input {
    font: inherit;
}

button {
    cursor: pointer;
}

.hidden {
    display: none !important;
}


.login-screen {
    display: flex;
    min-height: 100vh;
    align-items: center;
    justify-content: center;
    padding: 28px;
    background:
        linear-gradient(
            135deg,
            #eef4eb 0%,
            #f7f8f7 52%,
            #e9efe8 100%
        );
}


.login-card {
    width: 100%;
    max-width: 420px;
    padding: 38px;
    border: 1px solid #e0e3e1;
    border-radius: 22px;
    background: #ffffff;
    box-shadow:
        0 20px 55px
        rgba(0, 0, 0, 0.08);
}


.brand-mark {
    display: flex;
    width: 54px;
    height: 54px;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    background: #203322;
    color: #ffffff;
    font-size: 25px;
    font-weight: 700;
}


.brand-mark.small {
    width: 42px;
    height: 42px;
    border-radius: 13px;
    font-size: 19px;
}


.login-card h1 {
    margin: 24px 0 8px;
    font-size: 30px;
}


.login-subtitle {
    margin: 0 0 28px;
    color: #707579;
    line-height: 1.5;
}


.login-card label {
    display: block;
    margin: 18px 0 8px;
    font-size: 14px;
    font-weight: 700;
}


.login-card input {
    width: 100%;
    height: 48px;
    padding: 0 14px;
    border: 1px solid #d8dce0;
    border-radius: 11px;
    background: #ffffff;
    outline: none;
}


.login-card input:focus {
    border-color: #748d76;
    box-shadow:
        0 0 0 3px
        rgba(116, 141, 118, 0.12);
}


.primary-button {
    width: 100%;
    height: 49px;
    margin-top: 24px;
    border: 0;
    border-radius: 11px;
    background: #203322;
    color: #ffffff;
    font-weight: 700;
}


.primary-button:disabled {
    cursor: default;
    opacity: 0.6;
}


.message {
    margin-top: 15px;
    padding: 11px 12px;
    border-radius: 9px;
    font-size: 14px;
}


.error-message {
    background: #fff0f0;
    color: #a12727;
}


.login-footer {
    margin: 24px 0 0;
    color: #9a9fa3;
    text-align: center;
    font-size: 12px;
}


.dashboard-screen {
    display: flex;
    min-height: 100vh;
}


.sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    width: 240px;
    padding: 22px 16px;
    background: #172119;
    color: #ffffff;
}


.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 3px 5px 28px;
}


.sidebar-brand strong,
.sidebar-brand span {
    display: block;
}


.sidebar-brand span {
    margin-top: 2px;
    color: #aab3ab;
    font-size: 12px;
}


.nav {
    display: flex;
    flex-direction: column;
    gap: 5px;
}


.nav-item {
    display: flex;
    width: 100%;
    min-height: 43px;
    align-items: center;
    justify-content: space-between;
    padding: 0 13px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: #cdd4ce;
    text-align: left;
}


.nav-item:hover,
.nav-item.active {
    background: #2a372c;
    color: #ffffff;
}


.nav-item.disabled {
    cursor: default;
    opacity: 0.5;
}


.nav-item span {
    padding: 3px 6px;
    border-radius: 10px;
    background: #303b31;
    font-size: 10px;
}


.main {
    width: calc(100% - 240px);
    min-height: 100vh;
    margin-left: 240px;
}


.topbar {
    display: flex;
    min-height: 72px;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    border-bottom: 1px solid #e5e8e6;
    background: #ffffff;
}


.topbar-title strong,
.topbar-title span {
    display: block;
}


.topbar-title span {
    margin-top: 3px;
    color: #858a8f;
    font-size: 12px;
}


.account-area {
    display: flex;
    align-items: center;
    gap: 16px;
}


.account-copy {
    text-align: right;
}


.account-copy strong,
.account-copy span {
    display: block;
}


.account-copy span {
    margin-top: 2px;
    color: #888d91;
    font-size: 11px;
    text-transform: uppercase;
}


.logout-button {
    height: 36px;
    padding: 0 13px;
    border: 1px solid #dcdfe2;
    border-radius: 9px;
    background: #ffffff;
}


.content {
    padding: 30px;
}


.welcome-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 30px;
    border: 1px solid #e0e4df;
    border-radius: 18px;
    background: #ffffff;
}


.eyebrow {
    margin: 0 0 8px;
    color: #6f806f;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.2px;
}


.welcome-card h2,
.section-heading h2 {
    margin: 0;
    font-size: 27px;
}


.welcome-card p:last-child,
.section-heading p:last-child {
    margin-bottom: 0;
    color: #73787c;
}


.status-badge {
    padding: 9px 12px;
    border-radius: 20px;
    background: #edf6ed;
    color: #38623b;
    font-size: 12px;
    font-weight: 700;
}


.stat-grid {
    display: grid;
    grid-template-columns:
        repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin-top: 20px;
}


.stat-card {
    min-height: 165px;
    padding: 22px;
    border: 1px solid #e1e4e6;
    border-radius: 15px;
    background: #ffffff;
}


.stat-card span,
.stat-card strong {
    display: block;
}


.stat-card span {
    color: #777c81;
    font-size: 13px;
}


.stat-card strong {
    margin: 15px 0 20px;
    font-size: 34px;
}


.stat-card button {
    padding: 0;
    border: 0;
    background: transparent;
    color: #3f6443;
    font-weight: 700;
}


.stat-card small {
    color: #9ba0a4;
}


.stat-card.muted {
    background: #f9f9f9;
}


.section-heading {
    margin-bottom: 18px;
}


.preview-card {
    padding: 22px;
    border: 1px solid #e1e4e6;
    border-radius: 15px;
    background: #ffffff;
}


.preview-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 13px 0;
    border-bottom: 1px solid #eef0f1;
}


.preview-row:last-child {
    border-bottom: 0;
}


.preview-row strong,
.preview-row span {
    display: block;
}


.preview-row span {
    margin-top: 4px;
    color: #83888c;
    font-size: 12px;
}


.state-pill {
    flex: none;
    padding: 5px 8px;
    border-radius: 12px;
    background: #edf6ed;
    color: #39613d;
    font-size: 11px;
    font-weight: 700;
}


.state-pill.off {
    background: #f1f1f1;
    color: #777777;
}


@media (max-width: 900px) {

    .sidebar {
        position: static;
        width: 190px;
    }

    .main {
        width: calc(100% - 190px);
        margin-left: 190px;
    }

}


@media (max-width: 700px) {

    .dashboard-screen {
        display: block;
    }

    .sidebar {
        position: static;
        width: 100%;
    }

    .nav {
        display: grid;
        grid-template-columns:
            repeat(3, minmax(0, 1fr));
    }

    .main {
        width: 100%;
        margin-left: 0;
    }

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

}


@media (max-width: 520px) {

    .login-screen {
        padding: 16px;
    }

    .login-card {
        padding: 26px 22px;
    }

    .topbar {
        padding: 0 16px;
    }

    .account-copy {
        display: none;
    }

    .content {
        padding: 18px;
    }

    .welcome-card {
        align-items: flex-start;
        flex-direction: column;
        gap: 20px;
    }

    .nav {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

}


.section-heading-actions {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
}

.primary-action-button {
    min-height: 40px;
    padding: 0 16px;
    border: 0;
    border-radius: 10px;
    background: #203322;
    color: #ffffff;
    font-weight: 700;
}

.secondary-button {
    min-height: 40px;
    padding: 0 16px;
    border: 1px solid #d9ddda;
    border-radius: 10px;
    background: #ffffff;
    color: #33383b;
    font-weight: 700;
}

.form-card {
    margin-bottom: 18px;
    padding: 22px;
    border: 1px solid #dfe3df;
    border-radius: 15px;
    background: #ffffff;
}

.form-card-header {
    margin-bottom: 18px;
}

.form-card-header h3 {
    margin: 0;
    font-size: 20px;
}

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

.field {
    margin-bottom: 16px;
}

.field label {
    display: block;
    margin-bottom: 7px;
    font-size: 13px;
    font-weight: 700;
}

.field input,
.field textarea {
    width: 100%;
    padding: 11px 12px;
    border: 1px solid #d7dbd8;
    border-radius: 10px;
    background: #ffffff;
    outline: none;
}

.field input:focus,
.field textarea:focus {
    border-color: #748d76;
    box-shadow:
        0 0 0 3px
        rgba(116, 141, 118, 0.12);
}

.field textarea {
    resize: vertical;
}

.check-row {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 2px 0 18px;
    color: #4d5350;
    font-size: 13px;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.preview-actions {
    display: flex;
    align-items: center;
    gap: 7px;
}

.row-action {
    min-height: 32px;
    padding: 0 10px;
    border: 1px solid #dce0dd;
    border-radius: 8px;
    background: #ffffff;
    color: #404642;
    font-size: 12px;
    font-weight: 700;
}

.row-action.danger {
    color: #8d3636;
}

@media (max-width: 700px) {

    .section-heading-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .primary-action-button {
        width: 100%;
    }

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

    .preview-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .preview-actions {
        width: 100%;
    }

}


.form-helper {
    margin: 6px 0 0;
    color: #7b807d;
    font-size: 13px;
}

.field select {
    width: 100%;
    min-height: 43px;
    padding: 0 12px;
    border: 1px solid #d7dbd8;
    border-radius: 10px;
    background: #ffffff;
    outline: none;
}

.field select:focus {
    border-color: #748d76;
    box-shadow:
        0 0 0 3px
        rgba(116, 141, 118, 0.12);
}

.product-sort-field {
    max-width: 180px;
}

.check-grid {
    display: flex;
    gap: 24px;
    margin-bottom: 20px;
}

.variant-section {
    margin: 24px 0;
    padding-top: 22px;
    border-top: 1px solid #eceeec;
}

.variant-section-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 16px;
}

.variant-section-header h3 {
    margin: 0;
    font-size: 19px;
}

.variant-section-header p:last-child {
    margin: 6px 0 0;
    color: #7b807d;
    font-size: 13px;
}

.variant-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.variant-card {
    padding: 16px;
    border: 1px solid #e0e3e1;
    border-radius: 12px;
    background: #fafbfa;
}

.variant-grid {
    display: grid;
    grid-template-columns:
        minmax(0, 1.3fr)
        minmax(0, 1.2fr)
        minmax(120px, 0.8fr);
    gap: 12px;
}

.variant-secondary-grid {
    display: grid;
    grid-template-columns:
        minmax(0, 1fr)
        auto;
    gap: 12px;
    align-items: end;
}

.variant-remove {
    min-height: 40px;
    padding: 0 12px;
    border: 1px solid #e3cccc;
    border-radius: 9px;
    background: #ffffff;
    color: #8c3535;
    font-weight: 700;
}

.variant-number {
    margin-bottom: 12px;
    color: #6e746f;
    font-size: 12px;
    font-weight: 700;
}

@media (max-width: 760px) {

    .variant-grid,
    .variant-secondary-grid {
        grid-template-columns: 1fr;
    }

    .variant-section-header {
        align-items: stretch;
        flex-direction: column;
    }

    .check-grid {
        flex-direction: column;
        gap: 0;
    }

}


.variant-availability {
    display: flex;
    min-height: 40px;
    align-items: center;
    gap: 8px;
    padding: 0 4px;
    color: #4d5350;
    font-size: 13px;
    white-space: nowrap;
}

.variant-availability input {
    width: auto;
}



/* R3.5D3 PRODUCT IMAGE UI */

.product-image-section {
    margin: 24px 0;
    padding-top: 22px;
    border-top: 1px solid #eceeec;
}

.product-image-copy h3 {
    margin: 0;
    font-size: 19px;
}

.product-image-copy p:last-child {
    margin: 6px 0 16px;
    color: #7b807d;
    font-size: 13px;
}

.product-image-layout {
    display: flex;
    align-items: center;
    gap: 20px;
}

.product-image-preview-box {
    width: 220px;
    height: 220px;
    flex: 0 0 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 1px solid #dfe3df;
    border-radius: 14px;
    background: #f7f8f7;
}

.product-image-preview {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #ffffff;
}

.product-image-placeholder {
    padding: 20px;
    color: #929793;
    font-size: 13px;
    text-align: center;
}

.product-image-controls {
    display: flex;
    min-width: 220px;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
}

.product-image-picker {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.product-image-status {
    max-width: 360px;
    margin: 2px 0 0;
    color: #7b807d;
    font-size: 12px;
    line-height: 1.45;
}

@media (max-width: 760px) {

    .product-image-layout {
        align-items: stretch;
        flex-direction: column;
    }

    .product-image-preview-box {
        width: 100%;
        max-width: 320px;
        height: 320px;
        flex-basis: auto;
    }

}


/* R3.5E1 VARIANT PROMO */

.variant-promo-box {
    margin-top: 16px;
    padding: 15px;
    border: 1px solid #e3e6e4;
    border-radius: 11px;
    background: #ffffff;
}

.variant-promo-box.promo-enabled {
    border-color: #cad7cc;
    background: #fbfdfb;
}

.variant-promo-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 13px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.variant-promo-toggle input {
    width: auto;
}

.variant-promo-grid {
    display: grid;
    grid-template-columns:
        minmax(140px, 0.8fr)
        minmax(180px, 1fr)
        minmax(180px, 1fr);
    gap: 12px;
}

.variant-promo-field:disabled {
    opacity: 0.55;
    background: #f1f3f1;
    cursor: not-allowed;
}

@media (max-width: 760px) {

    .variant-promo-grid {
        grid-template-columns: 1fr;
    }

}

/* R3.15A9 — align Program Poin with Admin content */

#section-points {
    box-sizing: border-box;
    padding-left: 30px;
    padding-right: 30px;
}

#section-points > * {
    box-sizing: border-box;
}

@media (max-width: 520px) {
    #section-points {
        padding-left: 16px;
        padding-right: 16px;
    }
}

/* R3.18D OOS pending checkbox */
.order-oos-toggle {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-top: 6px;
    font-size: 12px;
    font-weight: 600;
    color: #475569;
    cursor: pointer;
}

.order-oos-toggle input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin: 0;
    cursor: pointer;
}

.order-oos-toggle input[type="checkbox"]:disabled {
    cursor: wait;
    opacity: .6;
}

/* R3.18 OOS transaction detail - FINAL */
.transaction-product-row > div:nth-child(2) {
    position: relative;
    min-width: 0;
}

.transaction-product-row > div:nth-child(2) > strong {
    display: block;
}

.transaction-product-row .order-oos-toggle {
    position: absolute;
    left: 11px;
    bottom: 2px;

    display: flex;
    align-items: center;
    gap: 3px;

    margin: 0;
    width: fit-content;

    font-size: 9px;
    line-height: 1;
    font-weight: 500;
    color: #718096;

    cursor: pointer;
}

.transaction-product-row .order-oos-toggle span {
    font-size: 9px;
    line-height: 1;
    white-space: nowrap;
}

.transaction-product-row .order-oos-toggle input[type="checkbox"] {
    width: 10px;
    height: 10px;

    margin: 0;
    padding: 0;

    flex: 0 0 10px;
    cursor: pointer;
}

.transaction-product-row .order-oos-toggle input[type="checkbox"]:disabled {
    cursor: wait;
    opacity: .6;
}

.transaction-product-row .order-small {
    display: block;
    margin-top: 2px;

    font-size: 9px;
    line-height: 1.15;
}

/* R3.18 OOS refund note FINAL */
.transaction-product-row .order-oos-refund-note {
    position: absolute;
    left: 11px;
    bottom: 2px;

    margin: 0;
    width: fit-content;

    font-size: 8px;
    line-height: 1;
    font-weight: 400;
    color: #64748b;

    white-space: nowrap;
}

