:root {
    --blue: #1569e8;
    --blue-dark: #0758cc;
    --blue-soft: #eaf2ff;

    --green: #24ad6a;
    --green-soft: #e8f8ef;

    --orange: #ff7a29;
    --orange-soft: #fff0e7;

    --purple: #7967e9;
    --purple-soft: #efedff;

    --yellow: #e7a51f;
    --yellow-soft: #fff7dd;

    --bg: #f4f7fb;
    --sidebar: #ffffff;
    --surface: #ffffff;

    --text: #162033;
    --secondary: #7b8799;

    --border: #e4eaf2;

    --shadow:
        0 9px 28px
        rgba(31, 55, 91, .07);
}


* {
    box-sizing: border-box;
}


html {
    -webkit-font-smoothing: antialiased;
}


body {
    margin: 0;

    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "SF Pro Display",
        "Segoe UI",
        sans-serif;

    background: var(--bg);
    color: var(--text);
}


button,
input {
    font: inherit;
}


button {
    border: 0;
}


.hidden {
    display: none !important;
}


/* LOGIN */

.login-page {
    min-height: 100vh;

    display: grid;
    place-items: center;

    padding: 24px;

    background:
        radial-gradient(
            circle at 8% 10%,
            #67bbff,
            transparent 30%
        ),
        radial-gradient(
            circle at 93% 87%,
            #98d6ff,
            transparent 30%
        ),
        linear-gradient(
            135deg,
            #0966df,
            #00a3ee
        );
}


.login-card {
    width: 100%;
    max-width: 390px;

    padding: 38px;

    background:
        rgba(255,255,255,.97);

    border-radius: 24px;

    box-shadow:
        0 30px 80px
        rgba(0,65,150,.22);
}


.logo,
.sidebar-logo {
    width: 50px;
    height: 50px;

    display: grid;
    place-items: center;

    border-radius: 14px;

    background:
        linear-gradient(
            145deg,
            #2690ff,
            #095bdb
        );

    color: white;

    font-weight: 700;

    font-size: 23px;

    box-shadow:
        0 8px 20px
        rgba(16,104,225,.26);
}


.login-card h1 {
    margin:
        25px
        0
        4px;

    font-size: 31px;
}


.login-card > p {
    margin:
        0
        0
        28px;

    color: var(--secondary);

    font-size: 14px;
}


.login-card label {
    display: block;

    margin:
        15px
        0
        7px;

    font-size: 12px;

    font-weight: 600;
}


.login-card input {
    width: 100%;
    height: 50px;

    padding: 0 14px;

    border:
        1px solid
        var(--border);

    border-radius: 11px;

    background: #f8faff;

    outline: none;
}


.login-card input:focus {
    background: white;

    border-color: #8bb7f8;

    box-shadow:
        0 0 0 3px
        rgba(21,105,232,.07);
}


.primary-btn {
    height: 46px;

    display: inline-flex;

    align-items: center;

    justify-content: center;

    gap: 7px;

    padding: 0 18px;

    border-radius: 11px;

    background:
        linear-gradient(
            180deg,
            #2482f7,
            #1268e6
        );

    color: white;

    cursor: pointer;

    font-size: 13px;

    font-weight: 600;

    box-shadow:
        0 8px 18px
        rgba(21,105,232,.18);
}


.primary-btn:hover {
    filter: brightness(.97);
}


.primary-btn.full {
    width: 100%;

    margin-top: 22px;
}


.error {
    margin-top: 14px;

    padding: 11px 13px;

    border-radius: 9px;

    color: #b73d36;

    background: #fff0ef;

    font-size: 13px;
}


/* LAYOUT */

.layout {
    min-height: 100vh;

    display: grid;

    grid-template-columns:
        248px
        1fr;
}


/* SIDEBAR */

.sidebar {
    height: 100vh;

    position: sticky;

    top: 0;

    display: flex;

    flex-direction: column;

    padding:
        26px
        15px
        17px;

    background:
        var(--sidebar);

    border-right:
        1px solid
        var(--border);
}


.sidebar-brand {
    display: flex;

    align-items: center;

    gap: 12px;

    padding: 0 10px;

    margin-bottom: 27px;
}


.sidebar-logo {
    width: 43px;
    height: 43px;

    font-size: 19px;
}


.sidebar-brand strong {
    display: block;

    font-size: 16px;
}


.sidebar-brand span {
    display: block;

    margin-top: 3px;

    color: var(--secondary);

    font-size: 9px;
}


.menu-label {
    margin:
        23px
        12px
        8px;

    color: #9aa4b3;

    font-size: 9px;

    font-weight: 700;

    letter-spacing: 1.1px;
}


.admin-label {
    margin-top: 28px;
}


.menu-item {
    width: 100%;

    height: 45px;

    display: flex;

    align-items: center;

    gap: 12px;

    padding: 0 12px;

    margin-bottom: 3px;

    border-radius: 10px;

    background: transparent;

    color: #394458;

    cursor: pointer;

    text-align: left;

    font-size: 12px;

    transition: .14s;
}


.menu-item:hover {
    background: #f3f6fb;
}


.menu-item.active {
    background:
        linear-gradient(
            90deg,
            #e5efff,
            #f0f5ff
        );

    color: #1263da;
}


.menu-item svg {
    width: 18px;
    height: 18px;

    flex: none;

    fill: none;

    stroke: currentColor;

    stroke-width: 1.7;

    stroke-linecap: round;

    stroke-linejoin: round;
}


.profile {
    margin-top: auto;

    display: grid;

    grid-template-columns:
        38px
        1fr
        31px;

    gap: 10px;

    align-items: center;

    padding:
        17px
        7px
        3px;

    border-top:
        1px solid
        var(--border);
}


.avatar {
    width: 38px;
    height: 38px;

    display: grid;
    place-items: center;

    border-radius: 50%;

    background:
        linear-gradient(
            145deg,
            #2790ff,
            #1165dd
        );

    color: white;

    font-size: 12px;

    font-weight: 700;
}


.profile-text {
    min-width: 0;
}


.profile-text strong {
    display: block;

    overflow: hidden;

    white-space: nowrap;

    text-overflow: ellipsis;

    font-size: 11px;
}


.profile-text span {
    display: block;

    margin-top: 3px;

    color: var(--secondary);

    font-size: 9px;
}


.logout {
    width: 31px;
    height: 31px;

    display: grid;
    place-items: center;

    background: transparent;

    color: #8793a4;

    cursor: pointer;
}


.logout svg {
    width: 17px;
    height: 17px;

    fill: none;

    stroke: currentColor;

    stroke-width: 1.6;

    stroke-linecap: round;

    stroke-linejoin: round;
}


/* CONTENT */

.content {
    min-width: 0;

    padding:
        35px
        clamp(28px, 4vw, 58px)
        70px;

    background:
        var(--bg);
}


.header {
    display: flex;

    align-items: center;

    justify-content:
        space-between;

    gap: 25px;

    margin-bottom: 25px;
}


.eyebrow {
    margin-bottom: 5px;

    color: #5c8ed7;

    font-size: 9px;

    font-weight: 750;

    letter-spacing: 1.4px;
}


.header h1 {
    margin: 0;

    font-size: 29px;

    letter-spacing: -.8px;
}


.header-right {
    display: flex;

    align-items: center;

    gap: 12px;
}


.date {
    height: 46px;

    display: flex;

    align-items: center;

    padding: 0 14px;

    border:
        1px solid
        var(--border);

    border-radius: 11px;

    background: white;

    color: var(--secondary);

    font-size: 11px;
}


/* HERO */

.hero {
    min-height: 230px;

    display: grid;

    grid-template-columns:
        .9fr
        1.1fr;

    gap: 35px;

    align-items: center;

    padding:
        38px
        42px;

    border-radius: 21px;

    background:
        linear-gradient(
            115deg,
            #0a64db 0%,
            #1a89ed 57%,
            #52b8f3 100%
        );

    color: white;

    overflow: hidden;

    box-shadow:
        0 15px 35px
        rgba(23,108,222,.16);
}


.hero-kicker {
    margin-bottom: 14px;

    color:
        rgba(255,255,255,.65);

    font-size: 9px;

    font-weight: 750;

    letter-spacing: 1.5px;
}


.hero h2 {
    margin: 0;

    font-size:
        clamp(31px, 4vw, 44px);

    font-weight: 650;

    letter-spacing: -1.2px;
}


.hero p {
    margin:
        10px
        0
        24px;

    color:
        rgba(255,255,255,.79);

    font-size: 13px;
}


.hero-button {
    height: 44px;

    padding: 0 16px;

    display: inline-flex;

    align-items: center;

    gap: 18px;

    border:
        1px solid
        rgba(255,255,255,.28);

    border-radius: 11px;

    background:
        rgba(255,255,255,.15);

    color: white;

    cursor: pointer;

    font-size: 12px;

    font-weight: 600;
}


.hero-button:hover {
    background:
        rgba(255,255,255,.22);
}


.hero-chart-title {
    margin-bottom: 9px;

    color:
        rgba(255,255,255,.76);

    font-size: 10px;
}


.hero-chart svg {
    width: 100%;
}


.hero-line {
    fill: none;

    stroke: white;

    stroke-width: 2.7;

    stroke-linecap: round;
}


.hero-area {
    fill: url(#heroArea);
}


.hero-chart circle {
    fill: white;
}


/* KPI */

.kpi-grid {
    display: grid;

    grid-template-columns:
        repeat(3,1fr);

    gap: 14px;

    margin-top: 19px;
}


.kpi-card {
    min-height: 125px;

    display: grid;

    grid-template-columns:
        48px
        1fr;

    gap: 14px;

    align-items: center;

    padding: 19px;

    border:
        1px solid
        var(--border);

    border-radius: 15px;

    background: white;

    box-shadow: var(--shadow);
}


.kpi-icon {
    width: 47px;
    height: 47px;

    display: grid;
    place-items: center;

    border-radius: 14px;
}


.kpi-card.blue .kpi-icon {
    color: var(--blue);

    background:
        var(--blue-soft);
}


.kpi-card.green .kpi-icon {
    color: var(--green);

    background:
        var(--green-soft);
}


.kpi-card.orange .kpi-icon {
    color: var(--orange);

    background:
        var(--orange-soft);
}


.kpi-icon svg {
    width: 22px;
    height: 22px;

    fill: none;

    stroke: currentColor;

    stroke-width: 1.8;

    stroke-linecap: round;

    stroke-linejoin: round;
}


.kpi-card > div:last-child > span {
    display: block;

    margin-bottom: 8px;

    color: var(--secondary);

    font-size: 10px;
}


.kpi-value strong {
    font-size:
        clamp(22px, 2.6vw, 30px);

    letter-spacing: -.7px;
}


.kpi-value small {
    margin-left: 4px;

    color: var(--secondary);

    font-size: 9px;
}


/* SECTION */

.section {
    margin-top: 28px;
}


.section-title h3,
.chart-head h3 {
    margin: 0;

    font-size: 15px;
}


.section-title p,
.chart-head p {
    margin:
        4px
        0
        0;

    color: var(--secondary);

    font-size: 10px;
}


.quick-grid {
    display: grid;

    grid-template-columns:
        repeat(4,1fr);

    gap: 12px;

    margin-top: 13px;
}


.quick-card {
    min-height: 96px;

    display: grid;

    grid-template-columns:
        40px
        1fr
        auto;

    gap: 12px;

    align-items: center;

    padding: 17px;

    border:
        1px solid
        var(--border);

    border-radius: 14px;

    background: white;

    color: var(--text);

    cursor: pointer;

    text-align: left;

    box-shadow: var(--shadow);
}


.quick-card:hover {
    transform: translateY(-1px);
}


.quick-icon {
    width: 40px;
    height: 40px;

    display: grid;
    place-items: center;

    border-radius: 11px;
}


.quick-icon.blue {
    color: var(--blue);
    background: var(--blue-soft);
}


.quick-icon.green {
    color: var(--green);
    background: var(--green-soft);
}


.quick-icon.purple {
    color: var(--purple);
    background: var(--purple-soft);
}


.quick-icon.yellow {
    color: var(--yellow);
    background: var(--yellow-soft);
}


.quick-icon svg {
    width: 19px;
    height: 19px;

    fill: none;

    stroke: currentColor;

    stroke-width: 1.7;

    stroke-linecap: round;

    stroke-linejoin: round;
}


.quick-card strong {
    display: block;

    font-size: 11px;
}


.quick-card div > span {
    display: block;

    margin-top: 4px;

    color: var(--secondary);

    font-size: 9px;
}


.quick-card b {
    color: #8591a3;

    font-size: 20px;

    font-weight: 400;
}


/* CHART CARDS */

.chart-grid {
    display: grid;

    grid-template-columns:
        1fr
        1fr;

    gap: 16px;

    margin-top: 24px;
}


.chart-card {
    min-height: 265px;

    padding: 22px;

    border:
        1px solid
        var(--border);

    border-radius: 16px;

    background: white;

    box-shadow: var(--shadow);
}


.chart-head {
    display: flex;

    justify-content:
        space-between;

    align-items: flex-start;
}


.chart-head button {
    background: transparent;

    color: var(--blue);

    cursor: pointer;

    font-size: 10px;

    font-weight: 600;
}


.chart-number {
    margin-top: 22px;
}


.chart-number strong {
    font-size: 32px;

    letter-spacing: -.9px;
}


.chart-number span {
    margin-left: 5px;

    color: var(--secondary);

    font-size: 10px;
}


.chart {
    width: 100%;

    height: 130px;

    margin-top: 8px;
}


.chart .line {
    fill: none;

    stroke-width: 2.5;

    stroke-linecap: round;
}


.blue-chart .line {
    stroke: #2878f0;
}


.orange-chart .line {
    stroke: #ff812e;
}


.message {
    margin-top: 20px;

    padding: 13px 15px;

    border:
        1px solid
        #cddfff;

    border-radius: 10px;

    background: #edf4ff;

    color: #275fb8;

    font-size: 12px;
}


/* RESPONSIVE */

@media (max-width: 1050px) {

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

}


@media (max-width: 900px) {

    .layout {
        grid-template-columns:
            78px
            1fr;
    }


    .sidebar {
        padding:
            22px
            10px
            16px;
    }


    .sidebar-brand {
        justify-content: center;

        padding: 0;
    }


    .sidebar-brand > div:last-child,
    .menu-item {
        font-size: 0;
    }

    @media (min-width: 769px) {
        .menu-item:not(.active) span {
            font-size: 0;
        }
    }


    .menu-item {
        justify-content: center;
    }


    .menu-label,
    .profile-text {
        display: none;
    }


    .profile {
        grid-template-columns: 1fr;

        justify-items: center;
    }


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


    .hero-chart {
        display: none;
    }


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

}


@media (max-width: 700px) {

    .content {
        padding:
            25px
            17px
            55px;
    }


    .header {
        align-items: flex-start;
    }


    .date {
        display: none;
    }


    .hero {
        padding:
            30px
            26px;
    }


    .quick-grid,
    .chart-grid {
        grid-template-columns: 1fr;
    }

}


/* =========================================
   SALE SCREEN
   ========================================= */

.page-screen {
    animation: screenFade .18s ease;
}


@keyframes screenFade {
    from {
        opacity: 0;
        transform: translateY(3px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}


.screen-header {
    margin-bottom: 22px;
}


.back-button {
    padding: 0;

    margin-bottom: 13px;

    background: transparent;

    color: var(--blue);

    cursor: pointer;

    font-size: 11px;

    font-weight: 600;
}


.screen-header h2 {
    margin: 0;

    font-size: 29px;

    letter-spacing: -.8px;
}


.screen-header p {
    margin: 6px 0 0;

    color: var(--secondary);

    font-size: 11px;
}


.sale-layout {
    display: grid;

    grid-template-columns:
        minmax(0, 1fr)
        330px;

    gap: 18px;

    align-items: start;
}


.sale-form-card,
.sale-summary-card {
    background: white;

    border:
        1px solid
        var(--border);

    border-radius: 16px;

    box-shadow: var(--shadow);
}


.sale-form-card {
    padding: 25px;
}


.sale-summary-card {
    padding: 23px;

    position: sticky;

    top: 25px;
}


.form-section-title,
.summary-heading {
    margin-bottom: 19px;

    font-size: 14px;

    font-weight: 700;
}


.payment-title {
    margin-top: 29px;
}


.form-grid {
    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap:
        18px
        16px;
}


.form-field label {
    display: block;

    margin-bottom: 7px;

    color: #3d4758;

    font-size: 11px;

    font-weight: 600;
}


.form-field select,
.form-field input,
.form-field textarea {
    width: 100%;

    border:
        1px solid
        var(--border);

    border-radius: 10px;

    background: #f9fbfe;

    color: var(--text);

    outline: none;

    transition:
        border .14s,
        background .14s,
        box-shadow .14s;
}


.form-field select,
.form-field input {
    height: 48px;

    padding:
        0
        13px;
}


.form-field textarea {
    min-height: 85px;

    resize: vertical;

    padding: 12px 13px;
}


.form-field select:focus,
.form-field input:focus,
.form-field textarea:focus {
    background: white;

    border-color: #84aff0;

    box-shadow:
        0 0 0 3px
        rgba(21,105,232,.07);
}


.form-field small {
    display: block;

    min-height: 14px;

    margin-top: 6px;

    color: var(--secondary);

    font-size: 9px;
}


.input-unit {
    position: relative;
}


.input-unit input {
    padding-right: 55px;
}


.input-unit > span {
    position: absolute;

    top: 50%;
    right: 13px;

    transform: translateY(-50%);

    color: var(--secondary);

    font-size: 10px;
}


.payment-tabs {
    display: grid;

    grid-template-columns:
        repeat(3, 1fr);

    gap: 8px;
}


.payment-tab {
    height: 46px;

    border:
        1px solid
        var(--border);

    border-radius: 10px;

    background: white;

    color: #536074;

    cursor: pointer;

    font-size: 11px;

    font-weight: 600;

    transition: .14s;
}


.payment-tab:hover {
    background: #f6f9fd;
}


.payment-tab.active {
    border-color: #9bbdf2;

    background: var(--blue-soft);

    color: var(--blue);
}


.credit-fields {
    margin-top: 19px;

    padding: 18px;

    border:
        1px solid
        #dce7f8;

    border-radius: 12px;

    background: #f6f9ff;
}


.notes-field {
    margin-top: 23px;
}


.optional {
    color: var(--secondary);

    font-weight: 400;
}


.summary-heading {
    padding-bottom: 16px;

    border-bottom:
        1px solid
        var(--border);
}


.summary-row {
    min-height: 42px;

    display: flex;

    align-items: center;

    justify-content:
        space-between;

    gap: 18px;

    border-bottom:
        1px solid
        #eef1f5;
}


.summary-row > span {
    color: var(--secondary);

    font-size: 10px;
}


.summary-row strong {
    max-width: 180px;

    overflow: hidden;

    white-space: nowrap;

    text-overflow: ellipsis;

    text-align: right;

    font-size: 11px;
}


.summary-total {
    margin-top: 20px;

    padding:
        17px
        16px;

    display: flex;

    align-items: center;

    justify-content:
        space-between;

    border-radius: 12px;

    background:
        linear-gradient(
            135deg,
            #edf4ff,
            #f6f9ff
        );
}


.summary-total span {
    color: #65738a;

    font-size: 11px;

    font-weight: 600;
}


.summary-total strong {
    color: var(--blue);

    font-size: 24px;

    letter-spacing: -.6px;
}


.sale-warning {
    margin-top: 13px;

    padding: 10px 11px;

    border:
        1px solid
        #ffd8bd;

    border-radius: 9px;

    background: #fff6ef;

    color: #c96520;

    font-size: 10px;
}


.submit-sale-button {
    width: 100%;
    height: 51px;

    margin-top: 17px;

    border-radius: 11px;

    background:
        linear-gradient(
            180deg,
            #2482f7,
            #1268e6
        );

    color: white;

    cursor: pointer;

    font-size: 12px;

    font-weight: 700;

    box-shadow:
        0 8px 18px
        rgba(21,105,232,.19);
}


.submit-sale-button:hover {
    filter: brightness(.97);
}


.submit-sale-button:disabled {
    opacity: .55;

    cursor: not-allowed;
}


.sale-success {
    position: fixed;

    right: 25px;
    bottom: 25px;

    z-index: 100;

    min-width: 270px;

    padding: 15px 17px;

    border:
        1px solid
        #bce7cc;

    border-radius: 12px;

    background: #ecfaf1;

    color: #227a45;

    box-shadow:
        0 14px 35px
        rgba(37,100,64,.16);

    font-size: 11px;

    font-weight: 600;
}


@media (max-width: 1000px) {

    .sale-layout {
        grid-template-columns: 1fr;
    }


    .sale-summary-card {
        position: static;
    }

}


@media (max-width: 620px) {

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


    .sale-form-card,
    .sale-summary-card {
        padding: 18px;
    }


    .payment-tabs {
        grid-template-columns: 1fr;
    }

}


/* =========================================
   GLOBAL FONT SIZE IMPROVEMENT
   ========================================= */

body {
    font-size: 15px;
}


/* Sidebar */

.sidebar-brand strong {
    font-size: 18px;
}

.sidebar-brand span {
    font-size: 11px;
}

.menu-label {
    font-size: 10px;
}

.menu-item {
    font-size: 14px;
}

.profile-text strong {
    font-size: 13px;
}

.profile-text span {
    font-size: 11px;
}


/* Header */

.eyebrow {
    font-size: 10px;
}

.header h1 {
    font-size: 31px;
}

.date {
    font-size: 13px;
}

.primary-btn {
    font-size: 14px;
}


/* Hero */

.hero-kicker {
    font-size: 10px;
}

.hero h2 {
    font-size: clamp(34px, 4vw, 46px);
}

.hero p {
    font-size: 15px;
}

.hero-button {
    font-size: 13px;
}

.hero-chart-title {
    font-size: 12px;
}


/* KPI */

.kpi-card > div:last-child > span {
    font-size: 12px;
}

.kpi-value strong {
    font-size: clamp(25px, 2.7vw, 32px);
}

.kpi-value small {
    font-size: 11px;
}


/* Section */

.section-title h3,
.chart-head h3 {
    font-size: 17px;
}

.section-title p,
.chart-head p {
    font-size: 12px;
}


/* Quick cards */

.quick-card strong {
    font-size: 13px;
}

.quick-card div > span {
    font-size: 11px;
}


/* Chart cards */

.chart-number strong {
    font-size: 35px;
}

.chart-number span {
    font-size: 11px;
}

.chart-head button {
    font-size: 12px;
}


/* Sale screen */

.back-button {
    font-size: 13px;
}

.screen-header h2 {
    font-size: 31px;
}

.screen-header p {
    font-size: 13px;
}

.form-section-title,
.summary-heading {
    font-size: 16px;
}

.form-field label {
    font-size: 13px;
}

.form-field select,
.form-field input,
.form-field textarea {
    font-size: 14px;
}

.form-field small {
    font-size: 11px;
}

.input-unit > span {
    font-size: 11px;
}

.payment-tab {
    font-size: 13px;
}

.summary-row > span {
    font-size: 12px;
}

.summary-row strong {
    font-size: 13px;
}

.summary-total span {
    font-size: 13px;
}

.summary-total strong {
    font-size: 26px;
}

.sale-warning {
    font-size: 12px;
}

.submit-sale-button {
    font-size: 14px;
}


/* Login */

.login-card h1 {
    font-size: 33px;
}

.login-card > p {
    font-size: 15px;
}

.login-card label {
    font-size: 13px;
}

.login-card input {
    font-size: 14px;
}


/* Mobile */
@media (max-width: 700px) {

    .menu-item {
        font-size: 13px;
    }

    .hero h2 {
        font-size: 32px;
    }

    .header h1 {
        font-size: 28px;
    }

}


/* =========================================
   CREDIT PAYMENT SCREEN
   ========================================= */

.payment-layout {
    display: grid;

    grid-template-columns:
        minmax(0, 1fr)
        330px;

    gap: 18px;

    align-items: start;
}


.payment-form-card,
.payment-summary-card {
    background: white;

    border:
        1px solid
        var(--border);

    border-radius: 16px;

    box-shadow: var(--shadow);
}


.payment-form-card {
    padding: 25px;
}


.payment-summary-card {
    padding: 23px;

    position: sticky;

    top: 25px;
}


.customer-debt-card {
    margin-top: 18px;

    display: grid;

    grid-template-columns:
        1fr
        1fr;

    gap: 1px;

    overflow: hidden;

    border:
        1px solid
        #dbe7f8;

    border-radius: 13px;

    background:
        #dbe7f8;
}


.customer-debt-card > div {
    min-height: 100px;

    padding: 18px;

    background:
        linear-gradient(
            135deg,
            #f3f7ff,
            #f9fbff
        );
}


.customer-debt-card span {
    display: block;

    margin-bottom: 10px;

    color: var(--secondary);

    font-size: 12px;
}


.customer-debt-card strong {
    display: block;

    font-size: 22px;

    letter-spacing: -.4px;
}


.payment-amount-field {
    margin-top: 25px;
}


.large-input input {
    height: 60px;

    font-size: 22px;

    font-weight: 650;
}


.large-input > span {
    font-size: 13px;
}


.payment-shortcuts {
    display: grid;

    grid-template-columns:
        repeat(4, 1fr);

    gap: 8px;

    margin-top: 10px;
}


.payment-shortcuts button {
    height: 39px;

    border:
        1px solid
        var(--border);

    border-radius: 9px;

    background: #f8faff;

    color: #536074;

    cursor: pointer;

    font-size: 12px;

    font-weight: 600;
}


.payment-shortcuts button:hover {
    border-color: #a9c5ef;

    background: var(--blue-soft);

    color: var(--blue);
}


.payment-after {
    margin-top: 20px;

    padding: 17px 16px;

    display: flex;

    flex-direction: column;

    gap: 7px;

    border-radius: 12px;

    background:
        linear-gradient(
            135deg,
            #eaf8f0,
            #f4fbf7
        );
}


.payment-after span {
    color: #587365;

    font-size: 12px;
}


.payment-after strong {
    color: #238353;

    font-size: 25px;

    letter-spacing: -.6px;
}


@media (max-width: 1000px) {

    .payment-layout {
        grid-template-columns: 1fr;
    }


    .payment-summary-card {
        position: static;
    }

}


@media (max-width: 620px) {

    .customer-debt-card {
        grid-template-columns: 1fr;
    }


    .payment-shortcuts {
        grid-template-columns:
            repeat(2, 1fr);
    }


    .payment-form-card,
    .payment-summary-card {
        padding: 18px;
    }

}


/* =========================================
   SEARCHABLE CUSTOMER PICKER
   ========================================= */

.customer-native-select {
    display: none !important;
}


.customer-picker {
    position: relative;

    width: 100%;
}


.customer-picker-button {
    width: 100%;
    height: 48px;

    padding:
        0
        13px;

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 15px;

    border:
        1px solid
        var(--border);

    border-radius: 10px;

    background: #f9fbfe;

    color: var(--text);

    cursor: pointer;

    text-align: left;

    font-size: 14px;

    transition:
        border-color .14s,
        background .14s,
        box-shadow .14s;
}


.customer-picker-button:hover {
    background: white;

    border-color: #bed2ef;
}


.customer-picker.open
.customer-picker-button {
    background: white;

    border-color: #84aff0;

    box-shadow:
        0 0 0 3px
        rgba(21,105,232,.07);
}


.customer-picker-button > span:first-child {
    min-width: 0;

    overflow: hidden;

    white-space: nowrap;

    text-overflow: ellipsis;
}


.customer-picker-arrow {
    flex: none;

    color: #7b8799;

    font-size: 14px;

    transition: transform .15s;
}


.customer-picker.open
.customer-picker-arrow {
    transform: rotate(180deg);
}


/* PANEL */

.customer-picker-panel {
    position: absolute;

    z-index: 200;

    top: calc(100% + 7px);
    left: 0;
    right: 0;

    overflow: hidden;

    border:
        1px solid
        #dce4ef;

    border-radius: 13px;

    background: white;

    box-shadow:
        0 18px 45px
        rgba(32, 53, 83, .16);
}


/* SEARCH */

.customer-search-box {
    height: 54px;

    display: flex;

    align-items: center;

    gap: 9px;

    padding:
        0
        13px;

    border-bottom:
        1px solid
        #edf0f4;

    background: #fbfcfe;
}


.customer-search-box svg {
    width: 18px;
    height: 18px;

    flex: none;

    fill: none;

    stroke: #8a95a6;

    stroke-width: 1.8;

    stroke-linecap: round;

    stroke-linejoin: round;
}


.customer-search-box input {
    width: 100%;
    height: 38px;

    padding: 0 !important;

    border: 0 !important;

    border-radius: 0 !important;

    background: transparent !important;

    box-shadow: none !important;

    outline: none;

    color: var(--text);

    font-size: 14px;
}


.customer-search-box input::placeholder {
    color: #9ba5b4;
}


/* LIST */

.customer-picker-list {
    max-height: 320px;

    overflow-y: auto;

    overscroll-behavior: contain;
}


.customer-picker-item {
    width: 100%;

    min-height: 62px;

    display: grid;

    grid-template-columns:
        minmax(0, 1fr)
        auto;

    align-items: center;

    gap: 15px;

    padding:
        10px
        13px;

    border-bottom:
        1px solid
        #f0f2f5;

    background: white;

    color: var(--text);

    cursor: pointer;

    text-align: left;
}


.customer-picker-item:last-child {
    border-bottom: 0;
}


.customer-picker-item:hover {
    background: #f5f8fd;
}


.customer-picker-item.selected {
    background: var(--blue-soft);
}


.customer-picker-name {
    display: block;

    overflow: hidden;

    white-space: nowrap;

    text-overflow: ellipsis;

    font-size: 14px;

    font-weight: 650;
}


.customer-picker-phone {
    display: block;

    margin-top: 4px;

    color: var(--secondary);

    font-size: 12px;
}


.customer-picker-debt {
    flex: none;

    padding:
        5px
        8px;

    border-radius: 7px;

    background:
        var(--orange-soft);

    color:
        #d9681d;

    font-size: 12px;

    font-weight: 700;
}


.customer-picker-empty {
    padding:
        24px
        15px;

    color: var(--secondary);

    text-align: center;

    font-size: 13px;
}


.customer-picker-count {
    padding:
        8px
        13px;

    border-top:
        1px solid
        #edf0f4;

    background: #fbfcfe;

    color: var(--secondary);

    font-size: 11px;
}


@media (max-width: 620px) {

    .customer-picker-panel {
        position: fixed;

        z-index: 500;

        top: 12%;
        left: 15px;
        right: 15px;

        max-height: 76vh;

        border-radius: 16px;
    }


    .customer-picker-list {
        max-height: 55vh;
    }

}


/* =========================================
   CUSTOMERS SCREEN
   ========================================= */

.customers-header {
    display: flex;

    justify-content: space-between;
    align-items: flex-end;

    gap: 24px;

    margin-bottom: 21px;
}


.customers-header h2 {
    margin: 0;

    font-size: 31px;

    letter-spacing: -.8px;
}


.customers-header p {
    margin: 6px 0 0;

    color: var(--secondary);

    font-size: 13px;
}


.customers-toolbar {
    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 16px;

    margin-bottom: 15px;
}


.customers-search {
    width: min(480px, 100%);
    height: 48px;

    display: flex;

    align-items: center;

    gap: 10px;

    padding: 0 14px;

    border:
        1px solid
        var(--border);

    border-radius: 11px;

    background: white;

    box-shadow:
        0 4px 12px
        rgba(35,55,86,.035);
}


.customers-search svg {
    width: 18px;
    height: 18px;

    flex: none;

    fill: none;

    stroke: #8b97a8;

    stroke-width: 1.8;

    stroke-linecap: round;
}


.customers-search input {
    width: 100%;
    height: 42px;

    border: 0;

    outline: none;

    background: transparent;

    color: var(--text);

    font-size: 14px;
}


.customers-search input::placeholder {
    color: #9ba5b4;
}


.customers-count {
    display: flex;

    align-items: baseline;

    gap: 5px;

    color: var(--secondary);
}


.customers-count strong {
    color: var(--text);

    font-size: 16px;
}


.customers-count span {
    font-size: 12px;
}


.customers-layout {
    display: grid;

    grid-template-columns:
        minmax(0,1fr)
        310px;

    gap: 17px;

    align-items: start;
}


.customers-list-card,
.customer-detail-card {
    border:
        1px solid
        var(--border);

    border-radius: 16px;

    background: white;

    box-shadow: var(--shadow);
}


.customers-list-card {
    overflow: hidden;
}


.customer-table-head {
    min-height: 47px;

    display: grid;

    grid-template-columns:
        minmax(180px, 1.6fr)
        minmax(130px, 1fr)
        minmax(110px, .8fr)
        30px;

    align-items: center;

    gap: 15px;

    padding:
        0
        17px;

    border-bottom:
        1px solid
        var(--border);

    background: #f8faff;

    color: var(--secondary);

    font-size: 11px;

    font-weight: 650;
}


.customer-list-row {
    width: 100%;

    min-height: 70px;

    display: grid;

    grid-template-columns:
        minmax(180px, 1.6fr)
        minmax(130px, 1fr)
        minmax(110px, .8fr)
        30px;

    align-items: center;

    gap: 15px;

    padding:
        10px
        17px;

    border-bottom:
        1px solid
        #eff2f6;

    background: white;

    color: var(--text);

    cursor: pointer;

    text-align: left;

    transition:
        background .12s;
}


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


.customer-list-row:hover {
    background: #f8faff;
}


.customer-list-row.selected {
    background: var(--blue-soft);
}


.customer-list-name {
    display: flex;

    align-items: center;

    gap: 11px;

    min-width: 0;
}


.customer-mini-avatar {
    width: 37px;
    height: 37px;

    flex: none;

    display: grid;

    place-items: center;

    border-radius: 50%;

    background:
        linear-gradient(
            145deg,
            #e6f0ff,
            #d7e7ff
        );

    color: var(--blue);

    font-size: 12px;

    font-weight: 700;
}


.customer-list-name strong {
    overflow: hidden;

    white-space: nowrap;

    text-overflow: ellipsis;

    font-size: 13px;
}


.customer-list-phone {
    color: var(--secondary);

    font-size: 12px;
}


.customer-list-debt {
    color: #313c4d;

    font-size: 13px;

    font-weight: 700;
}


.customer-list-debt.has-debt {
    color: #de7022;
}


.customer-list-arrow {
    color: #96a0b0;

    font-size: 20px;
}


.customers-empty {
    padding: 50px 20px;

    color: var(--secondary);

    text-align: center;

    font-size: 13px;
}


/* DETAIL */

.customer-detail-card {
    position: sticky;

    top: 25px;

    min-height: 300px;

    padding: 22px;
}


.customer-detail-empty {
    min-height: 255px;

    display: flex;

    flex-direction: column;

    align-items: center;
    justify-content: center;

    text-align: center;
}


.customer-detail-empty-icon {
    width: 55px;
    height: 55px;

    display: grid;

    place-items: center;

    margin-bottom: 15px;

    border-radius: 17px;

    background: var(--blue-soft);

    color: var(--blue);
}


.customer-detail-empty-icon svg {
    width: 25px;
    height: 25px;

    fill: none;

    stroke: currentColor;

    stroke-width: 1.7;

    stroke-linecap: round;
}


.customer-detail-empty strong {
    font-size: 14px;
}


.customer-detail-empty span {
    max-width: 200px;

    margin-top: 7px;

    color: var(--secondary);

    font-size: 11px;

    line-height: 1.5;
}


.customer-detail-top {
    display: flex;

    align-items: center;

    gap: 13px;

    padding-bottom: 20px;

    border-bottom:
        1px solid
        var(--border);
}


.customer-detail-avatar {
    width: 48px;
    height: 48px;

    flex: none;

    display: grid;

    place-items: center;

    border-radius: 50%;

    background:
        linear-gradient(
            145deg,
            #3988fa,
            #1767df
        );

    color: white;

    font-size: 15px;

    font-weight: 700;
}


.customer-detail-top h3 {
    margin: 0;

    font-size: 16px;
}


.customer-detail-top span {
    display: block;

    margin-top: 4px;

    color: var(--secondary);

    font-size: 12px;
}


.customer-detail-debt {
    margin-top: 20px;

    padding: 17px;

    border-radius: 12px;

    background:
        linear-gradient(
            135deg,
            #fff5ed,
            #fffaf6
        );
}


.customer-detail-debt span {
    display: block;

    color: #9b714e;

    font-size: 11px;
}


.customer-detail-debt strong {
    display: block;

    margin-top: 7px;

    color: #dd6e20;

    font-size: 25px;

    letter-spacing: -.5px;
}


.customer-detail-actions {
    margin-top: 17px;
}


.customer-action-primary {
    width: 100%;
    height: 45px;

    border-radius: 10px;

    background: var(--blue);

    color: white;

    cursor: pointer;

    font-size: 13px;

    font-weight: 650;
}


/* MODAL */

.modal-backdrop {
    position: fixed;

    inset: 0;

    z-index: 1000;

    display: grid;

    place-items: center;

    padding: 20px;

    background:
        rgba(22,32,51,.36);

    backdrop-filter: blur(4px);
}


.modal-card {
    width: min(460px, 100%);

    padding: 24px;

    border-radius: 17px;

    background: white;

    box-shadow:
        0 25px 70px
        rgba(20,39,71,.24);
}


.modal-head {
    display: flex;

    align-items: flex-start;
    justify-content: space-between;

    gap: 15px;

    margin-bottom: 23px;
}


.modal-head h3 {
    margin: 0;

    font-size: 19px;
}


.modal-head p {
    margin: 5px 0 0;

    color: var(--secondary);

    font-size: 12px;
}


.modal-close {
    width: 34px;
    height: 34px;

    border-radius: 50%;

    background: #f2f4f8;

    color: #697487;

    cursor: pointer;

    font-size: 20px;
}


.modal-field {
    margin-top: 17px;
}


.modal-actions {
    display: flex;

    justify-content: flex-end;

    gap: 9px;

    margin-top: 22px;
}


.secondary-button {
    height: 46px;

    padding: 0 17px;

    border:
        1px solid
        var(--border);

    border-radius: 10px;

    background: white;

    color: #596578;

    cursor: pointer;

    font-size: 13px;

    font-weight: 600;
}


@media (max-width: 1000px) {

    .customers-layout {
        grid-template-columns: 1fr;
    }


    .customer-detail-card {
        position: static;
    }

}


@media (max-width: 700px) {

    .customers-header {
        align-items: flex-start;
    }


    .customers-toolbar {
        align-items: stretch;

        flex-direction: column;
    }


    .customers-search {
        width: 100%;
    }


    .customer-table-head {
        display: none;
    }


    .customer-list-row {
        grid-template-columns:
            1fr
            auto;

        gap: 10px;
    }


    .customer-list-phone {
        grid-column: 1;

        padding-left: 48px;
    }


    .customer-list-debt {
        grid-column: 2;

        grid-row:
            1 / span 2;
    }


    .customer-list-arrow {
        display: none;
    }

}


/* =========================================
   CUSTOMER PAYMENT HISTORY
   ========================================= */

.customers-layout {
    grid-template-columns:
        minmax(0, 1fr)
        360px;
}


.customer-payment-history {
    margin-top: 22px;

    padding-top: 19px;

    border-top:
        1px solid
        var(--border);
}


.customer-payment-history-head {
    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 10px;

    margin-bottom: 12px;
}


.customer-payment-history-head strong {
    font-size: 14px;

    font-weight: 700;

    color: var(--text);
}


.customer-payment-history-head span {
    color: var(--secondary);

    font-size: 11px;
}


.customer-payment-history-list {
    max-height: 330px;

    overflow-y: auto;

    padding-right: 3px;
}


.customer-payment-history-row {
    padding:
        13px
        2px;

    border-bottom:
        1px solid
        #eef1f5;
}


.customer-payment-history-row:last-child {
    border-bottom: 0;
}


.customer-payment-history-row-top {
    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 12px;
}


.customer-payment-date {
    color: var(--secondary);

    font-size: 12px;
}


.customer-payment-amount {
    flex: none;

    color: #1d7a4c;

    font-size: 14px;

    font-weight: 750;
}


.customer-payment-user {
    margin-top: 5px;

    color: #344054;

    font-size: 12px;

    font-weight: 650;
}


.customer-payment-notes {
    margin-top: 5px;

    padding:
        7px
        9px;

    border-radius: 8px;

    background: #f6f8fb;

    color: var(--secondary);

    font-size: 11px;

    line-height: 1.45;
}


.customer-payment-history-empty {
    padding:
        22px
        10px;

    color: var(--secondary);

    text-align: center;

    font-size: 12px;
}


@media (max-width: 1000px) {

    .customers-layout {
        grid-template-columns: 1fr;
    }

}


/* =========================================
   CUSTOMER HISTORY TABS
   ========================================= */

.customer-history {
    margin-top: 22px;

    padding-top: 19px;

    border-top:
        1px solid
        var(--border);
}


.customer-history-tabs {
    display: grid;

    grid-template-columns:
        1fr
        1fr;

    gap: 6px;

    margin-bottom: 14px;

    padding: 4px;

    border-radius: 10px;

    background: #f2f5f9;
}


.customer-history-tab {
    min-height: 39px;

    display: flex;

    align-items: center;
    justify-content: center;

    gap: 7px;

    border-radius: 8px;

    background: transparent;

    color: #687588;

    cursor: pointer;

    font-size: 12px;

    font-weight: 650;
}


.customer-history-tab span {
    min-width: 20px;
    height: 20px;

    display: inline-grid;

    place-items: center;

    padding: 0 5px;

    border-radius: 10px;

    background: rgba(0,0,0,.05);

    font-size: 10px;
}


.customer-history-tab.active {
    background: white;

    color: var(--blue);

    box-shadow:
        0 2px 7px
        rgba(35,55,86,.08);
}


.customer-history-tab.active span {
    background: var(--blue-soft);
}


.customer-history-list {
    max-height: 390px;

    overflow-y: auto;

    padding-right: 4px;
}


.customer-history-empty {
    padding:
        25px
        10px;

    color: var(--secondary);

    text-align: center;

    font-size: 12px;
}


.customer-sale-history-row {
    padding:
        14px
        2px;

    border-bottom:
        1px solid
        #edf0f4;
}


.customer-sale-history-row:last-child {
    border-bottom: 0;
}


.customer-history-row-top {
    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 12px;
}


.customer-history-date {
    color: var(--secondary);

    font-size: 12px;
}


.customer-sale-amount {
    flex: none;

    color: #253247;

    font-size: 15px;

    font-weight: 750;
}


.customer-sale-item {
    margin-top: 7px;

    color: #303c50;

    font-size: 12px;

    font-weight: 650;

    line-height: 1.45;
}


.customer-sale-meta {
    margin-top: 5px;

    color: var(--secondary);

    font-size: 11px;

    line-height: 1.5;
}


.customer-history-notes {
    margin-top: 7px;

    padding:
        7px
        9px;

    border-radius: 8px;

    background: #f6f8fb;

    color: var(--secondary);

    font-size: 11px;

    line-height: 1.45;
}


.customer-sale-cancelled {
    margin-top: 9px;

    padding:
        8px
        9px;

    border:
        1px solid
        #f1caca;

    border-radius: 8px;

    background: #fff5f5;
}


.customer-sale-cancelled strong {
    display: block;

    color: #c94b42;

    font-size: 11px;

    text-transform: uppercase;

    letter-spacing: .3px;
}


.customer-sale-cancelled span {
    display: block;

    margin-top: 4px;

    color: #95625e;

    font-size: 11px;
}


.customer-sale-history-row.cancelled
.customer-sale-amount {
    color: #9b6d68;

    text-decoration: line-through;
}


/* Existing payment history adapt */

.customer-payment-history {
    margin-top: 0;

    padding-top: 0;

    border-top: 0;
}


.customer-payment-history-list {
    max-height: 390px;
}


.customer-payment-history-head {
    display: none;
}


@media (max-width: 1000px) {

    .customer-history-list,
    .customer-payment-history-list {
        max-height: 500px;
    }

}


/* =========================================
   STOCK SCREEN
   ========================================= */

.stock-page-header {
    display: flex;

    align-items: flex-end;
    justify-content: space-between;

    gap: 20px;

    margin-bottom: 20px;
}


.stock-page-header h2 {
    margin: 0;

    font-size: 31px;

    letter-spacing: -.8px;
}


.stock-page-header p {
    margin: 6px 0 0;

    color: var(--secondary);

    font-size: 13px;
}


/* KPI */

.stock-kpis {
    display: grid;

    grid-template-columns:
        repeat(3, minmax(0, 1fr));

    gap: 13px;

    margin-bottom: 17px;
}


.stock-kpi-card {
    min-height: 112px;

    display: flex;

    flex-direction: column;

    justify-content: space-between;

    padding: 19px;

    border:
        1px solid
        var(--border);

    border-radius: 15px;

    background: white;

    box-shadow: var(--shadow);
}


.stock-kpi-card span {
    color: var(--secondary);

    font-size: 12px;
}


.stock-kpi-card strong {
    margin-top: 12px;

    color: var(--text);

    font-size: 27px;

    letter-spacing: -.6px;
}


/* TOOLBAR */

.stock-toolbar {
    display: grid;

    grid-template-columns:
        minmax(0, 1fr)
        230px;

    gap: 12px;

    margin-bottom: 14px;
}


.stock-search {
    height: 48px;

    display: flex;

    align-items: center;

    gap: 10px;

    padding:
        0
        14px;

    border:
        1px solid
        var(--border);

    border-radius: 11px;

    background: white;

    box-shadow:
        0 4px 12px
        rgba(35,55,86,.035);
}


.stock-search svg {
    width: 18px;
    height: 18px;

    flex: none;

    fill: none;

    stroke: #8b97a8;

    stroke-width: 1.8;

    stroke-linecap: round;
}


.stock-search input {
    width: 100%;
    height: 42px;

    border: 0;

    outline: none;

    background: transparent;

    color: var(--text);

    font-size: 14px;
}


.stock-search input::placeholder {
    color: #9ba5b4;
}


.stock-filter {
    display: flex;

    align-items: center;

    gap: 9px;

    padding:
        0
        11px;

    border:
        1px solid
        var(--border);

    border-radius: 11px;

    background: white;
}


.stock-filter label {
    color: var(--secondary);

    font-size: 11px;

    white-space: nowrap;
}


.stock-filter select {
    width: 100%;
    height: 44px;

    border: 0;

    outline: none;

    background: transparent;

    color: var(--text);

    font-size: 13px;
}


/* TABLE */

.stock-table-card {
    overflow: hidden;

    border:
        1px solid
        var(--border);

    border-radius: 16px;

    background: white;

    box-shadow: var(--shadow);
}


.stock-table-head,
.stock-table-row {
    display: grid;

    grid-template-columns:
        minmax(170px, 1.2fr)
        minmax(180px, 1.4fr)
        minmax(130px, .9fr)
        minmax(130px, .8fr);

    align-items: center;

    gap: 15px;
}


.stock-table-head {
    min-height: 48px;

    padding:
        0
        18px;

    border-bottom:
        1px solid
        var(--border);

    background: #f8faff;

    color: var(--secondary);

    font-size: 11px;

    font-weight: 650;
}


.stock-table-row {
    min-height: 68px;

    padding:
        10px
        18px;

    border-bottom:
        1px solid
        #eff2f6;
}


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


.stock-table-row:hover {
    background: #f9fbfe;
}


.stock-warehouse-name {
    color: #465267;

    font-size: 13px;

    font-weight: 600;
}


.stock-product-name {
    display: flex;

    align-items: center;

    gap: 11px;

    min-width: 0;
}


.stock-product-icon {
    width: 37px;
    height: 37px;

    flex: none;

    display: grid;

    place-items: center;

    border-radius: 11px;

    background: var(--blue-soft);

    color: var(--blue);

    font-size: 12px;

    font-weight: 750;
}


.stock-product-name strong {
    overflow: hidden;

    white-space: nowrap;

    text-overflow: ellipsis;

    font-size: 13px;
}


.stock-reference-price {
    color: var(--secondary);

    font-size: 13px;
}


.stock-balance {
    color: #247c50;

    font-size: 15px;

    font-weight: 750;
}


.stock-balance.low {
    color: #dd762a;
}


.stock-balance.zero {
    color: #a0a8b4;
}


.stock-empty {
    padding:
        50px
        20px;

    color: var(--secondary);

    text-align: center;

    font-size: 13px;
}


@media (max-width: 850px) {

    .stock-kpis {
        grid-template-columns: 1fr;
    }


    .stock-toolbar {
        grid-template-columns: 1fr;
    }


    .stock-table-head {
        display: none;
    }


    .stock-table-row {
        grid-template-columns:
            1fr
            auto;
    }


    .stock-product-name {
        grid-column: 1;
        grid-row: 1;
    }


    .stock-balance {
        grid-column: 2;
        grid-row: 1;
    }


    .stock-warehouse-name {
        grid-column: 1;
        grid-row: 2;

        padding-left: 48px;

        font-size: 11px;
    }


    .stock-reference-price {
        grid-column: 2;
        grid-row: 2;

        font-size: 11px;
    }

}


/* =========================================
   STOCK HISTORY
   ========================================= */

.stock-view-tabs {
    width: fit-content;

    display: flex;

    gap: 5px;

    margin-bottom: 13px;

    padding: 4px;

    border-radius: 11px;

    background: #e9eef6;
}


.stock-view-tab {
    min-width: 130px;
    height: 38px;

    padding: 0 15px;

    border: 0;
    border-radius: 8px;

    background: transparent;

    color: #687588;

    cursor: pointer;

    font-size: 12px;

    font-weight: 650;
}


.stock-view-tab.active {
    background: white;

    color: var(--blue);

    box-shadow:
        0 2px 8px
        rgba(35,55,86,.08);
}


.stock-history-card {
    overflow: hidden;

    border:
        1px solid
        var(--border);

    border-radius: 16px;

    background: white;

    box-shadow: var(--shadow);
}


.stock-history-head,
.stock-history-row {
    display: grid;

    grid-template-columns:
        minmax(145px, 1fr)
        minmax(145px, 1fr)
        minmax(140px, 1fr)
        minmax(110px, .7fr)
        minmax(145px, 1fr);

    align-items: center;

    gap: 14px;
}


.stock-history-head {
    min-height: 48px;

    padding: 0 18px;

    border-bottom:
        1px solid
        var(--border);

    background: #f8faff;

    color: var(--secondary);

    font-size: 11px;

    font-weight: 650;
}


.stock-history-row {
    min-height: 68px;

    padding:
        11px
        18px;

    border-bottom:
        1px solid
        #eff2f6;
}


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


.stock-history-date {
    color: var(--secondary);

    font-size: 12px;
}


.stock-history-type {
    display: flex;

    flex-direction: column;

    gap: 4px;
}


.stock-history-type strong {
    font-size: 12px;

    font-weight: 700;
}


.stock-history-type span {
    color: var(--secondary);

    font-size: 10px;
}


.stock-history-product {
    color: var(--text);

    font-size: 13px;

    font-weight: 650;
}


.stock-history-qty {
    font-size: 14px;

    font-weight: 750;
}


.stock-history-qty.in {
    color: #218454;
}


.stock-history-qty.out {
    color: #d4584c;
}


.stock-history-user {
    color: #465267;

    font-size: 12px;

    font-weight: 600;
}


.stock-history-badge {
    width: fit-content;

    padding:
        5px
        8px;

    border-radius: 7px;

    font-size: 10px;

    font-weight: 700;
}


.stock-history-badge.purchase,
.stock-history-badge.transfer_in,
.stock-history-badge.return_in,
.stock-history-badge.adjustment_in {
    background: #edf8f2;

    color: #247c50;
}


.stock-history-badge.sale,
.stock-history-badge.transfer_out,
.stock-history-badge.return_out,
.stock-history-badge.adjustment_out {
    background: #fff1ef;

    color: #c9574c;
}


@media (max-width: 900px) {

    .stock-history-head {
        display: none;
    }


    .stock-history-row {
        grid-template-columns:
            1fr
            auto;
    }


    .stock-history-date {
        grid-column: 1;
    }


    .stock-history-qty {
        grid-column: 2;
        grid-row: 1;
    }


    .stock-history-type,
    .stock-history-product,
    .stock-history-user {
        grid-column:
            1 / span 2;
    }

}


/* =========================================
   PRODUCTS SCREEN
   ========================================= */

.products-page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;

    gap: 20px;

    margin-bottom: 20px;
}

.products-page-header h2 {
    margin: 0;

    font-size: 31px;
    letter-spacing: -.8px;
}

.products-page-header p {
    margin: 6px 0 0;

    color: var(--secondary);
    font-size: 13px;
}


.products-kpis {
    display: grid;

    grid-template-columns:
        repeat(3, minmax(0,1fr));

    gap: 13px;

    margin-bottom: 17px;
}

.products-kpi-card {
    min-height: 110px;

    display: flex;
    flex-direction: column;
    justify-content: space-between;

    padding: 19px;

    border: 1px solid var(--border);
    border-radius: 15px;

    background: white;

    box-shadow: var(--shadow);
}

.products-kpi-card span {
    color: var(--secondary);
    font-size: 12px;
}

.products-kpi-card strong {
    margin-top: 12px;

    font-size: 26px;
    letter-spacing: -.5px;
}


.products-toolbar {
    margin-bottom: 14px;
}

.products-search {
    width: min(520px,100%);
    height: 48px;

    display: flex;
    align-items: center;

    gap: 10px;

    padding: 0 14px;

    border: 1px solid var(--border);
    border-radius: 11px;

    background: white;
}

.products-search svg {
    width: 18px;
    height: 18px;

    fill: none;

    stroke: #8b97a8;
    stroke-width: 1.8;
}

.products-search input {
    width: 100%;
    height: 42px;

    border: 0;
    outline: none;

    background: transparent;

    font-size: 14px;
}


.products-table-card {
    overflow: hidden;

    border: 1px solid var(--border);
    border-radius: 16px;

    background: white;

    box-shadow: var(--shadow);
}


.products-table-head,
.products-table-row {
    display: grid;

    grid-template-columns:
        minmax(170px,1.2fr)
        minmax(180px,1.3fr)
        minmax(120px,.9fr)
        minmax(140px,.9fr)
        minmax(100px,.7fr)
        42px;

    align-items: center;

    gap: 14px;
}

.products-table-head {
    min-height: 48px;

    padding: 0 18px;

    border-bottom: 1px solid var(--border);

    background: #f8faff;

    color: var(--secondary);

    font-size: 11px;
    font-weight: 650;
}

.products-table-row {
    min-height: 68px;

    padding: 10px 18px;

    border-bottom: 1px solid #eff2f6;
}

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

.products-table-row:hover {
    background: #f9fbfe;
}


.products-name {
    font-size: 13px;
    font-weight: 700;
}

.products-size,
.products-grade {
    color: #4d596b;

    font-size: 12px;
}

.products-price {
    font-size: 14px;
    font-weight: 750;
}


.products-status {
    width: fit-content;

    padding: 5px 8px;

    border-radius: 8px;

    font-size: 10px;
    font-weight: 700;
}

.products-status.active {
    background: #edf8f2;

    color: #247c50;
}

.products-status.inactive {
    background: #f3f4f6;

    color: #8a94a3;
}


.products-action {
    width: 34px;
    height: 34px;

    display: grid;
    place-items: center;

    border-radius: 9px;

    background: #f3f6fa;

    color: #506079;

    cursor: pointer;

    font-size: 18px;
}

.products-action:hover {
    background: var(--blue-soft);

    color: var(--blue);
}


.products-empty {
    padding: 50px 20px;

    color: var(--secondary);

    text-align: center;

    font-size: 13px;
}


@media (max-width: 850px) {

    .products-kpis {
        grid-template-columns: 1fr;
    }

    .products-table-head {
        display: none;
    }

    .products-table-row {
        grid-template-columns:
            1fr
            auto;
    }

    .products-name,
    .products-size,
    .products-grade {
        grid-column: 1;
    }

    .products-price,
    .products-status,
    .products-action {
        grid-column: 2;
    }

}


/* =========================================
   WAREHOUSES SCREEN
   ========================================= */

.warehouses-page-header {
    display: flex;

    align-items: flex-end;
    justify-content: space-between;

    gap: 20px;

    margin-bottom: 20px;
}


.warehouses-page-header h2 {
    margin: 0;

    font-size: 31px;

    letter-spacing: -.8px;
}


.warehouses-page-header p {
    margin: 6px 0 0;

    color: var(--secondary);

    font-size: 13px;
}


.warehouses-kpis {
    display: grid;

    grid-template-columns:
        repeat(3, minmax(0, 1fr));

    gap: 13px;

    margin-bottom: 17px;
}


.warehouses-kpi-card {
    min-height: 110px;

    display: flex;
    flex-direction: column;
    justify-content: space-between;

    padding: 19px;

    border:
        1px solid
        var(--border);

    border-radius: 15px;

    background: white;

    box-shadow: var(--shadow);
}


.warehouses-kpi-card span {
    color: var(--secondary);

    font-size: 12px;
}


.warehouses-kpi-card strong {
    margin-top: 12px;

    font-size: 26px;

    letter-spacing: -.5px;
}


.warehouses-table-card {
    overflow: hidden;

    border:
        1px solid
        var(--border);

    border-radius: 16px;

    background: white;

    box-shadow: var(--shadow);
}


.warehouses-table-head,
.warehouses-table-row {
    display: grid;

    grid-template-columns:
        minmax(190px, 1.4fr)
        minmax(150px, 1fr)
        minmax(130px, .8fr)
        minmax(100px, .7fr)
        44px;

    align-items: center;

    gap: 14px;
}


.warehouses-table-head {
    min-height: 48px;

    padding:
        0
        18px;

    border-bottom:
        1px solid
        var(--border);

    background: #f8faff;

    color: var(--secondary);

    font-size: 11px;

    font-weight: 650;
}


.warehouses-table-row {
    min-height: 68px;

    padding:
        10px
        18px;

    border-bottom:
        1px solid
        #eff2f6;
}


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


.warehouses-table-row:hover {
    background: #f9fbfe;
}


.warehouse-name {
    font-size: 13px;

    font-weight: 700;
}


.warehouse-location {
    color: #556174;

    font-size: 12px;
}


.warehouse-stock {
    color: #247c50;

    font-size: 14px;

    font-weight: 750;
}


.warehouse-status {
    width: fit-content;

    padding:
        5px
        8px;

    border-radius: 8px;

    font-size: 10px;

    font-weight: 700;
}


.warehouse-status.active {
    background: #edf8f2;

    color: #247c50;
}


.warehouse-status.inactive {
    background: #f3f4f6;

    color: #8a94a3;
}


.warehouse-action {
    width: 34px;
    height: 34px;

    display: grid;

    place-items: center;

    border-radius: 9px;

    background: #f3f6fa;

    color: #506079;

    cursor: pointer;

    font-size: 18px;
}


.warehouse-action:hover {
    background: var(--blue-soft);

    color: var(--blue);
}


.warehouses-empty {
    padding:
        50px
        20px;

    color: var(--secondary);

    text-align: center;

    font-size: 13px;
}


@media (max-width: 850px) {

    .warehouses-page-header {
        align-items: flex-start;

        flex-direction: column;
    }


    .warehouses-kpis {
        grid-template-columns: 1fr;
    }


    .warehouses-table-head {
        display: none;
    }


    .warehouses-table-row {
        grid-template-columns:
            1fr
            auto;
    }


    .warehouse-name,
    .warehouse-location,
    .warehouse-stock {
        grid-column: 1;
    }


    .warehouse-status,
    .warehouse-action {
        grid-column: 2;
    }

}


/* =========================================
   WAREHOUSE INLINE MESSAGE
   ========================================= */

.warehouses-message {
    margin-bottom: 14px;

    padding:
        13px
        15px;

    border-radius: 11px;

    font-size: 12px;

    font-weight: 600;

    line-height: 1.5;
}


.warehouses-message.error {
    border:
        1px solid
        #f0c9c5;

    background:
        #fff4f3;

    color:
        #b84e45;
}


.warehouses-message.success {
    border:
        1px solid
        #c8e8d6;

    background:
        #f0faf4;

    color:
        #247c50;
}


/* =========================================
   WAREHOUSE TRANSFER
   ========================================= */

.warehouses-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}


.warehouse-transfer-modal {
    width: min(620px, calc(100vw - 30px));
}


.warehouse-transfer-grid {
    display: grid;

    grid-template-columns:
        minmax(0, 1fr)
        34px
        minmax(0, 1fr);

    gap: 10px;

    align-items: end;
}


.transfer-arrow {
    display: grid;
    place-items: center;

    height: 43px;

    color: var(--blue);

    font-size: 22px;
    font-weight: 700;
}


.transfer-stock-info {
    margin-top: 12px;

    padding: 12px 14px;

    border: 1px solid #dce5f0;

    border-radius: 10px;

    background: #f7faff;

    color: #64748b;

    font-size: 12px;
}


.transfer-stock-info strong {
    margin-left: 4px;

    color: #247c50;

    font-size: 14px;
}


.warehouse-transfer-modal textarea {
    width: 100%;

    resize: vertical;

    min-height: 75px;

    box-sizing: border-box;
}


@media (max-width: 700px) {

    .warehouses-header-actions {
        width: 100%;

        flex-direction: column;
        align-items: stretch;
    }


    .warehouse-transfer-grid {
        grid-template-columns: 1fr;
    }


    .transfer-arrow {
        height: auto;

        transform: rotate(90deg);
    }

}


/* =========================================
   REPORTS SCREEN
   ========================================= */

.reports-page-header {
    display: flex;

    justify-content: space-between;
    align-items: flex-start;

    margin-bottom: 18px;
}


.reports-page-header h2 {
    margin: 0 0 5px;

    font-size: 21px;
}


.reports-page-header p {
    margin: 0;

    color: var(--secondary);

    font-size: 12px;
}


.reports-filter-card {
    padding: 18px;

    margin-bottom: 16px;

    border: 1px solid #e7ebf1;

    border-radius: 14px;

    background: #fff;
}


.reports-quick-periods {
    display: flex;

    gap: 8px;

    margin-bottom: 16px;
}


.report-period-btn {
    padding: 8px 14px;

    border: 1px solid #dce3ec;

    border-radius: 9px;

    background: #fff;

    color: #536176;

    cursor: pointer;

    font-size: 12px;

    font-weight: 650;
}


.report-period-btn:hover {
    border-color: var(--blue);

    color: var(--blue);
}


.report-period-btn.active {
    border-color: var(--blue);

    background: var(--blue-soft);

    color: var(--blue);
}


.reports-filter-grid {
    display: grid;

    grid-template-columns:
        repeat(3, minmax(150px, 1fr))
        auto;

    gap: 12px;

    align-items: end;
}


.reports-filter-action {
    display: flex;

    align-items: end;
}


.reports-filter-action button {
    min-height: 42px;

    white-space: nowrap;
}


.reports-summary-head {
    display: flex;

    justify-content: space-between;
    align-items: center;

    margin:
        18px
        0
        12px;
}


.reports-summary-head > div {
    display: flex;

    flex-direction: column;

    gap: 3px;
}


.reports-summary-head strong {
    font-size: 15px;
}


.reports-summary-head span {
    color: var(--secondary);

    font-size: 11px;
}


.reports-kpi-grid {
    display: grid;

    grid-template-columns:
        repeat(4, minmax(0, 1fr));

    gap: 12px;
}


.report-kpi-card {
    min-height: 120px;

    padding: 16px;

    display: flex;

    flex-direction: column;

    border: 1px solid #e7ebf1;

    border-radius: 14px;

    background: #fff;
}


.report-kpi-card > span {
    margin-bottom: 10px;

    color: #697588;

    font-size: 11px;

    font-weight: 650;
}


.report-kpi-card > strong {
    margin-bottom: 7px;

    color: #172033;

    font-size: 20px;

    font-weight: 750;
}


.report-kpi-card > small {
    margin-top: auto;

    color: #8a94a3;

    font-size: 10px;

    line-height: 1.4;
}


.report-kpi-card.primary {
    border-color: #cdddf8;

    background: #f7faff;
}


.report-kpi-card.primary > strong {
    color: var(--blue);
}


.report-kpi-card.cash {
    background: #f5fbf7;
}


.report-kpi-card.cash > strong {
    color: #247c50;
}


.report-kpi-card.card {
    background: #f8f7ff;
}


.report-kpi-card.credit {
    background: #fffaf3;
}


.report-kpi-card.credit > strong {
    color: #b27320;
}


.report-kpi-card.expected {
    border-color: #c7e6d4;

    background: #eff9f3;
}


.report-kpi-card.expected > strong {
    color: #247c50;
}


.report-low-price-card {
    margin-top: 12px;

    padding: 16px 18px;

    display: flex;

    justify-content: space-between;
    align-items: center;

    gap: 20px;

    border: 1px solid #f1d8b8;

    border-radius: 14px;

    background: #fffaf3;
}


.report-low-price-card span {
    color: #8a5a18;

    font-size: 12px;

    font-weight: 700;
}


.report-low-price-card p {
    margin:
        4px
        0
        0;

    color: #9a8264;

    font-size: 10px;
}


.report-low-price-card > strong {
    min-width: 45px;

    color: #b27320;

    font-size: 24px;

    text-align: right;
}


@media (max-width: 1100px) {

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


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

}


@media (max-width: 650px) {

    .reports-kpi-grid {
        grid-template-columns: 1fr;
    }


    .reports-filter-grid {
        grid-template-columns: 1fr;
    }


    .reports-quick-periods {
        width: 100%;
    }


    .report-period-btn {
        flex: 1;
    }


    .reports-filter-action button {
        width: 100%;
    }

}


/* =========================================
   REPORT SALES DETAIL
   ========================================= */

.report-sales-detail-card {
    margin-top: 16px;

    border: 1px solid #e7ebf1;

    border-radius: 14px;

    background: #fff;

    overflow: hidden;
}


.report-sales-detail-head {
    padding: 16px 18px;

    display: flex;

    justify-content: space-between;
    align-items: center;

    gap: 15px;

    border-bottom: 1px solid #edf0f4;
}


.report-sales-detail-head h3 {
    margin: 0 0 4px;

    font-size: 15px;
}


.report-sales-detail-head p {
    margin: 0;

    color: #8993a2;

    font-size: 10px;
}


.report-sales-detail-legend {
    display: flex;

    gap: 8px;

    flex-wrap: wrap;
}


.report-sales-detail-legend span {
    padding: 5px 8px;

    border-radius: 20px;

    font-size: 9px;

    font-weight: 700;
}


.report-legend-low {
    background: #fff0e8;

    color: #c45b25;
}


.report-legend-cancelled {
    background: #f2f3f5;

    color: #777f8c;
}


.report-sales-table {
    overflow-x: auto;
}


.report-sales-row {
    min-width: 1540px;

    display: grid;

    grid-template-columns:
        125px
        65px
        120px
        135px
        90px
        80px
        105px
        95px
        90px
        105px
        105px
        90px
        100px
        90px;

    align-items: center;

    border-bottom: 1px solid #edf0f4;
}


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


.report-sales-row > div {
    padding: 12px 10px;

    font-size: 10px;
}


.report-sales-header {
    background: #f8fafc;

    color: #738095;

    font-weight: 700;
}


.report-sales-data-row {
    transition: background .15s ease;
}


.report-sales-data-row:hover {
    background: #fafcff;
}


.report-sales-data-row.low-price {
    background: #fff8f3;
}


.report-sales-data-row.low-price:hover {
    background: #fff3e9;
}


.report-sales-data-row.cancelled {
    opacity: .58;

    background: #f6f7f8;
}


.report-sales-data-row.cancelled > div {
    text-decoration: line-through;
}


.report-sale-id {
    color: var(--blue);

    font-weight: 700;
}


.report-product-name {
    font-weight: 700;
}


.report-price {
    font-weight: 650;
}


.report-reference-price {
    color: #697588;
}


.report-fifo-cost {
    color: #697588;
    font-weight: 650;
}


.report-gross-profit {
    font-weight: 750;
}


.report-gross-profit.positive {
    color: #247c50;
}


.report-gross-profit.negative {
    color: #c94b42;
}


.report-gross-profit.zero {
    color: #697588;
}


.report-gross-margin {
    font-weight: 700;
}


.report-gross-margin.positive {
    color: #247c50;
}


.report-gross-margin.negative {
    color: #c94b42;
}


.report-gross-margin.zero {
    color: #697588;
}


/* KPI profit values */
.report-kpi-card.profit-positive > strong {
    color: #247c50;
}


.report-kpi-card.profit-negative > strong {
    color: #c94b42;
}


.report-kpi-card.profit-zero > strong {
    color: #697588;
}


.report-price-difference.negative {
    color: #c94b42;

    font-weight: 750;
}


.report-price-difference.positive {
    color: #247c50;

    font-weight: 700;
}


.report-low-badge {
    display: inline-block;

    margin-top: 3px;

    padding: 3px 6px;

    border-radius: 5px;

    background: #ffe7da;

    color: #bd5220;

    font-size: 8px;

    font-weight: 750;
}


.report-payment-badge {
    display: inline-block;

    padding: 5px 7px;

    border-radius: 6px;

    background: #f2f5f9;

    font-size: 9px;

    font-weight: 700;
}


.report-sales-empty {
    padding: 28px 18px;

    color: #8993a2;

    text-align: center;

    font-size: 11px;
}


@media (max-width: 700px) {

    .report-sales-detail-head {
        align-items: flex-start;

        flex-direction: column;
    }

}


/* =========================================
   REPORT DETAIL TABS
   ========================================= */

.report-detail-tabs {
    width: fit-content;

    display: flex;

    gap: 5px;

    margin-top: 18px;
    margin-bottom: 10px;

    padding: 4px;

    border-radius: 10px;

    background: #e9eef6;
}


.report-detail-tab {
    min-width: 120px;
    height: 36px;

    padding: 0 14px;

    border: 0;
    border-radius: 7px;

    background: transparent;

    color: #687588;

    cursor: pointer;

    font-size: 11px;

    font-weight: 700;
}


.report-detail-tab.active {
    background: white;

    color: var(--blue);

    box-shadow:
        0 2px 7px
        rgba(35,55,86,.08);
}


/* =========================================
   REPORT PAYMENT DETAIL
   ========================================= */

.report-payment-table {
    overflow-x: auto;
}


.report-payment-row {
    min-width: 850px;

    display: grid;

    grid-template-columns:
        145px
        70px
        minmax(150px, 1fr)
        110px
        130px
        minmax(180px, 1.2fr);

    align-items: center;

    border-bottom:
        1px solid
        #edf0f4;
}


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


.report-payment-row > div {
    padding:
        12px
        10px;

    font-size: 10px;
}


.report-payment-data-row:hover {
    background: #fafcff;
}


.report-payment-id {
    color: var(--blue);

    font-weight: 700;
}


.report-payment-customer {
    font-weight: 700;
}


.report-payment-amount {
    color: #247c50;

    font-size: 12px !important;

    font-weight: 750;
}


.report-payment-note {
    color: #697588;

    line-height: 1.45;
}


/* =========================================
   REPORT STOCK MOVEMENTS
   ========================================= */

.report-stock-table {
    overflow-x: auto;
}


.report-stock-row {
    min-width: 920px;

    display: grid;

    grid-template-columns:
        145px
        120px
        145px
        100px
        100px
        130px
        minmax(180px, 1fr);

    align-items: center;

    border-bottom: 1px solid #edf0f4;
}


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


.report-stock-row > div {
    padding: 12px 10px;

    font-size: 10px;
}


.report-stock-data-row:hover {
    background: #fafcff;
}


.report-stock-type {
    width: fit-content;

    padding: 5px 7px;

    border-radius: 6px;

    font-size: 9px;

    font-weight: 750;
}


.report-stock-type.in {
    background: #edf8f2;

    color: #247c50;
}


.report-stock-type.out {
    background: #fff1ef;

    color: #c9574c;
}


.report-stock-qty {
    font-size: 12px !important;

    font-weight: 750;
}


.report-stock-qty.in {
    color: #247c50;
}


.report-stock-qty.out {
    color: #c9574c;
}


.report-stock-product {
    font-weight: 700;
}


.report-stock-note {
    color: #697588;

    line-height: 1.4;
}


/* =========================================================
   SELLER SETTLEMENTS
   ========================================================= */

.settlements-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.settlements-page-header h2 {
    margin: 0 0 6px;
    font-size: 28px;
}

.settlements-page-header p {
    margin: 0;
    color: #6b7280;
}

.settlements-filter-card,
.settlement-create-card,
.settlement-history-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 20px;
}

.settlements-quick-periods {
    display: flex;
    gap: 8px;
    margin-bottom: 18px;
}

.settlement-period-btn {
    border: 1px solid #d9dde5;
    background: #fff;
    border-radius: 9px;
    padding: 9px 15px;
    cursor: pointer;
    font-weight: 600;
}

.settlement-period-btn.active {
    background: #1f2937;
    border-color: #1f2937;
    color: #fff;
}

.settlements-filter-grid {
    display: grid;
    grid-template-columns:
        minmax(180px, 1.2fr)
        minmax(150px, 1fr)
        minmax(150px, 1fr)
        auto;
    gap: 16px;
    align-items: end;
}

.settlements-filter-action {
    display: flex;
    align-items: end;
}

.settlement-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.settlement-kpi-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 20px;
}

.settlement-kpi-card span {
    display: block;
    color: #6b7280;
    font-size: 13px;
    margin-bottom: 10px;
}

.settlement-kpi-card strong {
    display: block;
    font-size: 23px;
    margin-bottom: 7px;
}

.settlement-kpi-card small {
    color: #8a919e;
    line-height: 1.4;
}

.settlement-kpi-card.expected {
    border-color: #b8c7bc;
    background: #f7faf8;
}

.settlement-card-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
}

.settlement-card-head h3 {
    margin: 0 0 5px;
}

.settlement-card-head p {
    margin: 0;
    color: #7b8190;
    font-size: 13px;
}

.settlement-create-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    align-items: stretch;
}

.settlement-money-input {
    display: flex;
    align-items: center;
    border: 1px solid #d9dde5;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
}

.settlement-money-input input {
    border: 0 !important;
    outline: 0;
    flex: 1;
    min-width: 0;
}

.settlement-money-input span {
    padding: 0 14px;
    color: #6b7280;
    font-weight: 600;
}

.settlement-difference-box {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 14px 16px;
    background: #f9fafb;
}

.settlement-difference-box span,
.settlement-difference-box small {
    display: block;
}

.settlement-difference-box span {
    color: #6b7280;
    font-size: 13px;
}

.settlement-difference-box strong {
    display: block;
    margin: 5px 0;
    font-size: 22px;
}

.settlement-difference-box.negative strong {
    color: #b42318;
}

.settlement-difference-box.positive strong {
    color: #067647;
}

.settlement-note-field {
    margin-top: 18px;
}

.settlement-note-field textarea {
    width: 100%;
    resize: vertical;
    box-sizing: border-box;
}

.settlement-submit-row {
    display: flex;
    justify-content: flex-end;
    margin-top: 18px;
}

.settlement-history-table {
    overflow-x: auto;
}

.settlement-history-row {
    min-width: 950px;
    display: grid;
    grid-template-columns:
        1.5fr
        1.2fr
        1fr
        1fr
        1fr
        1.2fr
        1.3fr;
    gap: 12px;
    align-items: center;
    padding: 13px 12px;
    border-bottom: 1px solid #edf0f4;
}

.settlement-history-header {
    font-size: 12px;
    font-weight: 700;
    color: #6b7280;
    background: #f8f9fb;
}

.settlement-history-data {
    font-size: 13px;
}

.settlement-history-amount {
    font-weight: 700;
}

.settlement-history-difference.negative {
    color: #b42318;
    font-weight: 700;
}

.settlement-history-difference.positive {
    color: #067647;
    font-weight: 700;
}

.settlement-history-difference.zero {
    color: #475467;
    font-weight: 700;
}

.settlement-empty {
    padding: 30px;
    text-align: center;
    color: #8a919e;
}

@media (max-width: 1000px) {
    .settlement-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

@media (max-width: 650px) {
    .settlement-kpi-grid,
    .settlements-filter-grid,
    .settlement-create-grid {
        grid-template-columns: 1fr;
    }
}



/* Settlement V2 */
.settlement-kpi-grid {
    grid-template-columns:
        repeat(3, minmax(0, 1fr));
}

@media (max-width: 1100px) {
    .settlement-kpi-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 650px) {
    .settlement-kpi-grid {
        grid-template-columns: 1fr;
    }
}



/* Settlement clearer labels */

.settlement-due-amount {
    min-height: 46px;

    display: flex;
    align-items: center;

    padding: 0 14px;

    border: 1px solid #d9dde5;
    border-radius: 10px;

    background: #f8fafc;
}

.settlement-due-amount strong {
    font-size: 20px;
    font-weight: 750;
}



/* =========================================================
   USERS
   ========================================================= */

.users-page-header,
.users-form-head,
.users-list-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.users-page-header {
    margin-bottom: 22px;
}

.users-page-header h2,
.users-form-head h3,
.users-list-head h3 {
    margin: 0;
}

.users-page-header p,
.users-form-head p,
.users-list-head p {
    margin: 5px 0 0;
    color: #667085;
}

.users-primary-button,
.users-secondary-button,
.users-close-button,
.users-action-button {
    border: 0;
    cursor: pointer;
    font: inherit;
}

.users-primary-button {
    min-height: 42px;
    padding: 0 18px;
    border-radius: 10px;
    background: #20252b;
    color: white;
    font-weight: 700;
}

.users-secondary-button {
    min-height: 42px;
    padding: 0 18px;
    border-radius: 10px;
    background: #eef1f4;
    color: #20252b;
    font-weight: 650;
}

.users-close-button {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: #f0f2f5;
    font-size: 24px;
    line-height: 1;
}

.users-form-card,
.users-list-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
}

.users-form-card {
    padding: 22px;
    margin-bottom: 22px;
}

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

.users-form-actions {
    display: flex;
    gap: 10px;
    margin-top: 22px;
}

.users-list-head {
    padding: 20px 22px;
    border-bottom: 1px solid #e5e7eb;
}

.users-table {
    overflow-x: auto;
}

.users-row {
    display: grid;
    grid-template-columns:
        minmax(170px, 1.4fr)
        minmax(120px, 1fr)
        minmax(100px, .8fr)
        minmax(100px, .8fr)
        minmax(130px, 1fr)
        minmax(210px, 1.3fr);
    align-items: center;
    gap: 14px;
    min-width: 920px;
    padding: 15px 22px;
    border-bottom: 1px solid #eef0f2;
}

.users-table-header {
    background: #f8f9fb;
    color: #667085;
    font-size: 13px;
    font-weight: 700;
}

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

.users-person {
    display: flex;
    align-items: center;
    gap: 11px;
    min-width: 0;
}

.users-avatar {
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #eef1f4;
    font-weight: 800;
}

.users-person-name {
    font-weight: 700;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.users-login {
    font-family: monospace;
}

.users-role,
.users-status {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 750;
}

.users-role {
    background: #eef1f4;
}

.users-status.active {
    background: #eaf7ef;
    color: #247a43;
}

.users-status.inactive {
    background: #f7eceb;
    color: #a33c34;
}

.users-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.users-action-button {
    min-height: 34px;
    padding: 0 11px;
    border-radius: 8px;
    background: #eef1f4;
    font-size: 12px;
    font-weight: 700;
}

.users-action-button.danger {
    background: #f8e9e7;
    color: #a53d34;
}

.users-action-button.activate {
    background: #e8f5ed;
    color: #247a43;
}

.users-action-button:disabled,
.users-primary-button:disabled {
    cursor: not-allowed;
    opacity: .45;
}

.users-empty {
    padding: 35px 22px;
    text-align: center;
    color: #667085;
}

.users-password-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(20, 25, 30, .38);
}

.users-password-overlay.hidden {
    display: none;
}

.users-password-dialog {
    width: min(460px, 100%);
    padding: 22px;
    border-radius: 14px;
    background: white;
    box-shadow: 0 20px 60px rgba(0,0,0,.18);
}

.users-password-dialog .form-field {
    margin-top: 22px;
}

@media (max-width: 750px) {
    .users-form-grid {
        grid-template-columns: 1fr;
    }

    .users-page-header {
        align-items: flex-start;
        flex-direction: column;
    }
}



/* Products header action */

.products-page-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
}

.products-page-header > .primary-btn {
    flex-shrink: 0;
    margin-bottom: 2px;
}

@media (max-width: 720px) {
    .products-page-header {
        align-items: flex-start;
        flex-direction: column;
    }
}



/* =========================================================
   PURCHASES / IMPORTS
   ========================================================= */

.purchase-summary-grid {
    display: grid;
    grid-template-columns:
        repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin: 22px 0;
}

.purchase-table-head,
.purchase-table-row {
    display: grid;
    grid-template-columns:
        1.1fr
        1.4fr
        0.9fr
        1fr
        0.8fr
        1.1fr
        1.1fr
        1fr
        42px;
    gap: 12px;
    align-items: center;
}

.purchase-table-head {
    padding: 14px 18px;
    font-size: 12px;
    font-weight: 700;
    color: var(--muted);
    border-bottom: 1px solid var(--border);
}

.purchase-table-row {
    padding: 16px 18px;
    border-bottom: 1px solid var(--border);
}

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

.purchase-empty {
    padding: 36px 20px;
    text-align: center;
    color: var(--muted);
}

.purchase-status {
    display: inline-flex;
    align-items: center;
    width: max-content;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    background: #f1f5f9;
}

.purchase-status.in_transit {
    background: #eff6ff;
}

.purchase-status.customs {
    background: #fff7ed;
}

.purchase-status.received {
    background: #ecfdf5;
}

.purchase-status.finalized {
    background: #f3f4f6;
}

.purchase-invoice {
    font-weight: 700;
}

.purchase-cost {
    font-weight: 700;
}

.purchase-row-menu {
    border: 0;
    background: transparent;
    cursor: pointer;
    font-size: 22px;
    line-height: 1;
}

@media (max-width: 1100px) {

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

    .purchase-table-head {
        display: none;
    }

    .purchase-table-row {
        grid-template-columns:
            1fr 1fr;
    }
}



/* New purchase */

.purchase-modal-card {
    width: min(920px, calc(100vw - 40px));
    max-height: calc(100vh - 40px);
    overflow-y: auto;
}

.purchase-form-grid {
    display: grid;
    grid-template-columns:
        repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-top: 22px;
}

.purchase-products-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;

    margin: 26px 0 14px;
}

.purchase-products-head h4 {
    margin: 0;
    font-size: 17px;
}

.purchase-products-head p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 13px;
}

.purchase-item-row {
    display: grid;
    grid-template-columns:
        minmax(220px, 1fr)
        minmax(140px, .45fr)
        42px;
    gap: 12px;
    align-items: end;

    padding: 14px;
    margin-bottom: 10px;

    border: 1px solid var(--border);
    border-radius: 12px;

    background: #f8fafc;
}

.purchase-item-remove {
    width: 42px;
    height: 42px;

    border: 0;
    border-radius: 9px;

    background: #feeceb;
    color: #a53d34;

    cursor: pointer;
    font-size: 20px;
}

@media (max-width: 700px) {

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

    .purchase-item-row {
        grid-template-columns: 1fr;
    }

    .purchase-item-remove {
        width: 100%;
    }
}



/* =========================================================
   GLOBAL RESPONSIVE / MOBILE LAYOUT
   ========================================================= */

/* Desktopda mobil elementlər görünmür */

.mobile-menu-button,
.mobile-sidebar-overlay {
    display: none;
}


/* ---------------------------------------------------------
   TABLET
   --------------------------------------------------------- */

@media (max-width: 1100px) {

    .content {
        padding-left: 28px;
        padding-right: 28px;
    }

}


/* ---------------------------------------------------------
   MOBILE
   --------------------------------------------------------- */

@media (max-width: 768px) {

    html,
    body {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }


    /* ===== MAIN LAYOUT ===== */

    .layout {
        display: block;
        width: 100%;
        min-height: 100vh;
    }


    /* ===== SIDEBAR DRAWER ===== */

    .sidebar {
        position: fixed;

        top: 0;
        left: 0;
        bottom: 0;

        z-index: 1001;

        width: min(82vw, 290px);
        height: 100dvh;

        padding:
            max(20px, env(safe-area-inset-top))
            15px
            max(17px, env(safe-area-inset-bottom));

        overflow-y: auto;

        transform: translateX(-105%);

        transition:
            transform .22s ease;

        box-shadow:
            18px 0 45px
            rgba(15, 23, 42, .16);
    }


    body.mobile-menu-open .sidebar {
        transform: translateX(0);
    }


    /* ===== OVERLAY ===== */

    .mobile-sidebar-overlay {
        display: block;

        position: fixed;
        inset: 0;

        z-index: 1000;

        background:
            rgba(15, 23, 42, .38);

        opacity: 0;
        visibility: hidden;

        transition:
            opacity .2s ease,
            visibility .2s ease;
    }


    body.mobile-menu-open
    .mobile-sidebar-overlay {
        opacity: 1;
        visibility: visible;
    }


    body.mobile-menu-open {
        overflow: hidden;
    }


    /* ===== CONTENT ===== */

    .content {
        width: 100%;
        min-width: 0;

        padding:
            18px
            16px
            45px;

        overflow-x: hidden;
    }


    /* ===== HEADER ===== */

    .header {
        display: grid;

        grid-template-columns:
            46px
            minmax(0, 1fr);

        gap: 12px;

        align-items: center;

        margin-bottom: 22px;
    }


    .header > div:first-of-type {
        min-width: 0;
    }


    .header .eyebrow {
        font-size: 9px;
        letter-spacing: 1.3px;
    }


    .header h1 {
        margin-top: 3px;
        font-size: 27px;
        line-height: 1.1;
    }


    .header-right {
        grid-column:
            1 / -1;

        width: 100%;

        display: grid;

        grid-template-columns:
            minmax(0, 1fr)
            auto;

        gap: 10px;
    }


    .header-right .date {
        min-width: 0;
    }


    .header-right .primary-btn {
        white-space: nowrap;
    }


    /* ===== MOBILE MENU BUTTON ===== */

    .mobile-menu-button {
        width: 44px;
        height: 44px;

        display: inline-flex;

        align-items: center;
        justify-content: center;

        padding: 0;

        border:
            1px solid
            var(--border);

        border-radius: 11px;

        background: white;
        color: #344054;

        cursor: pointer;
    }


    .mobile-menu-button svg {
        width: 22px;
        height: 22px;

        fill: none;
        stroke: currentColor;
        stroke-width: 1.8;
        stroke-linecap: round;
    }


    /* ===== GENERAL FORMS ===== */

    input,
    select,
    textarea,
    button {
        max-width: 100%;
    }


    input,
    select {
        min-height: 46px;
    }


    textarea {
        min-height: 90px;
    }


    /* iPhone input zoom-un qarşısını alır */

    input,
    select,
    textarea {
        font-size: 16px;
    }


    /* ===== GENERIC PAGE HEADERS ===== */

    .products-page-header,
    .users-page-header,
    .settlement-page-header {
        align-items: stretch;
        flex-direction: column;
    }


    .products-page-header > .primary-btn,
    .users-page-header > .users-primary-button {
        width: 100%;
    }


    /* ===== KPI GRIDS ===== */

    .purchase-summary-grid,
    .settlement-kpi-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }


    /* ===== PURCHASES ===== */

    .purchase-table-head {
        display: none;
    }


    .purchase-table-row {
        display: grid;

        grid-template-columns:
            1fr;

        gap: 9px;

        padding: 16px;

        border:
            1px solid
            var(--border);

        border-radius: 14px;

        margin-bottom: 12px;

        background: white;
    }


    .purchase-row-menu {
        width: 100%;
        min-height: 42px;

        border-radius: 9px;

        background: #f4f7fb;
    }


    /* ===== PURCHASE MODAL ===== */

    .purchase-modal-card {
        width: calc(100vw - 20px);
        max-width: none;

        max-height:
            calc(100dvh - 20px);

        margin: 10px;

        padding: 20px 16px;

        border-radius: 18px;
    }


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


    .purchase-products-head {
        align-items: stretch;
        flex-direction: column;
    }


    .purchase-products-head button {
        width: 100%;
    }


    .purchase-item-row {
        grid-template-columns: 1fr;
    }


    .purchase-item-remove {
        width: 100%;
    }


    /* ===== MODAL ACTIONS ===== */

    .modal-actions {
        display: grid;

        grid-template-columns:
            1fr 1fr;

        gap: 10px;
    }


    .modal-actions button {
        width: 100%;
    }

}


/* ---------------------------------------------------------
   SMALL PHONE
   --------------------------------------------------------- */

@media (max-width: 480px) {

    .content {
        padding:
            15px
            12px
            38px;
    }


    .header {
        margin-bottom: 18px;
    }


    .header h1 {
        font-size: 24px;
    }


    .header-right {
        grid-template-columns: 1fr;
    }


    .header-right .primary-btn {
        width: 100%;
    }


    .purchase-summary-grid,
    .settlement-kpi-grid {
        grid-template-columns: 1fr;
    }


    .modal-actions {
        grid-template-columns: 1fr;
    }


    .login-card {
        max-width:
            calc(100vw - 24px);

        padding:
            28px 20px;

        border-radius: 18px;
    }

}


/* ---------------------------------------------------------
   SAFE AREA
   --------------------------------------------------------- */

@supports (
    padding:
        max(0px)
) {

    @media (max-width: 768px) {

        .content {
            padding-left:
                max(
                    16px,
                    env(safe-area-inset-left)
                );

            padding-right:
                max(
                    16px,
                    env(safe-area-inset-right)
                );
        }

    }

}



.purchase-other-country {
    margin-top: 8px;
}

.purchase-other-country input {
    width: 100%;
}



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

.purchase-detail-grid > div {
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #f8fafc;
}

.purchase-detail-grid span {
    display: block;
    margin-bottom: 6px;
    color: var(--muted);
    font-size: 12px;
}

.purchase-detail-grid strong {
    font-size: 15px;
}

@media (max-width: 700px) {
    .purchase-detail-grid {
        grid-template-columns: 1fr;
    }
}



/* =========================================================
   PURCHASE WORKFLOW
   ========================================================= */

.purchase-detail-section {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.purchase-detail-section-head h4 {
    margin: 0;
    font-size: 16px;
}

.purchase-detail-section-head p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 12px;
}


.purchase-expense-list {
    margin-top: 14px;
}

.purchase-expense-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;

    padding: 12px 14px;

    border: 1px solid var(--border);
    border-radius: 10px;

    margin-bottom: 8px;

    background: #f8fafc;
}

.purchase-expense-row small {
    display: block;
    margin-top: 3px;
    color: var(--muted);
}

.purchase-expense-empty {
    padding: 18px;
    border: 1px dashed var(--border);
    border-radius: 10px;
    color: var(--muted);
    text-align: center;
}


.purchase-workflow-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 14px;
}


.purchase-workflow-button {
    min-height: 42px;
    padding: 0 15px;

    border: 1px solid var(--border);
    border-radius: 9px;

    background: white;

    cursor: pointer;

    font-weight: 650;
}


.purchase-workflow-button.primary {
    border-color: #cbdcf7;
    background: #eaf2ff;
    color: #175fc7;
}


.purchase-workflow-button.success {
    border-color: #c5e5d1;
    background: #ecf9f1;
    color: #277849;
}


.purchase-finalized-info {
    width: 100%;

    padding: 13px 15px;

    border-radius: 10px;

    background: #ecf9f1;
    color: #277849;

    font-weight: 700;
}


.purchase-detail-message {
    margin-top: 16px;

    padding: 11px 13px;

    border-radius: 9px;

    font-size: 13px;
}


.purchase-detail-message.error {
    background: #fff0ef;
    color: #b73d36;
}


.purchase-detail-message.success {
    background: #ecf9f1;
    color: #277849;
}


.purchase-detail-message.hidden {
    display: none;
}


@media (max-width: 700px) {

    .purchase-workflow-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .purchase-workflow-button {
        width: 100%;
    }

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



/* Purchase detail items */

.purchase-items-detail-list {
    margin-top: 14px;
}

.purchase-item-detail-row {
    display: grid;

    grid-template-columns:
        minmax(220px, 1.6fr)
        minmax(110px, .7fr)
        minmax(130px, .8fr)
        minmax(140px, .9fr);

    gap: 14px;

    align-items: center;

    padding: 13px 14px;

    margin-bottom: 8px;

    border: 1px solid var(--border);
    border-radius: 10px;

    background: #f8fafc;
}

.purchase-item-detail-row span {
    display: block;
    margin-bottom: 3px;

    color: var(--muted);

    font-size: 11px;
}

@media (max-width: 700px) {

    .purchase-item-detail-row {
        grid-template-columns: 1fr;
    }

}



.purchase-item-detail-row {
    grid-template-columns:
        minmax(180px, 1.2fr)
        minmax(180px, 1.2fr)
        minmax(120px, .7fr);
}

@media (max-width: 700px) {
    .purchase-item-detail-row {
        grid-template-columns: 1fr;
    }
}


.purchase-item-detail-row {
    grid-template-columns:
        minmax(240px, 1.5fr)
        minmax(110px, .7fr)
        minmax(130px, .8fr)
        minmax(140px, .9fr);
}

@media (max-width: 700px) {
    .purchase-item-detail-row {
        grid-template-columns: 1fr;
    }
}



/* Purchase expense edit/delete */

.purchase-expense-main {
    min-width: 0;
}

.purchase-expense-side {
    display: flex;
    align-items: center;
    gap: 14px;
}

.purchase-expense-actions {
    display: flex;
    gap: 6px;
}

.purchase-expense-action {
    min-height: 32px;
    padding: 0 10px;

    border: 1px solid var(--border);
    border-radius: 7px;

    background: white;

    cursor: pointer;

    font-size: 12px;
    font-weight: 650;
}

.purchase-expense-action.danger {
    background: #fff0ef;
    border-color: #f3d2cf;
    color: #b73d36;
}

.purchase-workflow-button.unlock {
    background: #fff7e8;
    border-color: #eed8aa;
    color: #8a6116;
}

@media (max-width: 700px) {

    .purchase-expense-side {
        width: 100%;

        align-items: flex-start;
        flex-direction: column;
    }

    .purchase-expense-actions {
        width: 100%;
    }

    .purchase-expense-action {
        flex: 1;
    }

}



/* Purchase expense delete confirmation */

.purchase-delete-confirm {
    margin-top: 20px;
    padding: 16px;

    border: 1px solid var(--border);
    border-radius: 12px;

    background: #f8fafc;
}

.purchase-delete-confirm span {
    display: block;

    margin-bottom: 5px;

    color: var(--muted);
    font-size: 12px;
}

.purchase-delete-confirm strong {
    display: block;

    margin-bottom: 5px;

    font-size: 16px;
}

.purchase-delete-confirm b {
    font-size: 18px;
}

.purchase-delete-warning {
    margin-top: 12px;

    padding: 11px 13px;

    border-radius: 9px;

    background: #fff7ed;
    color: #8a5b19;

    font-size: 12px;
}

.purchase-danger-button {
    min-height: 42px;
    padding: 0 18px;

    border: 1px solid #efc7c3;
    border-radius: 9px;

    background: #fff0ef;
    color: #b73d36;

    cursor: pointer;

    font-weight: 700;
}

.purchase-danger-button:disabled {
    opacity: .55;
    cursor: not-allowed;
}



/* Purchase workflow confirmation */

.purchase-action-confirm-info {
    margin-top: 20px;

    padding: 16px;

    border: 1px solid var(--border);
    border-radius: 12px;

    background: #f8fafc;
}

.purchase-action-confirm-info span {
    display: block;

    margin-bottom: 6px;

    color: var(--muted);
    font-size: 12px;
}

.purchase-action-confirm-info strong {
    display: block;

    margin-bottom: 5px;

    font-size: 19px;
}

.purchase-action-confirm-info small {
    display: block;

    color: var(--muted);

    line-height: 1.5;
}

.purchase-action-confirm-warning {
    margin-top: 12px;

    padding: 11px 13px;

    border-radius: 9px;

    background: #fff7ed;
    color: #8a5b19;

    font-size: 12px;
    line-height: 1.5;
}

.purchase-action-confirm-warning.hidden {
    display: none;
}

.purchase-unlock-confirm-button {
    min-height: 42px;
    padding: 0 18px;

    border: 1px solid #e9d49c;
    border-radius: 9px;

    background: #fff7e8;
    color: #8a6116;

    cursor: pointer;

    font-weight: 700;
}

.purchase-unlock-confirm-button:disabled {
    opacity: .55;
    cursor: not-allowed;
}



/* =========================================================
   PURCHASE HISTORY
   ========================================================= */

.purchase-history-list {
    margin-top: 14px;
}

.purchase-history-row {
    position: relative;

    display: grid;

    grid-template-columns:
        18px
        minmax(0, 1fr);

    gap: 10px;

    padding-bottom: 16px;
}

.purchase-history-row:not(:last-child)::before {
    content: "";

    position: absolute;

    left: 6px;
    top: 15px;
    bottom: -2px;

    width: 1px;

    background: #dfe4eb;
}

.purchase-history-dot {
    width: 13px;
    height: 13px;

    margin-top: 4px;

    border: 3px solid #dceaff;
    border-radius: 50%;

    background: #2b72d6;

    z-index: 1;
}

.purchase-history-content {
    min-width: 0;

    padding: 11px 13px;

    border: 1px solid var(--border);
    border-radius: 10px;

    background: #f8fafc;
}

.purchase-history-main {
    display: flex;

    align-items: flex-start;
    justify-content: space-between;

    gap: 15px;
}

.purchase-history-main strong {
    font-size: 13px;
}

.purchase-history-main span,
.purchase-history-user {
    color: var(--muted);
    font-size: 11px;
}

.purchase-history-user {
    margin-top: 5px;
}

.purchase-history-empty {
    padding: 16px;

    border: 1px dashed var(--border);
    border-radius: 10px;

    color: var(--muted);

    text-align: center;

    font-size: 12px;
}

@media (max-width: 700px) {

    .purchase-history-main {
        flex-direction: column;
        gap: 5px;
    }

}



/* =========================================================
   PURCHASE FILTERS / PAGINATION
   ========================================================= */

.purchase-filters-card {
    padding: 16px;

    margin-bottom: 16px;

    border: 1px solid var(--border);
    border-radius: 14px;

    background: white;
}

.purchase-filter-grid {
    display: grid;

    grid-template-columns:
        repeat(6, minmax(0, 1fr));

    gap: 12px;
}

.purchase-filter-grid .form-field {
    margin: 0;
}

.purchase-filter-bottom {
    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 12px;

    margin-top: 12px;
}

.purchase-filter-bottom .products-search {
    flex: 1;
}

.purchase-pagination {
    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 16px;

    margin-top: 14px;

    padding: 12px 2px;
}

.purchase-pagination-actions {
    display: flex;

    align-items: center;

    gap: 10px;
}

.purchase-pagination-actions span {
    min-width: 100px;

    text-align: center;

    color: var(--muted);

    font-size: 12px;
}

.purchase-pagination button:disabled {
    opacity: .45;
    cursor: not-allowed;
}


@media (max-width: 1100px) {

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

}


@media (max-width: 700px) {

    .purchase-filter-grid {
        grid-template-columns: 1fr;
    }

    .purchase-filter-bottom {
        align-items: stretch;
        flex-direction: column;
    }

    .purchase-filter-bottom
    .secondary-button {
        width: 100%;
    }

    .purchase-pagination {
        align-items: stretch;
        flex-direction: column;
    }

    .purchase-pagination-actions {
        display: grid;

        grid-template-columns:
            1fr auto 1fr;
    }

}


/* =========================================
   REPORT FIFO KPI VALUE COLORS
   ========================================= */

#reportGrossProfit.positive,
#reportGrossMargin.positive {
    color: #247c50;
}

#reportGrossProfit.negative,
#reportGrossMargin.negative {
    color: #c94b42;
}

#reportGrossProfit.zero,
#reportGrossMargin.zero {
    color: #697588;
}


/* =========================================================
   SIDEBAR FIX
   Brand və profil həmişə görünür.
   Yalnız navigation hissəsi scroll olur.
   ========================================================= */

@media (min-width: 769px) {

    .sidebar {
        height: 100vh;
        overflow: hidden;
    }


    .sidebar-brand {
        flex: 0 0 auto;
    }


    .sidebar > nav {
        flex: 1 1 auto;

        min-height: 0;

        overflow-y: auto;
        overflow-x: hidden;

        padding-right: 3px;

        scrollbar-width: thin;
        scrollbar-color:
            #d7dde6
            transparent;
    }


    .sidebar > nav::-webkit-scrollbar {
        width: 5px;
    }


    .sidebar > nav::-webkit-scrollbar-track {
        background: transparent;
    }


    .sidebar > nav::-webkit-scrollbar-thumb {
        border-radius: 10px;
        background: #d7dde6;
    }


    .profile {
        flex: 0 0 auto;
        margin-top: 0;

        background: var(--sidebar);
    }

}


/* =========================================
   REPORT SALES SELLER + PAGINATION
   ========================================= */

.report-seller-name {
    font-weight: 700;
    color: #46566d;
}


.report-sales-pagination {
    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 15px;

    padding: 14px 16px;

    border-top:
        1px solid
        #edf0f4;

    background: #fafbfd;
}


.report-sales-pagination.hidden {
    display: none;
}


.report-sales-pagination-info {
    color: #738095;

    font-size: 11px;

    font-weight: 650;
}


.report-sales-pagination-actions {
    display: flex;

    align-items: center;

    gap: 10px;
}


.report-sales-pagination-actions button {
    min-width: 82px;
}


.report-sales-pagination-actions button:disabled {
    opacity: .45;

    cursor: not-allowed;
}


#reportSalesPageInfo {
    min-width: 90px;

    color: #46566d;

    text-align: center;

    font-size: 11px;

    font-weight: 700;
}


@media (max-width: 700px) {

    .report-sales-pagination {
        align-items: stretch;

        flex-direction: column;
    }


    .report-sales-pagination-actions {
        justify-content: space-between;
    }
}


/* =========================================
   REPORT SALES — SELLER + PAGINATION
   ========================================= */

.report-seller-name {
    font-weight: 700;
    color: #46546a;
}


.report-sales-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;

    padding: 16px 12px;

    border-top: 1px solid #edf0f4;

    background: #fafbfd;
}


.report-sales-pagination.hidden {
    display: none;
}


.report-sales-pagination span {
    min-width: 190px;

    text-align: center;

    font-size: 12px;
    font-weight: 700;

    color: #697588;
}


.report-sales-pagination button {
    min-width: 90px;
}


.report-sales-pagination button:disabled {
    opacity: .45;
    cursor: default;
}


/* =========================================
   REPORT SALES FINAL PAGINATION
   ========================================= */

.report-sales-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;

    padding: 16px 14px;

    border-top: 1px solid #edf0f4;

    background: #fafbfd;
}


.report-sales-pagination.hidden {
    display: none;
}


.report-sales-page-numbers {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}


.report-sales-page-number {
    min-width: 34px !important;
    height: 34px;

    padding: 0 10px;

    border: 1px solid #dce3ec;
    border-radius: 8px;

    background: #ffffff;

    color: #46546a;

    font-size: 12px;
    font-weight: 700;

    cursor: pointer;
}


.report-sales-page-number:hover {
    border-color: #9abef5;
    background: #f3f7ff;
}


.report-sales-page-number.active {
    border-color: #1677ee;
    background: #1677ee;
    color: #ffffff;
}


#reportSalesPageInfo {
    min-width: auto;

    padding: 0 6px;

    white-space: nowrap;
}


/* =========================================
   REPORT STOCK PAGINATION
   ========================================= */

.report-stock-pagination {
    min-width: 920px;

    display: flex;
    align-items: center;
    justify-content: center;

    gap: 10px;

    padding: 16px 12px;

    border-top: 1px solid #edf0f4;

    background: #fff;
}


.report-stock-pagination.hidden {
    display: none;
}


.report-stock-page-numbers {
    display: flex;
    align-items: center;

    gap: 6px;
}


.report-stock-page-btn {
    min-width: 34px;
    height: 34px;

    padding: 0 9px;

    border: 1px solid #d9dee7;
    border-radius: 8px;

    background: #fff;

    color: #344054;

    font-size: 12px;
    font-weight: 700;

    cursor: pointer;
}


.report-stock-page-btn:hover {
    background: #f5f7fa;
}


.report-stock-page-btn.active {
    background: #1f2937;
    border-color: #1f2937;

    color: #fff;
}


#reportStockPageInfo {
    min-width: 90px;

    text-align: center;

    color: #697588;

    font-size: 11px;
    font-weight: 650;
}


#reportStockPrevPage:disabled,
#reportStockNextPage:disabled {
    opacity: 0.45;
    cursor: default;
}


/* =========================================
   REPORT PAYMENTS PAGINATION
   ========================================= */

.report-payments-pagination {
    min-width: 850px;

    display: flex;
    align-items: center;
    justify-content: center;

    gap: 10px;

    padding: 16px 12px;

    border-top: 1px solid #edf0f4;

    background: #fff;
}


.report-payments-pagination.hidden {
    display: none;
}


.report-payments-page-numbers {
    display: flex;
    align-items: center;

    gap: 6px;
}


.report-payments-page-btn {
    min-width: 34px;
    height: 34px;

    padding: 0 9px;

    border: 1px solid #d9dee7;
    border-radius: 8px;

    background: #fff;

    color: #344054;

    font-size: 12px;
    font-weight: 700;

    cursor: pointer;
}


.report-payments-page-btn:hover {
    background: #f5f7fa;
}


.report-payments-page-btn.active {
    background: #1f2937;
    border-color: #1f2937;

    color: #fff;
}


#reportPaymentsPageInfo {
    min-width: 80px;

    text-align: center;

    color: #697588;

    font-size: 11px;
    font-weight: 650;
}


#reportPaymentsPrevPage:disabled,
#reportPaymentsNextPage:disabled {
    opacity: 0.45;

    cursor: default;
}


/* =========================================
   AUDIT PAGE
   ========================================= */

.audit-page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;

    gap: 20px;

    margin-bottom: 24px;
}


.audit-page-header h2 {
    margin: 0 0 6px;

    font-size: 28px;
}


.audit-page-header p {
    margin: 0;

    color: #7a8799;
}


.audit-limit-note {
    padding: 8px 12px;

    border-radius: 10px;

    background: #eef3f9;

    color: #66758a;

    font-size: 12px;
    font-weight: 700;
}


.audit-filter-card,
.audit-table-card {
    background: #fff;

    border: 1px solid #dde3eb;
    border-radius: 16px;

    box-shadow:
        0 10px 30px
        rgba(31, 41, 55, .04);
}


.audit-filter-card {
    padding: 18px;

    margin-bottom: 18px;
}


.audit-filter-grid {
    display: grid;

    grid-template-columns:
        repeat(5, minmax(150px, 1fr));

    gap: 14px;
}


.audit-search-row {
    display: flex;

    gap: 12px;

    margin-top: 14px;
}


.audit-search-row input {
    flex: 1;
}


.audit-table-card {
    overflow: hidden;
}


.audit-table {
    overflow-x: auto;
}


.audit-row {
    min-width: 1180px;

    display: grid;

    grid-template-columns:
        155px
        145px
        180px
        175px
        70px
        minmax(420px, 1fr);

    align-items: center;

    border-bottom:
        1px solid #edf0f4;
}


.audit-row > div {
    padding: 13px 12px;

    font-size: 11px;
}


.audit-header {
    background: #f8fafc;

    color: #738095;

    font-weight: 750;
}


.audit-data-row:hover {
    background: #fafcff;
}


.audit-user {
    font-weight: 700;

    color: #46566d;
}


.audit-action-badge {
    display: inline-flex;

    max-width: 100%;

    padding: 5px 8px;

    border-radius: 8px;

    background: #eef4ff;

    color: #2468c9;

    font-size: 10px;
    font-weight: 750;

    word-break: break-word;
}


.audit-entity {
    color: #526176;

    font-weight: 650;
}


.audit-entity-id {
    font-weight: 700;
}


.audit-details {
    overflow: hidden;

    white-space: nowrap;
    text-overflow: ellipsis;

    color: #68768a;

    font-family:
        ui-monospace,
        SFMono-Regular,
        Menlo,
        Monaco,
        Consolas,
        monospace;
}


.audit-empty {
    min-width: 1180px;

    padding: 36px 20px;

    text-align: center;

    color: #7c899b;
}


.audit-pagination {
    display: flex;
    align-items: center;
    justify-content: center;

    gap: 12px;

    padding: 16px;

    border-top:
        1px solid #edf0f4;

    background: #fafbfd;
}


.audit-pagination.hidden {
    display: none;
}


.audit-page-numbers {
    display: flex;

    gap: 6px;
}


.audit-page-btn {
    min-width: 34px;
    height: 34px;

    padding: 0 9px;

    border: 1px solid #d9dee7;
    border-radius: 8px;

    background: #fff;

    color: #344054;

    font-size: 12px;
    font-weight: 700;

    cursor: pointer;
}


.audit-page-btn.active {
    background: #1f2937;

    border-color: #1f2937;

    color: #fff;
}


.audit-page-btn:hover:not(.active) {
    background: #f5f7fa;
}


#auditPageInfo {
    min-width: 80px;

    text-align: center;

    color: #697588;

    font-size: 11px;
    font-weight: 650;
}


#auditPrevPage:disabled,
#auditNextPage:disabled {
    opacity: .45;

    cursor: default;
}


@media (max-width: 1150px) {

    .audit-filter-grid {
        grid-template-columns:
            repeat(2, minmax(160px, 1fr));
    }
}


/* =========================================
   AUDIT HUMAN READABLE UI
   ========================================= */

.audit-row {
    min-width: 1250px;

    grid-template-columns:
        155px
        145px
        190px
        180px
        minmax(430px, 1fr)
        90px;
}


.audit-human-details {
    color: #46566d;

    font-size: 11px;

    line-height: 1.45;

    white-space: normal;
}


.audit-more-cell {
    text-align: right;
}


.audit-details-button {
    padding: 6px 10px;

    border: 1px solid #d9e2ef;
    border-radius: 8px;

    background: #fff;

    color: #2468c9;

    font-size: 10px;
    font-weight: 750;

    cursor: pointer;
}


.audit-details-button:hover {
    background: #f4f8ff;
}


.audit-raw-details {
    grid-column: 1 / -1;

    padding: 14px 16px 16px;

    border-top: 1px dashed #dce3ec;

    background: #f8fafc;
}


.audit-raw-details.hidden {
    display: none;
}


.audit-raw-title {
    margin-bottom: 8px;

    color: #66758a;

    font-size: 10px;
    font-weight: 750;

    text-transform: uppercase;
    letter-spacing: .04em;
}


.audit-raw-details pre {
    margin: 0;

    padding: 12px;

    overflow-x: auto;

    border-radius: 8px;

    background: #fff;

    color: #526176;

    font-size: 10px;
    line-height: 1.5;

    white-space: pre-wrap;
    word-break: break-word;
}



/* =========================================
   OPERATION LOG FINAL LAYOUT
   ========================================= */

.audit-row {
    min-width: 1180px;

    grid-template-columns:
        155px
        145px
        210px
        210px
        minmax(460px, 1fr);
}



/* =========================================================
   OPERATION LOG - FINAL FILTER DESIGN
   ========================================================= */

.audit-filter-card {
    padding: 20px;

    margin-bottom: 18px;
}


/* ---------- TOP FILTERS ---------- */

.audit-filter-grid {
    display: grid;

    grid-template-columns:
        repeat(5, minmax(0, 1fr));

    gap: 16px;

    align-items: end;
}


/*
 * Audit daxilindəki bütün field-lər
 * eyni ölçü və quruluşda olsun.
 */
.audit-filter-grid .field {
    min-width: 0;

    display: flex;
    flex-direction: column;

    gap: 7px;
}


.audit-filter-grid .field label {
    display: block;

    margin: 0;

    color: #526176;

    font-size: 12px;
    font-weight: 700;

    line-height: 1.2;
}


.audit-filter-grid .field input,
.audit-filter-grid .field select {
    width: 100%;
    height: 44px;

    box-sizing: border-box;

    margin: 0;

    padding: 0 12px;

    border: 1px solid #d9e1eb;
    border-radius: 10px;

    background: #fff;

    font: inherit;
    font-size: 13px;

    outline: none;
}


.audit-filter-grid .field input:focus,
.audit-filter-grid .field select:focus {
    border-color: #8ab8f8;

    box-shadow:
        0 0 0 3px
        rgba(37, 128, 235, .08);
}


/* ---------- SEARCH / ACTION ROW ---------- */

.audit-search-row {
    display: grid;

    grid-template-columns:
        minmax(0, 1fr)
        auto
        auto;

    align-items: center;

    gap: 12px;

    margin-top: 16px;
}


.audit-search-row input {
    width: 100%;
    height: 44px;

    box-sizing: border-box;

    margin: 0;

    padding: 0 14px;

    border: 1px solid #d9e1eb;
    border-radius: 10px;

    background: #fff;

    font: inherit;
    font-size: 13px;

    outline: none;
}


.audit-search-row input:focus {
    border-color: #8ab8f8;

    box-shadow:
        0 0 0 3px
        rgba(37, 128, 235, .08);
}


#auditClearFilters,
#auditRefreshButton {
    height: 44px;

    box-sizing: border-box;

    margin: 0;

    padding-left: 18px;
    padding-right: 18px;

    white-space: nowrap;
}


/* ---------- RESPONSIVE ---------- */

@media (max-width: 1250px) {

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


@media (max-width: 900px) {

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


    .audit-search-row {
        grid-template-columns:
            1fr 1fr;
    }


    .audit-search-row input {
        grid-column: 1 / -1;
    }
}


@media (max-width: 600px) {

    .audit-filter-grid {
        grid-template-columns: 1fr;
    }


    .audit-search-row {
        grid-template-columns: 1fr;
    }


    .audit-search-row input {
        grid-column: auto;
    }


    #auditClearFilters,
    #auditRefreshButton {
        width: 100%;
    }
}



/* =========================================================
   OPERATION LOG - FINAL TABLE LAYOUT
   ========================================================= */

.audit-table {
    overflow-x: hidden;
}


.audit-row {
    min-width: 0;
    width: 100%;

    grid-template-columns:
        155px
        145px
        210px
        150px
        minmax(0, 1fr);
}


.audit-row > div {
    min-width: 0;
}


.audit-human-details {
    overflow: hidden;

    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;

    white-space: normal;
    word-break: break-word;

    line-height: 1.45;
}


.audit-entity {
    white-space: nowrap;

    overflow: hidden;
    text-overflow: ellipsis;
}


.audit-action-badge {
    max-width: 100%;

    white-space: normal;
    word-break: normal;
}


.audit-empty {
    min-width: 0;
    width: 100%;
}


/* Bir qədər dar ekranlarda sütunları sıxlaşdır */
@media (max-width: 1300px) {

    .audit-row {
        grid-template-columns:
            145px
            135px
            185px
            135px
            minmax(0, 1fr);
    }
}


@media (max-width: 1050px) {

    .audit-table {
        overflow-x: auto;
    }


    .audit-row {
        min-width: 1000px;

        grid-template-columns:
            145px
            135px
            190px
            145px
            minmax(385px, 1fr);
    }
}



/* =========================================================
   SELLER DASHBOARD
   ========================================================= */

.chart-card.seller-stock-wide {
    grid-column: 1 / -1;
}



/* =========================================================
   DASHBOARD REAL SALES CHART
   ========================================================= */

.hero-chart {
    min-width: 0;
}


.hero-chart-head {
    display: flex;

    align-items: flex-start;
    justify-content: space-between;

    gap: 16px;

    margin-bottom: 4px;
}


.hero-chart-period {
    margin-top: 3px;

    font-size: 11px;

    opacity: .68;
}


.hero-chart-total {
    display: flex;

    align-items: baseline;

    gap: 5px;

    white-space: nowrap;
}


.hero-chart-total strong {
    font-size: 19px;
    font-weight: 800;
}


.hero-chart-total span {
    font-size: 10px;

    opacity: .7;
}


#heroSalesChart {
    display: block;

    width: 100%;
    height: 145px;

    overflow: visible;
}


.hero-chart-grid-line {
    stroke: rgba(
        255,
        255,
        255,
        .12
    );

    stroke-width: 1;
}


.hero-sales-point {
    fill: #ffffff;

    stroke: rgba(
        255,
        255,
        255,
        .45
    );

    stroke-width: 2;
}


.hero-sales-labels {
    display: grid;

    grid-template-columns:
        repeat(
            7,
            minmax(0, 1fr)
        );

    margin-top: 2px;

    color: rgba(
        255,
        255,
        255,
        .68
    );

    font-size: 9px;

    text-align: center;
}


.hero-sales-labels span:first-child {
    text-align: left;
}


.hero-sales-labels span:last-child {
    text-align: right;
}



/* =========================================================
   SALE BANK TRANSFER / INLINE CUSTOMER
   ========================================================= */

.sale-new-customer-button {
    margin-top: 10px;

    border: 0;
    background: transparent;

    padding: 0;

    color: #2878f0;

    font-size: 12px;
    font-weight: 700;

    cursor: pointer;
}

.sale-new-customer-button:hover {
    text-decoration: underline;
}

#bankTransferFields {
    margin-top: 14px;
}



/* =========================================================
   REPORT SALE CANCEL
   ========================================================= */

.report-sale-id {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
}

.report-sale-cancel-btn {
    border: 1px solid #d9a3a0;
    background: #fff7f6;
    color: #b83f38;
    border-radius: 5px;
    padding: 3px 7px;
    font-size: 9px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
}

.report-sale-cancel-btn:hover {
    background: #fcebea;
}

.report-sale-cancelled-label {
    color: #8a919d;
    font-size: 9px;
    font-weight: 700;
    white-space: nowrap;
}



/* =========================================================
   SALE CANCEL MODAL
   ========================================================= */

.sale-cancel-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;

    margin-bottom: 18px;
    padding: 15px 16px;

    border: 1px solid #edf0f4;
    border-radius: 12px;

    background: #f8fafc;
}

.sale-cancel-info span {
    color: #697588;
    font-size: 13px;
}

.sale-cancel-info strong {
    color: #17233a;
    font-size: 17px;
}

#saleCancelReason {
    width: 100%;
    min-height: 105px;
    resize: vertical;
}

.sale-cancel-confirm-button {
    min-height: 46px;

    padding: 0 18px;

    border: 1px solid #e4a39e;
    border-radius: 10px;

    background: #fff5f4;
    color: #c53c33;

    cursor: pointer;

    font-size: 13px;
    font-weight: 700;
}

.sale-cancel-confirm-button:hover {
    background: #ffebe9;
}

.sale-cancel-confirm-button:disabled {
    opacity: .55;
    cursor: default;
}


/* =========================================================
   SALE RETURN MODAL
   ========================================================= */

.return-modal-card {
    width: min(760px, calc(100vw - 40px));
    max-height: calc(100vh - 40px);
    overflow-y: auto;
}

.return-sale-info {
    display: grid;
    grid-template-columns:
        repeat(3, minmax(0, 1fr));
    gap: 12px;

    margin-bottom: 24px;
}

.return-sale-info > div {
    padding: 14px 16px;

    border: 1px solid var(--border);
    border-radius: 11px;

    background: #f8fafc;
}

.return-sale-info span {
    display: block;

    margin-bottom: 5px;

    color: var(--secondary);
    font-size: 12px;
}

.return-sale-info strong {
    font-size: 14px;
}

.return-section-title {
    margin-bottom: 12px;

    font-size: 15px;
    font-weight: 700;
}

.return-item-row {
    display: grid;

    grid-template-columns:
        minmax(180px, 1fr)
        120px
        140px;

    gap: 12px;
    align-items: end;

    padding: 14px;
    margin-bottom: 10px;

    border: 1px solid var(--border);
    border-radius: 12px;

    background: #f8fafc;
}

.return-item-product strong {
    display: block;

    margin-bottom: 5px;

    font-size: 14px;
}

.return-item-product span {
    color: var(--secondary);
    font-size: 12px;
}

.return-item-price {
    text-align: right;
}

.return-item-price span {
    display: block;

    margin-bottom: 5px;

    color: var(--secondary);
    font-size: 12px;
}

.return-item-price strong {
    font-size: 14px;
}

.return-summary {
    padding-top: 18px;
    margin-top: 18px;

    border-top: 1px solid var(--border);
}

.return-summary-row {
    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 20px;

    padding: 14px 16px;
    margin-bottom: 15px;

    border-radius: 11px;

    background: #f4f7fb;
}

.return-summary-row span {
    color: var(--secondary);
    font-size: 13px;
}

.return-summary-row strong {
    font-size: 17px;
}

.return-difference-box {
    display: flex;
    flex-direction: column;

    gap: 5px;

    padding: 13px 15px;
    margin: 14px 0;

    border: 1px solid #f2b58d;
    border-radius: 10px;

    background: #fff5ee;
    color: #b95518;

    font-size: 13px;
}

.return-financial-info {
    padding: 14px 16px;
    margin-top: 18px;

    border: 1px solid #cbdcf7;
    border-radius: 11px;

    background: #f3f7fe;

    color: #36577e;
    font-size: 13px;
    line-height: 1.55;
}


@media (max-width: 700px) {

    .return-sale-info {
        grid-template-columns: 1fr;
    }

    .return-item-row {
        grid-template-columns: 1fr;
    }

    .return-item-price {
        text-align: left;
    }

}


/* =========================================
   DASHBOARD FINANCIAL BALANCES
   ========================================= */

.finance-dashboard-section {
    margin-top: 26px;
}


.finance-kpi-grid {
    display: grid;

    grid-template-columns:
        repeat(4, minmax(0, 1fr));

    gap: 13px;

    margin-top: 13px;
}


.finance-kpi-card {
    min-height: 108px;

    display: flex;

    flex-direction: column;

    justify-content: space-between;

    padding: 18px;

    border:
        1px solid
        var(--border);

    border-radius: 15px;

    background: white;

    box-shadow: var(--shadow);
}


.finance-kpi-card > span {
    color: var(--secondary);

    font-size: 12px;
}


.finance-kpi-value {
    margin-top: 16px;
}


.finance-kpi-value strong {
    color: var(--text);

    font-size:
        clamp(22px, 2.4vw, 29px);

    letter-spacing: -.6px;
}


.finance-kpi-value small {
    margin-left: 4px;

    color: var(--secondary);

    font-size: 10px;
}


.finance-kpi-card.cash {
    border-top:
        3px solid
        var(--green);
}


.finance-kpi-card.card {
    border-top:
        3px solid
        var(--blue);
}


.finance-kpi-card.bank {
    border-top:
        3px solid
        var(--orange);
}


.finance-kpi-card.total {
    border-top:
        3px solid
        #7c5ce7;
}


@media (max-width: 900px) {

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


@media (max-width: 520px) {

    .finance-kpi-grid {
        grid-template-columns:
            1fr;
    }
}



/* =========================================================
   SALES REGISTRY
   ========================================================= */

.sales-registry-page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 20px;
}

.sales-registry-page-header h2 {
    margin: 0;
    font-size: 28px;
}

.sales-registry-page-header p {
    margin: 7px 0 0;
    color: #738095;
}

.sales-registry-filter-card {
    background: #fff;
    border: 1px solid #e7ebf0;
    border-radius: 18px;
    padding: 20px;
    margin-bottom: 18px;
}

.sales-registry-quick-periods {
    display: flex;
    gap: 8px;
    margin-bottom: 18px;
}

.sales-registry-period-btn {
    border: 1px solid #dfe5ec;
    background: #fff;
    border-radius: 10px;
    padding: 9px 14px;
    cursor: pointer;
    font-weight: 700;
}

.sales-registry-period-btn.active {
    background: #101828;
    color: #fff;
    border-color: #101828;
}

.sales-registry-filter-grid {
    display: grid;
    grid-template-columns:
        repeat(5, minmax(0, 1fr))
        auto;
    gap: 14px;
    align-items: end;
}

.sales-registry-filter-action {
    display: flex;
    align-items: flex-end;
}

.sales-registry-filter-action button {
    white-space: nowrap;
}

.sales-registry-summary {
    display: grid;
    grid-template-columns:
        repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.sales-registry-summary > div {
    background: #fff;
    border: 1px solid #e7ebf0;
    border-radius: 14px;
    padding: 14px 16px;
}

.sales-registry-summary span {
    display: block;
    color: #738095;
    font-size: 12px;
    margin-bottom: 5px;
}

.sales-registry-summary strong {
    font-size: 20px;
}

.sales-registry-summary small {
    display: block;
    margin-top: 6px;
    color: #8490a3;
    font-size: 11px;
    line-height: 1.4;
}

.sales-registry-summary small b {
    color: #475467;
    font-weight: 800;
}

.sales-registry-table-card {
    background: #fff;
    border: 1px solid #e7ebf0;
    border-radius: 18px;
    overflow: hidden;
}

.sales-registry-table-head,
.sales-registry-table-row {
    display: grid;
    grid-template-columns:
        62px
        145px
        minmax(165px, 1.25fr)
        minmax(120px, 0.9fr)
        130px
        105px
        110px
        105px
        155px
        145px;
    gap: 12px;
    align-items: center;
}

.sales-registry-table-head {
    padding: 13px 16px;
    background: #f8fafc;
    color: #667085;
    font-size: 12px;
    font-weight: 800;
    border-bottom: 1px solid #e7ebf0;
}

.sales-registry-table-row {
    width: 100%;
    border: 0;
    border-bottom: 1px solid #eef1f4;
    background: #fff;
    padding: 15px 16px;
    text-align: left;
    font: inherit;
    color: inherit;
    cursor: pointer;
}

.sales-registry-table-row:last-child {
    border-bottom: 0;
}

.sales-registry-table-row:hover {
    background: #fafbfd;
}

.sales-registry-table-row > div {
    min-width: 0;
}

.sales-registry-table-row strong {
    display: block;
}

.sales-registry-sub {
    display: block;
    margin-top: 4px;
    color: #8490a3;
    font-size: 11px;
}

.sales-registry-id {
    font-weight: 800;
}

.sales-registry-status {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-height: 28px;
    padding: 5px 9px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
}

.sales-registry-status.active {
    background: #ecfdf3;
    color: #027a48;
}

.sales-registry-status.returned {
    background: #fff8e8;
    color: #9a6700;
}

.sales-registry-status.cancelled {
    background: #fef3f2;
    color: #b42318;
}

.sales-registry-empty {
    padding: 40px 20px;
    text-align: center;
    color: #8490a3;
}


@media (max-width: 1250px) {

    .sales-registry-filter-grid {
        grid-template-columns:
            repeat(3, minmax(0, 1fr));
    }

    .sales-registry-table-card {
        overflow-x: auto;
    }

    .sales-registry-table-head,
    .sales-registry-table-row {
        min-width: 1320px;
    }
}


@media (max-width: 760px) {

    .sales-registry-filter-grid {
        grid-template-columns:
            1fr;
    }

    .sales-registry-summary {
        grid-template-columns:
            1fr 1fr;
    }
}



/* =========================================================
   SALES REGISTRY DETAIL MODAL
   ========================================================= */

body.sales-detail-open {
    overflow: hidden;
}

.sales-detail-modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
}

.sales-detail-modal[hidden] {
    display: none !important;
}

.sales-detail-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(16, 24, 40, .44);
    backdrop-filter: blur(3px);
}

.sales-detail-panel {
    position: absolute;
    top: 18px;
    right: 18px;
    bottom: 18px;
    width: min(1040px, calc(100vw - 36px));
    background: #fff;
    border-radius: 24px;
    box-shadow:
        0 24px 80px
        rgba(16, 24, 40, .22);
    overflow-y: auto;
    padding: 28px;
}

.sales-detail-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 22px;
}

.sales-detail-header h2 {
    margin: 4px 0 4px;
    font-size: 30px;
}

.sales-detail-header p {
    margin: 0;
    color: #7b8798;
}

.sales-detail-eyebrow {
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .14em;
    color: #1570ef;
}

.sales-detail-close {
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 50%;
    background: #f2f4f7;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    color: #667085;
}

.sales-detail-close:hover {
    background: #eaecf0;
}

.sales-detail-loading,
.sales-detail-error,
.sales-detail-empty {
    padding: 28px;
    border-radius: 14px;
    text-align: center;
}

.sales-detail-loading,
.sales-detail-empty {
    background: #f8fafc;
    color: #7b8798;
}

.sales-detail-error {
    background: #fef3f2;
    color: #b42318;
}

.sales-detail-empty.compact {
    padding: 12px;
}

.sales-detail-status-bar {
    border-radius: 14px;
    padding: 13px 16px;
    margin-bottom: 18px;
    font-weight: 800;
}

.sales-detail-status-bar.active {
    background: #ecfdf3;
    color: #027a48;
}

.sales-detail-status-bar.returned {
    background: #fff8e8;
    color: #9a6700;
}

.sales-detail-status-bar.cancelled {
    background: #fef3f2;
    color: #b42318;
}

.sales-detail-summary-grid {
    display: grid;
    grid-template-columns:
        repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.sales-detail-summary-card {
    background: #f8fafc;
    border: 1px solid #eaecf0;
    border-radius: 14px;
    padding: 16px;
}

.sales-detail-summary-card span,
.sales-detail-info-grid span,
.sales-detail-credit-grid span,
.sales-detail-finance-grid span,
.sales-detail-item-grid span,
.sales-detail-return-money-grid span,
.sales-detail-return-note span {
    display: block;
    color: #7b8798;
    font-size: 12px;
    margin-bottom: 6px;
}

.sales-detail-summary-card strong {
    font-size: 18px;
}

.sales-detail-section {
    border: 1px solid #e7ebf0;
    border-radius: 18px;
    padding: 20px;
    margin-bottom: 18px;
}

.sales-detail-section-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.sales-detail-section-head h3 {
    margin: 0;
    font-size: 18px;
}

.sales-detail-section-head p {
    margin: 5px 0 0;
    color: #8490a3;
    font-size: 13px;
}

.sales-detail-info-grid,
.sales-detail-credit-grid,
.sales-detail-finance-grid {
    display: grid;
    grid-template-columns:
        repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.sales-detail-info-grid > div,
.sales-detail-credit-grid > div,
.sales-detail-finance-grid > div {
    background: #f8fafc;
    border-radius: 12px;
    padding: 14px;
}

.sales-detail-wide-info {
    grid-column: 1 / -1;
}

.sales-detail-items,
.sales-detail-returns {
    display: grid;
    gap: 12px;
}

.sales-detail-item-card,
.sales-detail-return-card {
    border: 1px solid #e7ebf0;
    border-radius: 14px;
    padding: 16px;
    background: #fff;
}

.sales-detail-item-card.has-return {
    border-color: #f2c879;
    background: #fffdf7;
}

.sales-detail-item-head,
.sales-detail-return-head {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: flex-start;
    margin-bottom: 14px;
}

.sales-detail-item-head h4,
.sales-detail-return-head h4 {
    margin: 0 0 4px;
    font-size: 16px;
}

.sales-detail-item-head span,
.sales-detail-return-head span {
    color: #8490a3;
    font-size: 12px;
}

.sales-detail-item-grid {
    display: grid;
    grid-template-columns:
        repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.sales-detail-item-grid > div {
    background: #f8fafc;
    border-radius: 10px;
    padding: 12px;
}

.sales-detail-warning {
    margin-top: 12px;
    border-radius: 10px;
    padding: 10px 12px;
    background: #fff4ed;
    color: #b54708;
    font-weight: 800;
    font-size: 12px;
}

.sales-detail-fifo {
    margin-top: 14px;
    border-top: 1px solid #eaecf0;
    padding-top: 12px;
}

.sales-detail-mini-title {
    font-weight: 800;
    font-size: 12px;
    margin-bottom: 8px;
}

.sales-detail-fifo-row {
    display: grid;
    grid-template-columns:
        1fr 110px 130px 130px;
    gap: 10px;
    align-items: center;
    padding: 8px 0;
    font-size: 12px;
}

.sales-detail-return-card.has-difference {
    border-color: #f4a261;
    background: #fffaf6;
}

.sales-detail-return-status {
    display: inline-flex;
    border-radius: 999px;
    padding: 6px 10px;
    background: #f2f4f7;
    font-weight: 800;
    color: #475467 !important;
}

.sales-detail-return-money-grid {
    display: grid;
    grid-template-columns:
        repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.sales-detail-return-money-grid > div {
    background: #f8fafc;
    border-radius: 10px;
    padding: 12px;
}

.sales-detail-return-items {
    margin-top: 12px;
}

.sales-detail-return-item {
    display: grid;
    grid-template-columns:
        1fr 120px 140px 180px;
    gap: 10px;
    padding: 9px 0;
    border-bottom: 1px solid #eef1f4;
    font-size: 12px;
}

.sales-detail-return-item:last-child {
    border-bottom: 0;
}

.sales-detail-return-alert {
    margin-top: 12px;
    border-radius: 10px;
    background: #fff1e8;
    padding: 12px;
    color: #b54708;
}

.sales-detail-return-alert strong,
.sales-detail-return-alert span {
    display: block;
}

.sales-detail-return-alert span {
    margin-top: 5px;
}

.sales-detail-return-note {
    margin-top: 12px;
    background: #f8fafc;
    border-radius: 10px;
    padding: 12px;
}

.sales-detail-note {
    background: #f8fafc;
    border-radius: 10px;
    padding: 14px;
    white-space: pre-wrap;
}

.sales-detail-cancel-section {
    border-color: #fda29b;
    background: #fffafa;
}


@media (max-width: 900px) {

    .sales-detail-panel {
        top: 8px;
        right: 8px;
        bottom: 8px;
        width: calc(100vw - 16px);
        padding: 20px;
        border-radius: 18px;
    }

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

    .sales-detail-info-grid,
    .sales-detail-credit-grid,
    .sales-detail-finance-grid,
    .sales-detail-item-grid,
    .sales-detail-return-money-grid {
        grid-template-columns:
            1fr 1fr;
    }

    .sales-detail-fifo-row,
    .sales-detail-return-item {
        grid-template-columns:
            1fr 1fr;
    }
}


@media (max-width: 560px) {

    .sales-detail-summary-grid,
    .sales-detail-info-grid,
    .sales-detail-credit-grid,
    .sales-detail-finance-grid,
    .sales-detail-item-grid,
    .sales-detail-return-money-grid,
    .sales-detail-fifo-row,
    .sales-detail-return-item {
        grid-template-columns:
            1fr;
    }
}



.sales-registry-return-value {
    color: #b54708;
}

.sales-registry-zero {
    color: #98a2b3;
}

.sales-registry-status.returned-full {
    background: #f2f4f7;
    color: #475467;
}


/* =========================================================
   SALES REGISTRY FINAL RESPONSIVE WIDTH FIX
   ========================================================= */

.sales-registry-table-card {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

.sales-registry-table-head,
.sales-registry-table-row {
    width: 100%;
    min-width: 0 !important;

    display: grid;

    grid-template-columns:
        48px
        135px
        minmax(150px, 1.35fr)
        minmax(90px, .75fr)
        minmax(105px, .85fr)
        minmax(90px, .75fr)
        90px
        100px
        105px
        minmax(115px, .9fr);

    gap: 10px;

    align-items: center;

    box-sizing: border-box;
}

.sales-registry-table-head > div,
.sales-registry-table-row > div {
    min-width: 0;
}

.sales-registry-table-row > div {
    overflow: hidden;
}

.sales-registry-table-row strong,
.sales-registry-table-row span {
    max-width: 100%;
}

.sales-registry-status {
    white-space: nowrap;
    font-size: 12px;
}

.sales-registry-table-row {
    cursor: pointer;
}


/*
 * Kiçik desktop / notebook ekranlarında
 * sütunları bir qədər sıxlaşdırırıq.
 */
@media (max-width: 1450px) {

    .sales-registry-table-head,
    .sales-registry-table-row {

        grid-template-columns:
            42px
            120px
            minmax(130px, 1.2fr)
            80px
            95px
            80px
            80px
            90px
            95px
            110px;

        gap: 7px;
    }

    .sales-registry-table-head {
        font-size: 12px;
    }

    .sales-registry-table-row {
        font-size: 13px;
    }

    .sales-registry-status {
        font-size: 11px;
    }
}



.sales-registry-status.debt {
    background: #fff8e8;
    color: #b54708;
}



.sales-registry-status.completed {
    background: #ecfdf3;
    color: #027a48;
}


/* Sale detail real credit balance */

.sales-detail-status-bar.debt {
    background: #fff8e8;
    color: #b54708;
}

.sales-detail-status-bar.completed {
    background: #ecfdf3;
    color: #027a48;
}

.sales-detail-debt-payments {
    margin-top: 16px;
    border-top: 1px solid #eaecf0;
    padding-top: 14px;
}

.sales-detail-debt-payment-list {
    display: grid;
    gap: 8px;
}

.sales-detail-debt-payment-row {
    display: grid;
    grid-template-columns:
        minmax(160px, 1fr)
        140px
        minmax(140px, 1fr);
    gap: 12px;
    align-items: center;
    background: #f8fafc;
    border-radius: 10px;
    padding: 11px 14px;
    font-size: 13px;
}

.sales-detail-debt-payment-row strong {
    font-size: 14px;
}

@media (max-width: 700px) {

    .sales-detail-debt-payment-row {
        grid-template-columns: 1fr;
        gap: 5px;
    }
}


/* =========================================
   REPORT RETURNS SUMMARY
   ========================================= */

.report-returns-section {
    margin-top: 18px;

    padding: 16px;

    border: 1px solid #e7ebf1;

    border-radius: 14px;

    background: #fff;
}


.report-returns-head {
    margin-bottom: 14px;
}


.report-returns-head h3 {
    margin: 0 0 4px;

    font-size: 15px;
}


.report-returns-head p {
    margin: 0;

    color: #8993a2;

    font-size: 10px;
}


.report-returns-grid {
    display: grid;

    grid-template-columns:
        repeat(4, minmax(0, 1fr));

    gap: 12px;
}


.report-return-card {
    min-height: 108px;

    padding: 14px;

    display: flex;

    flex-direction: column;

    border: 1px solid #edf0f4;

    border-radius: 12px;

    background: #fafbfc;
}


.report-return-card > span {
    margin-bottom: 9px;

    color: #697588;

    font-size: 11px;

    font-weight: 650;
}


.report-return-card > strong {
    margin-bottom: 7px;

    color: #c94b42;

    font-size: 18px;

    font-weight: 750;
}


.report-return-card > small {
    margin-top: auto;

    color: #8a94a3;

    font-size: 10px;

    line-height: 1.4;
}


.report-return-card.net {
    border-color: #cdddf8;

    background: #f7faff;
}


.report-return-card.net > strong {
    color: var(--blue);
}


.report-return-card.debt {
    background: #fffaf3;
}


.report-return-card.debt > strong {
    color: #b27320;
}


@media (max-width: 1100px) {

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


@media (max-width: 650px) {

    .report-returns-grid {
        grid-template-columns: 1fr;
    }
}



/* =========================================
   REPORT RETURNS - FINANCIAL RESULT
   ========================================= */

.report-return-card.cost {
    background: #fafbfc;
}

.report-return-card.cost > strong {
    color: #475467;
}


.report-return-card.cost-net {
    background: #f7faff;
    border-color: #d6e4fb;
}

.report-return-card.cost-net > strong {
    color: var(--blue);
}


.report-return-card.profit {
    background: #f4fbf7;
    border-color: #d7eee0;
}

.report-return-card.profit > strong {
    color: #027a48;
}


.report-return-card.margin {
    background: #f4fbf7;
    border-color: #d7eee0;
}

.report-return-card.margin > strong {
    color: #027a48;
}



/* =========================================================
   WOOD_COMMON_PAGINATION_V1
   ========================================================= */

.wood-pagination {
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:16px;
    margin-top:16px;
    padding:14px 4px 4px;
    color:#738095;
    font-size:13px;
}

.wood-pagination.hidden {
    display:none;
}

.wood-pagination-info {
    white-space:nowrap;
}

.wood-pagination-actions {
    display:flex;
    align-items:center;
    gap:12px;
}

.wood-pagination-current {
    min-width:100px;
    text-align:center;
    font-weight:600;
    color:#39465c;
}

.wood-pagination-actions button:disabled {
    opacity:.45;
    cursor:not-allowed;
}

@media (max-width:700px) {

    .wood-pagination {
        flex-direction:column;
        align-items:stretch;
    }

    .wood-pagination-actions {
        justify-content:space-between;
    }
}



/* WOOD_MULTI_ITEM_SALE_V1 */

.sale-items-title {
    margin-top: 28px;
}

.sale-items-header {
    display: grid;
    grid-template-columns:
        minmax(180px, 2fr)
        minmax(90px, .8fr)
        minmax(120px, 1fr)
        minmax(135px, 1fr)
        minmax(110px, .9fr)
        42px;
    gap: 10px;
    align-items: center;
    padding: 0 8px 8px;
    color: var(--secondary);
    font-size: 11px;
    font-weight: 600;
}

.sale-item-row {
    display: grid;
    grid-template-columns:
        minmax(180px, 2fr)
        minmax(90px, .8fr)
        minmax(120px, 1fr)
        minmax(135px, 1fr)
        minmax(110px, .9fr)
        42px;
    gap: 10px;
    align-items: start;
    margin-bottom: 10px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fbfcfe;
}

.sale-item-cell select,
.sale-item-cell input {
    width: 100%;
    height: 44px;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: white;
    color: var(--text);
    padding: 0 11px;
    font-size: 13px;
}

.sale-item-cell select:focus,
.sale-item-cell input:focus {
    border-color: #84aff0;
    outline: none;
    box-shadow:
        0 0 0 3px
        rgba(21,105,232,.07);
}

.sale-item-product small {
    display: block;
    margin-top: 5px;
    color: var(--secondary);
    font-size: 10px;
}

.sale-item-stock {
    min-height: 44px;
    display: flex;
    align-items: center;
}

.sale-item-stock strong {
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.sale-item-total {
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.sale-item-total strong {
    font-size: 13px;
    white-space: nowrap;
}

.sale-item-remove-cell {
    display: flex;
    align-items: center;
    justify-content: center;
}

.sale-item-remove {
    width: 38px;
    height: 38px;
    border: 1px solid #f0c6c6;
    border-radius: 9px;
    background: #fff7f7;
    color: #c53c3c;
    font-size: 21px;
    line-height: 1;
    cursor: pointer;
}

.sale-item-remove:hover {
    background: #ffeded;
}

.sale-item-remove:disabled {
    opacity: .35;
    cursor: not-allowed;
}

.sale-add-item-button {
    min-height: 43px;
    margin-top: 4px;
    padding: 0 16px;
    border: 1px dashed #8eb9f2;
    border-radius: 10px;
    background: #f5f9ff;
    color: var(--blue);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

.sale-add-item-button:hover {
    background: #edf5ff;
}

@media (max-width: 1250px) {

    .sale-items-header {
        display: none;
    }

    .sale-item-row {
        grid-template-columns:
            minmax(180px, 2fr)
            minmax(90px, 1fr)
            minmax(120px, 1fr);
    }

    .sale-item-product {
        grid-column: span 2;
    }

    .sale-item-total {
        justify-content: flex-start;
    }
}

@media (max-width: 620px) {

    .sale-item-row {
        grid-template-columns: 1fr;
    }

    .sale-item-product {
        grid-column: auto;
    }

    .sale-item-remove-cell {
        justify-content: flex-end;
    }

    .sale-item-total {
        justify-content: flex-start;
    }
}

/* WOOD_MULTI_ITEM_SALE_V1_END */

/* =========================================================
   WOOD_MULTI_ITEM_SALE_LAYOUT_V2
   ========================================================= */

#saleScreen .sale-layout {
    grid-template-columns:
        minmax(0, 1fr)
        360px;
}

#saleScreen .sale-form-card {
    min-width: 0;
}

#saleScreen #saleItemsContainer {
    width: 100%;
    min-width: 0;
}


/*
 * Desktop column layout:
 *
 * Product | Stock | Quantity | Price | Amount | Delete
 */
#saleScreen .sale-items-header,
#saleScreen .sale-item-row {
    grid-template-columns:
        minmax(150px, 1.75fr)
        minmax(82px, .72fr)
        minmax(105px, .90fr)
        minmax(125px, 1fr)
        minmax(105px, .90fr)
        38px;

    column-gap: 8px;
}


#saleScreen .sale-items-header {
    padding:
        0
        10px
        8px;

    box-sizing: border-box;
}


#saleScreen .sale-item-row {
    width: 100%;

    box-sizing: border-box;

    padding: 11px 10px;

    overflow: hidden;
}


#saleScreen .sale-item-cell {
    min-width: 0;
}


/* PRODUCT */

#saleScreen .sale-item-product select {
    width: 100%;
    min-width: 0;
}

#saleScreen .sale-item-product small {
    overflow: hidden;

    white-space: nowrap;

    text-overflow: ellipsis;
}


/* STOCK */

#saleScreen .sale-item-stock {
    min-width: 0;

    justify-content: flex-start;
}

#saleScreen .sale-item-stock strong {
    max-width: 100%;

    overflow: hidden;

    white-space: nowrap;

    text-overflow: ellipsis;
}


/* QUANTITY + PRICE */

#saleScreen .sale-item-cell .input-unit {
    width: 100%;
    min-width: 0;
}

#saleScreen .sale-item-cell .input-unit input {
    width: 100%;
    min-width: 0;

    box-sizing: border-box;
}


/* AMOUNT */

#saleScreen .sale-item-total {
    min-width: 0;

    justify-content: flex-end;

    text-align: right;
}

#saleScreen .sale-item-total strong {
    display: block;

    width: 100%;

    overflow: hidden;

    white-space: nowrap;

    text-overflow: ellipsis;

    text-align: right;

    font-size: 12px;
}


/* DELETE */

#saleScreen .sale-item-remove-cell {
    min-width: 38px;
}

#saleScreen .sale-item-remove {
    flex:
        0
        0
        36px;

    width: 36px;
    height: 36px;
}


/*
 * At normal notebook / smaller desktop widths,
 * keep the row in one line but give the form
 * more horizontal room.
 */
@media (max-width: 1350px) {

    #saleScreen .sale-layout {
        grid-template-columns:
            minmax(0, 1fr)
            320px;
    }

    #saleScreen .sale-items-header,
    #saleScreen .sale-item-row {
        grid-template-columns:
            minmax(135px, 1.65fr)
            minmax(78px, .72fr)
            minmax(95px, .90fr)
            minmax(115px, 1fr)
            minmax(95px, .90fr)
            36px;
    }
}


/*
 * Below this width summary moves underneath.
 * Product rows retain enough room instead of
 * pushing amount outside the card.
 */
@media (max-width: 1100px) {

    #saleScreen .sale-layout {
        grid-template-columns: 1fr;
    }

    #saleScreen .sale-summary-card {
        position: static;
    }
}


/*
 * Tablet: use a readable card layout.
 */
@media (max-width: 760px) {

    #saleScreen .sale-items-header {
        display: none;
    }

    #saleScreen .sale-item-row {
        grid-template-columns:
            minmax(0, 1fr)
            minmax(0, 1fr);

        gap: 12px;
    }

    #saleScreen .sale-item-product {
        grid-column:
            1 / -1;
    }

    #saleScreen .sale-item-stock {
        min-height: 36px;
    }

    #saleScreen .sale-item-total {
        justify-content: flex-start;

        text-align: left;
    }

    #saleScreen .sale-item-total strong {
        text-align: left;
    }

    #saleScreen .sale-item-remove-cell {
        justify-content: flex-end;
    }
}


/* Mobile */

@media (max-width: 520px) {

    #saleScreen .sale-item-row {
        grid-template-columns: 1fr;
    }

    #saleScreen .sale-item-remove-cell {
        justify-content: flex-end;
    }
}

/* WOOD_MULTI_ITEM_SALE_LAYOUT_V2_END */

/* =========================================================
   WOOD_SALE_INPUT_SPINNER_FIX_V1
   ========================================================= */

/*
 * Chrome / Edge / Safari:
 * number input-un sağındakı native oxları gizlədirik.
 * m³ və USD unit yazısı ilə üst-üstə düşməsin.
 */
#saleScreen input[type="number"]::-webkit-inner-spin-button,
#saleScreen input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}


/*
 * Firefox
 */
#saleScreen input[type="number"] {
    -moz-appearance: textfield;
}


/*
 * Unit üçün kifayət qədər sağ boşluq.
 */
#saleScreen .sale-item-cell .input-unit input {
    padding-right: 52px;
}

#saleScreen .sale-item-cell .input-unit > span {
    right: 12px;

    pointer-events: none;

    white-space: nowrap;
}


/*
 * Məbləğ sütununa bir az daha çox yer.
 */
#saleScreen .sale-items-header,
#saleScreen .sale-item-row {
    grid-template-columns:
        minmax(145px, 1.65fr)
        minmax(88px, .78fr)
        minmax(110px, .92fr)
        minmax(130px, 1.05fr)
        minmax(125px, 1fr)
        38px;
}


/*
 * Məbləğ daşmasın.
 */
#saleScreen .sale-item-total {
    overflow: visible;
}

#saleScreen .sale-item-total strong {
    overflow: visible;

    text-overflow: clip;

    font-variant-numeric:
        tabular-nums;
}


/*
 * 1350px-dən aşağı ekranlarda da
 * amount sütununu çox sıxmırıq.
 */
@media (max-width: 1350px) {

    #saleScreen .sale-items-header,
    #saleScreen .sale-item-row {
        grid-template-columns:
            minmax(130px, 1.55fr)
            minmax(82px, .75fr)
            minmax(100px, .9fr)
            minmax(120px, 1fr)
            minmax(115px, .95fr)
            36px;
    }
}

/* WOOD_SALE_INPUT_SPINNER_FIX_V1_END */

/* =========================================================
   WOOD_SALE_REDESIGN_V3
   Final desktop sale item layout
   Product | Qty | Price | Amount | Delete
   ========================================================= */

#saleScreen .sale-layout {
    grid-template-columns:
        minmax(0, 1fr)
        330px;

    gap: 22px;
}


/*
 * Give the sale form usable horizontal room.
 */
#saleScreen .sale-form-card {
    padding: 28px;

    min-width: 0;

    overflow: visible;
}


#saleScreen #saleItemsContainer {
    width: 100%;

    min-width: 0;
}


/*
 * FINAL FIVE-COLUMN LAYOUT
 */
#saleScreen .sale-items-header,
#saleScreen .sale-item-row {
    display: grid;

    grid-template-columns:
        minmax(210px, 2.1fr)
        minmax(105px, .85fr)
        minmax(130px, 1fr)
        minmax(125px, 1fr)
        40px;

    gap: 12px;

    width: 100%;

    box-sizing: border-box;
}


#saleScreen .sale-items-header {
    padding:
        0
        13px
        9px;

    align-items: end;

    color: var(--secondary);

    font-size: 12px;

    font-weight: 600;
}


#saleScreen .sale-items-header span:nth-child(4) {
    text-align: right;
}


/*
 * ROW CARD
 */
#saleScreen .sale-item-row {
    margin-bottom: 12px;

    padding: 14px 13px;

    align-items: center;

    border:
        1px solid
        #dfe6ef;

    border-radius: 13px;

    background:
        #fbfcfe;

    overflow: visible;
}


#saleScreen .sale-item-cell {
    min-width: 0;

    box-sizing: border-box;
}


/*
 * PRODUCT
 */
#saleScreen .sale-item-product {
    min-width: 0;
}


#saleScreen .sale-item-product select {
    display: block;

    width: 100%;

    min-width: 0;

    height: 46px;

    box-sizing: border-box;

    padding:
        0
        38px
        0
        13px;

    border:
        1px solid
        var(--border);

    border-radius: 10px;

    background: white;

    color: var(--text);

    font-size: 14px;
}


#saleScreen .sale-item-meta {
    display: flex;

    flex-wrap: wrap;

    align-items: center;

    gap: 5px;

    margin-top: 7px;

    color: var(--secondary);

    font-size: 10px;

    line-height: 1.35;
}


#saleScreen .sale-item-meta strong {
    color: #354158;

    font-weight: 600;
}


#saleScreen .sale-item-meta-dot {
    opacity: .5;
}


/*
 * INPUTS
 */
#saleScreen .sale-item-cell .input-unit {
    position: relative;

    width: 100%;

    min-width: 0;
}


#saleScreen .sale-item-cell .input-unit input {
    display: block;

    width: 100%;

    min-width: 0;

    height: 46px;

    box-sizing: border-box;

    padding:
        0
        48px
        0
        13px;

    border:
        1px solid
        var(--border);

    border-radius: 10px;

    background: white;

    color: var(--text);

    font-size: 14px;

    font-variant-numeric:
        tabular-nums;
}


#saleScreen .sale-item-cell .input-unit > span {
    position: absolute;

    right: 12px;

    top: 50%;

    transform:
        translateY(-50%);

    color: #78869b;

    font-size: 11px;

    pointer-events: none;
}


/*
 * Remove browser number spinners.
 */
#saleScreen
.sale-item-cell
input[type="number"]::-webkit-inner-spin-button,
#saleScreen
.sale-item-cell
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;

    margin: 0;
}


#saleScreen
.sale-item-cell
input[type="number"] {
    -moz-appearance: textfield;
}


/*
 * AMOUNT
 */
#saleScreen .sale-item-total {
    display: flex;

    flex-direction: column;

    align-items: flex-end;

    justify-content: center;

    min-width: 0;

    min-height: 46px;

    overflow: visible;

    text-align: right;
}


#saleScreen .sale-item-total strong {
    display: block;

    width: auto;

    max-width: none;

    overflow: visible;

    white-space: nowrap;

    text-overflow: clip;

    color: #162033;

    font-size: 14px;

    font-weight: 700;

    line-height: 1.2;

    font-variant-numeric:
        tabular-nums;
}


#saleScreen .sale-item-total > span {
    display: block;

    margin-top: 3px;

    color: var(--secondary);

    font-size: 9px;

    font-weight: 500;
}


/*
 * DELETE
 */
#saleScreen .sale-item-remove-cell {
    display: flex;

    align-items: center;

    justify-content: flex-end;

    min-width: 40px;
}


#saleScreen .sale-item-remove {
    width: 38px;

    height: 38px;

    flex:
        0
        0
        38px;

    padding: 0;

    border:
        1px solid
        #f0bebe;

    border-radius: 9px;

    background:
        #fff7f7;

    color:
        #d64343;

    font-size: 20px;

    line-height: 36px;

    text-align: center;

    cursor: pointer;
}


#saleScreen .sale-item-remove:disabled {
    opacity: .25;

    cursor: default;
}


/*
 * Add item
 */
#saleScreen .sale-add-item-button {
    margin-top: 4px;

    min-height: 44px;

    padding:
        0
        18px;
}


/*
 * Summary slightly narrower, form wider.
 */
#saleScreen .sale-summary-card {
    width: auto;

    min-width: 0;

    box-sizing: border-box;
}


/*
 * Medium desktop:
 * summary moves under form before rows become cramped.
 */
@media (max-width: 1180px) {

    #saleScreen .sale-layout {
        grid-template-columns:
            1fr;
    }

    #saleScreen .sale-summary-card {
        position: static;
    }
}


/*
 * Tablet.
 */
@media (max-width: 760px) {

    #saleScreen .sale-items-header {
        display: none;
    }

    #saleScreen .sale-item-row {
        grid-template-columns:
            minmax(0, 1fr)
            minmax(0, 1fr);

        gap: 12px;
    }

    #saleScreen .sale-item-product {
        grid-column:
            1 / -1;
    }

    #saleScreen .sale-item-total {
        align-items: flex-start;

        text-align: left;
    }

    #saleScreen .sale-item-remove-cell {
        justify-content: flex-end;
    }
}


/*
 * Mobile.
 */
@media (max-width: 520px) {

    #saleScreen .sale-form-card {
        padding: 18px;
    }

    #saleScreen .sale-item-row {
        grid-template-columns:
            1fr;
    }

    #saleScreen .sale-item-remove-cell {
        justify-content: flex-end;
    }
}

/* WOOD_SALE_REDESIGN_V3_END */

/* =========================================================
   WOOD_SALE_CARD_REDESIGN_V4
   ========================================================= */


/*
 * Main page:
 * form gets priority, summary stays fixed.
 */
#saleScreen .sale-layout {
    display: grid;

    grid-template-columns:
        minmax(0, 1fr)
        340px;

    gap: 24px;

    align-items: start;
}


#saleScreen .sale-form-card {
    min-width: 0;

    padding: 28px;
}


#saleScreen #saleItemsContainer {
    width: 100%;

    min-width: 0;
}


/*
 * Old table/grid concept is fully disabled.
 */
#saleScreen .sale-items-header {
    display: none !important;
}


/*
 * One product = one independent card.
 */
#saleScreen .sale-item-row {
    display: block;

    width: 100%;

    min-width: 0;

    box-sizing: border-box;

    margin-bottom: 14px;

    padding: 16px;

    border:
        1px solid
        #dfe6ef;

    border-radius: 14px;

    background:
        #fbfcfe;

    overflow: hidden;
}


/* =========================================================
   PRODUCT TOP
   ========================================================= */

#saleScreen .sale-product-top {
    display: grid;

    grid-template-columns:
        minmax(0, 1fr)
        40px;

    gap: 12px;

    align-items: start;
}


#saleScreen .sale-product-main {
    min-width: 0;
}


#saleScreen .sale-row-label {
    display: block;

    margin:
        0
        0
        7px;

    color:
        #65738a;

    font-size: 11px;

    font-weight: 600;
}


#saleScreen .sale-product-main select {
    width: 100%;

    height: 46px;

    box-sizing: border-box;

    padding:
        0
        42px
        0
        13px;

    border:
        1px solid
        var(--border);

    border-radius: 10px;

    background: white;

    color:
        var(--text);

    font-size: 14px;
}


#saleScreen .sale-product-main select:focus {
    outline: none;

    border-color:
        #84aff0;

    box-shadow:
        0 0 0 3px
        rgba(21,105,232,.07);
}


/*
 * Stock + reference under product name.
 */
#saleScreen .sale-item-meta {
    display: flex;

    flex-wrap: wrap;

    align-items: center;

    gap: 6px;

    margin-top: 7px;

    min-height: 16px;

    color:
        #78869b;

    font-size: 10px;

    line-height: 1.4;
}


#saleScreen .sale-item-meta strong {
    color:
        #364257;

    font-weight: 700;
}


#saleScreen .sale-item-meta-dot {
    color:
        #b3bdca;
}


/* =========================================================
   DELETE BUTTON
   ========================================================= */

#saleScreen .sale-item-remove {
    width: 38px;

    height: 38px;

    margin-top: 22px;

    padding: 0;

    border:
        1px solid
        #f0c1c1;

    border-radius: 9px;

    background:
        #fff7f7;

    color:
        #d74848;

    font-size: 20px;

    line-height: 36px;

    text-align: center;

    cursor: pointer;
}


#saleScreen .sale-item-remove:hover {
    background:
        #ffeded;
}


/*
 * One product exists by default.
 * No need to show disabled X.
 */
#saleScreen .sale-item-remove:disabled {
    visibility: hidden;
}


/* =========================================================
   QUANTITY / PRICE / AMOUNT
   ========================================================= */

#saleScreen .sale-product-values {
    display: grid;

    grid-template-columns:
        minmax(0, 1fr)
        minmax(0, 1fr)
        minmax(150px, .9fr);

    gap: 14px;

    margin-top: 16px;

    padding-top: 15px;

    border-top:
        1px solid
        #e7ecf3;
}


#saleScreen .sale-value-field {
    min-width: 0;
}


#saleScreen .sale-value-field .input-unit {
    position: relative;

    width: 100%;

    min-width: 0;
}


#saleScreen .sale-value-field input {
    width: 100%;

    min-width: 0;

    height: 46px;

    box-sizing: border-box;

    padding:
        0
        52px
        0
        13px;

    border:
        1px solid
        var(--border);

    border-radius: 10px;

    background: white;

    color:
        var(--text);

    font-size: 14px;

    font-variant-numeric:
        tabular-nums;
}


#saleScreen .sale-value-field input:focus {
    outline: none;

    border-color:
        #84aff0;

    box-shadow:
        0 0 0 3px
        rgba(21,105,232,.07);
}


#saleScreen .sale-value-field .input-unit > span {
    position: absolute;

    top: 50%;

    right: 12px;

    transform:
        translateY(-50%);

    color:
        #78869b;

    font-size: 11px;

    pointer-events: none;
}


/*
 * Browser spinner arrows off.
 */
#saleScreen
.sale-value-field
input[type="number"]::-webkit-inner-spin-button,
#saleScreen
.sale-value-field
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;

    margin: 0;
}


#saleScreen
.sale-value-field
input[type="number"] {
    -moz-appearance: textfield;
}


/* =========================================================
   AMOUNT
   ========================================================= */

#saleScreen .sale-amount-field {
    min-width: 0;
}


#saleScreen .sale-item-total {
    display: flex;

    align-items: baseline;

    justify-content: flex-end;

    gap: 6px;

    width: 100%;

    height: 46px;

    box-sizing: border-box;

    padding:
        0
        13px;

    border:
        1px solid
        #e4eaf2;

    border-radius: 10px;

    background:
        #f3f6fa;

    overflow: hidden;
}


#saleScreen .sale-item-total strong {
    min-width: 0;

    max-width: 100%;

    overflow: hidden;

    white-space: nowrap;

    text-overflow: ellipsis;

    color:
        #162033;

    font-size: 15px;

    font-weight: 750;

    font-variant-numeric:
        tabular-nums;
}


#saleScreen .sale-item-total span {
    flex:
        0
        0
        auto;

    color:
        #78869b;

    font-size: 10px;
}


/* =========================================================
   ADD PRODUCT
   ========================================================= */

#saleScreen .sale-add-item-button {
    min-height: 44px;

    margin-top: 2px;

    padding:
        0
        17px;

    border:
        1px dashed
        #76aef3;

    border-radius: 10px;

    background:
        #f5f9ff;

    color:
        var(--blue);

    font-size: 12px;

    font-weight: 650;

    cursor: pointer;
}


/* =========================================================
   SUMMARY
   ========================================================= */

#saleScreen .sale-summary-card {
    width: 100%;

    min-width: 0;

    box-sizing: border-box;
}


/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 1180px) {

    #saleScreen .sale-layout {
        grid-template-columns: 1fr;
    }

    #saleScreen .sale-summary-card {
        position: static;
    }
}


@media (max-width: 680px) {

    #saleScreen .sale-product-values {
        grid-template-columns:
            1fr
            1fr;
    }

    #saleScreen .sale-amount-field {
        grid-column:
            1 / -1;
    }
}


@media (max-width: 480px) {

    #saleScreen .sale-form-card {
        padding: 18px;
    }

    #saleScreen .sale-product-values {
        grid-template-columns:
            1fr;
    }

    #saleScreen .sale-amount-field {
        grid-column: auto;
    }
}

/* WOOD_SALE_CARD_REDESIGN_V4_END */

/* =========================================================
   WOOD_SALE_COSMETIC_FIX_V1
   ========================================================= */


/*
 * Amount + USD same line.
 */
#saleScreen .sale-item-total {
    display: flex;

    align-items: center;

    justify-content: flex-end;

    white-space: nowrap;
}


#saleScreen .sale-item-total strong {
    display: inline-flex;

    align-items: baseline;

    justify-content: flex-end;

    gap: 6px;

    width: 100%;

    white-space: nowrap;

    overflow: visible;

    text-overflow: clip;
}


#saleScreen .sale-item-total strong > span {
    display: inline;

    margin: 0;

    color: #78869b;

    font-size: 10px;

    font-weight: 500;

    flex: 0 0 auto;
}


/*
 * Single row: delete button hidden.
 * Multi-row: button becomes visible.
 *
 * JS already disables it when only one row exists.
 */
#saleScreen .sale-item-remove:disabled {
    visibility: hidden !important;

    opacity: 0 !important;

    pointer-events: none;
}


#saleScreen .sale-item-remove:not(:disabled) {
    visibility: visible;

    opacity: 1;
}


/* WOOD_SALE_COSMETIC_FIX_V1_END */


/* =========================================================
   WOOD DAILY REPORT + STOCK VALUE UI V1
   ========================================================= */


.manager-daily-section {
    margin-top: 26px;
}


.manager-daily-head {
    align-items: flex-end;
}


.manager-daily-date {
    padding:
        7px
        11px;

    border:
        1px solid
        var(--border);

    border-radius: 9px;

    background:
        #fff;

    color:
        var(--secondary);

    font-size: 11px;

    font-weight: 650;
}


.manager-daily-grid {
    display: grid;

    grid-template-columns:
        repeat(
            4,
            minmax(0, 1fr)
        );

    gap: 13px;

    margin-top: 13px;
}


.manager-daily-card {
    min-width: 0;

    min-height: 105px;

    display: flex;

    flex-direction: column;

    justify-content:
        space-between;

    padding: 18px;

    box-sizing: border-box;

    border:
        1px solid
        var(--border);

    border-radius: 15px;

    background:
        #fff;

    box-shadow:
        var(--shadow);
}


.manager-daily-card > span {
    color:
        var(--secondary);

    font-size: 12px;
}


.manager-daily-card > div {
    display: flex;

    align-items: baseline;

    gap: 5px;

    margin-top: 15px;

    min-width: 0;
}


.manager-daily-card strong {
    min-width: 0;

    overflow: hidden;

    white-space: nowrap;

    text-overflow: ellipsis;

    color:
        var(--text);

    font-size:
        clamp(
            20px,
            2vw,
            27px
        );

    font-weight: 780;

    letter-spacing:
        -.5px;

    font-variant-numeric:
        tabular-nums;
}


.manager-daily-card small {
    flex:
        0
        0
        auto;

    color:
        var(--secondary);

    font-size: 9px;
}


.manager-daily-note {
    display: block;

    margin-top: 6px;

    color:
        #8b95a5 !important;

    font-size:
        10px !important;
}


/*
 * Subtle category accents.
 */
.manager-daily-card.stock-volume {
    border-top:
        3px solid
        #2e7be8;
}


.manager-daily-card.stock-value {
    border-top:
        3px solid
        #6f5bd3;
}


.manager-daily-card.average-cost {
    border-top:
        3px solid
        #9a6ac7;
}


.manager-daily-card.sales {
    border-top:
        3px solid
        #24a26a;
}


.manager-daily-card.sold-volume {
    border-top:
        3px solid
        #3a9eb0;
}


.manager-daily-card.credit {
    border-top:
        3px solid
        #e59a32;
}


.manager-daily-card.payments {
    border-top:
        3px solid
        #cf6b5d;
}


/* =========================================================
   STOCK COST KPI
   ========================================================= */


#stockScreen .stock-kpis {
    grid-template-columns:
        repeat(
            5,
            minmax(0, 1fr)
        );
}


.stock-cost-manager-only strong {
    font-variant-numeric:
        tabular-nums;
}


#stockValueKpiCard {
    border-top:
        3px solid
        #6f5bd3;
}


#stockAverageKpiCard {
    border-top:
        3px solid
        #9a6ac7;
}


/* =========================================================
   RESPONSIVE
   ========================================================= */


@media (max-width: 1150px) {

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


    #stockScreen .stock-kpis {
        grid-template-columns:
            repeat(
                2,
                minmax(0, 1fr)
            );
    }
}


@media (max-width: 600px) {

    .manager-daily-grid {
        grid-template-columns:
            1fr;
    }


    #stockScreen .stock-kpis {
        grid-template-columns:
            1fr;
    }


    .manager-daily-head {
        align-items:
            flex-start;

        flex-direction:
            column;

        gap: 8px;
    }
}


/* WOOD DAILY REPORT + STOCK VALUE UI V1 END */



/* =========================================================
   WOOD DAILY REPORT SEPARATE SCREEN V1
   ========================================================= */


#dailyReportScreen {
    width: 100%;
}


.daily-report-page-head {
    display: flex;

    align-items: flex-end;

    justify-content:
        space-between;

    gap: 24px;

    margin-bottom: 22px;
}


.daily-report-page-head h2 {
    margin:
        0
        0
        5px;

    color:
        var(--text);

    font-size: 25px;
}


.daily-report-page-head p {
    margin: 0;

    color:
        var(--secondary);

    font-size: 12px;
}


.daily-report-date-control {
    min-width: 285px;
}


.daily-report-date-control label {
    display: block;

    margin-bottom: 6px;

    color:
        var(--secondary);

    font-size: 11px;

    font-weight: 650;
}


.daily-report-date-row {
    display: flex;

    gap: 8px;
}


.daily-report-date-row input {
    min-width: 170px;

    height: 40px;

    padding:
        0
        12px;

    box-sizing:
        border-box;

    border:
        1px solid
        var(--border);

    border-radius: 9px;

    background:
        #fff;

    color:
        var(--text);

    font-family:
        inherit;

    font-size: 12px;
}


.daily-report-date-row .primary-button {
    min-width: 90px;

    height: 40px;
}


.daily-report-page-grid {
    margin-top: 0;
}


.daily-report-message {
    margin-bottom: 14px;

    padding:
        11px
        13px;

    border:
        1px solid
        #dce4ee;

    border-radius: 9px;

    background:
        #f7f9fc;

    font-size: 12px;
}


.daily-report-message.error {
    border-color:
        #f0c7c7;

    background:
        #fff5f5;

    color:
        #a73535;
}


@media (max-width: 800px) {

    .daily-report-page-head {
        align-items:
            stretch;

        flex-direction:
            column;
    }


    .daily-report-date-control {
        min-width: 0;
    }


    .daily-report-date-row {
        width: 100%;
    }


    .daily-report-date-row input {
        flex: 1;

        min-width: 0;
    }
}


/* WOOD DAILY REPORT SEPARATE SCREEN V1 END */



/* =========================================================
   WOOD DAILY REPORT LAYOUT FIX V1
   ========================================================= */


#dailyReportScreen {
    width: 100%;

    min-width: 0;

    box-sizing: border-box;

    margin: 0;

    padding: 0;
}


#dailyReportScreen:not(.hidden) {
    display: block;
}


/*
 * Başlıq + tarix filteri eyni üst sətirdə.
 */
#dailyReportScreen .daily-report-page-head {
    width: 100%;

    box-sizing: border-box;

    display: flex;

    align-items: flex-end;

    justify-content: space-between;

    gap: 24px;

    margin: 0 0 24px 0;
}


/*
 * KPI bloklarının content sahəsini tam istifadə etməsi.
 */
#dailyReportScreen .manager-daily-grid {
    width: 100%;

    box-sizing: border-box;

    display: grid;

    grid-template-columns:
        repeat(
            4,
            minmax(0, 1fr)
        );

    gap: 16px;
}


#dailyReportScreen .manager-daily-card {
    min-width: 0;

    box-sizing: border-box;
}


/*
 * İkinci sıradakı 3 kartın da normal ölçüdə qalması.
 */
#dailyReportScreen .manager-daily-card {
    width: 100%;
}


/*
 * Tarix sahəsi sağ tərəfdə kompakt qalsın.
 */
#dailyReportScreen .daily-report-date-control {
    flex: 0 0 auto;

    min-width: 280px;
}


#dailyReportScreen .daily-report-date-row {
    display: flex;

    align-items: center;

    gap: 10px;
}


#dailyReportScreen .daily-report-date-row input {
    height: 42px;
}


#dailyReportScreen .daily-report-date-row button {
    height: 42px;
}


/*
 * Tablet
 */
@media (max-width: 1200px) {

    #dailyReportScreen .manager-daily-grid {
        grid-template-columns:
            repeat(
                2,
                minmax(0, 1fr)
            );
    }
}


/*
 * Mobil
 */
@media (max-width: 700px) {

    #dailyReportScreen .daily-report-page-head {
        align-items: stretch;

        flex-direction: column;
    }


    #dailyReportScreen .daily-report-date-control {
        width: 100%;

        min-width: 0;
    }


    #dailyReportScreen .daily-report-date-row {
        width: 100%;
    }


    #dailyReportScreen .daily-report-date-row input {
        flex: 1;

        min-width: 0;
    }


    #dailyReportScreen .manager-daily-grid {
        grid-template-columns: 1fr;
    }
}


/* WOOD DAILY REPORT LAYOUT FIX V1 END */



/* =========================================================
   WOOD DAILY EXECUTIVE REPORT V2
   ========================================================= */


#dailyReportScreen {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
}


.exec-daily-top {
    display: flex;

    align-items: flex-end;

    justify-content:
        space-between;

    gap: 24px;

    margin-bottom: 16px;
}


.exec-daily-title h2 {
    margin: 0 0 5px 0;

    font-size: 26px;

    line-height: 1.15;

    color: #172033;
}


.exec-daily-title p {
    margin: 0;

    font-size: 13px;

    color: #7b879a;
}


.exec-daily-filter {
    min-width: 285px;
}


.exec-daily-filter label {
    display: block;

    margin-bottom: 6px;

    font-size: 11px;

    font-weight: 700;

    color: #69778c;
}


.exec-daily-filter-row {
    display: flex;

    gap: 9px;
}


.exec-daily-filter-row input {
    width: 178px;

    height: 42px;

    box-sizing: border-box;

    border: 1px solid #dfe5ee;

    border-radius: 10px;

    background: #fff;

    padding: 0 12px;

    color: #182236;

    font: inherit;

    font-size: 12px;
}


.exec-daily-filter-row button {
    height: 42px;

    min-width: 88px;
}


.exec-daily-period-note {
    margin-bottom: 16px;

    padding: 10px 13px;

    border: 1px solid #dce8fa;

    border-radius: 10px;

    background: #f7faff;

    color: #65748b;

    font-size: 12px;

    font-weight: 600;
}


/* GROUP */

.exec-daily-group {
    margin-bottom: 15px;

    padding: 16px;

    border-radius: 14px;

    border: 1px solid #e6eaf0;

    box-sizing: border-box;
}


.exec-daily-stock {
    border-color: #d7ebdf;

    background:
        linear-gradient(
            180deg,
            #fbfefc 0%,
            #f7fcf9 100%
        );
}


.exec-daily-sales {
    border-color: #d9e6fa;

    background:
        linear-gradient(
            180deg,
            #fbfdff 0%,
            #f7faff 100%
        );
}


.exec-daily-debt {
    border-color: #f0dfd4;

    background:
        linear-gradient(
            180deg,
            #fffdfb 0%,
            #fff9f5 100%
        );
}


.exec-daily-group-head {
    display: flex;

    align-items: center;

    justify-content:
        space-between;

    gap: 15px;

    margin-bottom: 13px;

    padding: 0 2px;
}


.exec-daily-group-head h3 {
    margin: 0 0 3px;

    font-size: 14px;

    letter-spacing: .045em;

    color: #172033;
}


.exec-daily-group-head p {
    margin: 0;

    font-size: 11px;

    color: #8490a2;
}


.exec-daily-stock
.exec-daily-group-head h3 {
    color: #16874b;
}


.exec-daily-sales
.exec-daily-group-head h3 {
    color: #1974dd;
}


.exec-daily-debt
.exec-daily-group-head h3 {
    color: #d75c3d;
}


/* GRID */

.exec-daily-grid {
    display: grid;

    gap: 12px;

    width: 100%;
}


.exec-daily-grid.three {
    grid-template-columns:
        repeat(
            3,
            minmax(0, 1fr)
        );
}


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


/* KPI */

.exec-daily-kpi {
    min-width: 0;

    min-height: 122px;

    padding: 17px 18px;

    box-sizing: border-box;

    border: 1px solid #e4e8ef;

    border-radius: 12px;

    background: #fff;

    box-shadow:
        0 1px 2px
        rgba(20, 30, 50, .025);
}


.exec-daily-kpi > span {
    display: block;

    min-height: 31px;

    color: #687589;

    font-size: 12px;

    line-height: 1.35;
}


.exec-daily-value {
    display: flex;

    align-items: baseline;

    flex-wrap: wrap;

    gap: 7px;

    margin-top: 7px;
}


.exec-daily-value strong {
    min-width: 0;

    color: #172033;

    font-size: clamp(
        24px,
        2vw,
        31px
    );

    font-weight: 760;

    letter-spacing: -.025em;

    line-height: 1.1;

    word-break: break-word;
}


.exec-daily-value small {
    color: #8490a3;

    font-size: 10px;

    font-weight: 600;
}


.exec-daily-stock
.exec-daily-value strong {
    color: #16874b;
}


.exec-daily-sales
.exec-daily-value strong {
    color: #1974dd;
}


.exec-daily-debt
.exec-daily-value strong {
    color: #d34f3f;
}


.exec-daily-help {
    margin-top: 9px;

    color: #99a3b2;

    font-size: 10px;

    line-height: 1.35;
}


.exec-daily-mini-status {
    flex: 0 0 auto;

    padding:
        6px
        10px;

    border-radius: 999px;

    background: #fff2e9;

    color: #cf5a32;

    font-size: 11px;

    font-weight: 700;
}


/* RESPONSIVE */

@media (max-width: 1150px) {

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

}


@media (max-width: 720px) {

    .exec-daily-top {
        flex-direction: column;

        align-items: stretch;
    }


    .exec-daily-filter {
        min-width: 0;

        width: 100%;
    }


    .exec-daily-filter-row {
        width: 100%;
    }


    .exec-daily-filter-row input {
        flex: 1;

        width: auto;

        min-width: 0;
    }


    .exec-daily-grid.three,
    .exec-daily-grid.two {
        grid-template-columns: 1fr;
    }


    .exec-daily-group-head {
        align-items: flex-start;

        flex-direction: column;
    }

}


/* WOOD DAILY EXECUTIVE REPORT V2 END */



/* =========================================================
   WOOD DAILY REPORT UNIT FONT SIZE FIX V1
   ========================================================= */


#dailyReportScreen
.exec-daily-value small {

    font-size: 13px;

    font-weight: 700;

    line-height: 1.2;

    color: #6f7c90;
}


/*
 * USD/m³ bir az uzun olduğuna görə
 * çox sıx görünməsin.
 */
#dailyReportScreen
.exec-daily-value small {

    letter-spacing: .01em;
}


/*
 * Kiçik ekranlarda da oxunaqlı qalsın.
 */
@media (max-width: 720px) {

    #dailyReportScreen
    .exec-daily-value small {

        font-size: 12px;
    }
}


/* WOOD DAILY REPORT UNIT FONT SIZE FIX V1 END */



/* =========================================================
   WOOD DAILY REPORT STOCK ALERT V1
   ========================================================= */


/*
 * SATIŞ SAYI
 *
 * Borclu müştəri pill-i ilə eyni prinsip.
 */
#dailyReportScreen
.exec-daily-sales-status {

    flex: 0 0 auto;

    margin: 0;

    padding:
        6px
        11px;

    border-radius: 999px;

    background: #eaf3ff;

    color: #1974dd;

    font-size: 11px;

    font-weight: 700;

    line-height: 1.2;
}


/*
 * ANBAR STATUS
 */
#dailyReportScreen
.exec-daily-stock-status {

    display: flex;

    flex-direction: column;

    align-items: flex-end;

    gap: 2px;

    flex: 0 0 auto;

    padding:
        7px
        11px;

    border-radius: 10px;

    border: 1px solid transparent;
}


#dailyReportScreen
.exec-daily-stock-status strong {

    font-size: 11px;

    font-weight: 800;

    line-height: 1.2;
}


#dailyReportScreen
.exec-daily-stock-status span {

    font-size: 9px;

    font-weight: 600;

    line-height: 1.3;
}


/*
 * NORMAL
 */
#dailyReportScreen
.exec-daily-stock-status.normal {

    background: #edf9f1;

    border-color: #cfead8;

    color: #16874b;
}


/*
 * XƏBƏRDARLIQ
 */
#dailyReportScreen
.exec-daily-stock-status.warning {

    background: #fff8df;

    border-color: #f1db86;

    color: #a46b00;
}


/*
 * KRİTİK
 */
#dailyReportScreen
.exec-daily-stock-status.critical {

    background: #fff0ef;

    border-color: #f0c2be;

    color: #c83f35;
}


@media (max-width: 720px) {

    #dailyReportScreen
    .exec-daily-stock-status {

        align-items: flex-start;

        width: 100%;

        box-sizing: border-box;
    }


    #dailyReportScreen
    .exec-daily-sales-status {

        align-self: flex-start;
    }
}


/* WOOD DAILY REPORT STOCK ALERT V1 END */


/* FINAL CASHBOX FIVE CARD GRID */

#financeDashboardSection .finance-kpi-grid {

    grid-template-columns: repeat(5, minmax(0, 1fr));

}



#financeDashboardSection .finance-kpi-card.seller-cash {

    min-width: 0;

}



@media (max-width: 1200px) {

    #financeDashboardSection .finance-kpi-grid {

        grid-template-columns: repeat(3, minmax(0, 1fr));

    }

}



@media (max-width: 760px) {

    #financeDashboardSection .finance-kpi-grid {

        grid-template-columns: 1fr;

    }

}










/* =========================================================
   WOOD DAILY CASHBOX EXISTING DESIGN THEME V3
   ========================================================= */


/*
 * Vacib:
 * layout, ölçülər, radius, shadow, spacing və fontlar
 * mövcud .exec-daily-group / .exec-daily-card dizaynından gəlir.
 *
 * Burada yalnız KASSA-nın rəng teması dəyişir.
 */


/* KASSA əsas blok */

#dailyReportScreen
.exec-daily-group.exec-daily-cashbox {

    border-color: #bfe5cf;

    background:
        linear-gradient(
            180deg,
            #fbfffc 0%,
            #f8fdf9 100%
        );
}


/* KASSA başlığı */

#dailyReportScreen
.exec-daily-cashbox
.exec-daily-group-head h3 {

    color: #16874b;
}


/* Başlıq altı mətn */

#dailyReportScreen
.exec-daily-cashbox
.exec-daily-group-head p {

    color: #81908a;
}


/* Kartlar SATIŞ / BORCLAR kartları ilə eyni qalsın */

#dailyReportScreen
.exec-daily-cashbox
.exec-daily-card {

    background: #ffffff;

    border-color: #dce9e1;
}


/* Əsas rəqəmlər */

#dailyReportScreen
.exec-daily-cashbox
.exec-daily-value {

    color: #16874b;
}


/* USD */

#dailyReportScreen
.exec-daily-cashbox
.exec-daily-value small {

    color: #6f7c90;
}


/* Kart başlığı */

#dailyReportScreen
.exec-daily-cashbox
.exec-daily-label {

    color: #6f7c90;
}


/* Alt izah */

#dailyReportScreen
.exec-daily-cashbox
.exec-daily-note {

    color: #99a3b2;
}


/* WOOD DAILY CASHBOX EXISTING DESIGN THEME V3 END */



/* =========================================================
   WOOD_OPENING_BALANCE_FRONTEND_V1
   ========================================================= */

.opening-balance-screen {
    padding-bottom: 40px;
}

.opening-layout {
    display: grid;
    gap: 18px;
}

.opening-card {
    background: var(--card-bg, #fff);
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 18px;
    padding: 22px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}

.opening-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
}

.opening-card-head h3 {
    margin: 0 0 5px;
    font-size: 18px;
}

.opening-card-head p {
    margin: 0;
    color: #64748b;
    font-size: 13px;
    line-height: 1.5;
}

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

.opening-notes-field {
    margin-top: 18px;
}

.opening-notes-field textarea {
    width: 100%;
    resize: vertical;
}

.opening-money-input {
    display: flex;
    align-items: center;
    overflow: hidden;
    border: 1px solid #dbe3ee;
    border-radius: 10px;
    background: #fff;
}

.opening-money-input:focus-within {
    border-color: #64748b;
}

.opening-money-input input {
    flex: 1;
    min-width: 0;
    border: 0 !important;
    box-shadow: none !important;
}

.opening-money-input span {
    padding: 0 12px;
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.opening-rows {
    display: grid;
    gap: 12px;
}

.opening-row {
    position: relative;
    display: grid;
    align-items: end;
    gap: 12px;
    padding: 16px 54px 16px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #f8fafc;
}

.opening-stock-row {
    grid-template-columns:
        minmax(150px, 1fr)
        minmax(180px, 1.4fr)
        minmax(140px, .8fr)
        minmax(170px, 1fr);
}

.opening-debt-row {
    grid-template-columns:
        minmax(220px, 2fr)
        minmax(180px, 1fr);
}

.opening-remove-button {
    position: absolute;
    top: 50%;
    right: 14px;
    width: 32px;
    height: 32px;
    transform: translateY(-50%);
    border: 0;
    border-radius: 9px;
    background: #fee2e2;
    color: #b91c1c;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}

.opening-remove-button:hover {
    background: #fecaca;
}

.opening-summary-card {
    border-width: 2px;
}

.opening-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.opening-summary-grid article {
    display: grid;
    gap: 8px;
    padding: 16px;
    border-radius: 14px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

.opening-summary-grid span {
    color: #64748b;
    font-size: 12px;
    font-weight: 600;
}

.opening-summary-grid strong {
    color: #0f172a;
    font-size: 17px;
}

.opening-final-warning {
    margin-top: 18px;
    padding: 14px 16px;
    border: 1px solid #f59e0b;
    border-radius: 12px;
    background: #fffbeb;
    color: #92400e;
    line-height: 1.5;
}

.opening-create-button {
    margin-top: 18px;
    min-width: 230px;
}

.opening-readonly-banner {
    margin-bottom: 18px;
    padding: 14px 16px;
    border: 1px solid #86efac;
    border-radius: 12px;
    background: #f0fdf4;
    color: #166534;
    font-weight: 600;
}

.opening-finalized-badge {
    display: inline-flex;
    align-items: center;
    padding: 7px 11px;
    border-radius: 999px;
    background: #dcfce7;
    color: #166534;
    font-size: 12px;
    font-weight: 800;
}

.opening-readonly-table {
    display: grid;
    gap: 10px;
}

.opening-readonly-row {
    display: grid;
    grid-template-columns:
        1fr 1.3fr .7fr .8fr;
    gap: 12px;
    padding: 14px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #f8fafc;
}

.opening-readonly-row > div {
    display: grid;
    gap: 5px;
}

.opening-readonly-row span {
    color: #64748b;
    font-size: 11px;
    font-weight: 600;
}

.opening-readonly-row strong {
    color: #0f172a;
    font-size: 14px;
}

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

.opening-readonly-note {
    white-space: pre-wrap;
    color: #334155;
    line-height: 1.6;
}

.opening-empty {
    padding: 22px;
    border: 1px dashed #cbd5e1;
    border-radius: 12px;
    background: #f8fafc;
    color: #64748b;
    text-align: center;
    line-height: 1.6;
}

@media (max-width: 1100px) {
    .opening-form-grid,
    .opening-summary-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

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

@media (max-width: 700px) {
    .opening-card {
        padding: 16px;
    }

    .opening-card-head {
        flex-direction: column;
    }

    .opening-form-grid,
    .opening-summary-grid,
    .opening-stock-row,
    .opening-debt-row,
    .opening-readonly-row,
    .opening-readonly-debt {
        grid-template-columns: 1fr;
    }

    .opening-row {
        padding-right: 16px;
        padding-bottom: 58px;
    }

    .opening-remove-button {
        top: auto;
        right: 16px;
        bottom: 14px;
        transform: none;
    }

    .opening-create-button {
        width: 100%;
        min-width: 0;
    }
}



/* =========================================================
   WOOD OPENING SUPPLIER + SUPPLIER MANAGEMENT V1
   ========================================================= */

.opening-supplier-row {
    grid-template-columns:
        minmax(240px, 2fr)
        minmax(180px, 1fr);
}


.supplier-screen {
    padding-bottom: 40px;
}


.supplier-kpi-grid {
    display: grid;
    grid-template-columns:
        repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}


.supplier-kpi {
    display: grid;
    gap: 8px;
    padding: 18px;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    background: #fff;
}


.supplier-kpi span {
    color: #64748b;
    font-size: 12px;
    font-weight: 600;
}


.supplier-kpi strong {
    color: #0f172a;
    font-size: 22px;
}


.supplier-layout {
    display: grid;
    grid-template-columns:
        minmax(320px, .8fr)
        minmax(420px, 1.2fr);
    gap: 18px;
    align-items: start;
}


.supplier-search {
    width: min(280px, 100%);
}


.supplier-list {
    display: grid;
    gap: 9px;
}


.supplier-list-row {
    width: 100%;
    display: grid;
    grid-template-columns:
        minmax(0, 1fr)
        auto;
    align-items: center;
    gap: 16px;
    padding: 14px 15px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #f8fafc;
    color: #0f172a;
    text-align: left;
    cursor: pointer;
}


.supplier-list-row:hover {
    border-color: #94a3b8;
    background: #fff;
}


.supplier-list-row.selected {
    border-color: #64748b;
    background: #fff;
}


.supplier-list-row > div:first-child {
    min-width: 0;
    display: grid;
    gap: 5px;
}


.supplier-list-row > div:first-child strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}


.supplier-list-row span {
    color: #64748b;
    font-size: 12px;
}


.supplier-list-balance {
    display: grid;
    gap: 4px;
    text-align: right;
}


.supplier-list-balance strong {
    white-space: nowrap;
}


.supplier-detail-balance {
    display: grid;
    gap: 7px;
    padding: 18px;
    margin-bottom: 22px;
    border: 1px solid #dbeafe;
    border-radius: 14px;
    background: #eff6ff;
}


.supplier-detail-balance span {
    color: #475569;
    font-size: 12px;
    font-weight: 600;
}


.supplier-detail-balance strong {
    color: #0f172a;
    font-size: 26px;
}


.supplier-detail-balance small {
    color: #64748b;
    line-height: 1.5;
}


.supplier-detail-balance.supplier-position-debt {
    border-color: #fecaca;
    background: #fef2f2;
}


.supplier-detail-balance.supplier-position-advance {
    border-color: #bbf7d0;
    background: #f0fdf4;
}


.supplier-history-legacy-title {
    white-space: pre-wrap;
}


.supplier-history-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}


.supplier-history-head h4 {
    margin: 0;
}


.supplier-history-head span {
    color: #64748b;
    font-size: 12px;
}


.supplier-history {
    display: grid;
    gap: 9px;
}


.supplier-history-row {
    display: grid;
    grid-template-columns:
        minmax(0, 1fr)
        auto;
    gap: 16px;
    align-items: center;
    padding: 13px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #f8fafc;
}


.supplier-history-row > div {
    display: grid;
    gap: 4px;
}


.supplier-history-row span,
.supplier-history-row small {
    color: #64748b;
    font-size: 11px;
}


.supplier-positive {
    color: #15803d;
}


.supplier-negative {
    color: #b91c1c;
}


.supplier-modal-content {
    width: min(520px, calc(100vw - 32px));
}


.supplier-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}


.supplier-advance-preview {
    display: grid;
    grid-template-columns:
        repeat(3, minmax(0, 1fr));
    gap: 9px;
    margin-top: 16px;
}


.supplier-advance-preview > div {
    display: grid;
    gap: 5px;
    padding: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #f8fafc;
}


.supplier-advance-preview span {
    color: #64748b;
    font-size: 11px;
}


.supplier-advance-preview strong {
    color: #0f172a;
    font-size: 14px;
}


@media (max-width: 1100px) {

    .supplier-layout {
        grid-template-columns: 1fr;
    }

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


@media (max-width: 700px) {

    .opening-supplier-row,
    .supplier-kpi-grid,
    .supplier-advance-preview {
        grid-template-columns: 1fr;
    }

    .supplier-list-row,
    .supplier-history-row {
        grid-template-columns: 1fr;
    }

    .supplier-list-balance {
        text-align: left;
    }

    .supplier-modal-actions {
        flex-direction: column-reverse;
    }

    .supplier-modal-actions button {
        width: 100%;
    }
}

/* WOOD OPENING SUPPLIER + SUPPLIER MANAGEMENT V1 END */


/* WOOD_PHASE8F_OPENING_INLINE_UI_V1 START */

/*
 * Opening Balance:
 * inline master-data creation buttons.
 */
.opening-inline-master-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: auto;
    min-height: 36px;

    margin-top: 9px;
    padding: 7px 13px;

    border:
        1px solid
        rgba(35, 113, 238, .24);

    border-radius: 10px;

    background:
        rgba(35, 113, 238, .065);

    color:
        #1769d3;

    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;

    white-space: nowrap;

    cursor: pointer;

    transition:
        background .16s ease,
        border-color .16s ease,
        box-shadow .16s ease,
        transform .16s ease;
}


.opening-inline-master-button:hover {
    background:
        rgba(35, 113, 238, .11);

    border-color:
        rgba(35, 113, 238, .38);

    box-shadow:
        0 4px 12px
        rgba(35, 113, 238, .10);
}


.opening-inline-master-button:active {
    transform:
        translateY(1px);
}


.opening-inline-master-button:focus-visible {
    outline:
        3px solid
        rgba(35, 113, 238, .14);

    outline-offset:
        2px;
}


/*
 * Supplier create form now uses the same centered modal
 * system as New Customer.
 */
#supplierCreateModal .supplier-modal-content {
    width:
        min(520px, 100%);
}


#supplierCreateModal .supplier-modal-content
.form-field {
    margin-top:
        16px;
}


#supplierCreateModal .supplier-modal-actions {
    margin-top:
        22px;
}


/* WOOD_PHASE8F_OPENING_INLINE_UI_V1 END */


/* WOOD_PHASE8F_OPENING_ROW_ALIGNMENT_V1 START */

/*
 * Inline create düyməsi birinci sütunu hündürləndirir.
 * Məbləğ sahəsi isə həmin əlavə hündürlüyə görə aşağı
 * çəkilməməlidir.
 *
 * Borc / avans inputları həmişə select ilə eyni
 * yuxarı xəttdə saxlanılır.
 */
.opening-debt-row > .form-field:nth-child(2),
.opening-supplier-row > .form-field:nth-child(2) {
    align-self: start;
}


/*
 * Sətri sil düyməsi də select/input səviyyəsində qalsın.
 * 29px label + field aralığına uyğunlaşdırılıb.
 */
.opening-debt-row > .opening-remove-button,
.opening-supplier-row > .opening-remove-button {
    align-self: start;
    margin-top: 29px;
}


/* WOOD_PHASE8F_OPENING_ROW_ALIGNMENT_V1 END */



/* =========================================================
   WOOD_PHASE8J_CUSTOMER_SUPPLIER_LIFECYCLE_UI_V1
   ========================================================= */

.customer-detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.customer-detail-actions button {
    min-height: 40px;
}

.customer-admin-action {
    white-space: nowrap;
}

.supplier-detail-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.supplier-detail-actions button {
    white-space: nowrap;
}

.supplier-detail-actions button:disabled {
    opacity: .5;
    cursor: not-allowed;
}

#customerEditModal .modal-card,
#supplierEditModal .supplier-modal-content {
    width: min(520px, calc(100vw - 32px));
}

@media (max-width: 700px) {
    .customer-detail-actions,
    .supplier-detail-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .customer-detail-actions button,
    .supplier-detail-actions button {
        width: 100%;
    }
}

/* WOOD_PHASE8J_CUSTOMER_SUPPLIER_LIFECYCLE_UI_V1 END */


/* =========================================================
   WOOD_PHASE8N_DASHBOARD_LIVE_REFRESH_CSS_V2 BEGIN
   ========================================================= */

.wood-dashboard-live-bar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 14px;
    width: 100%;
    box-sizing: border-box;
    margin: 0 0 12px 0;
    padding: 7px 10px;
    border: 1px solid rgba(120, 130, 145, 0.18);
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.035);
}

.wood-dashboard-live-info {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    font-size: 12px;
}

.wood-dashboard-live-status {
    font-weight: 700;
    color: #2ea66b;
}

.wood-dashboard-live-time {
    color: #7c8797;
    font-variant-numeric: tabular-nums;
}

.wood-dashboard-live-button {
    min-height: 31px;
    padding: 5px 11px;
    border: 1px solid rgba(120, 130, 145, 0.25);
    border-radius: 8px;
    background: transparent;
    color: inherit;
    cursor: pointer;
    font: inherit;
    font-size: 12px;
    font-weight: 700;
}

.wood-dashboard-live-button:hover {
    background: rgba(120, 130, 145, 0.08);
}

.wood-dashboard-live-button:disabled {
    cursor: default;
    opacity: 0.55;
}

.wood-dashboard-live-bar.is-loading
.wood-dashboard-live-status {
    opacity: 0.7;
}

.wood-dashboard-live-bar.is-error
.wood-dashboard-live-status {
    color: #c94b42;
}

@media (max-width: 700px) {

    .wood-dashboard-live-bar {
        justify-content: space-between;
    }

    .wood-dashboard-live-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 2px;
    }
}

/* WOOD_PHASE8N_DASHBOARD_LIVE_REFRESH_CSS_V2 END */



/* WOOD_PHASE9B5_SALE_DATE_ROLE_UI */
.sale-date-hint {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    line-height: 1.35;
    color: #738095;
}

#saleDate:disabled {
    cursor: not-allowed;
    opacity: 0.78;
}


/* =========================================================
   PHASE 9B6 — BACKDATED SALE AUDIT VISIBILITY
   ========================================================= */

.sales-detail-backdated-notice {
    margin: 18px 0 22px;
    padding: 18px 20px;
    border: 1px solid #f0c36a;
    border-radius: 16px;
    background: #fff8e7;
}

.sales-detail-backdated-notice[hidden] {
    display: none !important;
}

.sales-detail-backdated-notice-title {
    margin-bottom: 6px;
    font-size: 15px;
    font-weight: 800;
    color: #8a5700;
}

.sales-detail-backdated-notice-text {
    font-size: 14px;
    line-height: 1.55;
    color: #73511a;
}


/* =========================================================
   WOOD_SALE_AMOUNT_PRESENTATION_V1
   Calculated amount styled consistently with sale inputs.
   ========================================================= */

#saleScreen .sale-amount-field .sale-item-total {
    position: relative;

    display: flex;
    flex-direction: row;

    align-items: center;
    justify-content: flex-end;

    width: 100%;
    min-width: 0;

    height: 46px;
    min-height: 46px;

    box-sizing: border-box;

    padding:
        0
        48px
        0
        13px;

    border:
        1px solid
        var(--border);

    border-radius: 10px;

    background: #f4f7fb;

    overflow: hidden;

    text-align: right;
}


#saleScreen .sale-amount-field .sale-item-total-value {
    display: block;

    width: 100%;
    min-width: 0;

    margin: 0;

    overflow: hidden;

    white-space: nowrap;

    text-overflow: ellipsis;

    color: var(--text);

    font-size: 14px;
    font-weight: 700;

    line-height: 1;

    text-align: right;

    font-variant-numeric:
        tabular-nums;
}


#saleScreen .sale-amount-field .sale-item-total-currency {
    position: absolute;

    right: 12px;
    top: 50%;

    transform:
        translateY(-50%);

    color: #78869b;

    font-size: 11px;
    font-weight: 500;

    line-height: 1;

    pointer-events: none;

    white-space: nowrap;
}


@media (max-width: 760px) {

    #saleScreen .sale-amount-field .sale-item-total {
        justify-content: flex-end;
        text-align: right;
    }

    #saleScreen .sale-amount-field .sale-item-total-value {
        text-align: right;
    }
}

/* WOOD_SALE_AMOUNT_PRESENTATION_V1_END */

/* =========================================================
   WOOD_PHASE9E3_PAYMENT_METHOD_SELECT_VISIBLE_V1
   Debt payment method is a real visible select.
   Do not use .customer-native-select here because that class
   intentionally hides native selects used behind custom pickers.
   ========================================================= */

.payment-method-select {
    width: 100%;
    height: 46px;

    padding:
        0
        42px
        0
        14px;

    border:
        1px
        solid
        var(--border);

    border-radius: 10px;

    background-color: #fff;

    color: var(--text);

    font: inherit;
    font-size: 13px;

    outline: none;
    cursor: pointer;

    transition:
        border-color .15s ease,
        box-shadow .15s ease;
}

.payment-method-select:focus {
    border-color: var(--blue);

    box-shadow:
        0 0 0 3px
        rgba(36, 128, 255, .10);
}

.payment-method-select:disabled {
    cursor: not-allowed;
    opacity: .65;
}

/* WOOD_PHASE9E3_PAYMENT_METHOD_SELECT_VISIBLE_V1 END */


/* WOOD_PHASE9H_UNIVERSAL_DETAIL_CSS_V1 */

.wood-universal-detail-modal[hidden] {
    display: none !important;
}

.wood-universal-detail-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.wood-universal-detail-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.58);
    backdrop-filter: blur(2px);
}

.wood-universal-detail-panel {
    position: relative;
    width: min(760px, 100%);
    max-height: min(88vh, 900px);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border-radius: 22px;
    box-shadow:
        0 24px 70px rgba(15, 23, 42, 0.24);
}

.wood-universal-detail-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    padding: 24px 26px 18px;
    border-bottom: 1px solid #e7ebf0;
}

.wood-universal-detail-eyebrow {
    display: block;
    margin-bottom: 5px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #728096;
}

.wood-universal-detail-header h2 {
    margin: 0;
    color: #172033;
    font-size: 22px;
}

.wood-universal-detail-header p {
    margin: 6px 0 0;
    color: #718096;
    font-size: 13px;
}

.wood-universal-detail-close {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    border: 0;
    border-radius: 12px;
    background: #f2f5f8;
    color: #344054;
    font-size: 25px;
    line-height: 1;
    cursor: pointer;
}

.wood-universal-detail-body {
    overflow-y: auto;
    padding: 22px 26px 28px;
}

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

.wood-universal-detail-field {
    min-width: 0;
    padding: 14px 15px;
    border: 1px solid #e7ebf0;
    border-radius: 14px;
    background: #fbfcfd;
}

.wood-universal-detail-field.wide {
    grid-column: 1 / -1;
}

.wood-universal-detail-field span {
    display: block;
    margin-bottom: 5px;
    font-size: 11px;
    font-weight: 700;
    color: #7a8798;
}

.wood-universal-detail-field strong {
    display: block;
    overflow-wrap: anywhere;
    font-size: 14px;
    line-height: 1.45;
    color: #172033;
}

.wood-universal-detail-section {
    margin-top: 20px;
}

.wood-universal-detail-section h3 {
    margin: 0 0 10px;
    color: #172033;
    font-size: 14px;
}

.wood-universal-detail-list {
    display: grid;
    gap: 9px;
}

.wood-universal-detail-list-row {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 12px 14px;
    border: 1px solid #e7ebf0;
    border-radius: 12px;
    background: #fff;
}

.wood-universal-detail-list-row > div {
    min-width: 0;
}

.wood-universal-detail-list-row strong {
    color: #172033;
}

.wood-universal-detail-list-row small {
    display: block;
    margin-top: 4px;
    color: #758195;
}

.wood-universal-detail-positive {
    color: #16815d !important;
}

.wood-universal-detail-negative {
    color: #c44949 !important;
}

.wood-universal-detail-footer {
    display: flex;
    justify-content: flex-end;
    padding: 16px 26px 20px;
    border-top: 1px solid #e7ebf0;
    background: #fff;
}

.wood-detail-clickable {
    cursor: pointer !important;
}

.wood-detail-clickable:hover {
    filter: brightness(.985);
}

body.wood-universal-detail-open {
    overflow: hidden;
}

@media (max-width: 720px) {
    .wood-universal-detail-modal {
        padding: 10px;
    }

    .wood-universal-detail-panel {
        max-height: 94vh;
        border-radius: 18px;
    }

    .wood-universal-detail-grid {
        grid-template-columns: 1fr;
    }

    .wood-universal-detail-field.wide {
        grid-column: auto;
    }
}

/* WOOD_PHASE9H_UNIVERSAL_DETAIL_CSS_V1 END */



/* =========================================================
   WOOD_PHASE9I_DEBTOR_INACTIVITY_CSS_V1
   ========================================================= */

.customer-list-inactivity {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    font-weight: 600;
    opacity: .72;
    line-height: 1.25;
}

.customer-detail-inactivity {
    margin-top: 10px;
    padding: 12px 14px;
    border: 1px solid rgba(148, 163, 184, .28);
    border-radius: 12px;
}

.customer-detail-inactivity span,
.customer-detail-inactivity strong {
    display: block;
}

.customer-detail-inactivity span {
    font-size: 12px;
    opacity: .7;
    margin-bottom: 4px;
}

.customer-detail-inactivity strong {
    font-size: 14px;
}



/* =========================================================
   WOOD COMPANY UI STAGE 4G2
   ========================================================= */

/* ---------- Company badges ---------- */

.company-type-badges {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
}

.company-type-badge {
    display: inline-flex;
    align-items: center;
    width: auto;
    min-width: 0;
    min-height: 22px;
    padding: 3px 9px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-size: 12px;
    font-weight: 650;
    line-height: 1.25;
    white-space: nowrap;
}

/* Taxta təchizatçısı — yaşıl */
.company-type-badge--wood-supplier {
    color: #087443;
    background: #e9f8f0;
    border-color: #c2ead4;
}

/* Nəqliyyat — mavi */
.company-type-badge--transport {
    color: #1769c2;
    background: #eaf3ff;
    border-color: #c8ddfa;
}

/* Xidmət — narıncı */
.company-type-badge--service {
    color: #b85a12;
    background: #fff1e6;
    border-color: #ffd4b3;
}

/* Digər — bənövşəyi */
.company-type-badge--other {
    color: #7137b7;
    background: #f3ebff;
    border-color: #ddc9fa;
}

.company-type-badge--unknown {
    color: #667085;
    background: #f2f4f7;
    border-color: #e4e7ec;
}

.company-status-text {
    display: block;
    margin-top: 4px;
}


/* ---------- Company detail ---------- */

.company-detail-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    margin-top: 6px;
}

.company-detail-meta .company-type-badges {
    margin-top: 0;
}

.company-detail-note {
    color: #667085;
    font-size: 13px;
}


/* =========================================================
   CREATE / EDIT COMPANY TYPE SELECTOR
   Override generic form input rules.
   ========================================================= */

#supplierCreateTypes,
#supplierEditTypes {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: 8px;
}

#supplierCreateTypes > label,
#supplierEditTypes > label {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
    min-height: 40px;
    margin: 0;
    padding: 8px 10px;
    border: 1px solid #dfe6ef;
    border-radius: 10px;
    background: #fff;
    color: #344054;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.25;
    cursor: pointer;
    box-sizing: border-box;
    transition:
        background .15s ease,
        border-color .15s ease,
        box-shadow .15s ease;
}

#supplierCreateTypes > label:hover,
#supplierEditTypes > label:hover {
    border-color: #b9d2f7;
    background: #f8fbff;
}


/*
 * Critical override:
 * generic text-input rules were making checkbox huge.
 */
#supplierCreateTypes input[type="checkbox"],
#supplierEditTypes input[type="checkbox"] {
    appearance: auto;
    -webkit-appearance: checkbox;
    display: inline-block;
    width: 16px !important;
    height: 16px !important;
    min-width: 16px !important;
    max-width: 16px !important;
    min-height: 16px !important;
    max-height: 16px !important;
    flex: 0 0 16px;
    margin: 0 !important;
    padding: 0 !important;
    border: initial;
    border-radius: 3px;
    background: initial;
    box-shadow: none !important;
    outline: none;
    accent-color: #1677ff;
    cursor: pointer;
}


/* Give each type row its own subtle identity */

#supplierCreateTypes > label:has(
    input[value="WOOD_SUPPLIER"]
),
#supplierEditTypes > label:has(
    input[value="WOOD_SUPPLIER"]
) {
    background: #f6fcf8;
}

#supplierCreateTypes > label:has(
    input[value="TRANSPORT"]
),
#supplierEditTypes > label:has(
    input[value="TRANSPORT"]
) {
    background: #f6f9fe;
}

#supplierCreateTypes > label:has(
    input[value="SERVICE"]
),
#supplierEditTypes > label:has(
    input[value="SERVICE"]
) {
    background: #fffaf6;
}

#supplierCreateTypes > label:has(
    input[value="OTHER"]
),
#supplierEditTypes > label:has(
    input[value="OTHER"]
) {
    background: #fbf8ff;
}


/* Checked rows */

#supplierCreateTypes > label:has(
    input[value="WOOD_SUPPLIER"]:checked
),
#supplierEditTypes > label:has(
    input[value="WOOD_SUPPLIER"]:checked
) {
    border-color: #8ed4ae;
    background: #e9f8f0;
}

#supplierCreateTypes > label:has(
    input[value="TRANSPORT"]:checked
),
#supplierEditTypes > label:has(
    input[value="TRANSPORT"]:checked
) {
    border-color: #9bc4f4;
    background: #eaf3ff;
}

#supplierCreateTypes > label:has(
    input[value="SERVICE"]:checked
),
#supplierEditTypes > label:has(
    input[value="SERVICE"]:checked
) {
    border-color: #f4b985;
    background: #fff1e6;
}

#supplierCreateTypes > label:has(
    input[value="OTHER"]:checked
),
#supplierEditTypes > label:has(
    input[value="OTHER"]:checked
) {
    border-color: #c9a7ef;
    background: #f3ebff;
}


/* ---------- Compact create/edit modal ---------- */

#supplierCreateModal .supplier-modal-content,
#supplierEditModal .supplier-modal-content {
    width: min(540px, calc(100vw - 32px));
    max-width: 540px;
}

#supplierCreateModal .form-field,
#supplierEditModal .form-field {
    margin-bottom: 14px;
}

#supplierCreateModal textarea,
#supplierEditModal textarea {
    min-height: 82px;
}


/* Responsive */
@media (max-width: 640px) {
    #supplierCreateTypes,
    #supplierEditTypes {
        grid-template-columns: 1fr;
    }
}



/* =========================================================
   WOOD COMPANY ADVANCE MODAL FIX V1
   ========================================================= */

#supplierAdvanceModal.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1100;
    display: grid;
    place-items: center;
    padding: 20px;
    overflow-y: auto;
    background: rgba(22, 32, 51, .36);
    backdrop-filter: blur(4px);
}

#supplierAdvanceModal.hidden {
    display: none !important;
}

#supplierAdvanceModal .supplier-modal-content {
    width: min(520px, calc(100vw - 32px));
    max-width: 520px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    box-sizing: border-box;
}

#supplierAdvanceModal .modal-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 20px;
}

#supplierAdvanceModal .modal-head h3 {
    margin: 0;
}

#supplierAdvanceModal .modal-head p {
    margin: 5px 0 0;
    color: #667085;
}

#supplierAdvanceModal .form-field {
    margin-bottom: 14px;
}

#supplierAdvanceModal textarea {
    min-height: 82px;
}

@media (max-width: 640px) {
    #supplierAdvanceModal.modal-backdrop {
        padding: 12px;
    }

    #supplierAdvanceModal .supplier-modal-content {
        width: 100%;
        max-height: calc(100vh - 24px);
    }
}



/* =========================================================
   WOOD COMPANY CONFIRM LAYER FIX V2

   Generic Wood modal .......... 1000
   Company advance modal ....... 1100
   Company confirmation ........ 1200
   ========================================================= */

#woodCompanyConfirmModal.modal-backdrop {
    z-index: 1200;
}



/* WOOD_PURCHASE_SUPPLIER_DROPDOWN_V1 */

.purchase-supplier-combobox {
    position: relative;
    width: 100%;
}

.purchase-supplier-combobox > #purchaseSupplier {
    width: 100%;
}

.purchase-supplier-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    z-index: 1400;
    max-height: 260px;
    overflow-y: auto;
    padding: 6px;
    background: #ffffff;
    border: 1px solid #d8e0eb;
    border-radius: 14px;
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.18);
}

.purchase-supplier-dropdown.hidden {
    display: none;
}

.purchase-supplier-option {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: #172033;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.purchase-supplier-option:hover,
.purchase-supplier-option.is-active {
    background: #eef5ff;
    color: #155eef;
}

.purchase-supplier-option + .purchase-supplier-option {
    margin-top: 2px;
}

/* WOOD_PURCHASE_SUPPLIER_DROPDOWN_V1 END */


/* ==========================================================
   WOOD_PHASE9E4D_CUSTOMER_ADVANCE_UI_V1
   ========================================================== */

.customer-table-head,
.customer-list-row {
    grid-template-columns:
        minmax(190px, 1.5fr)
        minmax(130px, 1fr)
        minmax(110px, .8fr)
        minmax(110px, .8fr)
        32px;
}

.customer-list-advance {
    font-weight: 700;
    color: var(--muted);
}

.customer-list-advance.has-advance {
    color: #177245;
}

.customer-detail-balance-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.customer-detail-advance {
    border-radius: 14px;
    padding: 14px 16px;
    background: rgba(34, 139, 94, .08);
    border: 1px solid rgba(34, 139, 94, .18);
}

.customer-detail-advance span {
    display: block;
    font-size: 12px;
    color: var(--muted);
    margin-bottom: 5px;
}

.customer-detail-advance strong {
    font-size: 18px;
    color: #177245;
}

.customer-history-tabs {
    grid-template-columns:
        repeat(3, minmax(0, 1fr));
}

.customer-advance-preview-row strong,
.customer-advance-history-amount {
    color: #177245;
}

.customer-advance-history-row {
    border-left:
        3px solid rgba(34, 139, 94, .35);
}

#customerDebtCard {
    grid-template-columns:
        repeat(3, minmax(0, 1fr));
}

@media (max-width: 900px) {

    .customer-table-head,
    .customer-list-row {
        grid-template-columns:
            minmax(160px, 1.4fr)
            minmax(100px, 1fr)
            minmax(95px, .8fr)
            minmax(95px, .8fr)
            28px;
    }

    .customer-detail-balance-grid {
        grid-template-columns:
            1fr;
    }
}


/* ==========================================================
   END WOOD_PHASE9E4D_CUSTOMER_ADVANCE_UI_V1
   ========================================================== */


/* ==========================================================
   WOOD_PHASE9E4D_UI_POLISH_V1
   Semantic balance colors:
   Debt    = reddish/orange
   Advance = green
   ========================================================== */

:root {
    --wood-debt-color: #d8661f;
    --wood-debt-bg: #fff7f2;
    --wood-debt-border: #f2d3bf;

    --wood-advance-color: #16834b;
    --wood-advance-bg: #f1faf5;
    --wood-advance-border: #bddfca;
}


/* ---------- Monetary values ---------- */

.wood-money-debt {
    color: var(--wood-debt-color) !important;
}

.wood-money-advance {
    color: var(--wood-advance-color) !important;
}


/* ---------- Debt / advance rows ---------- */

.wood-debt-row .wood-semantic-value {
    color: var(--wood-debt-color) !important;
    font-weight: 700;
}

.wood-advance-row .wood-semantic-value {
    color: var(--wood-advance-color) !important;
    font-weight: 700;
}


/* ---------- Customer detail balance cards ---------- */

.wood-balance-pair {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
    gap: 16px !important;
    align-items: stretch !important;
}

.wood-balance-card {
    box-sizing: border-box !important;
    width: 100% !important;
    min-width: 0 !important;
    height: 100% !important;
    min-height: 168px !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
}

.wood-balance-card-debt {
    background: var(--wood-debt-bg) !important;
    border-color: var(--wood-debt-border) !important;
}

.wood-balance-card-advance {
    background: var(--wood-advance-bg) !important;
    border-color: var(--wood-advance-border) !important;
}


/* Value inside customer detail cards */

.wood-balance-card-debt .wood-semantic-value {
    color: var(--wood-debt-color) !important;
}

.wood-balance-card-advance .wood-semantic-value {
    color: var(--wood-advance-color) !important;
}


/* ---------- Customer list ---------- */

.wood-customer-debt-cell {
    color: var(--wood-debt-color) !important;
}

.wood-customer-advance-cell {
    color: var(--wood-advance-color) !important;
}


/* ---------- Payment screen ---------- */

.wood-payment-debt {
    color: var(--wood-debt-color) !important;
}

.wood-payment-advance {
    color: var(--wood-advance-color) !important;
}


/* Keep both balance cards symmetric on smaller screens */

@media (max-width: 900px) {

    .wood-balance-pair {
        grid-template-columns: 1fr !important;
    }

    .wood-balance-card {
        min-height: 130px !important;
    }
}


/* ==========================================================
   WOOD_PHASE9E4D_DETAIL_SYMMETRY_V2
   Customer detail:
   Cari borc + Cari avans = identical geometry
   ========================================================== */

.wood-detail-balance-pair-v2 {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
    gap: 24px !important;
    align-items: stretch !important;
}

.wood-detail-balance-card-v2 {
    box-sizing: border-box !important;

    width: 100% !important;
    min-width: 0 !important;

    height: 100% !important;
    min-height: 246px !important;

    margin-top: 0 !important;
    margin-bottom: 0 !important;

    align-self: stretch !important;

    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
}

.wood-detail-balance-card-v2 > * {
    max-width: 100%;
}


/*
 * Preserve existing semantic colors.
 * Only geometry/alignment is standardized here.
 */
.wood-detail-balance-card-v2-debt {
    height: 100% !important;
}

.wood-detail-balance-card-v2-advance {
    height: 100% !important;
}


@media (max-width: 900px) {

    .wood-detail-balance-pair-v2 {
        grid-template-columns: 1fr !important;
        gap: 14px !important;
    }

    .wood-detail-balance-card-v2 {
        min-height: 150px !important;
    }
}


/* ==========================================================
   WOOD_PHASE9E4D_DETAIL_PROPORTION_V3

   Final visual proportions:
   - equal width
   - equal compact height
   - equal top alignment
   - same internal padding
   - debt amount stays on one line
   ========================================================== */


/*
 * Parent containing Cari borc + Cari avans.
 */
.wood-detail-balance-pair-v2 {
    display: grid !important;

    grid-template-columns:
        minmax(0, 1fr)
        minmax(0, 1fr) !important;

    gap: 14px !important;

    align-items: stretch !important;

    width: 100% !important;
}


/*
 * Override the oversized V2 cards.
 */
.wood-detail-balance-card-v2 {
    box-sizing: border-box !important;

    width: 100% !important;

    height: 160px !important;
    min-height: 160px !important;
    max-height: 160px !important;

    margin: 0 !important;

    padding: 26px 28px !important;

    align-self: stretch !important;

    display: flex !important;
    flex-direction: column !important;

    justify-content: center !important;
    align-items: flex-start !important;

    overflow: hidden !important;
}


/*
 * Both cards use identical geometry.
 */
.wood-detail-balance-card-v2-debt,
.wood-detail-balance-card-v2-advance {
    height: 160px !important;
    min-height: 160px !important;
    max-height: 160px !important;

    margin: 0 !important;
}


/*
 * Do not allow amount + USD to wrap.
 */
.wood-detail-balance-card-v2-debt
.wood-semantic-value,

.wood-detail-balance-card-v2-advance
.wood-semantic-value,

#customerDetailDebt,
#customerDetailAdvance {
    white-space: nowrap !important;

    width: auto !important;
    max-width: 100% !important;

    line-height: 1.15 !important;
}


/*
 * Debt value can be large.
 * Keep it inside the card instead of wrapping USD.
 */
#customerDetailDebt {
    font-size: clamp(
        27px,
        2.05vw,
        38px
    ) !important;
}


/*
 * Advance uses same visual hierarchy.
 */
#customerDetailAdvance {
    font-size: clamp(
        27px,
        2.05vw,
        38px
    ) !important;
}


/*
 * On narrow screens stack normally.
 */
@media (max-width: 900px) {

    .wood-detail-balance-pair-v2 {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }

    .wood-detail-balance-card-v2,
    .wood-detail-balance-card-v2-debt,
    .wood-detail-balance-card-v2-advance {
        height: 135px !important;
        min-height: 135px !important;
        max-height: 135px !important;
    }
}


/* ==========================================================
   WOOD_PHASE9E4D_DETAIL_PROPORTION_V4
   Final compact customer-detail balance cards
   ========================================================== */

.wood-detail-balance-pair-v2 {
    display: grid !important;
    grid-template-columns:
        minmax(0, 1fr)
        minmax(0, 1fr) !important;

    gap: 18px !important;
    align-items: stretch !important;
    width: 100% !important;
}


/*
 * Compact card geometry.
 * This overrides V2/V3 oversized settings.
 */
.wood-detail-balance-card-v2,
.wood-detail-balance-card-v2-debt,
.wood-detail-balance-card-v2-advance {

    box-sizing: border-box !important;

    width: 100% !important;

    height: 118px !important;
    min-height: 118px !important;
    max-height: 118px !important;

    margin: 0 !important;

    padding:
        20px
        24px !important;

    display: flex !important;
    flex-direction: column !important;

    justify-content: center !important;
    align-items: flex-start !important;

    align-self: stretch !important;

    overflow: visible !important;
}


/*
 * Labels.
 */
.wood-detail-balance-card-v2
:not(.wood-semantic-value) {
    line-height: 1.25;
}


/*
 * Values:
 * compact enough to keep 18000.00 USD on one line.
 */
#customerDetailDebt,
#customerDetailAdvance {

    white-space: nowrap !important;

    display: block !important;

    width: auto !important;
    max-width: 100% !important;

    margin-top: 8px !important;

    font-size:
        clamp(
            22px,
            1.75vw,
            31px
        ) !important;

    line-height: 1.05 !important;

    letter-spacing: -0.02em !important;
}


/*
 * Keep semantic colors.
 */
#customerDetailDebt {
    color: var(--wood-debt-color) !important;
}

#customerDetailAdvance {
    color: var(--wood-advance-color) !important;
}


/*
 * Detail cards should look equal, not visually oversized.
 */
.wood-detail-balance-card-v2-debt {
    border-radius: 18px !important;
}

.wood-detail-balance-card-v2-advance {
    border-radius: 18px !important;
}


/*
 * Prevent old V2 JS inline equal-height value
 * from making the cards tall again.
 */
.wood-detail-balance-card-v2[style] {
    height: 118px !important;
    min-height: 118px !important;
    max-height: 118px !important;
}


/*
 * Narrow screens.
 */
@media (max-width: 900px) {

    .wood-detail-balance-pair-v2 {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }

    .wood-detail-balance-card-v2,
    .wood-detail-balance-card-v2-debt,
    .wood-detail-balance-card-v2-advance,
    .wood-detail-balance-card-v2[style] {
        height: 108px !important;
        min-height: 108px !important;
        max-height: 108px !important;
    }

    #customerDetailDebt,
    #customerDetailAdvance {
        font-size: 26px !important;
    }
}


/* ==========================================================
   WOOD_PHASE9E4D_DETAIL_FINAL_V5

   Final geometry:
   - no JS height
   - compact
   - 50/50
   - same height
   - same padding
   - no amount overflow
   ========================================================== */


/*
 * Actual row holding the two cards.
 */
.wood-detail-final-pair-v5 {

    display: grid !important;

    grid-template-columns:
        minmax(0, 1fr)
        minmax(0, 1fr) !important;

    gap: 12px !important;

    width: 100% !important;

    align-items: stretch !important;
}


/*
 * Actual two cards.
 */
.wood-detail-final-card-v5 {

    box-sizing: border-box !important;

    width: 100% !important;

    height: 104px !important;
    min-height: 104px !important;
    max-height: 104px !important;

    margin: 0 !important;

    padding:
        17px
        18px !important;

    display: flex !important;
    flex-direction: column !important;

    justify-content: center !important;
    align-items: flex-start !important;

    align-self: stretch !important;

    overflow: hidden !important;

    border-radius: 16px !important;
}


/*
 * Neutralize previous geometry classes if they are
 * present on the same elements.
 */
.wood-detail-final-card-v5.wood-balance-card,
.wood-detail-final-card-v5.wood-detail-balance-card-v2 {

    width: 100% !important;

    height: 104px !important;
    min-height: 104px !important;
    max-height: 104px !important;

    margin: 0 !important;

    padding:
        17px
        18px !important;
}


/*
 * Remove any old inline height/min-height that browser
 * may still have on a currently open DOM element.
 *
 * The removed V2 script will no longer recreate them.
 */
.wood-detail-final-card-v5[style] {

    height: 104px !important;
    min-height: 104px !important;
    max-height: 104px !important;

    margin-top: 0 !important;
    margin-bottom: 0 !important;
}


/*
 * Value geometry.
 */
#customerDetailDebt,
#customerDetailAdvance {

    display: block !important;

    width: auto !important;
    max-width: 100% !important;

    margin:
        6px
        0
        0
        0 !important;

    padding: 0 !important;

    white-space: nowrap !important;

    font-size:
        clamp(
            19px,
            1.45vw,
            27px
        ) !important;

    line-height: 1.05 !important;

    letter-spacing: -0.025em !important;
}


/*
 * Preserve semantic colors.
 */
#customerDetailDebt {
    color: var(--wood-debt-color) !important;
}

#customerDetailAdvance {
    color: var(--wood-advance-color) !important;
}


/*
 * Card semantic backgrounds.
 */
.wood-detail-final-debt-v5 {

    background:
        var(--wood-debt-bg) !important;

    border:
        1px solid
        var(--wood-debt-border) !important;
}

.wood-detail-final-advance-v5 {

    background:
        var(--wood-advance-bg) !important;

    border:
        1px solid
        var(--wood-advance-border) !important;
}


/*
 * Do not let descendant elements force the card wider.
 */
.wood-detail-final-card-v5 > * {

    min-width: 0 !important;
    max-width: 100% !important;
}


/*
 * Responsive:
 * When detail panel becomes genuinely narrow,
 * keep cards usable.
 */
@media (max-width: 900px) {

    .wood-detail-final-pair-v5 {
        gap: 10px !important;
    }

    .wood-detail-final-card-v5,
    .wood-detail-final-card-v5.wood-balance-card,
    .wood-detail-final-card-v5.wood-detail-balance-card-v2,
    .wood-detail-final-card-v5[style] {

        height: 96px !important;
        min-height: 96px !important;
        max-height: 96px !important;

        padding:
            14px
            15px !important;
    }

    #customerDetailDebt,
    #customerDetailAdvance {

        font-size:
            clamp(
                18px,
                3.5vw,
                24px
            ) !important;
    }
}


/* =========================================================
   WOOD_PERSONAL_LOANS_UI_V1
   ========================================================= */


.personal-loans-screen {
    width: 100%;
}


.personal-loans-page-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 22px;
}


.personal-loans-page-head h2 {
    margin: 0 0 6px;
}


.personal-loans-page-head p {
    margin: 0;
    opacity: 0.68;
}


.personal-loans-message {
    padding: 12px 15px;
    border-radius: 10px;
    margin-bottom: 18px;
    background: #f6f6f6;
}


.personal-loans-message.success {
    background: #edf8f1;
}


.personal-loans-message.error {
    background: #fff1f1;
}


.personal-loans-summary-grid {
    display: grid;
    grid-template-columns:
        repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 20px;
}


.personal-loans-summary-card {
    background: var(--card-bg, #fff);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 14px;
    padding: 18px;
    min-width: 0;
}


.personal-loans-summary-card span {
    display: block;
    font-size: 13px;
    opacity: 0.68;
    margin-bottom: 9px;
}


.personal-loans-summary-card strong {
    display: block;
    font-size: 22px;
    line-height: 1.2;
    overflow-wrap: anywhere;
}


.personal-loans-summary-card--green strong,
.personal-loan-positive-money,
.personal-loan-detail-summary .is-green strong {
    color: #16834b;
}


.personal-loans-summary-card--debt strong,
.personal-loan-debt-money,
.personal-loan-detail-summary .is-debt strong {
    color: #d8661f;
}


.personal-loans-table-card {
    background: var(--card-bg, #fff);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 14px;
    overflow: hidden;
}


.personal-loans-table-head,
.personal-loans-table-row {
    display: grid;
    grid-template-columns:
        minmax(150px, 1.45fr)
        minmax(110px, 1fr)
        minmax(100px, 0.9fr)
        minmax(100px, 0.9fr)
        minmax(100px, 0.9fr)
        minmax(100px, 0.9fr)
        minmax(100px, 0.8fr);
    align-items: center;
    gap: 12px;
}


.personal-loans-table-head {
    padding: 13px 16px;
    font-size: 12px;
    font-weight: 700;
    opacity: 0.62;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}


.personal-loans-table-row {
    width: 100%;
    border: 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    background: transparent;
    text-align: left;
    padding: 15px 16px;
    cursor: pointer;
    color: inherit;
    font: inherit;
}


.personal-loans-table-row:last-child {
    border-bottom: 0;
}


.personal-loans-table-row:hover {
    background: rgba(0, 0, 0, 0.025);
}


.personal-loans-table-row.is-cancelled {
    opacity: 0.62;
}


.personal-loans-table-row strong {
    display: block;
}


.personal-loans-table-row small {
    display: block;
    margin-top: 4px;
    opacity: 0.6;
    line-height: 1.3;
}


.personal-loan-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 5px 9px;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}


.personal-loan-status.active {
    background: #fff4e9;
    color: #bf5b19;
}


.personal-loan-status.closed {
    background: #edf8f1;
    color: #16834b;
}


.personal-loan-status.cancelled {
    background: #f2f2f2;
    color: #777;
}


.personal-loans-empty {
    padding: 28px 18px;
    text-align: center;
    opacity: 0.6;
}


.personal-loan-modal-card {
    width: min(620px, calc(100vw - 30px));
}


.personal-loan-detail-card {
    width: min(820px, calc(100vw - 30px));
    max-height: calc(100vh - 40px);
    overflow: auto;
}


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


.personal-loan-wide-field {
    grid-column: 1 / -1;
}


.personal-loan-money-input {
    display: flex;
    align-items: center;
    gap: 8px;
}


.personal-loan-money-input input {
    flex: 1;
    min-width: 0;
}


.personal-loan-money-input span {
    font-weight: 700;
    opacity: 0.7;
}


.personal-loan-source-box {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 13px 15px;
    margin-top: 16px;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.035);
}


.personal-loan-source-box span {
    opacity: 0.65;
}


.personal-loan-modal-error {
    margin-top: 13px;
    padding: 11px 13px;
    border-radius: 9px;
    background: #fff1f1;
}


.personal-loan-detail-summary {
    display: grid;
    grid-template-columns:
        repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}


.personal-loan-detail-summary article {
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    padding: 15px;
}


.personal-loan-detail-summary span {
    display: block;
    opacity: 0.65;
    font-size: 13px;
    margin-bottom: 8px;
}


.personal-loan-detail-summary strong {
    display: block;
    font-size: 20px;
    overflow-wrap: anywhere;
}


.personal-loan-detail-meta {
    display: grid;
    grid-template-columns:
        repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}


.personal-loan-detail-meta > div {
    padding: 12px 14px;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.03);
}


.personal-loan-detail-meta span {
    display: block;
    font-size: 12px;
    opacity: 0.6;
    margin-bottom: 5px;
}


.personal-loan-detail-note {
    grid-column: 1 / -1;
}


.personal-loan-detail-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 22px;
}


.personal-loan-danger-btn,
.personal-loan-history-cancel {
    border: 1px solid #dc7777;
    background: #fff5f5;
    color: #b43a3a;
    border-radius: 9px;
    padding: 9px 13px;
    cursor: pointer;
    font: inherit;
    font-weight: 700;
}


.personal-loan-danger-btn:disabled,
.personal-loan-history-cancel:disabled {
    opacity: 0.5;
    cursor: default;
}


.personal-loan-history-head {
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    padding-top: 18px;
    margin-top: 4px;
}


.personal-loan-history-head h4 {
    margin: 0 0 5px;
}


.personal-loan-history-head p {
    margin: 0;
    font-size: 13px;
    opacity: 0.6;
}


.personal-loan-repayment-history {
    margin-top: 13px;
}


.personal-loan-repayment-row {
    display: grid;
    grid-template-columns:
        minmax(120px, 0.8fr)
        minmax(150px, 1.4fr)
        minmax(90px, auto);
    gap: 12px;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}


.personal-loan-repayment-row.is-cancelled {
    opacity: 0.6;
}


.personal-loan-repayment-row strong,
.personal-loan-repayment-row small {
    display: block;
}


.personal-loan-repayment-row small {
    opacity: 0.6;
    margin-top: 3px;
}


.personal-loan-reversal-warning {
    margin-top: 15px;
    padding: 12px 14px;
    border-radius: 10px;
    background: #fff7eb;
    line-height: 1.45;
}


@media (max-width: 1100px) {

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


    .personal-loans-table-card {
        overflow-x: auto;
    }


    .personal-loans-table-head,
    .personal-loans-table-row {
        min-width: 930px;
    }
}


@media (max-width: 700px) {

    .personal-loans-page-head {
        flex-direction: column;
    }


    .personal-loans-summary-grid,
    .personal-loan-detail-summary,
    .personal-loan-detail-meta,
    .personal-loan-form-grid {
        grid-template-columns: 1fr;
    }


    .personal-loan-wide-field,
    .personal-loan-detail-note {
        grid-column: auto;
    }


    .personal-loan-repayment-row {
        grid-template-columns: 1fr;
    }
}


/* WOOD_PERSONAL_LOANS_UI_V1_END */


/* =========================================================
   WOOD_OTHER_EXPENSES_UI_V1
   ========================================================= */

.other-expenses-screen {
    width: 100%;
}

.other-expenses-page-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
    margin-bottom: 24px;
}

.other-expenses-page-head h2 {
    margin: 0 0 6px;
}

.other-expenses-page-head p {
    margin: 0;
    opacity: .72;
}

.other-expenses-message {
    margin-bottom: 18px;
    padding: 12px 14px;
    border-radius: 10px;
    background: rgba(0, 0, 0, .04);
}

.other-expenses-message.is-error {
    background: rgba(180, 30, 30, .08);
}

.other-expenses-message.is-success {
    background: rgba(30, 150, 80, .08);
}

.other-expenses-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 22px;
}

.other-expenses-summary-card {
    background: var(--card-bg, #fff);
    border: 1px solid rgba(0, 0, 0, .08);
    border-radius: 14px;
    padding: 18px;
}

.other-expenses-summary-card span {
    display: block;
    font-size: 13px;
    opacity: .68;
    margin-bottom: 8px;
}

.other-expenses-summary-card strong {
    display: block;
    font-size: 22px;
    white-space: nowrap;
}

.other-expenses-table-card {
    background: var(--card-bg, #fff);
    border: 1px solid rgba(0, 0, 0, .08);
    border-radius: 14px;
    overflow: hidden;
}

.other-expenses-table-head,
.other-expenses-table-row {
    display: grid;
    grid-template-columns:
        110px
        140px
        minmax(220px, 1fr)
        150px
        130px
        110px;
    gap: 12px;
    align-items: center;
}

.other-expenses-table-head {
    padding: 13px 16px;
    font-size: 12px;
    font-weight: 700;
    opacity: .65;
    border-bottom: 1px solid rgba(0, 0, 0, .08);
}

.other-expenses-table-row {
    width: 100%;
    border: 0;
    border-bottom: 1px solid rgba(0, 0, 0, .06);
    background: transparent;
    text-align: left;
    padding: 14px 16px;
    cursor: pointer;
    font: inherit;
}

.other-expenses-table-row:hover {
    background: rgba(0, 0, 0, .025);
}

.other-expenses-table-row:last-child {
    border-bottom: 0;
}

.other-expenses-table-row.is-cancelled {
    opacity: .58;
}

.other-expenses-table-row small {
    display: block;
    margin-top: 4px;
    opacity: .62;
}

.other-expense-money {
    font-weight: 700;
    white-space: nowrap;
}

.other-expense-status {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 5px 9px;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.other-expense-status.active {
    background: rgba(30, 150, 80, .10);
}

.other-expense-status.cancelled {
    background: rgba(160, 40, 40, .10);
}

.other-expenses-empty {
    padding: 34px 20px;
    text-align: center;
    opacity: .65;
}

.other-expense-modal-card,
.other-expense-detail-modal,
.other-expense-cancel-modal {
    width: min(680px, calc(100vw - 32px));
}

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

.other-expense-notes-field {
    grid-column: 1 / -1;
}

.other-expense-detail-body {
    margin-top: 6px;
}

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

.other-expense-detail-grid > div {
    padding: 14px;
    border-radius: 10px;
    background: rgba(0, 0, 0, .035);
}

.other-expense-detail-grid span {
    display: block;
    font-size: 12px;
    opacity: .62;
    margin-bottom: 5px;
}

.other-expense-detail-grid strong {
    display: block;
    overflow-wrap: anywhere;
}

.other-expense-detail-wide {
    grid-column: 1 / -1;
}


@media (max-width: 1100px) {

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

    .other-expenses-table-card {
        overflow-x: auto;
    }

    .other-expenses-table-head,
    .other-expenses-table-row {
        min-width: 900px;
    }
}


@media (max-width: 700px) {

    .other-expenses-page-head {
        flex-direction: column;
    }

    .other-expenses-summary-grid {
        grid-template-columns: 1fr;
    }

    .other-expense-form-grid,
    .other-expense-detail-grid {
        grid-template-columns: 1fr;
    }

    .other-expense-notes-field,
    .other-expense-detail-wide {
        grid-column: auto;
    }
}



/* =========================================================
   WOOD DAILY OTHER EXPENSES THEME V2
   ========================================================= */

#dailyReportScreen
.exec-daily-group.exec-daily-other-expenses {
    border-color: #ded9ee;

    background:
        linear-gradient(
            180deg,
            #fdfcff 0%,
            #faf9fd 100%
        );
}


#dailyReportScreen
.exec-daily-other-expenses
.exec-daily-group-head h3 {
    color: #6d5aa8;
}


#dailyReportScreen
.exec-daily-other-expenses
.exec-daily-group-head p {
    color: #8790a1;
}


#dailyReportScreen
.exec-daily-other-expenses
.exec-daily-kpi {
    background: #ffffff;
    border-color: #e6e2ef;
}


#dailyReportScreen
.exec-daily-other-expenses
.exec-daily-value strong {
    color: #6d5aa8;
}


/* WOOD DAILY OTHER EXPENSES THEME V2 END */


/* =========================================================
   WOOD PHASE9J TOTAL ASSETS CSS V2
   ========================================================= */

#dailyReportScreen
.exec-daily-assets-card {
    border-color: #bfe3cd;
    background:
        linear-gradient(
            180deg,
            #ffffff 0%,
            #f7fcf9 100%
        );
}

#dailyReportScreen
.exec-daily-assets-card
.exec-daily-label {
    color: #16834b;
    font-weight: 700;
}

#dailyReportScreen
.exec-daily-assets-card
.exec-daily-value {
    color: #16834b;
}

#dailyReportScreen
.exec-daily-assets-card
.exec-daily-note {
    color: #82908a;
}

/* WOOD PHASE9J TOTAL ASSETS CSS V2 END */


/* =========================================================
   WOOD KASSA DESIGN ALIGN V1
   KASSA kartlarını digər Daily Report KPI kartları ilə
   eyni vizual sistemə gətirir.
   ========================================================= */

#dailyReportScreen
.exec-daily-cashbox
.exec-daily-grid.three {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    align-items: stretch;
}


#dailyReportScreen
.exec-daily-cashbox
.exec-daily-card {
    min-width: 0;
    min-height: 180px;

    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;

    padding: 28px 28px 26px;

    border: 1px solid #dfe4ea;
    border-radius: 20px;

    background: #ffffff;

    box-shadow:
        0 1px 2px rgba(15, 23, 42, 0.03),
        0 3px 8px rgba(15, 23, 42, 0.035);
}


#dailyReportScreen
.exec-daily-cashbox
.exec-daily-card:hover {
    transform: none;
    box-shadow:
        0 1px 2px rgba(15, 23, 42, 0.03),
        0 3px 8px rgba(15, 23, 42, 0.035);
}


#dailyReportScreen
.exec-daily-cashbox
.exec-daily-label {
    display: block;

    margin: 0 0 30px;

    color: #6f7d92;

    font-size: 18px;
    font-weight: 500;
    line-height: 1.35;

    letter-spacing: 0;
}


#dailyReportScreen
.exec-daily-cashbox
.exec-daily-value {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 9px;

    margin: 0;

    color: #159447;

    font-size: 30px;
    font-weight: 700;
    line-height: 1.15;

    letter-spacing: -0.02em;
}


#dailyReportScreen
.exec-daily-cashbox
.exec-daily-value small {
    color: #68778d;

    font-size: 16px;
    font-weight: 700;
    line-height: 1;
}


#dailyReportScreen
.exec-daily-cashbox
.exec-daily-note {
    display: block;

    margin-top: 10px;

    color: #8b96a8;

    font-size: 17px;
    font-weight: 400;
    line-height: 1.35;
}


/*
   9J-də üçüncü kart üçün əlavə edilmiş ayrıca highlight
   görünüşünü ləğv edirik.
   Üç KASSA kartı eyni vizual sistemdə olmalıdır.
*/
#dailyReportScreen
.exec-daily-cashbox
.exec-daily-assets-card {
    border-color: #dfe4ea;
    background: #ffffff;
}


#dailyReportScreen
.exec-daily-cashbox
.exec-daily-assets-card
.exec-daily-label {
    color: #6f7d92;
    font-weight: 500;
}


#dailyReportScreen
.exec-daily-cashbox
.exec-daily-assets-card
.exec-daily-value {
    color: #159447;
}


#dailyReportScreen
.exec-daily-cashbox
.exec-daily-assets-card
.exec-daily-note {
    color: #8b96a8;
}


/*
   KASSA outer panel artıq öz yaşıl identifikasiyasını saxlayır.
   Daxili kartlar ayrıca yaşıl border almır.
*/
#dailyReportScreen
.exec-daily-cashbox {
    overflow: visible;
}


/*
   Tablet
*/
@media (max-width: 1100px) {
    #dailyReportScreen
    .exec-daily-cashbox
    .exec-daily-grid.three {
        grid-template-columns: 1fr;
    }

    #dailyReportScreen
    .exec-daily-cashbox
    .exec-daily-card {
        min-height: 150px;
    }
}


/*
   Mobile
*/
@media (max-width: 640px) {
    #dailyReportScreen
    .exec-daily-cashbox
    .exec-daily-card {
        padding: 22px 20px;
        min-height: auto;
    }

    #dailyReportScreen
    .exec-daily-cashbox
    .exec-daily-label {
        margin-bottom: 22px;
        font-size: 16px;
    }

    #dailyReportScreen
    .exec-daily-cashbox
    .exec-daily-value {
        font-size: 25px;
    }

    #dailyReportScreen
    .exec-daily-cashbox
    .exec-daily-value small {
        font-size: 14px;
    }

    #dailyReportScreen
    .exec-daily-cashbox
    .exec-daily-note {
        font-size: 15px;
    }
}


/* WOOD KASSA DESIGN ALIGN V1 END */


/* =========================================================
   WOOD KASSA COMPACT DESIGN V2
   ========================================================= */

#dailyReportScreen
.exec-daily-cashbox
.exec-daily-grid.three {
    gap: 18px;
    align-items: stretch;
}


#dailyReportScreen
.exec-daily-cashbox
.exec-daily-card {
    min-height: 0;

    padding:
        16px 22px
        14px 22px;

    border: 1px solid #dfe4ea;
    border-radius: 16px;

    background: #ffffff;

    box-shadow:
        0 1px 2px rgba(15, 23, 42, 0.025);
}


#dailyReportScreen
.exec-daily-cashbox
.exec-daily-label {
    margin: 0 0 12px;

    color: #6f7d92;

    font-size: 16px;
    font-weight: 500;
    line-height: 1.3;
}


#dailyReportScreen
.exec-daily-cashbox
.exec-daily-value {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;

    gap: 7px;

    margin: 0;

    color: #159447;

    font-size: 24px;
    font-weight: 700;
    line-height: 1.15;

    letter-spacing: -0.015em;
}


#dailyReportScreen
.exec-daily-cashbox
.exec-daily-value small {
    color: #68778d;

    font-size: 14px;
    font-weight: 700;
}


#dailyReportScreen
.exec-daily-cashbox
.exec-daily-note {
    margin-top: 5px;

    color: #8b96a8;

    font-size: 15px;
    font-weight: 400;
    line-height: 1.25;
}


#dailyReportScreen
.exec-daily-cashbox
.exec-daily-assets-card {
    min-height: 0;

    border-color: #dfe4ea;
    background: #ffffff;

    box-shadow:
        0 1px 2px rgba(15, 23, 42, 0.025);
}


#dailyReportScreen
.exec-daily-cashbox
.exec-daily-assets-card
.exec-daily-label {
    color: #6f7d92;
    font-weight: 500;
}


#dailyReportScreen
.exec-daily-cashbox
.exec-daily-assets-card
.exec-daily-value {
    color: #159447;
}


#dailyReportScreen
.exec-daily-cashbox
.exec-daily-assets-card
.exec-daily-note {
    color: #8b96a8;
}


@media (max-width: 1100px) {

    #dailyReportScreen
    .exec-daily-cashbox
    .exec-daily-card {
        min-height: 0;
    }
}


@media (max-width: 640px) {

    #dailyReportScreen
    .exec-daily-cashbox
    .exec-daily-card {
        padding: 14px 18px;
    }

    #dailyReportScreen
    .exec-daily-cashbox
    .exec-daily-label {
        margin-bottom: 10px;
        font-size: 15px;
    }

    #dailyReportScreen
    .exec-daily-cashbox
    .exec-daily-value {
        font-size: 22px;
    }

    #dailyReportScreen
    .exec-daily-cashbox
    .exec-daily-note {
        font-size: 14px;
    }
}


/* WOOD KASSA COMPACT DESIGN V2 END */



/* =========================================================
   WOOD DAILY INACTIVE DEBTORS 30D V1
   ========================================================= */

.exec-daily-debt-statuses {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
}


.exec-daily-mini-status-button {
    appearance: none;
    border: 1px solid #f0d6c7;
    cursor: pointer;
    font-family: inherit;
    transition:
        background .15s ease,
        border-color .15s ease,
        transform .15s ease;
}


.exec-daily-mini-status-button:not(:disabled):hover {
    background: #ffe8db;
    border-color: #e8bfa9;
}


.exec-daily-mini-status-button:not(:disabled):active {
    transform: translateY(1px);
}


.exec-daily-mini-status-button:disabled {
    cursor: default;
    opacity: .62;
}


.wood-daily-inactive-table-wrap {
    width: 100%;
    overflow-x: auto;
}


.wood-daily-inactive-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}


.wood-daily-inactive-table th,
.wood-daily-inactive-table td {
    padding: 12px 14px;
    border-bottom: 1px solid #e8ebf0;
    text-align: left;
    vertical-align: middle;
}


.wood-daily-inactive-table th {
    color: #687589;
    font-size: 12px;
    font-weight: 700;
    background: #f8fafc;
}


.wood-daily-inactive-table td {
    color: #273244;
}


.wood-daily-inactive-table tbody tr:last-child td {
    border-bottom: 0;
}


.wood-daily-inactive-money {
    white-space: nowrap;
    color: #d34f3f !important;
    font-weight: 700;
}


.wood-daily-inactive-empty {
    padding: 18px;
    border: 1px solid #e4e8ef;
    border-radius: 12px;
    background: #fafbfc;
    color: #687589;
}


@media (max-width: 720px) {

    .exec-daily-debt-statuses {
        width: 100%;
        justify-content: flex-start;
    }

}


/* WOOD DAILY INACTIVE DEBTORS 30D V1 END */


/* =========================================================
   WOOD DAILY INACTIVE DEBTOR CLICK FIX V2
   ========================================================= */

#pageDailyInactiveDebtor30d:not(:disabled) {
    pointer-events: auto;
    cursor: pointer;
    position: relative;
    z-index: 2;
}


/* WOOD DAILY INACTIVE DEBTOR CLICK FIX V2 END */


/* =========================================================
   WOOD INACTIVE DEBTOR NAME ALERT V1

   Son 30 gündə borc ödənişi etməyən müştərinin
   yalnız adı qırmızı STOP/xəbərdarlıq nişanı kimi göstərilir.
   ========================================================= */

.wood-daily-inactive-name-cell {
    vertical-align: middle;
}


.wood-daily-inactive-name-alert {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    max-width: 100%;

    padding: 7px 12px;

    border-radius: 8px;

    background: #d94b3d;

    color: #ffffff;

    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;

    letter-spacing: 0.01em;

    box-shadow:
        0 1px 2px rgba(120, 25, 20, 0.12);

    white-space: normal;
    overflow-wrap: anywhere;
}


/* WOOD INACTIVE DEBTOR NAME ALERT V1 END */


/* =========================================================
   WOOD INACTIVE DEBTOR RED ROWS V1
   ========================================================= */


/*
   Cədvəldə sətirlər arasında çox kiçik boşluq.
   border-collapse: separate vacibdir.
*/
.wood-daily-inactive-table {
    border-collapse: separate;
    border-spacing: 0 5px;
}


/*
   Xəbərdarlıq sətri tam qırmızı.
*/
.wood-daily-inactive-table
tbody
.wood-daily-inactive-alert-row
td {
    background: #d83c3c;

    color: #ffffff !important;

    border-bottom: 0;

    font-weight: 600;
}


/*
   Sol kənarı yumşaq radius.
*/
.wood-daily-inactive-table
tbody
.wood-daily-inactive-alert-row
td:first-child {
    border-radius:
        8px 0 0 8px;
}


/*
   Sağ kənarı yumşaq radius.
*/
.wood-daily-inactive-table
tbody
.wood-daily-inactive-alert-row
td:last-child {
    border-radius:
        0 8px 8px 0;
}


/*
   Əvvəlki "yalnız ad badge" görünüşünü ləğv edirik.
*/
.wood-daily-inactive-name-alert {
    display: inline;

    max-width: none;

    padding: 0;

    border-radius: 0;

    background: transparent;

    color: #ffffff;

    font-size: inherit;
    font-weight: 700;
    line-height: inherit;

    letter-spacing: normal;

    box-shadow: none;

    white-space: normal;
    overflow-wrap: anywhere;
}


/*
   Borc məbləği də ağ.
   Əvvəlki qırmızı text override-ını ləğv edir.
*/
.wood-daily-inactive-table
tbody
.wood-daily-inactive-alert-row
.wood-daily-inactive-money {
    color: #ffffff !important;
    font-weight: 700;
}


/*
   Sətir daxilində bütün mətnlər ağ.
*/
.wood-daily-inactive-table
tbody
.wood-daily-inactive-alert-row
td,
.wood-daily-inactive-table
tbody
.wood-daily-inactive-alert-row
td * {
    color: #ffffff !important;
}


/*
   Hover yalnız çox cüzi vizual effekt.
*/
.wood-daily-inactive-table
tbody
.wood-daily-inactive-alert-row:hover
td {
    background: #cc3535;
}


/*
   Mobil görünüş.
*/
@media (max-width: 720px) {

    .wood-daily-inactive-table {
        border-spacing: 0 4px;
    }

    .wood-daily-inactive-table
    th,
    .wood-daily-inactive-table
    td {
        padding: 10px 11px;
    }
}


/* WOOD INACTIVE DEBTOR RED ROWS V1 END */


/* =========================================================
   WOOD_CUSTOMER_INACTIVITY_FILTER_CSS_V1
   ========================================================= */

.customer-inactivity-filter {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
}

.customer-inactivity-filter-btn {
    appearance: none;
    border: 1px solid rgba(148, 163, 184, .34);
    background: transparent;
    border-radius: 9px;
    padding: 7px 11px;
    font: inherit;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    white-space: nowrap;
    transition:
        background-color .15s ease,
        border-color .15s ease,
        transform .15s ease;
}

.customer-inactivity-filter-btn:hover {
    background: rgba(148, 163, 184, .10);
}

.customer-inactivity-filter-btn:active {
    transform: translateY(1px);
}

.customer-inactivity-filter-btn.active {
    background: rgba(37, 99, 235, .12);
    border-color: rgba(37, 99, 235, .45);
}

@media (max-width: 900px) {
    .customer-inactivity-filter {
        width: 100%;
        margin-left: 0;
        flex-wrap: wrap;
    }
}

/* WOOD_CUSTOMER_INACTIVITY_FILTER_CSS_V1 END */

/* =========================================================
   WOOD_DESKTOP_VISUAL_HARMONY_V1_BEGIN
   Desktop visual alignment only. No behavior changes.
   ========================================================= */

/*
 * Cross-page audit:
 * secondary-btn is widely used but previously had no
 * common visual definition.
 */
.secondary-btn {
    min-height: 42px;

    display: inline-flex;

    align-items: center;
    justify-content: center;

    gap: 7px;

    padding: 0 16px;

    border:
        1px solid
        var(--border);

    border-radius: 10px;

    background: #fff;

    color: #596578;

    cursor: pointer;

    font: inherit;

    font-size: 13px;
    font-weight: 650;

    transition:
        border-color .14s,
        background .14s,
        color .14s,
        box-shadow .14s;
}


.secondary-btn:hover:not(:disabled) {
    border-color: #b7cff3;

    background: #f7faff;

    color: var(--blue);
}


.secondary-btn:focus-visible {
    outline: none;

    border-color: #84aff0;

    box-shadow:
        0 0 0 3px
        rgba(21, 105, 232, .07);
}


.secondary-btn:disabled {
    cursor: not-allowed;

    opacity: .5;
}


/* ---------------------------------------------------------
   COMPANIES - SEARCH + DETAIL BUTTONS
   --------------------------------------------------------- */

#suppliersScreen .supplier-search {
    height: 46px;

    padding: 0 14px;

    border:
        1px solid
        var(--border);

    border-radius: 11px;

    background: #f9fbfe;

    color: var(--text);

    outline: none;

    box-shadow: none;

    transition:
        border-color .14s,
        background .14s,
        box-shadow .14s;
}


#suppliersScreen .supplier-search:focus {
    background: #fff;

    border-color: #84aff0;

    box-shadow:
        0 0 0 3px
        rgba(21, 105, 232, .07);
}


#suppliersScreen
.supplier-detail-actions
.secondary-btn {
    min-height: 46px;

    padding: 0 16px;

    border-radius: 11px;
}


#suppliersScreen
.supplier-detail-actions
.secondary-btn:hover:not(:disabled) {
    border-color: #a9c7f5;

    background: #f7faff;

    color: var(--blue);
}


#suppliersScreen
#supplierDetailEditButton {
    border-color: #cfe0fb;

    background: var(--blue-soft);

    color: var(--blue);
}


#suppliersScreen
#supplierDetailStatusButton {
    border-color: #f0d8c9;

    background: #fff8f3;

    color: #b85f28;
}


/* ---------------------------------------------------------
   1. DASHBOARD FINANCE
   --------------------------------------------------------- */

#financeDashboardSection
.finance-kpi-card.seller-cash {
    border-top:
        3px solid
        #2aa7b8;
}


/* ---------------------------------------------------------
   2. STOCK
   --------------------------------------------------------- */

#stockScreen
.stock-kpi-card:nth-child(1) {
    border-top:
        3px solid
        var(--green);
}


#stockScreen
.stock-kpi-card:nth-child(2) {
    border-top:
        3px solid
        var(--blue);
}


#stockScreen
.stock-kpi-card:nth-child(3) {
    border-top:
        3px solid
        var(--orange);
}


/* ---------------------------------------------------------
   3. PURCHASES
   --------------------------------------------------------- */

#purchasesScreen
.purchase-summary-grid
.report-kpi-card:nth-child(1) {
    border-top:
        3px solid
        var(--blue);
}


#purchasesScreen
.purchase-summary-grid
.report-kpi-card:nth-child(2) {
    border-top:
        3px solid
        var(--green);
}


#purchasesScreen
.purchase-summary-grid
.report-kpi-card:nth-child(3) {
    border-top:
        3px solid
        var(--orange);
}


#purchasesScreen
.purchase-summary-grid
.report-kpi-card:nth-child(4) {
    border-top:
        3px solid
        var(--purple);
}


/* ---------------------------------------------------------
   11A. PRODUCTS - FOUND DURING FULL AUDIT
   --------------------------------------------------------- */

#productsScreen
.products-kpi-card:nth-child(1) {
    border-top:
        3px solid
        var(--blue);
}


#productsScreen
.products-kpi-card:nth-child(2) {
    border-top:
        3px solid
        var(--green);
}


#productsScreen
.products-kpi-card:nth-child(3) {
    border-top:
        3px solid
        var(--orange);
}


/* ---------------------------------------------------------
   4. COMPANIES KPI
   --------------------------------------------------------- */

#suppliersScreen
.supplier-kpi:nth-child(1) {
    border-top:
        3px solid
        var(--blue);
}


#suppliersScreen
.supplier-kpi:nth-child(2) {
    border-top:
        3px solid
        var(--green);
}


#suppliersScreen
.supplier-kpi:nth-child(3) {
    border-top:
        3px solid
        var(--purple);
}


/* ---------------------------------------------------------
   5. WAREHOUSES
   --------------------------------------------------------- */

#warehousesScreen
.warehouses-kpi-card:nth-child(1) {
    border-top:
        3px solid
        var(--blue);
}


#warehousesScreen
.warehouses-kpi-card:nth-child(2) {
    border-top:
        3px solid
        var(--green);
}


#warehousesScreen
.warehouses-kpi-card:nth-child(3) {
    border-top:
        3px solid
        var(--purple);
}


/* ---------------------------------------------------------
   6. SALES REGISTRY
   --------------------------------------------------------- */

#salesRegistryScreen
.sales-registry-filter-card,

#salesRegistryScreen
.sales-registry-table-card {
    border-color:
        var(--border);

    box-shadow:
        var(--shadow);
}


#salesRegistryScreen
.sales-registry-period-btn {
    color: #536176;

    transition:
        border-color .14s,
        background .14s,
        color .14s;
}


#salesRegistryScreen
.sales-registry-period-btn:hover {
    border-color: #9cc0f4;

    color: var(--blue);
}


#salesRegistryScreen
.sales-registry-period-btn.active {
    border-color: #bfd5f8;

    background:
        var(--blue-soft);

    color:
        var(--blue);

    box-shadow:
        inset 0 0 0 1px
        rgba(21, 105, 232, .04);
}


#salesRegistryScreen
.sales-registry-summary > div {
    box-shadow:
        0 7px 20px
        rgba(31, 55, 91, .045);
}


#salesRegistryScreen
.sales-registry-summary > div:nth-child(1) {
    border-top:
        3px solid
        var(--blue);

    background:
        linear-gradient(
            180deg,
            #fff 0%,
            #f7faff 100%
        );
}


#salesRegistryScreen
.sales-registry-summary > div:nth-child(2) {
    border-top:
        3px solid
        var(--green);

    background:
        linear-gradient(
            180deg,
            #fff 0%,
            #f6fcf8 100%
        );
}


#salesRegistryScreen
.sales-registry-summary > div:nth-child(3) {
    border-top:
        3px solid
        var(--orange);

    background:
        linear-gradient(
            180deg,
            #fff 0%,
            #fff9f5 100%
        );
}


#salesRegistryScreen
.sales-registry-summary > div:nth-child(4) {
    border-top:
        3px solid
        var(--purple);

    background:
        linear-gradient(
            180deg,
            #fff 0%,
            #f8f7ff 100%
        );
}


#salesRegistryScreen
.sales-registry-table-head {
    background:
        #f7faff;
}


/* ---------------------------------------------------------
   7. OTHER EXPENSES + PERSONAL LOANS
   --------------------------------------------------------- */

#otherExpensesScreen
.other-expenses-summary-card:nth-child(1),

#personalLoansScreen
.personal-loans-summary-card:nth-child(1) {
    border-top:
        3px solid
        var(--blue);
}


#otherExpensesScreen
.other-expenses-summary-card:nth-child(2),

#personalLoansScreen
.personal-loans-summary-card:nth-child(2) {
    border-top:
        3px solid
        var(--green);
}


#otherExpensesScreen
.other-expenses-summary-card:nth-child(3),

#personalLoansScreen
.personal-loans-summary-card:nth-child(3) {
    border-top:
        3px solid
        var(--orange);
}


#otherExpensesScreen
.other-expenses-summary-card:nth-child(4),

#personalLoansScreen
.personal-loans-summary-card:nth-child(4) {
    border-top:
        3px solid
        var(--purple);
}


/* ---------------------------------------------------------
   8. REPORTS
   Every KPI gets a different soft tone.
   --------------------------------------------------------- */

#reportsScreen
.reports-kpi-grid
.report-kpi-card {
    box-shadow:
        0 7px 20px
        rgba(31, 55, 91, .045);
}


#reportsScreen
.reports-kpi-grid
.report-kpi-card:nth-child(1) {
    border-color: #d4e3fb;

    border-top:
        3px solid
        #1569e8;

    background:
        linear-gradient(
            180deg,
            #fff 0%,
            #f3f8ff 100%
        );
}


#reportsScreen
.reports-kpi-grid
.report-kpi-card:nth-child(2) {
    border-color: #d5eee1;

    border-top:
        3px solid
        #24ad6a;

    background:
        linear-gradient(
            180deg,
            #fff 0%,
            #f3fbf7 100%
        );
}


#reportsScreen
.reports-kpi-grid
.report-kpi-card:nth-child(3) {
    border-color: #ffe0cd;

    border-top:
        3px solid
        #ff7a29;

    background:
        linear-gradient(
            180deg,
            #fff 0%,
            #fff7f1 100%
        );
}


#reportsScreen
.reports-kpi-grid
.report-kpi-card:nth-child(4) {
    border-color: #ddd8fb;

    border-top:
        3px solid
        #7967e9;

    background:
        linear-gradient(
            180deg,
            #fff 0%,
            #f7f5ff 100%
        );
}


#reportsScreen
.reports-kpi-grid
.report-kpi-card:nth-child(5) {
    border-color: #f6e4b8;

    border-top:
        3px solid
        #d99b17;

    background:
        linear-gradient(
            180deg,
            #fff 0%,
            #fffaf0 100%
        );
}


#reportsScreen
.reports-kpi-grid
.report-kpi-card:nth-child(6) {
    border-color: #cdeced;

    border-top:
        3px solid
        #20a4a8;

    background:
        linear-gradient(
            180deg,
            #fff 0%,
            #f1fbfb 100%
        );
}


#reportsScreen
.reports-kpi-grid
.report-kpi-card:nth-child(7) {
    border-color: #d9def9;

    border-top:
        3px solid
        #5267df;

    background:
        linear-gradient(
            180deg,
            #fff 0%,
            #f5f7ff 100%
        );
}


#reportsScreen
.reports-kpi-grid
.report-kpi-card:nth-child(8) {
    border-color: #cfebe2;

    border-top:
        3px solid
        #1f9b75;

    background:
        linear-gradient(
            180deg,
            #fff 0%,
            #f2fbf8 100%
        );
}


#reportsScreen
.reports-kpi-grid
.report-kpi-card:nth-child(9) {
    border-color: #f2d7dc;

    border-top:
        3px solid
        #d45d6e;

    background:
        linear-gradient(
            180deg,
            #fff 0%,
            #fff4f5 100%
        );
}


#reportsScreen
.reports-kpi-grid
.report-kpi-card:nth-child(10) {
    border-color: #d4e8f8;

    border-top:
        3px solid
        #3088da;

    background:
        linear-gradient(
            180deg,
            #fff 0%,
            #f1f8ff 100%
        );
}


#reportsScreen
.reports-kpi-grid
.report-kpi-card:nth-child(11) {
    border-color: #deebcc;

    border-top:
        3px solid
        #70a73b;

    background:
        linear-gradient(
            180deg,
            #fff 0%,
            #f7fbf1 100%
        );
}


#reportsScreen
.reports-kpi-grid
.report-kpi-card:nth-child(12) {
    border-color: #ead7f3;

    border-top:
        3px solid
        #9858bf;

    background:
        linear-gradient(
            180deg,
            #fff 0%,
            #faf4ff 100%
        );
}


/* ---------------------------------------------------------
   9. SETTLEMENTS
   --------------------------------------------------------- */

#settlementsScreen
.settlements-filter-card,

#settlementsScreen
.settlement-create-card,

#settlementsScreen
.settlement-history-card {
    border-color:
        var(--border);

    box-shadow:
        var(--shadow);
}


#settlementsScreen
.settlement-period-btn {
    color: #536176;

    transition:
        border-color .14s,
        background .14s,
        color .14s;
}


#settlementsScreen
.settlement-period-btn:hover {
    border-color: #9cc0f4;

    color: var(--blue);
}


#settlementsScreen
.settlement-period-btn.active {
    border-color: #bfd5f8;

    background:
        var(--blue-soft);

    color:
        var(--blue);
}


#settlementsScreen
.settlement-kpi-card:nth-child(1) {
    border-top:
        3px solid
        var(--blue);

    background:
        linear-gradient(
            180deg,
            #fff 0%,
            #f7faff 100%
        );
}


#settlementsScreen
.settlement-kpi-card:nth-child(2) {
    border-top:
        3px solid
        var(--green);

    background:
        linear-gradient(
            180deg,
            #fff 0%,
            #f6fcf8 100%
        );
}


#settlementsScreen
.settlement-kpi-card:nth-child(3) {
    border-top:
        3px solid
        var(--orange);

    background:
        linear-gradient(
            180deg,
            #fff 0%,
            #fff9f5 100%
        );
}


#settlementsScreen
.settlement-kpi-card:nth-child(4) {
    border-top:
        3px solid
        var(--purple);

    background:
        linear-gradient(
            180deg,
            #fff 0%,
            #f8f7ff 100%
        );
}


#settlementsScreen
.settlement-kpi-card:nth-child(5) {
    border-top:
        3px solid
        #2aa7b8;

    background:
        linear-gradient(
            180deg,
            #fff 0%,
            #f3fbfc 100%
        );
}


#settlementsScreen
.settlement-kpi-card:nth-child(6) {
    border-color: #c7e6d4;

    border-top:
        3px solid
        var(--green);

    background:
        linear-gradient(
            180deg,
            #fff 0%,
            #eff9f3 100%
        );
}


/* ---------------------------------------------------------
   11B. REPORT + AUDIT PAGINATION DARK STATES
   --------------------------------------------------------- */

#reportsScreen
.report-stock-page-btn.active,

#reportsScreen
.report-payments-page-btn.active,

#auditScreen
.audit-page-btn.active {
    border-color:
        var(--blue);

    background:
        var(--blue);

    color:
        #fff;
}


/* ---------------------------------------------------------
   10. USERS
   --------------------------------------------------------- */

#usersScreen
.users-primary-button {
    background:
        linear-gradient(
            180deg,
            #2482f7,
            #1268e6
        );

    color:
        #fff;

    box-shadow:
        0 8px 18px
        rgba(21, 105, 232, .18);
}


#usersScreen
.users-primary-button:hover:not(:disabled) {
    filter:
        brightness(.97);
}


#usersScreen
.users-form-card,

#usersScreen
.users-list-card {
    border-color:
        var(--border);

    border-radius:
        16px;

    box-shadow:
        var(--shadow);
}


#usersScreen
.users-table-header {
    background:
        #f7faff;

    color:
        #667085;
}


#usersScreen
.users-avatar {
    background:
        var(--blue-soft);

    color:
        var(--blue);
}


#usersScreen
.users-secondary-button,

#usersScreen
.users-action-button {
    border:
        1px solid
        #e0e7f0;

    background:
        #f8faff;

    color:
        #536176;
}


#usersScreen
.users-action-button:hover:not(:disabled),

#usersScreen
.users-secondary-button:hover:not(:disabled) {
    border-color:
        #bcd4f6;

    background:
        var(--blue-soft);

    color:
        var(--blue);
}


#usersScreen
.users-action-button.danger {
    border-color:
        #f0d8d5;

    background:
        #fff3f1;

    color:
        #a53d34;
}


#usersScreen
.users-action-button.activate {
    border-color:
        #cde8d8;

    background:
        #eff9f3;

    color:
        #247a43;
}


/* WOOD_DESKTOP_VISUAL_HARMONY_V1_END */


/* =========================================================
   WOOD_DESKTOP_GEOMETRY_PERIODS_V1_BEGIN

   Desktop-only geometry normalization.

   Same component type = same:
   - height
   - padding
   - radius
   - border
   - shadow
   - grid gap
   - quick-period button geometry
   ========================================================= */

@media (min-width: 901px) {

    /* -----------------------------------------------------
       QUICK PERIOD CONTROLS
       ----------------------------------------------------- */

    .sales-registry-quick-periods,
    .reports-quick-periods,
    .settlements-quick-periods {
        display: flex;

        align-items: center;

        gap: 8px;

        margin-bottom: 18px;
    }


    .sales-registry-period-btn,
    .report-period-btn,
    .settlement-period-btn {
        appearance: none;

        box-sizing: border-box;

        width: 92px;
        min-width: 92px;
        height: 38px;
        min-height: 38px;

        display: inline-flex;

        align-items: center;
        justify-content: center;

        padding: 0 12px;

        border:
            1px solid
            #dce3ec;

        border-radius: 9px;

        background: #fff;

        color: #536176;

        cursor: pointer;

        font: inherit;

        font-size: 12px;
        font-weight: 700;

        line-height: 1;

        white-space: nowrap;

        transition:
            border-color .14s,
            background .14s,
            color .14s,
            box-shadow .14s;
    }


    .sales-registry-period-btn:hover,
    .report-period-btn:hover,
    .settlement-period-btn:hover {
        border-color:
            #9cc0f4;

        color:
            var(--blue);
    }


    .sales-registry-period-btn.active,
    .report-period-btn.active,
    .settlement-period-btn.active {
        border-color:
            #bfd5f8;

        background:
            var(--blue-soft);

        color:
            var(--blue);

        box-shadow:
            inset 0 0 0 1px
            rgba(21, 105, 232, .04);
    }


    /* -----------------------------------------------------
       FILTER SURFACES
       ----------------------------------------------------- */

    .sales-registry-filter-card,
    .reports-filter-card,
    .settlements-filter-card,
    .audit-filter-card {
        box-sizing: border-box;

        padding: 18px;

        border:
            1px solid
            var(--border);

        border-radius: 16px;

        background: #fff;

        box-shadow:
            var(--shadow);

        margin-bottom: 18px;
    }


    .sales-registry-filter-action button,
    .reports-filter-action button,
    .settlements-filter-action button {
        box-sizing: border-box;

        height: 42px;
        min-height: 42px;

        padding:
            0 16px;

        border-radius:
            10px;

        white-space:
            nowrap;
    }


    /* -----------------------------------------------------
       KPI / SUMMARY GEOMETRY
       ----------------------------------------------------- */

    .kpi-card,

    .finance-kpi-card,

    .stock-kpi-card,

    .products-kpi-card,

    .supplier-kpi,

    .warehouses-kpi-card,

    .purchase-summary-grid
    .report-kpi-card,

    #reportsScreen
    .report-kpi-card,

    .settlement-kpi-card,

    .sales-registry-summary > div,

    .other-expenses-summary-card,

    .personal-loans-summary-card,

    .opening-summary-grid article,

    .exec-daily-kpi {
        box-sizing: border-box;

        height: 132px;
        min-height: 132px;
        max-height: 132px;

        padding: 18px;

        border-radius: 15px;

        overflow: hidden;
    }


    /*
     * KPI labels reserve equal vertical space.
     * This keeps values on the same baseline even when
     * another card has a two-line title.
     */

    .finance-kpi-card > span,

    .stock-kpi-card > span,

    .products-kpi-card > span,

    .supplier-kpi > span,

    .warehouses-kpi-card > span,

    .report-kpi-card > span,

    .settlement-kpi-card > span,

    .sales-registry-summary > div > span,

    .other-expenses-summary-card > span,

    .personal-loans-summary-card > span,

    .opening-summary-grid article > span,

    .exec-daily-kpi > span {
        box-sizing: border-box;

        min-height: 32px;

        line-height: 1.35;

        overflow-wrap: anywhere;
    }


    /*
     * Long values must not force a card to grow.
     */

    .finance-kpi-value strong,

    .stock-kpi-card strong,

    .products-kpi-card strong,

    .supplier-kpi strong,

    .warehouses-kpi-card strong,

    .report-kpi-card > strong,

    .settlement-kpi-card strong,

    .sales-registry-summary > div > strong,

    .other-expenses-summary-card strong,

    .personal-loans-summary-card strong,

    .opening-summary-grid article strong,

    .exec-daily-value strong {
        min-width: 0;

        max-width: 100%;

        font-size:
            clamp(
                20px,
                1.7vw,
                24px
            );

        line-height: 1.15;

        overflow-wrap: anywhere;

        word-break: normal;

        white-space: normal;
    }


    /* -----------------------------------------------------
       SAME GRID RHYTHM
       ----------------------------------------------------- */

    .kpi-grid,

    .finance-kpi-grid,

    .stock-kpis,

    .products-kpis,

    .supplier-kpi-grid,

    .warehouses-kpis,

    .purchase-summary-grid,

    .reports-kpi-grid,

    .settlement-kpi-grid,

    .sales-registry-summary,

    .other-expenses-summary-grid,

    .personal-loans-summary-grid,

    .opening-summary-grid,

    .exec-daily-grid {
        gap: 14px;
    }


    /* -----------------------------------------------------
       COMMON CARD SURFACES
       ----------------------------------------------------- */

    .stock-table-card,

    .products-table-card,

    .warehouses-table-card,

    .supplier-list-card,

    .supplier-detail-card,

    .customers-list-card,

    .customer-detail-card,

    .sales-registry-table-card,

    .other-expenses-table-card,

    .personal-loans-table-card,

    .report-sales-detail-card,

    .settlement-history-card,

    .users-list-card,

    .users-form-card,

    .audit-table-card,

    .sale-form-card,

    .payment-form-card {
        box-sizing: border-box;

        border:
            1px solid
            var(--border);

        border-radius:
            16px;

        background:
            #fff;

        box-shadow:
            var(--shadow);
    }

}

/* WOOD_DESKTOP_GEOMETRY_PERIODS_V1_END */



/* =========================================================
   WOOD_DESKTOP_GLOBAL_HEADER_ART_V1_BEGIN

   Shared desktop top-header visual.
   Static, subtle and deliberately non-distracting.
   No hard circles / no sharp turns.
   ========================================================= */

@media (min-width: 901px) {

    .header {
        position: relative;

        isolation: isolate;

        min-height: 82px;

        overflow: hidden;

        padding:
            15px
            18px;

        border:
            1px solid
            rgba(188, 211, 242, .72);

        border-radius:
            18px;

        background:
            linear-gradient(
                118deg,
                #f4f8ff 0%,
                #fbfdff 36%,
                #ffffff 58%,
                #f5f9ff 100%
            );

        box-shadow:
            0 8px 24px
            rgba(31, 55, 91, .045);
    }


    /*
     * Fine flowing lines.
     * Straight / soft diagonal rhythm instead of circles.
     */
    .header::before {
        content: "";

        position: absolute;

        inset:
            -60px
            -80px;

        z-index: -2;

        pointer-events: none;

        opacity: .72;

        background:

            repeating-linear-gradient(
                153deg,
                transparent 0,
                transparent 33px,

                rgba(
                    21,
                    105,
                    232,
                    .045
                ) 34px,

                transparent 35px,
                transparent 76px
            ),

            repeating-linear-gradient(
                27deg,
                transparent 0,
                transparent 58px,

                rgba(
                    77,
                    132,
                    210,
                    .027
                ) 59px,

                transparent 60px,
                transparent 108px
            );

        transform:
            skewX(-8deg)
            translateX(2%);
    }


    /*
     * Second layer gives depth without a visible
     * hard geometric object.
     */
    .header::after {
        content: "";

        position: absolute;

        top: -35px;
        right: -80px;

        width: 58%;
        height: 160px;

        z-index: -1;

        pointer-events: none;

        opacity: .8;

        background:
            linear-gradient(
                145deg,

                transparent 0%,
                transparent 26%,

                rgba(
                    21,
                    105,
                    232,
                    .035
                ) 26.5%,

                transparent 27%,
                transparent 48%,

                rgba(
                    90,
                    144,
                    219,
                    .025
                ) 48.5%,

                transparent 49%,
                transparent 100%
            );

        transform:
            skewX(-12deg);
    }


    .header > * {
        position: relative;

        z-index: 1;
    }


    /*
     * Slightly integrate date box with the new header
     * while keeping the existing component geometry.
     */
    .header .date {
        border-color:
            rgba(
                190,
                209,
                235,
                .82
            );

        background:
            rgba(
                255,
                255,
                255,
                .88
            );

        box-shadow:
            0 3px 10px
            rgba(
                31,
                55,
                91,
                .035
            );
    }


    .header .eyebrow {
        color:
            #4e83cf;
    }

}

/* WOOD_DESKTOP_GLOBAL_HEADER_ART_V1_END */


/* =========================================================
   WOOD_DESKTOP_GLOBAL_HEADER_ART_V2_BEGIN
   Stronger visual version.
   Soft geometry only; no hard circles or sharp turns.
   ========================================================= */

@media (min-width: 901px) {

    .header {
        min-height: 88px;

        background:
            linear-gradient(
                110deg,
                #edf5ff 0%,
                #f7faff 34%,
                #ffffff 62%,
                #eef6ff 100%
            );

        border-color:
            rgba(112, 164, 232, .38);

        box-shadow:
            0 10px 28px
            rgba(31, 74, 137, .07);
    }


    /*
     * Main line field.
     * More visible than V1 but still background-level.
     */
    .header::before {
        inset:
            -95px
            -120px;

        opacity: 1;

        background:

            repeating-linear-gradient(
                151deg,
                transparent 0px,
                transparent 45px,

                rgba(
                    21,
                    105,
                    232,
                    .095
                ) 46px,

                rgba(
                    21,
                    105,
                    232,
                    .095
                ) 47px,

                transparent 48px,
                transparent 100px
            ),

            repeating-linear-gradient(
                28deg,
                transparent 0px,
                transparent 70px,

                rgba(
                    61,
                    131,
                    226,
                    .065
                ) 71px,

                rgba(
                    61,
                    131,
                    226,
                    .065
                ) 72px,

                transparent 73px,
                transparent 142px
            ),

            linear-gradient(
                118deg,
                rgba(
                    21,
                    105,
                    232,
                    .05
                ) 0%,

                transparent 30%,

                transparent 68%,

                rgba(
                    63,
                    137,
                    235,
                    .055
                ) 100%
            );

        transform:
            skewX(-7deg)
            translateX(1%);
    }


    /*
     * Broad soft directional highlights.
     * No circle edges.
     */
    .header::after {
        top: -65px;
        right: -45px;

        width: 72%;
        height: 215px;

        opacity: 1;

        background:

            linear-gradient(
                145deg,

                transparent 0%,
                transparent 18%,

                rgba(
                    21,
                    105,
                    232,
                    .07
                ) 18.5%,

                rgba(
                    21,
                    105,
                    232,
                    .018
                ) 24%,

                transparent 34%,

                transparent 52%,

                rgba(
                    72,
                    143,
                    235,
                    .06
                ) 52.5%,

                rgba(
                    72,
                    143,
                    235,
                    .014
                ) 59%,

                transparent 70%,
                transparent 100%
            );

        transform:
            skewX(-9deg);
    }


    .header .date {
        border-color:
            rgba(
                118,
                165,
                228,
                .42
            );

        background:
            rgba(
                255,
                255,
                255,
                .92
            );

        box-shadow:
            0 5px 14px
            rgba(
                39,
                93,
                166,
                .08
            );
    }

}

/* WOOD_DESKTOP_GLOBAL_HEADER_ART_V2_END */


/* =========================================================
   WOOD_DESKTOP_ORGANIC_RIBBON_BACKGROUND_V2_BEGIN

   Two soft asymmetric line ribbons.
   One lightweight inline SVG.
   ========================================================= */

@media (min-width: 901px) {

    .content {
        position: relative;
        isolation: isolate;

        background:
            linear-gradient(
                135deg,
                #f4f7fb 0%,
                #f8faff 45%,
                #f3f7fc 100%
            );
    }


    .content::before {
        content: "";

        position: fixed;

        top: -7vh;
        right: -5vw;
        bottom: -7vh;
        left: 248px;

        z-index: -1;

        pointer-events: none;

        opacity: .48;

        background-image:
            url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%201600%201000'%20preserveAspectRatio='none'%20fill='none'%3E%3Cdefs%3E%3ClinearGradient%20id='g1'%20x1='500'%20y1='0'%20x2='1600'%20y2='650'%20gradientUnits='userSpaceOnUse'%3E%3Cstop%20stop-color='%231569e8'/%3E%3Cstop%20offset='.52'%20stop-color='%232aa7b8'/%3E%3Cstop%20offset='1'%20stop-color='%237967e9'/%3E%3C/linearGradient%3E%3ClinearGradient%20id='g2'%20x1='0'%20y1='650'%20x2='1100'%20y2='1000'%20gradientUnits='userSpaceOnUse'%3E%3Cstop%20stop-color='%237967e9'/%3E%3Cstop%20offset='.5'%20stop-color='%231569e8'/%3E%3Cstop%20offset='1'%20stop-color='%232aa7b8'/%3E%3C/linearGradient%3E%3Cpath%20id='top'%20d='M-700,-80%20C-300,-80%20150,-80%20520,-80%20C690,60%20710,260%20890,300%20C1080,345%201085,125%201300,185%20C1425,220%201485,350%201690,390'/%3E%3Cpath%20id='bottom'%20d='M-120,810%20C170,620%20390,930%20630,790%20C840,665%20910,780%201040,900%20C1160,1000%201340,970%201720,760'/%3E%3C/defs%3E%3Cg%20fill='none'%20stroke-linecap='round'%20stroke-width='1.35'%3E%3Cg%20stroke='url(%23g1)'%20opacity='.82'%3E%3Cuse%20href='%23top'%20transform='translate(0,-54)'/%3E%3Cuse%20href='%23top'%20transform='translate(0,-36)'/%3E%3Cuse%20href='%23top'%20transform='translate(0,-18)'/%3E%3Cuse%20href='%23top'/%3E%3Cuse%20href='%23top'%20transform='translate(0,18)'/%3E%3Cuse%20href='%23top'%20transform='translate(0,36)'/%3E%3Cuse%20href='%23top'%20transform='translate(0,54)'/%3E%3C/g%3E%3Cg%20stroke='url(%23g2)'%20opacity='.70'%3E%3Cuse%20href='%23bottom'%20transform='translate(0,-54)'/%3E%3Cuse%20href='%23bottom'%20transform='translate(0,-36)'/%3E%3Cuse%20href='%23bottom'%20transform='translate(0,-18)'/%3E%3Cuse%20href='%23bottom'/%3E%3Cuse%20href='%23bottom'%20transform='translate(0,18)'/%3E%3Cuse%20href='%23bottom'%20transform='translate(0,36)'/%3E%3Cuse%20href='%23bottom'%20transform='translate(0,54)'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");

        background-repeat:
            no-repeat;

        background-position:
            center center;

        background-size:
            cover;

        transform:
            translate3d(
                -8px,
                -3px,
                0
            )
            scale(1.035);

        transform-origin:
            center center;

        animation:
            woodOrganicRibbonDrift
            70s
            ease-in-out
            infinite
            alternate;

        will-change:
            transform;
    }


    @keyframes woodOrganicRibbonDrift {

        0% {
            transform:
                translate3d(
                    -10px,
                    -4px,
                    0
                )
                scale(1.035);
        }

        50% {
            transform:
                translate3d(
                    5px,
                    4px,
                    0
                )
                scale(1.042);
        }

        100% {
            transform:
                translate3d(
                    13px,
                    -2px,
                    0
                )
                scale(1.035);
        }

    }

}


@media (min-width: 901px) and (prefers-reduced-motion: reduce) {

    .content::before {
        animation: none;

        transform:
            scale(1.035);
    }

}

/* WOOD_DESKTOP_ORGANIC_RIBBON_BACKGROUND_V2_END */


/* =========================================================
   WOOD_DESKTOP_REMOVE_GLOBAL_HEADER_V1_BEGIN

   Desktop only:
   remove the entire global top header/banner.

   Mobile header stays untouched because it contains
   the mobile menu button.
   ========================================================= */

@media (min-width: 901px) {

    .content > .header {
        display: none !important;
    }

}

/* WOOD_DESKTOP_REMOVE_GLOBAL_HEADER_V1_END */


/* =========================================================
   WOOD_DESKTOP_WAVE_BEHIND_SIDEBAR_V1_BEGIN

   Let the decorative wave continue underneath the sidebar.
   The solid sidebar sits above it, so no cut line/end point
   is visible along the left content boundary.
   ========================================================= */

@media (min-width: 901px) {

    /*
     * Continue decorative layer underneath sidebar instead
     * of starting it exactly at the content boundary.
     */
    .content::before {
        left: 0 !important;
    }


    /*
     * Sidebar becomes the opaque foreground layer.
     * Existing sticky positioning is preserved.
     */
    .sidebar {
        z-index: 30;

        background:
            var(--sidebar);
    }


    /*
     * Keep the content itself below the sidebar's stacking
     * level while preserving its own isolated background.
     */
    .content {
        z-index: 0;
    }

}

/* WOOD_DESKTOP_WAVE_BEHIND_SIDEBAR_V1_END */


/* =========================================================
   WOOD_DESKTOP_WAVE_UNDULATION_V1_BEGIN

   Lightweight optical wave deformation.

   Only the existing composited SVG layer moves.
   No SVG path morphing, turbulence filter, JS or canvas.
   ========================================================= */

@media (min-width: 901px) {

    .content::before {
        transform-origin:
            52%
            48%;

        animation:
            woodWaveUndulation
            28s
            cubic-bezier(
                .45,
                .05,
                .55,
                .95
            )
            infinite;
    }


    @keyframes woodWaveUndulation {

        0% {
            transform:
                translate3d(
                    -10px,
                    -5px,
                    0
                )
                scaleX(1.040)
                scaleY(1.025)
                skewY(-0.22deg)
                rotate(-0.10deg);
        }


        20% {
            transform:
                translate3d(
                    1px,
                    5px,
                    0
                )
                scaleX(1.045)
                scaleY(1.045)
                skewY(0.18deg)
                rotate(0.08deg);
        }


        40% {
            transform:
                translate3d(
                    11px,
                    -1px,
                    0
                )
                scaleX(1.036)
                scaleY(1.058)
                skewY(0.32deg)
                rotate(0.14deg);
        }


        60% {
            transform:
                translate3d(
                    5px,
                    -8px,
                    0
                )
                scaleX(1.046)
                scaleY(1.038)
                skewY(-0.10deg)
                rotate(-0.04deg);
        }


        80% {
            transform:
                translate3d(
                    -7px,
                    3px,
                    0
                )
                scaleX(1.038)
                scaleY(1.052)
                skewY(-0.30deg)
                rotate(-0.13deg);
        }


        100% {
            transform:
                translate3d(
                    -10px,
                    -5px,
                    0
                )
                scaleX(1.040)
                scaleY(1.025)
                skewY(-0.22deg)
                rotate(-0.10deg);
        }

    }

}


/*
 * Accessibility / low-power preference:
 * same visual remains, movement stops.
 */
@media (min-width: 901px) and (prefers-reduced-motion: reduce) {

    .content::before {
        animation:
            none;

        transform:
            translate3d(
                0,
                0,
                0
            )
            scale(1.04);
    }

}

/* WOOD_DESKTOP_WAVE_UNDULATION_V1_END */


/* =========================================================
   WOOD_RESPONSIVE_WAVE_VERTICAL_SPACING_V1_BEGIN

   Bring upper and lower wave bundles closer together.

   Standard desktop: mildly closer
   Large desktop:    more compression
   Very large/tall:  stronger compression

   Animation, color and SVG geometry stay unchanged.
   ========================================================= */


/*
 * Normal desktop / current screen.
 * Slightly reduce vertical distance immediately.
 */
@media (min-width: 901px) {

    .content::before {
        background-size:
            100%
            88% !important;

        background-position:
            center
            center !important;
    }

}


/*
 * Larger desktop / wide monitors.
 */
@media (min-width: 1600px) {

    .content::before {
        background-size:
            100%
            82% !important;
    }

}


/*
 * Very large or very tall desktop displays.
 * Typical 27–36 inch high-resolution monitors will
 * generally land here depending on browser viewport.
 */
@media (min-width: 2200px),
       (min-height: 1200px) {

    .content::before {
        background-size:
            100%
            75% !important;
    }

}


/*
 * Ultra-wide / high-resolution screens.
 * Prevent an excessively empty center.
 */
@media (min-width: 3000px) {

    .content::before {
        background-size:
            100%
            70% !important;
    }

}

/* WOOD_RESPONSIVE_WAVE_VERTICAL_SPACING_V1_END */


/* =========================================================
   WOOD_RESPONSIVE_WAVE_SPACING_STRETCH_V2_BEGIN

   Keep the vertically compressed wave bundles,
   but stretch them horizontally beyond viewport edges.

   Result:
   - center gap remains smaller
   - left/right SVG endpoints stay outside visible area
   - large monitors retain a wide flowing composition
   ========================================================= */


/* Normal desktop */
@media (min-width: 901px) {

    .content::before {
        background-size:
            112%
            88% !important;

        background-position:
            center
            center !important;
    }

}


/* Large desktop */
@media (min-width: 1600px) {

    .content::before {
        background-size:
            120%
            82% !important;
    }

}


/* Very large / tall displays */
@media (min-width: 2200px),
       (min-height: 1200px) {

    .content::before {
        background-size:
            130%
            75% !important;
    }

}


/* Ultra-wide / 4K-class large viewport */
@media (min-width: 3000px) {

    .content::before {
        background-size:
            138%
            70% !important;
    }

}

/* WOOD_RESPONSIVE_WAVE_SPACING_STRETCH_V2_END */


/* =========================================================
   WOOD_RESPONSIVE_WAVE_POSITION_UP_V1_BEGIN

   Do NOT modify SVG paths.
   Move the complete background image upward responsively.

   Existing top/bottom distance remains unchanged.
   ========================================================= */


/* Normal desktop - very small upward adjustment */
@media (min-width: 901px) {

    .content::before {
        background-position:
            center
            35% !important;
    }

}


/* Large desktop */
@media (min-width: 1600px) {

    .content::before {
        background-position:
            center
            20% !important;
    }

}


/* Large / tall monitor */
@media (min-width: 2200px),
       (min-height: 1200px) {

    .content::before {
        background-position:
            center
            0% !important;
    }

}


/* Ultra-wide */
@media (min-width: 3000px) {

    .content::before {
        background-position:
            center
            -5% !important;
    }

}

/* WOOD_RESPONSIVE_WAVE_POSITION_UP_V1_END */


/* =========================================================
   WOOD_RESPONSIVE_WAVE_POSITION_BALANCE_V2_BEGIN

   Keep the current shape, spacing and stretch.
   Only move the complete composition slightly downward.
   ========================================================= */


/* Normal desktop */
@media (min-width: 901px) {

    .content::before {
        background-position:
            center
            45% !important;
    }

}


/* Large desktop */
@media (min-width: 1600px) {

    .content::before {
        background-position:
            center
            38% !important;
    }

}


/* Large / tall monitor */
@media (min-width: 2200px),
       (min-height: 1200px) {

    .content::before {
        background-position:
            center
            30% !important;
    }

}


/* Ultra-wide */
@media (min-width: 3000px) {

    .content::before {
        background-position:
            center
            26% !important;
    }

}

/* WOOD_RESPONSIVE_WAVE_POSITION_BALANCE_V2_END */


/* =========================================================
   WOOD_LARGE_SCREEN_BOTTOM_WAVE_DOWN_V1_BEGIN

   Large displays only.
   Top ribbon stays exactly where it is.
   Bottom ribbon moves slightly downward.
   ========================================================= */

@media (min-width: 2200px),
       (min-height: 1200px) {

    .content::before {
        background-image:
            url("data:image/svg+xml,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%201600%201000'%20preserveAspectRatio%3D'none'%20fill%3D'none'%3E%3Cdefs%3E%3ClinearGradient%20id%3D'g1'%20x1%3D'500'%20y1%3D'0'%20x2%3D'1600'%20y2%3D'650'%20gradientUnits%3D'userSpaceOnUse'%3E%3Cstop%20stop-color%3D'%231569e8'%2F%3E%3Cstop%20offset%3D'.52'%20stop-color%3D'%232aa7b8'%2F%3E%3Cstop%20offset%3D'1'%20stop-color%3D'%237967e9'%2F%3E%3C%2FlinearGradient%3E%3ClinearGradient%20id%3D'g2'%20x1%3D'0'%20y1%3D'650'%20x2%3D'1100'%20y2%3D'1000'%20gradientUnits%3D'userSpaceOnUse'%3E%3Cstop%20stop-color%3D'%237967e9'%2F%3E%3Cstop%20offset%3D'.5'%20stop-color%3D'%231569e8'%2F%3E%3Cstop%20offset%3D'1'%20stop-color%3D'%232aa7b8'%2F%3E%3C%2FlinearGradient%3E%3Cpath%20id%3D'top'%20d%3D'M-700,-80%20C-300,-80%20150,-80%20520,-80%20C690,60%20710,260%20890,300%20C1080,345%201085,125%201300,185%20C1425,220%201485,350%201690,390'%2F%3E%3Cpath%20id%3D'bottom'%20d%3D'M-120,810%20C170,620%20390,930%20630,790%20C840,665%20910,780%201040,900%20C1160,1000%201340,970%201720,760'%2F%3E%3C%2Fdefs%3E%3Cg%20fill%3D'none'%20stroke-linecap%3D'round'%20stroke-width%3D'1.35'%3E%3Cg%20stroke%3D'url(%23g1)'%20opacity%3D'.82'%3E%3Cuse%20href%3D'%23top'%20transform%3D'translate(0,-54)'%2F%3E%3Cuse%20href%3D'%23top'%20transform%3D'translate(0,-36)'%2F%3E%3Cuse%20href%3D'%23top'%20transform%3D'translate(0,-18)'%2F%3E%3Cuse%20href%3D'%23top'%2F%3E%3Cuse%20href%3D'%23top'%20transform%3D'translate(0,18)'%2F%3E%3Cuse%20href%3D'%23top'%20transform%3D'translate(0,36)'%2F%3E%3Cuse%20href%3D'%23top'%20transform%3D'translate(0,54)'%2F%3E%3C%2Fg%3E%3Cg%20stroke%3D'url(%23g2)'%20opacity%3D'.70'%20transform%3D'translate(0,40)'%3E%3Cuse%20href%3D'%23bottom'%20transform%3D'translate(0,-54)'%2F%3E%3Cuse%20href%3D'%23bottom'%20transform%3D'translate(0,-36)'%2F%3E%3Cuse%20href%3D'%23bottom'%20transform%3D'translate(0,-18)'%2F%3E%3Cuse%20href%3D'%23bottom'%2F%3E%3Cuse%20href%3D'%23bottom'%20transform%3D'translate(0,18)'%2F%3E%3Cuse%20href%3D'%23bottom'%20transform%3D'translate(0,36)'%2F%3E%3Cuse%20href%3D'%23bottom'%20transform%3D'translate(0,54)'%2F%3E%3C%2Fg%3E%3C%2Fg%3E%3C%2Fsvg%3E")
            !important;
    }

}

/* WOOD_LARGE_SCREEN_BOTTOM_WAVE_DOWN_V1_END */



/* =========================================================
   WOOD_DAILY_DEBT_NAVIGATION_CSS_V1_BEGIN

   Three interactive debt-status pills.
   ========================================================= */

.exec-daily-debt-statuses {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 12px;
}


.exec-daily-debt-statuses
.wood-daily-debt-nav {
    box-sizing: border-box;

    appearance: none;
    -webkit-appearance: none;

    min-height: 42px;

    padding:
        9px
        18px;

    border:
        1px solid
        rgba(
            220,
            102,
            63,
            .22
        );

    border-radius:
        999px;

    background:
        rgba(
            255,
            247,
            242,
            .96
        );

    color:
        #d45a38;

    font:
        inherit;

    font-weight:
        700;

    line-height:
        1.2;

    text-decoration:
        none;

    white-space:
        nowrap;

    cursor:
        pointer;

    transition:
        transform
        .16s
        ease,
        box-shadow
        .16s
        ease,
        border-color
        .16s
        ease,
        background-color
        .16s
        ease;
}


.exec-daily-debt-statuses
.wood-daily-debt-nav:hover {
    transform:
        translateY(-1px);

    border-color:
        rgba(
            220,
            102,
            63,
            .40
        );

    background:
        #fff4ed;

    box-shadow:
        0
        6px
        16px
        rgba(
            165,
            76,
            43,
            .10
        );
}


.exec-daily-debt-statuses
.wood-daily-debt-nav:active {
    transform:
        translateY(0);
}


.exec-daily-debt-statuses
.wood-daily-debt-nav:focus-visible {
    outline:
        2px
        solid
        rgba(
            29,
            113,
            232,
            .50
        );

    outline-offset:
        2px;
}


/*
 * 30d = 0 olsa belə klik aktivdir.
 */
#pageDailyInactiveDebtor30d.wood-daily-debt-nav:disabled {
    opacity:
        1;

    cursor:
        pointer;

    pointer-events:
        auto;
}


/*
 * Personal-loan pill:
 * same family, slightly differentiated.
 */
#pageDailyPersonalLoanCount {
    color:
        #b85a42;

    background:
        rgba(
            255,
            250,
            246,
            .98
        );
}


@media (max-width: 900px) {

    .exec-daily-debt-statuses {
        justify-content:
            flex-start;
    }


    .exec-daily-debt-statuses
    .wood-daily-debt-nav {
        min-height:
            40px;

        padding:
            8px
            14px;

        white-space:
            normal;
    }

}

/* WOOD_DAILY_DEBT_NAVIGATION_CSS_V1_END */


/* =========================================================
   WOOD_DAILY_DEBT_PILL_SIZE_ALIGN_V2_BEGIN

   Daily Report interactive status pills use the same
   compact visual scale as "satış əməliyyatı".

   Functionality and colors remain unchanged.
   ========================================================= */

.exec-daily-debt-statuses
.wood-daily-debt-nav {
    min-height:
        0 !important;

    height:
        auto !important;

    padding:
        5px
        10px !important;

    border-radius:
        999px !important;

    font-size:
        11px !important;

    font-weight:
        700 !important;

    line-height:
        1.2 !important;
}


/*
 * Previous mobile rule used larger padding/min-height.
 * Keep the same compact component size on all screens.
 */
@media (max-width: 900px) {

    .exec-daily-debt-statuses
    .wood-daily-debt-nav {
        min-height:
            0 !important;

        padding:
            5px
            10px !important;

        font-size:
            11px !important;
    }

}

/* WOOD_DAILY_DEBT_PILL_SIZE_ALIGN_V2_END */


/* WOOD_TIMBER_CALCULATOR_STYLE_V1 */
.wood-calc-open { overflow: hidden !important; }

.wood-calc-launcher {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 8000;
  border: 0;
  border-radius: 16px;
  padding: 12px 18px;
  display: flex;
  align-items: center;
  gap: 9px;
  background: #172033;
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 12px 30px rgba(15,23,42,.22);
}
.wood-calc-launcher:hover { transform: translateY(-1px); }
.wood-calc-launcher-icon { font-size: 20px; }

.wood-calc-page {
  position: fixed;
  inset: 0;
  z-index: 9000;
  overflow: auto;
  background: #f4f6f9;
  padding: 32px 20px 70px;
}
.wood-calc-page[hidden] { display: none !important; }

.wood-calc-shell {
  width: min(100%, 1080px);
  margin: 0 auto;
}
.wood-calc-topbar {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}
.wood-calc-topbar h1 {
  margin: 3px 0 4px;
  font-size: clamp(26px,4vw,38px);
}
.wood-calc-topbar p { margin: 0; color: #64748b; }
.wood-calc-eyebrow {
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .12em;
}
.wood-calc-close {
  width: 44px;
  height: 44px;
  border: 1px solid #dbe1e8;
  border-radius: 13px;
  background: #fff;
  cursor: pointer;
  font-size: 18px;
}

.wood-calc-mode {
  display: inline-flex;
  padding: 4px;
  gap: 4px;
  border-radius: 14px;
  background: #e7ebf0;
  margin-bottom: 18px;
}
.wood-calc-mode button {
  border: 0;
  background: transparent;
  padding: 10px 18px;
  border-radius: 10px;
  font-weight: 700;
  cursor: pointer;
}
.wood-calc-mode button.active {
  background: #fff;
  box-shadow: 0 2px 8px rgba(15,23,42,.09);
}

.wood-calc-card {
  background: #fff;
  border: 1px solid #e3e8ef;
  border-radius: 20px;
  padding: 22px;
  margin-bottom: 16px;
  box-shadow: 0 8px 24px rgba(15,23,42,.045);
}
.wood-calc-section-head h2 { margin: 0 0 4px; font-size: 18px; }
.wood-calc-section-head p { margin: 0; color: #64748b; }

.wood-calc-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin: 18px 0;
}
.wood-calc-presets button {
  border: 1px solid #d8dee7;
  background: #f8fafc;
  border-radius: 12px;
  padding: 9px 15px;
  font-weight: 700;
  cursor: pointer;
}
.wood-calc-presets button.active {
  border-color: #172033;
  background: #172033;
  color: white;
}

.wood-calc-dimensions {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 14px;
}
.wood-calc-field label,
.wood-calc-input-card > label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 7px;
  color: #475569;
}
.wood-calc-measure,
.wood-calc-main-input {
  display: flex;
  overflow: hidden;
  border: 1px solid #d8dee7;
  border-radius: 13px;
  background: #fff;
}
.wood-calc-measure input,
.wood-calc-main-input input {
  min-width: 0;
  flex: 1;
  border: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
  padding: 13px 14px;
  font-size: 17px;
  font-weight: 700;
  background: transparent;
}
.wood-calc-measure select {
  width: 82px;
  border: 0;
  border-left: 1px solid #e2e8f0;
  padding: 0 10px;
  background: #f8fafc;
  font-weight: 700;
}
.wood-calc-main-input span {
  display: flex;
  align-items: center;
  padding: 0 16px;
  border-left: 1px solid #e2e8f0;
  background: #f8fafc;
  font-weight: 800;
}

.wood-calc-results {
  display: grid;
  grid-template-columns: repeat(2,1fr);
  gap: 14px;
}
.wood-calc-result {
  background: #fff;
  border: 1px solid #e3e8ef;
  border-radius: 18px;
  padding: 20px;
}
.wood-calc-result span {
  display: block;
  color: #64748b;
  margin-bottom: 8px;
}
.wood-calc-result strong {
  font-size: 24px;
  color: #172033;
}
.wood-calc-result.primary {
  background: #172033;
  border-color: #172033;
}
.wood-calc-result.primary span { color: #cbd5e1; }
.wood-calc-result.primary strong { color: #fff; font-size: 30px; }
.wood-calc-result.wide { grid-column: 1 / -1; }

.wood-calc-error {
  margin-top: 15px;
  padding: 13px 15px;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 12px;
  color: #9a3412;
  font-weight: 600;
}

@media (max-width: 700px) {
  .wood-calc-page { padding: 20px 12px 60px; }
  .wood-calc-dimensions,
  .wood-calc-results { grid-template-columns: 1fr; }
  .wood-calc-result.wide { grid-column: auto; }
  .wood-calc-launcher { right: 14px; bottom: 14px; }
}



/* WOOD_TIMBER_CALCULATOR_STYLE_V2_COMPACT */

/* Overall */
.wood-calc-page {
  background: #f6f7f9 !important;
  padding: 22px 16px 42px !important;
}

.wood-calc-shell {
  width: min(100%, 820px) !important;
  margin: 0 auto !important;
}


/* Launcher */
.wood-calc-launcher {
  right: 18px !important;
  bottom: 18px !important;

  padding: 9px 13px !important;
  gap: 7px !important;

  border-radius: 10px !important;

  background: #25344a !important;
  color: #fff !important;

  font-size: 13px !important;
  font-weight: 650 !important;

  box-shadow:
    0 5px 16px rgba(15, 23, 42, .16) !important;

  transition:
    transform .15s ease,
    box-shadow .15s ease,
    background .15s ease !important;
}

.wood-calc-launcher:hover {
  transform: translateY(-1px) !important;
  background: #1f2d40 !important;
  box-shadow:
    0 7px 18px rgba(15, 23, 42, .19) !important;
}

.wood-calc-launcher-icon {
  font-size: 16px !important;
}


/* Header */
.wood-calc-topbar {
  align-items: center !important;
  margin-bottom: 16px !important;
}

.wood-calc-eyebrow {
  font-size: 9px !important;
  color: #94a3b8 !important;
  letter-spacing: .10em !important;
}

.wood-calc-topbar h1 {
  margin: 2px 0 2px !important;
  font-size: 25px !important;
  line-height: 1.2 !important;
  color: #1e293b !important;
}

.wood-calc-topbar p {
  font-size: 13px !important;
  color: #64748b !important;
}

.wood-calc-close {
  width: 36px !important;
  height: 36px !important;

  border-radius: 9px !important;
  border: 1px solid #e2e8f0 !important;

  background: #fff !important;
  color: #64748b !important;

  font-size: 14px !important;

  transition:
    background .15s ease,
    color .15s ease !important;
}

.wood-calc-close:hover {
  background: #f1f5f9 !important;
  color: #1e293b !important;
}


/* Mode selector */
.wood-calc-mode {
  margin-bottom: 12px !important;
  padding: 3px !important;
  gap: 2px !important;

  border: 1px solid #e2e8f0 !important;
  border-radius: 10px !important;

  background: #eef1f5 !important;
}

.wood-calc-mode button {
  padding: 7px 13px !important;
  border-radius: 7px !important;

  font-size: 13px !important;
  color: #64748b !important;
}

.wood-calc-mode button.active {
  background: #fff !important;
  color: #25344a !important;

  box-shadow:
    0 1px 4px rgba(15, 23, 42, .10) !important;
}


/* Cards */
.wood-calc-card {
  padding: 16px !important;
  margin-bottom: 11px !important;

  border-radius: 13px !important;
  border: 1px solid #e5e9ef !important;

  box-shadow:
    0 2px 9px rgba(15, 23, 42, .035) !important;
}

.wood-calc-section-head h2 {
  margin-bottom: 2px !important;
  font-size: 15px !important;
  color: #273449 !important;
}

.wood-calc-section-head p {
  font-size: 12px !important;
  color: #7b8798 !important;
}


/* Presets */
.wood-calc-presets {
  margin: 12px 0 14px !important;
  gap: 7px !important;
}

.wood-calc-presets button {
  padding: 6px 11px !important;

  border-radius: 8px !important;
  border: 1px solid #dfe4ea !important;

  background: #f8fafc !important;
  color: #475569 !important;

  font-size: 12px !important;
  font-weight: 650 !important;

  transition:
    background .15s ease,
    border-color .15s ease,
    color .15s ease !important;
}

.wood-calc-presets button:hover {
  border-color: #aab4c2 !important;
  background: #f1f5f9 !important;
}

.wood-calc-presets button.active {
  border-color: #31435d !important;
  background: #31435d !important;
  color: #fff !important;
}


/* Dimensions */
.wood-calc-dimensions {
  gap: 10px !important;
}

.wood-calc-field label,
.wood-calc-input-card > label {
  margin-bottom: 5px !important;

  font-size: 11px !important;
  color: #64748b !important;
}

.wood-calc-measure,
.wood-calc-main-input {
  min-height: 40px !important;

  border-radius: 9px !important;
  border-color: #dfe4ea !important;

  transition:
    border-color .15s ease,
    box-shadow .15s ease !important;
}

.wood-calc-measure:focus-within,
.wood-calc-main-input:focus-within {
  border-color: #94a3b8 !important;

  box-shadow:
    0 0 0 3px rgba(100, 116, 139, .09) !important;
}

.wood-calc-measure input,
.wood-calc-main-input input {
  padding: 9px 11px !important;

  font-size: 14px !important;
  font-weight: 650 !important;

  color: #1e293b !important;
}

.wood-calc-measure select {
  width: 68px !important;

  padding: 0 7px !important;

  background: #f8fafc !important;
  color: #475569 !important;

  font-size: 12px !important;
}

.wood-calc-main-input span {
  padding: 0 12px !important;

  background: #f8fafc !important;
  color: #475569 !important;

  font-size: 12px !important;
}


/* Results */
.wood-calc-results {
  grid-template-columns: repeat(2, 1fr) !important;
  gap: 9px !important;
}

.wood-calc-result {
  min-height: 82px !important;

  padding: 13px 15px !important;

  border-radius: 12px !important;
  border: 1px solid #e4e8ed !important;

  background: #fff !important;

  box-shadow:
    0 2px 7px rgba(15, 23, 42, .025) !important;
}

.wood-calc-result span {
  margin-bottom: 5px !important;

  color: #7b8798 !important;

  font-size: 11px !important;
  font-weight: 550 !important;
}

.wood-calc-result strong {
  color: #273449 !important;

  font-size: 19px !important;
  line-height: 1.2 !important;
}


/* Main result */
.wood-calc-result.primary {
  border-color: #dce4ee !important;

  background:
    linear-gradient(
      135deg,
      #eef3f8 0%,
      #f8fafc 100%
    ) !important;
}

.wood-calc-result.primary span {
  color: #64748b !important;
}

.wood-calc-result.primary strong {
  color: #1e3a5f !important;

  font-size: 23px !important;
}


/* Wide result */
.wood-calc-result.wide {
  min-height: auto !important;

  padding-top: 11px !important;
  padding-bottom: 11px !important;

  background: #f8fafc !important;
}


/* Error */
.wood-calc-error {
  margin-top: 10px !important;
  padding: 9px 11px !important;

  border-radius: 8px !important;

  font-size: 12px !important;
}


/* Desktop: main input less oversized */
.wood-calc-input-card {
  padding-top: 13px !important;
  padding-bottom: 13px !important;
}


/* Mobile */
@media (max-width: 700px) {

  .wood-calc-page {
    padding: 15px 10px 55px !important;
  }

  .wood-calc-shell {
    width: 100% !important;
  }

  .wood-calc-topbar h1 {
    font-size: 21px !important;
  }

  .wood-calc-dimensions {
    grid-template-columns: 1fr !important;
  }

  .wood-calc-results {
    grid-template-columns: 1fr 1fr !important;
  }

  .wood-calc-result.primary,
  .wood-calc-result.wide {
    grid-column: 1 / -1 !important;
  }

  .wood-calc-result {
    min-height: 72px !important;
  }

  .wood-calc-result strong {
    font-size: 17px !important;
  }

  .wood-calc-result.primary strong {
    font-size: 21px !important;
  }

  .wood-calc-launcher {
    right: 12px !important;
    bottom: 12px !important;
  }
}

@media (max-width: 430px) {

  .wood-calc-results {
    grid-template-columns: 1fr !important;
  }

  .wood-calc-result.primary,
  .wood-calc-result.wide {
    grid-column: auto !important;
  }

  .wood-calc-presets button {
    flex: 1 1 calc(50% - 7px) !important;
  }
}



/* =========================================================
   WOOD_TIMBER_CALCULATOR_STYLE_V3_BLUE
   ========================================================= */

/* PAGE */
.wood-calc-page {
  background:
    radial-gradient(circle at 8% 8%, rgba(59, 130, 246, .12), transparent 27%),
    radial-gradient(circle at 92% 15%, rgba(14, 165, 233, .10), transparent 25%),
    linear-gradient(145deg, #f7fbff 0%, #eef7ff 48%, #f8fbff 100%) !important;

  padding: 28px 18px 60px !important;
}

.wood-calc-shell {
  width: min(100%, 920px) !important;
  margin: 0 auto !important;
  position: relative !important;
}


/* =========================================================
   LAUNCHER
   ========================================================= */

.wood-calc-launcher {
  right: 20px !important;
  bottom: 20px !important;

  padding: 11px 17px !important;
  gap: 8px !important;

  border: 1px solid rgba(255,255,255,.35) !important;
  border-radius: 14px !important;

  background:
    linear-gradient(
      135deg,
      #2563eb 0%,
      #0284c7 100%
    ) !important;

  color: #fff !important;

  font-size: 13px !important;
  font-weight: 700 !important;

  box-shadow:
    0 12px 28px rgba(37, 99, 235, .28),
    inset 0 1px 0 rgba(255,255,255,.22) !important;

  transition:
    transform .18s ease,
    box-shadow .18s ease !important;
}

.wood-calc-launcher:hover {
  transform: translateY(-2px) scale(1.015) !important;

  box-shadow:
    0 16px 34px rgba(37, 99, 235, .34),
    inset 0 1px 0 rgba(255,255,255,.24) !important;
}

.wood-calc-launcher-icon {
  width: 24px !important;
  height: 24px !important;

  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;

  border-radius: 8px !important;

  background: rgba(255,255,255,.17) !important;

  font-size: 15px !important;
}


/* =========================================================
   HERO HEADER
   ========================================================= */

.wood-calc-topbar {
  position: relative !important;
  overflow: hidden !important;

  align-items: center !important;

  padding: 22px 24px !important;
  margin-bottom: 16px !important;

  border: 1px solid rgba(96, 165, 250, .26) !important;
  border-radius: 20px !important;

  background:
    linear-gradient(
      125deg,
      rgba(255,255,255,.97) 0%,
      rgba(239,248,255,.97) 57%,
      rgba(224,242,254,.95) 100%
    ) !important;

  box-shadow:
    0 14px 38px rgba(30, 64, 175, .09) !important;
}

.wood-calc-topbar::before {
  content: "" !important;

  position: absolute !important;
  width: 180px !important;
  height: 180px !important;

  right: 60px !important;
  top: -115px !important;

  border-radius: 50% !important;

  background:
    radial-gradient(
      circle,
      rgba(59,130,246,.24),
      rgba(14,165,233,.08) 55%,
      transparent 72%
    ) !important;

  pointer-events: none !important;
}

.wood-calc-topbar::after {
  content: "" !important;

  position: absolute !important;
  width: 110px !important;
  height: 110px !important;

  right: 150px !important;
  bottom: -85px !important;

  border-radius: 50% !important;

  background:
    rgba(56, 189, 248, .10) !important;

  pointer-events: none !important;
}

.wood-calc-topbar > * {
  position: relative !important;
  z-index: 2 !important;
}

.wood-calc-eyebrow {
  display: inline-flex !important;

  padding: 4px 9px !important;
  margin-bottom: 5px !important;

  border-radius: 999px !important;

  background: #e0f2fe !important;

  color: #0369a1 !important;

  font-size: 9px !important;
  font-weight: 800 !important;
  letter-spacing: .10em !important;
}

.wood-calc-topbar h1 {
  margin: 3px 0 3px !important;

  color: #123b68 !important;

  font-size: 29px !important;
  line-height: 1.15 !important;

  letter-spacing: -.02em !important;
}

.wood-calc-topbar p {
  margin: 0 !important;

  color: #6483a4 !important;

  font-size: 13px !important;
  font-weight: 500 !important;
}


/* CLOSE */
.wood-calc-close {
  width: 39px !important;
  height: 39px !important;

  border: 1px solid #cfe5f8 !important;
  border-radius: 12px !important;

  background: rgba(255,255,255,.86) !important;
  color: #4b77a5 !important;

  font-size: 14px !important;

  box-shadow:
    0 4px 12px rgba(37,99,235,.08) !important;
}

.wood-calc-close:hover {
  background: #eff8ff !important;
  color: #2563eb !important;
  border-color: #93c5fd !important;
}


/* =========================================================
   MODE SWITCH
   ========================================================= */

.wood-calc-mode {
  width: fit-content !important;

  margin: 0 0 14px !important;
  padding: 4px !important;

  border: 1px solid #cfe5f8 !important;
  border-radius: 13px !important;

  background: rgba(224, 242, 254, .72) !important;

  box-shadow:
    inset 0 1px 2px rgba(37,99,235,.04) !important;
}

.wood-calc-mode button {
  padding: 9px 17px !important;

  border-radius: 9px !important;

  color: #6483a4 !important;

  font-size: 13px !important;
  font-weight: 700 !important;

  transition:
    background .16s ease,
    color .16s ease,
    box-shadow .16s ease !important;
}

.wood-calc-mode button.active {
  background: #fff !important;
  color: #1665b5 !important;

  box-shadow:
    0 4px 12px rgba(37,99,235,.13) !important;
}


/* =========================================================
   CARDS
   ========================================================= */

.wood-calc-card {
  padding: 19px 20px !important;
  margin-bottom: 13px !important;

  border: 1px solid #d9eaf8 !important;
  border-radius: 17px !important;

  background:
    rgba(255,255,255,.92) !important;

  box-shadow:
    0 8px 24px rgba(37, 99, 235, .055) !important;

  backdrop-filter: blur(8px) !important;
}

.wood-calc-section-head h2 {
  margin: 0 0 3px !important;

  color: #244d76 !important;

  font-size: 16px !important;
  font-weight: 750 !important;
}

.wood-calc-section-head p {
  margin: 0 !important;

  color: #7893ad !important;

  font-size: 12px !important;
}


/* =========================================================
   PRESETS
   ========================================================= */

.wood-calc-presets {
  gap: 8px !important;
  margin: 14px 0 17px !important;
}

.wood-calc-presets button {
  position: relative !important;

  padding: 8px 14px !important;

  border: 1px solid #d3e8fa !important;
  border-radius: 11px !important;

  background:
    linear-gradient(
      180deg,
      #ffffff 0%,
      #f3f9ff 100%
    ) !important;

  color: #3e6d99 !important;

  font-size: 12px !important;
  font-weight: 700 !important;

  box-shadow:
    0 3px 8px rgba(59,130,246,.04) !important;

  transition:
    transform .14s ease,
    border-color .14s ease,
    box-shadow .14s ease !important;
}

.wood-calc-presets button:hover {
  transform: translateY(-1px) !important;

  border-color: #93c5fd !important;

  box-shadow:
    0 6px 14px rgba(59,130,246,.10) !important;
}

.wood-calc-presets button.active {
  border-color: #60a5fa !important;

  background:
    linear-gradient(
      135deg,
      #2563eb 0%,
      #0ea5e9 100%
    ) !important;

  color: #fff !important;

  box-shadow:
    0 7px 16px rgba(37,99,235,.22) !important;
}


/* =========================================================
   DIMENSION INPUTS
   ========================================================= */

.wood-calc-dimensions {
  gap: 12px !important;
}

.wood-calc-field label,
.wood-calc-input-card > label {
  margin-bottom: 6px !important;

  color: #53779c !important;

  font-size: 11px !important;
  font-weight: 700 !important;
}

.wood-calc-measure,
.wood-calc-main-input {
  min-height: 44px !important;

  overflow: hidden !important;

  border: 1px solid #d6e7f5 !important;
  border-radius: 12px !important;

  background: #fbfdff !important;

  box-shadow:
    inset 0 1px 2px rgba(30,64,175,.025) !important;

  transition:
    border-color .16s ease,
    box-shadow .16s ease,
    background .16s ease !important;
}

.wood-calc-measure:hover,
.wood-calc-main-input:hover {
  border-color: #b7daf5 !important;
}

.wood-calc-measure:focus-within,
.wood-calc-main-input:focus-within {
  border-color: #60a5fa !important;

  background: #fff !important;

  box-shadow:
    0 0 0 4px rgba(59, 130, 246, .095) !important;
}

.wood-calc-measure input,
.wood-calc-main-input input {
  padding: 10px 13px !important;

  color: #173a5e !important;

  font-size: 15px !important;
  font-weight: 700 !important;
}

.wood-calc-measure select {
  width: 72px !important;

  padding: 0 8px !important;

  border-left: 1px solid #d9eaf8 !important;

  background:
    linear-gradient(
      180deg,
      #f2f9ff 0%,
      #eaf5ff 100%
    ) !important;

  color: #3270a9 !important;

  font-size: 12px !important;
  font-weight: 750 !important;
}

.wood-calc-main-input span {
  padding: 0 14px !important;

  border-left: 1px solid #d9eaf8 !important;

  background:
    linear-gradient(
      180deg,
      #f2f9ff 0%,
      #eaf5ff 100%
    ) !important;

  color: #2563a4 !important;

  font-size: 12px !important;
  font-weight: 800 !important;
}


/* =========================================================
   MAIN INPUT CARD
   ========================================================= */

.wood-calc-input-card {
  position: relative !important;
  overflow: hidden !important;

  padding: 16px 20px !important;
}

.wood-calc-input-card::before {
  content: "" !important;

  position: absolute !important;
  top: 0 !important;
  left: 0 !important;

  width: 4px !important;
  height: 100% !important;

  background:
    linear-gradient(
      180deg,
      #2563eb,
      #38bdf8
    ) !important;
}


/* =========================================================
   RESULTS
   ========================================================= */

.wood-calc-results {
  grid-template-columns: 1.15fr .85fr !important;
  gap: 11px !important;
}

.wood-calc-result {
  min-height: 92px !important;

  padding: 16px 18px !important;

  border: 1px solid #dcecf8 !important;
  border-radius: 16px !important;

  background:
    linear-gradient(
      145deg,
      #ffffff 0%,
      #f7fbff 100%
    ) !important;

  box-shadow:
    0 8px 20px rgba(37,99,235,.045) !important;

  transition:
    transform .16s ease,
    box-shadow .16s ease !important;
}

.wood-calc-result:hover {
  transform: translateY(-1px) !important;

  box-shadow:
    0 11px 25px rgba(37,99,235,.075) !important;
}

.wood-calc-result span {
  margin-bottom: 7px !important;

  color: #7893ad !important;

  font-size: 11px !important;
  font-weight: 650 !important;
}

.wood-calc-result strong {
  color: #244d76 !important;

  font-size: 20px !important;
  font-weight: 800 !important;

  letter-spacing: -.015em !important;
}


/* =========================================================
   PRIMARY RESULT — SPECIAL
   ========================================================= */

.wood-calc-result.primary {
  position: relative !important;
  overflow: hidden !important;

  min-height: 104px !important;

  border: 0 !important;

  background:
    linear-gradient(
      130deg,
      #2563eb 0%,
      #168bd0 52%,
      #16b6d9 100%
    ) !important;

  box-shadow:
    0 14px 30px rgba(37,99,235,.22) !important;
}

.wood-calc-result.primary::before {
  content: "" !important;

  position: absolute !important;

  width: 120px !important;
  height: 120px !important;

  right: -28px !important;
  top: -55px !important;

  border-radius: 50% !important;

  background:
    rgba(255,255,255,.12) !important;
}

.wood-calc-result.primary::after {
  content: "" !important;

  position: absolute !important;

  width: 75px !important;
  height: 75px !important;

  right: 65px !important;
  bottom: -55px !important;

  border-radius: 50% !important;

  background:
    rgba(255,255,255,.08) !important;
}

.wood-calc-result.primary span,
.wood-calc-result.primary strong {
  position: relative !important;
  z-index: 2 !important;
}

.wood-calc-result.primary span {
  color: rgba(255,255,255,.78) !important;
}

.wood-calc-result.primary strong {
  color: #fff !important;

  font-size: 28px !important;

  text-shadow:
    0 2px 8px rgba(0,0,0,.08) !important;
}


/* =========================================================
   WIDE RESULT
   ========================================================= */

.wood-calc-result.wide {
  grid-column: 1 / -1 !important;

  min-height: auto !important;

  background:
    linear-gradient(
      90deg,
      #f0f8ff 0%,
      #f7fcff 100%
    ) !important;

  border-color: #cde7fa !important;
}


/* =========================================================
   ERROR
   ========================================================= */

.wood-calc-error {
  margin-top: 12px !important;
  padding: 10px 13px !important;

  border: 1px solid #fecaca !important;
  border-radius: 10px !important;

  background: #fff5f5 !important;
  color: #b42318 !important;

  font-size: 12px !important;
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 700px) {

  .wood-calc-page {
    padding: 14px 10px 55px !important;
  }

  .wood-calc-topbar {
    padding: 17px 16px !important;
    border-radius: 16px !important;
  }

  .wood-calc-topbar h1 {
    font-size: 23px !important;
  }

  .wood-calc-card {
    padding: 15px !important;
  }

  .wood-calc-dimensions {
    grid-template-columns: 1fr !important;
  }

  .wood-calc-results {
    grid-template-columns: 1fr 1fr !important;
  }

  .wood-calc-result.primary,
  .wood-calc-result.wide {
    grid-column: 1 / -1 !important;
  }

  .wood-calc-launcher {
    right: 12px !important;
    bottom: 12px !important;
  }
}

@media (max-width: 440px) {

  .wood-calc-results {
    grid-template-columns: 1fr !important;
  }

  .wood-calc-result.primary,
  .wood-calc-result.wide {
    grid-column: auto !important;
  }

  .wood-calc-presets {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
  }
}



/* =========================================================
   WOOD_TIMBER_CALCULATOR_STYLE_V4_NATIVE
   Uses native Wood design language
   ========================================================= */

.wood-calc-page {
    background: var(--bg) !important;
    padding: 30px 24px 60px !important;
}

.wood-calc-shell {
    width: min(100%, 940px) !important;
    margin: 0 auto !important;
}


/* ---------------------------------------------------------
   FLOATING LAUNCH BUTTON
   --------------------------------------------------------- */

.wood-calc-launcher {
    right: 20px !important;
    bottom: 20px !important;

    min-height: 44px !important;

    padding: 0 16px !important;

    display: inline-flex !important;
    align-items: center !important;
    gap: 9px !important;

    border: 0 !important;
    border-radius: 11px !important;

    background: var(--blue) !important;
    color: #fff !important;

    font-size: 13px !important;
    font-weight: 700 !important;

    box-shadow:
        0 8px 22px
        rgba(21, 105, 232, .22) !important;

    transition:
        background .15s ease,
        transform .15s ease,
        box-shadow .15s ease !important;
}

.wood-calc-launcher:hover {
    background: var(--blue-dark) !important;
    transform: translateY(-1px) !important;

    box-shadow:
        0 11px 26px
        rgba(21, 105, 232, .26) !important;
}

.wood-calc-launcher-icon {
    width: 25px !important;
    height: 25px !important;

    display: grid !important;
    place-items: center !important;

    border-radius: 7px !important;

    background: rgba(255,255,255,.15) !important;

    font-size: 15px !important;
}


/* ---------------------------------------------------------
   PAGE HEADER
   --------------------------------------------------------- */

.wood-calc-topbar {
    position: static !important;
    overflow: visible !important;

    display: flex !important;
    align-items: flex-end !important;
    justify-content: space-between !important;

    gap: 20px !important;

    margin-bottom: 20px !important;
    padding: 0 !important;

    border: 0 !important;
    border-radius: 0 !important;

    background: transparent !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
}

.wood-calc-topbar::before,
.wood-calc-topbar::after {
    content: none !important;
    display: none !important;
}

.wood-calc-eyebrow {
    display: inline-block !important;

    margin-bottom: 7px !important;
    padding: 0 !important;

    background: transparent !important;

    color: var(--blue) !important;

    font-size: 10px !important;
    font-weight: 750 !important;
    letter-spacing: .08em !important;
}

.wood-calc-topbar h1 {
    margin: 0 !important;

    color: var(--text) !important;

    font-size: 31px !important;
    font-weight: 750 !important;
    letter-spacing: -.8px !important;
    line-height: 1.12 !important;
}

.wood-calc-topbar p {
    margin: 6px 0 0 !important;

    color: var(--secondary) !important;

    font-size: 13px !important;
}


/* Close button = native action button */
.wood-calc-close {
    width: 40px !important;
    height: 40px !important;

    display: grid !important;
    place-items: center !important;

    border: 1px solid var(--border) !important;
    border-radius: 10px !important;

    background: #fff !important;
    color: #506079 !important;

    box-shadow: var(--shadow) !important;

    font-size: 14px !important;
}

.wood-calc-close:hover {
    background: var(--blue-soft) !important;
    color: var(--blue) !important;
    border-color: #cddfff !important;
}


/* ---------------------------------------------------------
   MODE SWITCH
   Same language as stock tabs
   --------------------------------------------------------- */

.wood-calc-mode {
    width: fit-content !important;

    display: flex !important;
    gap: 5px !important;

    margin: 0 0 16px !important;
    padding: 4px !important;

    border: 0 !important;
    border-radius: 11px !important;

    background: #e9eef6 !important;

    box-shadow: none !important;
}

.wood-calc-mode button {
    min-width: 145px !important;
    height: 40px !important;

    padding: 0 16px !important;

    border: 0 !important;
    border-radius: 8px !important;

    background: transparent !important;

    color: #687588 !important;

    font-size: 13px !important;
    font-weight: 650 !important;
}

.wood-calc-mode button.active {
    background: #fff !important;
    color: var(--blue) !important;

    box-shadow:
        0 2px 8px
        rgba(35,55,86,.08) !important;
}


/* ---------------------------------------------------------
   MAIN CARDS
   Same structure as Wood cards
   --------------------------------------------------------- */

.wood-calc-card {
    margin-bottom: 14px !important;
    padding: 22px !important;

    border: 1px solid var(--border) !important;
    border-radius: 16px !important;

    background: #fff !important;

    box-shadow: var(--shadow) !important;

    backdrop-filter: none !important;
}

.wood-calc-section-head h2 {
    margin: 0 !important;

    color: var(--text) !important;

    font-size: 16px !important;
    font-weight: 700 !important;
}

.wood-calc-section-head p {
    margin: 5px 0 0 !important;

    color: var(--secondary) !important;

    font-size: 12px !important;
}


/* ---------------------------------------------------------
   PRESETS
   --------------------------------------------------------- */

.wood-calc-presets {
    display: flex !important;
    flex-wrap: wrap !important;

    gap: 8px !important;

    margin: 17px 0 20px !important;
}

.wood-calc-presets button {
    min-height: 38px !important;

    padding: 0 14px !important;

    border: 1px solid var(--border) !important;
    border-radius: 10px !important;

    background: #f9fbfe !important;

    color: #506079 !important;

    font-size: 12px !important;
    font-weight: 650 !important;

    box-shadow: none !important;

    transition:
        background .15s ease,
        color .15s ease,
        border-color .15s ease,
        transform .15s ease !important;
}

.wood-calc-presets button:hover {
    transform: translateY(-1px) !important;

    background: var(--blue-soft) !important;
    color: var(--blue) !important;

    border-color: #cddfff !important;
}

.wood-calc-presets button.active {
    background: var(--blue-soft) !important;
    color: var(--blue) !important;

    border-color: #b9d4ff !important;

    box-shadow: none !important;
}


/* ---------------------------------------------------------
   DIMENSIONS
   --------------------------------------------------------- */

.wood-calc-dimensions {
    display: grid !important;

    grid-template-columns:
        repeat(3, minmax(0, 1fr)) !important;

    gap: 16px !important;
}

.wood-calc-field label,
.wood-calc-input-card > label {
    display: block !important;

    margin-bottom: 7px !important;

    color: #3d4758 !important;

    font-size: 13px !important;
    font-weight: 600 !important;
}


/* Native form style */
.wood-calc-measure,
.wood-calc-main-input {
    width: 100% !important;
    min-height: 48px !important;

    display: flex !important;

    overflow: hidden !important;

    border: 1px solid var(--border) !important;
    border-radius: 10px !important;

    background: #f9fbfe !important;

    box-shadow: none !important;

    transition:
        border-color .15s ease,
        box-shadow .15s ease,
        background .15s ease !important;
}

.wood-calc-measure:focus-within,
.wood-calc-main-input:focus-within {
    border-color: var(--blue) !important;
    background: #fff !important;

    box-shadow:
        0 0 0 3px
        rgba(36, 128, 255, .10) !important;
}

.wood-calc-measure input,
.wood-calc-main-input input {
    min-width: 0 !important;

    flex: 1 !important;

    padding: 0 13px !important;

    border: 0 !important;
    outline: 0 !important;

    background: transparent !important;

    color: var(--text) !important;

    font-size: 15px !important;
    font-weight: 650 !important;

    box-shadow: none !important;
}

.wood-calc-measure select {
    width: 76px !important;

    padding: 0 10px !important;

    border: 0 !important;
    border-left: 1px solid var(--border) !important;

    background: #f3f6fa !important;

    color: #506079 !important;

    font-size: 13px !important;
    font-weight: 650 !important;

    outline: none !important;
    cursor: pointer !important;
}

.wood-calc-measure select:focus {
    color: var(--blue) !important;
}

.wood-calc-main-input span {
    display: flex !important;
    align-items: center !important;

    padding: 0 15px !important;

    border-left: 1px solid var(--border) !important;

    background: #f3f6fa !important;

    color: var(--secondary) !important;

    font-size: 12px !important;
    font-weight: 700 !important;
}


/* ---------------------------------------------------------
   MAIN VALUE INPUT
   --------------------------------------------------------- */

.wood-calc-input-card {
    position: static !important;
    overflow: visible !important;

    padding: 20px 22px !important;
}

.wood-calc-input-card::before,
.wood-calc-input-card::after {
    content: none !important;
    display: none !important;
}

.wood-calc-input-card .wood-calc-main-input {
    min-height: 54px !important;
}

.wood-calc-main-input input {
    font-size: 18px !important;
    font-weight: 750 !important;
}


/* ---------------------------------------------------------
   RESULTS
   --------------------------------------------------------- */

.wood-calc-results {
    display: grid !important;

    grid-template-columns:
        repeat(2, minmax(0, 1fr)) !important;

    gap: 12px !important;
}


/* Standard result card */
.wood-calc-result {
    min-height: 108px !important;

    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;

    padding: 18px 19px !important;

    border: 1px solid var(--border) !important;
    border-radius: 15px !important;

    background: #fff !important;

    box-shadow: var(--shadow) !important;

    transform: none !important;
}

.wood-calc-result:hover {
    transform: translateY(-1px) !important;
}

.wood-calc-result span {
    display: block !important;

    margin: 0 0 10px !important;

    color: var(--secondary) !important;

    font-size: 12px !important;
    font-weight: 600 !important;
}

.wood-calc-result strong {
    color: var(--text) !important;

    font-size: 23px !important;
    font-weight: 750 !important;

    line-height: 1.1 !important;
    letter-spacing: -.5px !important;
}


/* ---------------------------------------------------------
   PRIMARY RESULT
   Distinct, but still 100% Wood theme
   --------------------------------------------------------- */

.wood-calc-result.primary {
    position: relative !important;
    overflow: hidden !important;

    grid-column: 1 / -1 !important;

    min-height: 126px !important;

    padding: 21px 22px 21px 27px !important;

    border:
        1px solid
        #cddfff !important;

    border-radius: 16px !important;

    background:
        var(--blue-soft) !important;

    box-shadow:
        0 9px 28px
        rgba(21,105,232,.08) !important;
}

.wood-calc-result.primary::before {
    content: "" !important;

    position: absolute !important;

    left: 0 !important;
    top: 0 !important;
    bottom: 0 !important;

    width: 5px !important;

    border-radius:
        16px 0 0 16px !important;

    background: var(--blue) !important;
}

.wood-calc-result.primary::after {
    content: none !important;
    display: none !important;
}

.wood-calc-result.primary span {
    color: #5d7392 !important;
}

.wood-calc-result.primary strong {
    color: var(--blue) !important;

    font-size: 31px !important;
    font-weight: 780 !important;

    text-shadow: none !important;
}


/* Last / info result */
.wood-calc-result.wide {
    grid-column: 1 / -1 !important;

    min-height: 84px !important;

    background: #f8faff !important;

    border-color: var(--border) !important;
}


/* ---------------------------------------------------------
   ERROR
   --------------------------------------------------------- */

.wood-calc-error {
    margin-top: 12px !important;
    padding: 13px 15px !important;

    border:
        1px solid
        #cddfff !important;

    border-radius: 10px !important;

    background: #edf4ff !important;
    color: #275fb8 !important;

    font-size: 12px !important;
    font-weight: 600 !important;
}


/* ---------------------------------------------------------
   RESPONSIVE
   --------------------------------------------------------- */

@media (max-width: 700px) {

    .wood-calc-page {
        padding:
            22px
            16px
            55px !important;
    }

    .wood-calc-topbar {
        align-items: flex-start !important;
    }

    .wood-calc-topbar h1 {
        font-size: 27px !important;
    }

    .wood-calc-dimensions {
        grid-template-columns: 1fr !important;
    }

    .wood-calc-results {
        grid-template-columns: 1fr 1fr !important;
    }

    .wood-calc-result.primary,
    .wood-calc-result.wide {
        grid-column: 1 / -1 !important;
    }

    .wood-calc-mode {
        width: 100% !important;
    }

    .wood-calc-mode button {
        min-width: 0 !important;
        flex: 1 !important;
    }
}


@media (max-width: 480px) {

    .wood-calc-page {
        padding:
            18px
            12px
            45px !important;
    }

    .wood-calc-results {
        grid-template-columns: 1fr !important;
    }

    .wood-calc-result.primary,
    .wood-calc-result.wide {
        grid-column: auto !important;
    }

    .wood-calc-presets {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
    }

    .wood-calc-presets button {
        width: 100% !important;
    }

    .wood-calc-launcher {
        right: 12px !important;
        bottom: 12px !important;
    }
}




/* WOOD_TIMBER_CALCULATOR_NATIVE_BACKGROUND_V1 */

.wood-calc-page {
    background: #f4f7fb !important;
    background-image: none !important;
    background-color: #f4f7fb !important;
}



/* =========================================================
   WOOD_TIMBER_CALCULATOR_GRID_BACKGROUND_V2
   ========================================================= */

.wood-calc-page {
    position: fixed !important;
    inset: 0 !important;

    background: #f4f7fb !important;
    background-color: #f4f7fb !important;
    background-image: none !important;

    overflow: auto !important;
    isolation: isolate !important;
}

/* Top-right decorative grid */
.wood-calc-page::before {
    content: "" !important;

    position: fixed !important;
    top: 34px !important;
    right: 22px !important;

    width: 430px !important;
    height: 300px !important;

    pointer-events: none !important;
    z-index: 0 !important;

    background-image:
        linear-gradient(
            rgba(21, 105, 232, .075) 1px,
            transparent 1px
        ),
        linear-gradient(
            90deg,
            rgba(21, 105, 232, .075) 1px,
            transparent 1px
        ) !important;

    background-size:
        28px 28px !important;

    -webkit-mask-image:
        radial-gradient(
            ellipse at 72% 28%,
            #000 0%,
            rgba(0,0,0,.75) 38%,
            transparent 74%
        ) !important;

    mask-image:
        radial-gradient(
            ellipse at 72% 28%,
            #000 0%,
            rgba(0,0,0,.75) 38%,
            transparent 74%
        ) !important;
}

/* Bottom-left smaller grid */
.wood-calc-page::after {
    content: "" !important;

    position: fixed !important;
    left: 16px !important;
    bottom: 10px !important;

    width: 330px !important;
    height: 220px !important;

    pointer-events: none !important;
    z-index: 0 !important;

    background-image:
        linear-gradient(
            rgba(21, 105, 232, .055) 1px,
            transparent 1px
        ),
        linear-gradient(
            90deg,
            rgba(21, 105, 232, .055) 1px,
            transparent 1px
        ) !important;

    background-size:
        30px 30px !important;

    -webkit-mask-image:
        radial-gradient(
            ellipse at 30% 70%,
            #000 0%,
            rgba(0,0,0,.65) 34%,
            transparent 76%
        ) !important;

    mask-image:
        radial-gradient(
            ellipse at 30% 70%,
            #000 0%,
            rgba(0,0,0,.65) 34%,
            transparent 76%
        ) !important;
}

/* All calculator content remains above decoration */
.wood-calc-shell {
    position: relative !important;
    z-index: 1 !important;
}



/* =========================================================
   WOOD_TIMBER_CALCULATOR_NATIVE_GRID_OVERLAY_V1
   Dashboard / Warehouse inspired background
   ========================================================= */

.wood-calc-page {
    position: fixed !important;
    inset: 0 !important;
    overflow: auto !important;

    background:
        #f4f7fb !important;

    isolation: isolate !important;
}


/* Fine dashboard-like background lines */
.wood-calc-page::before {
    content: "" !important;

    position: fixed !important;
    inset: 0 !important;

    z-index: 0 !important;
    pointer-events: none !important;

    background-image:
        linear-gradient(
            rgba(21, 105, 232, .032) 1px,
            transparent 1px
        ),
        linear-gradient(
            90deg,
            rgba(21, 105, 232, .032) 1px,
            transparent 1px
        ) !important;

    background-size:
        44px 44px !important;

    background-position:
        0 0 !important;

    opacity: 1 !important;

    -webkit-mask-image: none !important;
    mask-image: none !important;
}


/*
 * Soft coloured grid cells.
 * They sit exactly on top of the line grid,
 * similar to the light visual accents used
 * across Overview / Warehouse.
 */
.wood-calc-page::after {
    content: "" !important;

    position: fixed !important;
    inset: 0 !important;

    z-index: 0 !important;
    pointer-events: none !important;

    background:

        /* top-right larger blue tile */
        linear-gradient(
            rgba(21, 105, 232, .060),
            rgba(21, 105, 232, .060)
        )
        calc(100% - 176px)
        44px
        / 88px 88px
        no-repeat,

        /* top-right cyan neighbour */
        linear-gradient(
            rgba(82, 184, 243, .065),
            rgba(82, 184, 243, .065)
        )
        calc(100% - 88px)
        132px
        / 44px 44px
        no-repeat,

        /* upper-left soft blue strip */
        linear-gradient(
            rgba(26, 137, 237, .040),
            rgba(26, 137, 237, .040)
        )
        44px
        132px
        / 132px 44px
        no-repeat,

        /* left-middle block */
        linear-gradient(
            rgba(21, 105, 232, .045),
            rgba(21, 105, 232, .045)
        )
        0
        396px
        / 88px 88px
        no-repeat,

        /* right-middle thin accent */
        linear-gradient(
            rgba(82, 184, 243, .050),
            rgba(82, 184, 243, .050)
        )
        calc(100% - 44px)
        484px
        / 44px 132px
        no-repeat,

        /* lower-left cyan cell */
        linear-gradient(
            rgba(82, 184, 243, .045),
            rgba(82, 184, 243, .045)
        )
        88px
        calc(100% - 132px)
        / 44px 88px
        no-repeat,

        /* lower-right blue group */
        linear-gradient(
            rgba(21, 105, 232, .042),
            rgba(21, 105, 232, .042)
        )
        calc(100% - 220px)
        calc(100% - 88px)
        / 132px 44px
        no-repeat !important;

    opacity: 1 !important;

    -webkit-mask-image: none !important;
    mask-image: none !important;
}


/* Calculator content stays clean above decoration */
.wood-calc-shell {
    position: relative !important;
    z-index: 1 !important;
}


/* White cards stay solid — grid never leaks through */
.wood-calc-card,
.wood-calc-result,
.wood-calc-topbar,
.wood-calc-mode {
    position: relative !important;
    z-index: 2 !important;
}



/* =========================================================
   WOOD_TIMBER_CALCULATOR_STYLE_V5_NATIVE_PAGE
   Native Wood page + wave background
   ========================================================= */

/*
 * Desktop:
 * keep the Wood sidebar visible.
 * Calculator occupies only the main content area.
 */
.wood-calc-page {
    position: fixed !important;

    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    left: 292px !important;

    overflow: auto !important;

    padding:
        48px
        64px
        70px !important;

    background: #f4f7fb !important;
    background-image: none !important;

    isolation: isolate !important;
}


/* ---------------------------------------------------------
   TOP WAVE DECORATION
   --------------------------------------------------------- */

.wood-calc-page::before {
    content: "" !important;

    position: fixed !important;

    top: 0 !important;
    right: 0 !important;

    width: min(72vw, 1120px) !important;
    height: 330px !important;

    z-index: 0 !important;
    pointer-events: none !important;

    opacity: .82 !important;

    background-image:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 340' fill='none'%3E%3Cpath d='M0 -35 C210 230 315 252 510 205 C690 160 790 30 1015 88 C1095 109 1155 145 1235 190' stroke='%2389B9FF' stroke-width='1.5'/%3E%3Cpath d='M0 -18 C208 245 318 267 515 220 C695 175 795 45 1020 103 C1100 124 1160 160 1240 205' stroke='%238CBFFF' stroke-width='1.5'/%3E%3Cpath d='M0 0 C207 260 321 282 520 235 C700 190 800 60 1025 118 C1105 139 1165 175 1245 220' stroke='%2390C5FF' stroke-width='1.5'/%3E%3Cpath d='M0 18 C205 275 325 297 525 250 C705 205 805 75 1030 133 C1110 154 1170 190 1250 235' stroke='%2388CCF1' stroke-width='1.5'/%3E%3Cpath d='M0 36 C203 290 328 312 530 265 C710 220 810 90 1035 148 C1115 169 1175 205 1255 250' stroke='%237CD5DF' stroke-width='1.5'/%3E%3C/svg%3E") !important;

    background-repeat: no-repeat !important;
    background-position: top right !important;
    background-size: 100% 100% !important;

    -webkit-mask-image: none !important;
    mask-image: none !important;
}


/* ---------------------------------------------------------
   BOTTOM WAVE DECORATION
   --------------------------------------------------------- */

.wood-calc-page::after {
    content: "" !important;

    position: fixed !important;

    left: 292px !important;
    right: 0 !important;
    bottom: 0 !important;

    height: 320px !important;

    z-index: 0 !important;
    pointer-events: none !important;

    opacity: .72 !important;

    background-image:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1500 320' fill='none'%3E%3Cpath d='M-80 105 C180 185 300 190 480 125 C650 65 770 155 925 230 C1110 320 1305 260 1570 175' stroke='%2391B9FF' stroke-width='1.5'/%3E%3Cpath d='M-80 122 C180 202 300 207 480 142 C650 82 770 172 925 247 C1110 337 1305 277 1570 192' stroke='%2392C0FF' stroke-width='1.5'/%3E%3Cpath d='M-80 139 C180 219 300 224 480 159 C650 99 770 189 925 264 C1110 354 1305 294 1570 209' stroke='%2390C6FA' stroke-width='1.5'/%3E%3Cpath d='M-80 156 C180 236 300 241 480 176 C650 116 770 206 925 281 C1110 371 1305 311 1570 226' stroke='%2386CDED' stroke-width='1.5'/%3E%3Cpath d='M-80 173 C180 253 300 258 480 193 C650 133 770 223 925 298 C1110 388 1305 328 1570 243' stroke='%237AD4DF' stroke-width='1.5'/%3E%3C/svg%3E") !important;

    background-repeat: no-repeat !important;
    background-position: bottom center !important;
    background-size: 100% 100% !important;

    -webkit-mask-image: none !important;
    mask-image: none !important;
}


/* Content above waves */
.wood-calc-shell {
    position: relative !important;
    z-index: 2 !important;

    width: min(100%, 1050px) !important;
    margin: 0 auto !important;
}


/* Header like native Wood pages */
.wood-calc-topbar {
    margin-bottom: 22px !important;

    padding: 0 !important;

    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
}

.wood-calc-eyebrow {
    color: var(--blue) !important;
}

.wood-calc-topbar h1 {
    font-size: 32px !important;
    color: var(--text) !important;
}

.wood-calc-topbar p {
    color: var(--secondary) !important;
}


/* Mode switch a little closer to native page tabs */
.wood-calc-mode {
    margin-bottom: 18px !important;

    border: 1px solid var(--border) !important;

    background: rgba(255,255,255,.74) !important;

    box-shadow:
        0 5px 16px
        rgba(31,55,86,.045) !important;
}

.wood-calc-mode button {
    min-width: 160px !important;
}

.wood-calc-mode button.active {
    background: #fff !important;
    color: var(--blue) !important;

    box-shadow:
        0 2px 8px
        rgba(21,105,232,.10) !important;
}


/* Cards like Warehouse / Sales cards */
.wood-calc-card {
    background: rgba(255,255,255,.97) !important;

    border: 1px solid var(--border) !important;

    border-radius: 16px !important;

    box-shadow:
        0 10px 30px
        rgba(31,55,86,.065) !important;
}


/* Result cards */
.wood-calc-result {
    background: rgba(255,255,255,.97) !important;

    border: 1px solid var(--border) !important;

    box-shadow:
        0 9px 25px
        rgba(31,55,86,.055) !important;
}


/* Main result: same visual family as KPI cards */
.wood-calc-result.primary {
    border: 1px solid #c7dcff !important;
    border-top: 4px solid var(--blue) !important;

    background:
        linear-gradient(
            180deg,
            #ffffff 0%,
            #f3f8ff 100%
        ) !important;

    box-shadow:
        0 11px 28px
        rgba(21,105,232,.09) !important;
}

.wood-calc-result.primary::before,
.wood-calc-result.primary::after {
    content: none !important;
    display: none !important;
}

.wood-calc-result.primary span {
    color: var(--secondary) !important;
}

.wood-calc-result.primary strong {
    color: var(--blue) !important;

    font-size: 31px !important;

    text-shadow: none !important;
}


/* Close button positioned like a native page action */
.wood-calc-close {
    background: #fff !important;

    border: 1px solid var(--border) !important;

    box-shadow:
        0 8px 22px
        rgba(31,55,86,.08) !important;
}


/* ---------------------------------------------------------
   TABLET / MOBILE
   --------------------------------------------------------- */

@media (max-width: 900px) {

    .wood-calc-page {
        left: 0 !important;

        padding:
            28px
            20px
            65px !important;
    }

    .wood-calc-page::after {
        left: 0 !important;
    }
}

@media (max-width: 700px) {

    .wood-calc-page {
        padding:
            22px
            14px
            60px !important;
    }

    .wood-calc-page::before {
        width: 100vw !important;
        height: 220px !important;
        opacity: .55 !important;
    }

    .wood-calc-page::after {
        height: 210px !important;
        opacity: .45 !important;
    }

    .wood-calc-topbar h1 {
        font-size: 26px !important;
    }
}


/* =========================================================
   WOOD_CALCULATOR_REAL_NATIVE_WAVE_V1

   Do not draw a separate calculator SVG.
   Keep the existing Wood .content::before decoration visible.
   ========================================================= */


/*
 * When calculator opens, hide the previous page's actual
 * content but preserve .content itself and therefore its
 * native ::before wave decoration.
 */
body.wood-calc-open .content > * {
    visibility: hidden !important;
}


/*
 * The old page must not receive mouse events while calculator
 * is open.
 */
body.wood-calc-open .content {
    pointer-events: none !important;
}


/*
 * Calculator itself becomes transparent so the real Wood
 * background + .content::before wave remains visible below.
 */
.wood-calc-page {
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
}


/*
 * Disable every calculator-specific fake grid/wave that was
 * added during V2/V3/V5 experiments.
 */
.wood-calc-page::before,
.wood-calc-page::after {
    content: none !important;
    display: none !important;
    background: none !important;
    background-image: none !important;
}


/*
 * Calculator UI stays above the native Wood decoration.
 */
.wood-calc-shell {
    position: relative !important;
    z-index: 10 !important;
}


/*
 * Current calculator result cards use display:flex !important.
 * Explicitly preserve HTML hidden semantics.
 */
.wood-calc-result[hidden] {
    display: none !important;
}


/*
 * In Ədəd → Kub there is only one result, so it naturally
 * occupies the full result width.
 */
.wood-calc-result.primary {
    grid-column: 1 / -1 !important;
}


/* WOOD_CALCULATOR_REAL_NATIVE_WAVE_V1_END */


/* =========================================================
   WOOD_CALCULATOR_NAVIGATION_VISIBILITY_V1
   ========================================================= */

/*
 * Launcher exists globally on every normal page,
 * but disappears while the calculator itself is open.
 */
body.wood-calc-open #woodTimberCalculatorLauncher {
    display: none !important;
}

/* Extra defensive guard for JS aria state. */
#woodTimberCalculatorLauncher[aria-hidden="true"] {
    display: none !important;
}

/* WOOD_CALCULATOR_NAVIGATION_VISIBILITY_V1_END */


/* =========================================================
   WOOD_CALCULATOR_CUSTOM_PRESETS_STYLE_V1
   ========================================================= */

.wood-calc-add-preset {
    min-height: 38px !important;

    padding: 0 14px !important;

    border:
        1px dashed
        #9fc4f8 !important;

    border-radius: 10px !important;

    background:
        var(--blue-soft) !important;

    color:
        var(--blue) !important;

    font-size: 12px !important;
    font-weight: 700 !important;
}

.wood-calc-add-preset:hover {
    border-style: solid !important;

    background:
        #dfeeff !important;
}


/* Custom preset chip */
.wood-calc-custom-preset {
    display: inline-flex !important;
    align-items: stretch !important;

    min-height: 38px !important;

    overflow: hidden !important;

    border:
        1px solid
        var(--border) !important;

    border-radius: 10px !important;

    background: #f9fbfe !important;
}

.wood-calc-custom-preset:hover {
    border-color:
        #b9d4ff !important;
}

.wood-calc-custom-preset-main {
    min-height: 38px !important;

    padding:
        0 11px 0 13px !important;

    border: 0 !important;
    border-radius: 0 !important;

    background:
        transparent !important;

    color:
        #506079 !important;

    font-size: 12px !important;
    font-weight: 650 !important;

    box-shadow: none !important;
}

.wood-calc-custom-preset-main.active {
    background:
        var(--blue-soft) !important;

    color:
        var(--blue) !important;
}

.wood-calc-custom-preset-remove {
    width: 30px !important;

    border: 0 !important;
    border-left:
        1px solid
        var(--border) !important;

    border-radius: 0 !important;

    background:
        transparent !important;

    color:
        #96a3b5 !important;

    font-size: 17px !important;

    box-shadow: none !important;
}

.wood-calc-custom-preset-remove:hover {
    background:
        #fff1f2 !important;

    color:
        #dc2626 !important;
}


/* -----------------------------------------
   Modal
   ----------------------------------------- */

.wood-calc-preset-modal {
    position: fixed !important;
    inset: 0 !important;

    z-index: 12000 !important;

    display: grid !important;
    place-items: center !important;

    padding: 24px !important;
}

.wood-calc-preset-modal[hidden] {
    display: none !important;
}

.wood-calc-preset-backdrop {
    position: absolute !important;
    inset: 0 !important;

    background:
        rgba(31, 55, 86, .18) !important;

    backdrop-filter:
        blur(2px) !important;
}

.wood-calc-preset-dialog {
    position: relative !important;
    z-index: 1 !important;

    width:
        min(100%, 520px) !important;

    padding: 22px !important;

    border:
        1px solid
        var(--border) !important;

    border-radius: 16px !important;

    background:
        #fff !important;

    box-shadow:
        0 22px 60px
        rgba(31, 55, 86, .18) !important;
}

.wood-calc-preset-head {
    display: flex !important;
    align-items: flex-start !important;
    justify-content: space-between !important;

    gap: 20px !important;

    margin-bottom: 20px !important;
}

.wood-calc-preset-head h3 {
    margin: 0 !important;

    color:
        var(--text) !important;

    font-size: 19px !important;
}

.wood-calc-preset-head p {
    margin:
        5px 0 0 !important;

    color:
        var(--secondary) !important;

    font-size: 12px !important;
}

.wood-calc-preset-close {
    width: 36px !important;
    height: 36px !important;

    border:
        1px solid
        var(--border) !important;

    border-radius: 9px !important;

    background: #fff !important;

    color: #65748a !important;
}

.wood-calc-preset-form {
    display: grid !important;

    grid-template-columns:
        1fr 1fr !important;

    gap: 14px !important;
}

.wood-calc-preset-error {
    margin-top: 13px !important;

    padding: 10px 12px !important;

    border:
        1px solid
        #fecaca !important;

    border-radius: 9px !important;

    background:
        #fff5f5 !important;

    color:
        #b42318 !important;

    font-size: 12px !important;
    font-weight: 600 !important;
}

.wood-calc-preset-actions {
    display: flex !important;
    justify-content: flex-end !important;

    gap: 9px !important;

    margin-top: 20px !important;
}

.wood-calc-preset-secondary,
.wood-calc-preset-save {
    min-height: 40px !important;

    padding: 0 15px !important;

    border-radius: 10px !important;

    font-size: 13px !important;
    font-weight: 700 !important;
}

.wood-calc-preset-secondary {
    border:
        1px solid
        var(--border) !important;

    background:
        #fff !important;

    color:
        #506079 !important;
}

.wood-calc-preset-save {
    border:
        1px solid
        var(--blue) !important;

    background:
        var(--blue) !important;

    color:
        #fff !important;

    box-shadow:
        0 7px 18px
        rgba(21,105,232,.17) !important;
}

.wood-calc-preset-save:hover {
    background:
        var(--blue-dark) !important;
}


@media (max-width: 600px) {

    .wood-calc-preset-form {
        grid-template-columns:
            1fr !important;
    }

    .wood-calc-preset-dialog {
        padding: 18px !important;
    }

    .wood-calc-preset-actions {
        flex-direction:
            column-reverse !important;
    }

    .wood-calc-preset-secondary,
    .wood-calc-preset-save {
        width: 100% !important;
    }
}

/* WOOD_CALCULATOR_CUSTOM_PRESETS_STYLE_V1_END */


/* =========================================================
   WOOD_CALCULATOR_CUSTOM_PRESET_LENGTH_STYLE_V1
   ========================================================= */

/*
 * Three dimensions fit cleanly inside the dialog.
 */
.wood-calc-preset-dialog {
    width: min(100%, 720px) !important;
}

.wood-calc-preset-form {
    grid-template-columns:
        repeat(3, minmax(0, 1fr)) !important;

    gap: 14px !important;
}

/*
 * Important: prevent input/select from pushing outside
 * the modal when three columns are present.
 */
.wood-calc-preset-form .wood-calc-field {
    min-width: 0 !important;
}

.wood-calc-preset-form .wood-calc-measure {
    width: 100% !important;
    min-width: 0 !important;
}

.wood-calc-preset-form .wood-calc-measure input {
    width: 1px !important;
    min-width: 0 !important;
    flex: 1 1 auto !important;
}

.wood-calc-preset-form .wood-calc-measure select {
    flex: 0 0 72px !important;
    width: 72px !important;
}


/* Tablet */
@media (max-width: 760px) {

    .wood-calc-preset-dialog {
        width: min(100%, 560px) !important;
    }

    .wood-calc-preset-form {
        grid-template-columns:
            1fr 1fr !important;
    }

    .wood-calc-preset-length-field {
        grid-column: 1 / -1 !important;
    }
}


/* Mobile */
@media (max-width: 520px) {

    .wood-calc-preset-form {
        grid-template-columns:
            1fr !important;
    }

    .wood-calc-preset-length-field {
        grid-column: auto !important;
    }
}

/* WOOD_CALCULATOR_CUSTOM_PRESET_LENGTH_STYLE_V1_END */


/* =========================================================
   WOOD_CALCULATOR_PRESET_MANAGER_STYLE_V1
   ========================================================= */

/* Old per-preset X is no longer used. */
.wood-calc-custom-preset-remove {
    display: none !important;
}


/* Global delete button */
.wood-calc-delete-presets {
    min-height: 38px !important;

    padding: 0 14px !important;

    border:
        1px solid
        #e0e6ef !important;

    border-radius: 10px !important;

    background:
        #fff !important;

    color:
        #64748b !important;

    font-size: 12px !important;
    font-weight: 700 !important;
}

.wood-calc-delete-presets:hover:not(:disabled) {
    border-color:
        #fecaca !important;

    background:
        #fff7f7 !important;

    color:
        #dc2626 !important;
}

.wood-calc-delete-presets:disabled {
    opacity: .45 !important;
    cursor: not-allowed !important;
}


/* Custom preset is now one clean chip */
.wood-calc-custom-preset {
    border: 0 !important;
    overflow: visible !important;
    background: transparent !important;
}

.wood-calc-custom-preset-main {
    min-height: 38px !important;

    padding: 0 14px !important;

    border:
        1px solid
        var(--border) !important;

    border-radius: 10px !important;

    background:
        #f9fbfe !important;
}

.wood-calc-custom-preset-main:hover {
    border-color:
        #b9d4ff !important;

    background:
        var(--blue-soft) !important;

    color:
        var(--blue) !important;
}


/* Delete dialog */
.wood-calc-delete-dialog {
    width:
        min(100%, 560px) !important;
}


/* Select all */
.wood-calc-select-all {
    display: flex !important;
    align-items: center !important;

    gap: 10px !important;

    margin-bottom: 11px !important;

    padding: 11px 13px !important;

    border:
        1px solid
        var(--border) !important;

    border-radius: 10px !important;

    background:
        #f8fafc !important;

    color:
        #475569 !important;

    font-size: 13px !important;
    font-weight: 700 !important;

    cursor: pointer !important;
}

.wood-calc-select-all input {
    width: 17px !important;
    height: 17px !important;

    accent-color:
        var(--blue) !important;
}


/* Preset list */
.wood-calc-delete-list {
    display: flex !important;
    flex-direction: column !important;

    gap: 8px !important;

    max-height: 330px !important;
    overflow-y: auto !important;

    padding-right: 3px !important;
}

.wood-calc-delete-row {
    display: flex !important;
    align-items: center !important;

    gap: 11px !important;

    min-height: 48px !important;

    padding: 0 13px !important;

    border:
        1px solid
        var(--border) !important;

    border-radius: 10px !important;

    background:
        #fff !important;

    cursor: pointer !important;

    transition:
        border-color .15s ease,
        background .15s ease !important;
}

.wood-calc-delete-row:hover {
    border-color:
        #b9d4ff !important;

    background:
        #f8fbff !important;
}

.wood-calc-delete-row input {
    width: 17px !important;
    height: 17px !important;

    accent-color:
        var(--blue) !important;
}

.wood-calc-delete-name {
    color:
        var(--text) !important;

    font-size: 13px !important;
    font-weight: 650 !important;
}

.wood-calc-delete-empty {
    padding: 22px 14px !important;

    border:
        1px dashed
        var(--border) !important;

    border-radius: 10px !important;

    color:
        var(--secondary) !important;

    text-align: center !important;

    font-size: 13px !important;
}


/* Destructive action */
.wood-calc-delete-confirm {
    min-height: 40px !important;

    padding: 0 16px !important;

    border:
        1px solid
        #dc2626 !important;

    border-radius: 10px !important;

    background:
        #dc2626 !important;

    color:
        #fff !important;

    font-size: 13px !important;
    font-weight: 700 !important;

    box-shadow:
        0 7px 18px
        rgba(220, 38, 38, .14) !important;
}

.wood-calc-delete-confirm:hover {
    background:
        #b91c1c !important;

    border-color:
        #b91c1c !important;
}


/* WOOD_CALCULATOR_PRESET_MANAGER_STYLE_V1_END */


/* =========================================================
   WOOD_CALCULATOR_PRESET_HEADER_STYLE_V1
   ========================================================= */

.wood-calc-preset-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.wood-calc-preset-copy {
    flex: 1 1 420px;
    min-width: 280px;
}

.wood-calc-preset-copy > div,
.wood-calc-preset-copy > * {
    margin: 0;
}

.wood-calc-preset-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-left: auto;
}

.wood-calc-toolbar-btn {
    height: 52px;
    padding: 0 22px;
    border-radius: 16px;
    border: 1px solid transparent;
    font-weight: 700;
    font-size: 15px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease, background-color .15s ease;
}

.wood-calc-toolbar-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
}

.wood-calc-toolbar-btn--add {
    color: #2563eb !important;
    background: linear-gradient(180deg, rgba(59,130,246,.14) 0%, rgba(37,99,235,.08) 100%) !important;
    border-color: rgba(37, 99, 235, 0.24) !important;
}

.wood-calc-toolbar-btn--add:hover {
    background: linear-gradient(180deg, rgba(59,130,246,.18) 0%, rgba(37,99,235,.11) 100%) !important;
    border-color: rgba(37, 99, 235, 0.34) !important;
}

.wood-calc-toolbar-btn--delete {
    color: #dc2626 !important;
    background: linear-gradient(180deg, rgba(248,113,113,.14) 0%, rgba(239,68,68,.08) 100%) !important;
    border-color: rgba(220, 38, 38, 0.22) !important;
}

.wood-calc-toolbar-btn--delete:hover {
    background: linear-gradient(180deg, rgba(248,113,113,.18) 0%, rgba(239,68,68,.12) 100%) !important;
    border-color: rgba(220, 38, 38, 0.30) !important;
}

@media (max-width: 900px) {
    .wood-calc-preset-head {
        align-items: stretch;
    }

    .wood-calc-preset-actions {
        width: 100%;
        margin-left: 0;
    }
}


/* =========================================================
   WOOD_CALCULATOR_PRESET_ROW_POSITION_STYLE_V1
   ========================================================= */

/*
 * Add/Delete buttons live in the same row as preset chips.
 */
.wood-calc-presets {
    display: flex !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    gap: 10px !important;
}


/*
 * Neutralize the previous header-action layout.
 * Colors from toolbar button styles stay active.
 */
.wood-calc-preset-head {
    display: block !important;
    margin-bottom: 0 !important;
}

.wood-calc-preset-copy {
    display: contents !important;
}

.wood-calc-preset-actions {
    display: contents !important;
}


/*
 * Same visual height as preset chips.
 */
.wood-calc-presets
#woodCalcAddPresetButton,
.wood-calc-presets
#woodCalcDeletePresetButton {
    height: 42px !important;
    min-height: 42px !important;

    padding:
        0 16px !important;

    border-radius:
        11px !important;

    font-size:
        13px !important;

    margin:
        0 !important;
}


/*
 * Native blue action.
 */
.wood-calc-presets
#woodCalcAddPresetButton {
    color:
        #1569e8 !important;

    background:
        #eaf2ff !important;

    border:
        1px solid
        #b9d4ff !important;

    box-shadow:
        none !important;
}

.wood-calc-presets
#woodCalcAddPresetButton:hover {
    color:
        #0a58ca !important;

    background:
        #dfeaff !important;

    border-color:
        #93bcfb !important;
}


/*
 * Native destructive action.
 */
.wood-calc-presets
#woodCalcDeletePresetButton {
    color:
        #dc2626 !important;

    background:
        #fff1f2 !important;

    border:
        1px solid
        #fecaca !important;

    box-shadow:
        none !important;
}

.wood-calc-presets
#woodCalcDeletePresetButton:hover:not(:disabled) {
    color:
        #b91c1c !important;

    background:
        #ffe4e6 !important;

    border-color:
        #fca5a5 !important;
}


/* WOOD_CALCULATOR_PRESET_ROW_POSITION_STYLE_V1_END */




/* =========================================================
   WOOD_CALCULATOR_PRESET_TOP_RIGHT_TUNE_V1
   ========================================================= */

/*
 * Move Add/Delete actions to the top-right area inside
 * the same preset card row, and make them slightly smaller.
 */
.wood-calc-presets {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    gap: 10px !important;
    width: 100% !important;
}

.wood-calc-presets #woodCalcAddPresetButton {
    margin-left: auto !important;
}

.wood-calc-presets #woodCalcAddPresetButton,
.wood-calc-presets #woodCalcDeletePresetButton {
    flex: 0 0 auto !important;
    height: 38px !important;
    min-height: 38px !important;
    padding: 0 14px !important;
    border-radius: 10px !important;
    font-size: 12.5px !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    white-space: nowrap !important;
}

.wood-calc-presets #woodCalcAddPresetButton svg,
.wood-calc-presets #woodCalcDeletePresetButton svg {
    width: 14px !important;
    height: 14px !important;
}

.wood-calc-presets #woodCalcAddPresetButton span,
.wood-calc-presets #woodCalcDeletePresetButton span {
    gap: 8px !important;
}

/* keep custom preset chips visually balanced */
.wood-calc-presets .wood-calc-preset-chip,
.wood-calc-presets .wood-calc-preset-btn {
    height: 38px !important;
    min-height: 38px !important;
    padding: 0 14px !important;
    border-radius: 10px !important;
    font-size: 12.5px !important;
    white-space: nowrap !important;
}

/* if screen gets narrower, let buttons wrap naturally */
@media (max-width: 1180px) {
    .wood-calc-presets #woodCalcAddPresetButton {
        margin-left: 0 !important;
    }
}

/* END: WOOD_CALCULATOR_PRESET_TOP_RIGHT_TUNE_V1 */




/* =========================================================
   WOOD_CALCULATOR_PRESET_HEADER_ALIGN_V1
   Preset action buttons: top-right, slightly higher,
   visually aligned with "Taxta ölçüsü"
   ========================================================= */

.wood-calc-presets {
    position: relative !important;
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    gap: 12px !important;
    padding-top: 8px !important;
    padding-right: 430px !important; /* reserve space for right actions */
}

/* keep preset chips normal on the left */
.wood-calc-presets .wood-calc-preset-chip,
.wood-calc-presets .wood-calc-preset-btn {
    order: 1 !important;
}

/* move the two action buttons to top-right inside same white block */
.wood-calc-presets #woodCalcAddPresetButton,
.wood-calc-presets #woodCalcDeletePresetButton {
    position: absolute !important;
    top: -68px !important;   /* slightly higher */
    height: 40px !important;
    min-height: 40px !important;
    padding: 0 16px !important;
    border-radius: 12px !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    white-space: nowrap !important;
    z-index: 2 !important;
}

.wood-calc-presets #woodCalcAddPresetButton {
    right: 210px !important;
}

.wood-calc-presets #woodCalcDeletePresetButton {
    right: 0 !important;
}

/* icon sizing */
.wood-calc-presets #woodCalcAddPresetButton svg,
.wood-calc-presets #woodCalcDeletePresetButton svg {
    width: 14px !important;
    height: 14px !important;
}

.wood-calc-presets #woodCalcAddPresetButton span,
.wood-calc-presets #woodCalcDeletePresetButton span {
    gap: 8px !important;
}

/* on narrower widths, fall back safely */
@media (max-width: 1280px) {
    .wood-calc-presets {
        padding-right: 0 !important;
        padding-top: 0 !important;
    }

    .wood-calc-presets #woodCalcAddPresetButton,
    .wood-calc-presets #woodCalcDeletePresetButton {
        position: static !important;
        top: auto !important;
        right: auto !important;
    }
}




/* =========================================================
   WOOD_CALCULATOR_PRESET_SPACING_POLISH_V1
   ========================================================= */

/* bring preset row a little closer to the heading */
.wood-calc-presets {
    margin-top: 8px !important;
}

/* move top-right actions slightly down */
.wood-calc-presets #woodCalcAddPresetButton,
.wood-calc-presets #woodCalcDeletePresetButton {
    top: -59px !important;
}

/* keep the two action buttons visually grouped */
.wood-calc-presets #woodCalcAddPresetButton {
    right: 176px !important;
}

.wood-calc-presets #woodCalcDeletePresetButton {
    right: 0 !important;
}

/* slightly tighter visual rhythm */
.wood-calc-presets {
    gap: 10px !important;
}

/* END WOOD_CALCULATOR_PRESET_SPACING_POLISH_V1 */


/* =========================================================
   WOOD_CALCULATOR_SIZE_HEADER_LAYOUT_FINAL_STYLE_V1
   ========================================================= */

/*
 * Proper native header row.
 * No absolute-position hacks.
 */
.wood-calc-size-header-final {
    display: flex !important;
    align-items: flex-start !important;
    justify-content: space-between !important;

    gap: 20px !important;

    margin-bottom: 16px !important;
}

.wood-calc-size-header-copy {
    flex: 1 1 auto !important;
    min-width: 0 !important;
}

.wood-calc-size-header-copy
.wood-calc-section-head {
    margin: 0 !important;
}

.wood-calc-size-header-actions {
    flex: 0 0 auto !important;

    display: flex !important;
    align-items: center !important;

    gap: 8px !important;

    padding-top: 1px !important;
}


/* Remove all previous positioning tricks */
.wood-calc-size-header-actions
#woodCalcAddPresetButton,
.wood-calc-size-header-actions
#woodCalcDeletePresetButton {
    position: static !important;

    top: auto !important;
    right: auto !important;
    bottom: auto !important;
    left: auto !important;

    margin: 0 !important;

    width: auto !important;

    height: 36px !important;
    min-height: 36px !important;

    padding: 0 12px !important;

    border-radius: 9px !important;

    font-size: 12px !important;
    font-weight: 700 !important;
    line-height: 1 !important;

    white-space: nowrap !important;

    box-shadow: none !important;
}


/* ADD */
.wood-calc-size-header-actions
#woodCalcAddPresetButton {
    color: #1569e8 !important;

    background: #eaf2ff !important;

    border:
        1px solid
        #b9d4ff !important;
}

.wood-calc-size-header-actions
#woodCalcAddPresetButton:hover {
    color: #0a58ca !important;

    background: #dfeaff !important;

    border-color: #93bcfb !important;
}


/* DELETE */
.wood-calc-size-header-actions
#woodCalcDeletePresetButton {
    color: #dc2626 !important;

    background: #fff1f2 !important;

    border:
        1px solid
        #fecaca !important;
}

.wood-calc-size-header-actions
#woodCalcDeletePresetButton:hover:not(:disabled) {
    color: #b91c1c !important;

    background: #ffe4e6 !important;

    border-color: #fca5a5 !important;
}


/*
 * Presets now form their own clean row below header.
 */
.wood-calc-presets {
    position: static !important;

    display: flex !important;
    align-items: center !important;
    flex-wrap: wrap !important;

    gap: 9px !important;

    width: 100% !important;

    margin:
        0 0 18px 0 !important;

    padding: 0 !important;
}


/* Custom chips slightly more compact */
.wood-calc-custom-preset-main {
    height: 38px !important;
    min-height: 38px !important;

    padding: 0 13px !important;

    border-radius: 9px !important;

    font-size: 12px !important;
}


/* Tablet */
@media (max-width: 800px) {

    .wood-calc-size-header-final {
        flex-direction: column !important;
        align-items: stretch !important;

        gap: 12px !important;
    }

    .wood-calc-size-header-actions {
        justify-content: flex-start !important;
    }
}


/* WOOD_CALCULATOR_SIZE_HEADER_LAYOUT_FINAL_STYLE_V1_END */


/* =========================================================
   WOOD_CALCULATOR_PRESET_MODAL_HEADER_FIX_V1
   ========================================================= */

/*
 * Earlier calculator-card layout rules reused
 * .wood-calc-preset-head and accidentally affected modal
 * headers. Restore proper modal header structure.
 */
.wood-calc-preset-modal .wood-calc-preset-head {
    display: flex !important;
    align-items: flex-start !important;
    justify-content: space-between !important;

    gap: 20px !important;

    margin-bottom: 20px !important;
}

.wood-calc-preset-modal
.wood-calc-preset-head > div:first-child {
    flex: 1 1 auto !important;
    min-width: 0 !important;
}

.wood-calc-preset-modal
.wood-calc-preset-head h3 {
    margin: 0 !important;
}

.wood-calc-preset-modal
.wood-calc-preset-head p {
    margin: 5px 0 0 !important;
}

.wood-calc-preset-modal
.wood-calc-preset-close {
    position: static !important;

    flex: 0 0 36px !important;

    width: 36px !important;
    height: 36px !important;

    margin: 0 !important;

    align-self: flex-start !important;
}


/*
 * Modal action buttons stay cleanly at bottom-right.
 */
.wood-calc-preset-modal
.wood-calc-preset-actions {
    display: flex !important;
    justify-content: flex-end !important;
    align-items: center !important;

    gap: 9px !important;

    margin-top: 20px !important;
}


/*
 * New preset modal stays comfortably sized.
 */
#woodCalcPresetModal
.wood-calc-preset-dialog {
    width: min(100%, 720px) !important;
}


/*
 * Delete manager slightly narrower.
 */
#woodCalcPresetDeleteModal
.wood-calc-preset-dialog {
    width: min(100%, 560px) !important;
}


/* WOOD_CALCULATOR_PRESET_MODAL_HEADER_FIX_V1_END */



/* =========================================================
   WOOD_BANK_CASHBACK_FRONTEND_STYLE_V1
   ========================================================= */

.customer-cashback-editor {
    padding: 14px;
    border: 1px solid #dce8e2;
    border-radius: 12px;
    background: #f8fbf9;
}

.customer-cashback-toggle {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
}

.customer-cashback-toggle input {
    width: 18px;
    height: 18px;
    margin-top: 2px;
}

.customer-cashback-toggle span {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.customer-cashback-toggle strong {
    font-size: 14px;
    color: #183c2d;
}

.customer-cashback-toggle small,
.customer-cashback-help {
    color: #64766f;
    line-height: 1.45;
}

.customer-cashback-rate-wrap {
    margin-top: 14px;
}

.customer-cashback-rate-wrap > label {
    display: block;
    margin-bottom: 7px;
    font-weight: 600;
}

.customer-cashback-rate-input {
    display: flex;
    align-items: center;
    gap: 8px;
}

.customer-cashback-rate-input input {
    flex: 1;
}

.customer-cashback-rate-input span {
    font-weight: 700;
    color: #315c4a;
}

.customer-cashback-help {
    display: block;
    margin-top: 8px;
}

.customer-cashback-detail {
    margin-top: 12px;
    padding: 12px 14px;
    border: 1px solid #bfe3d2;
    border-radius: 12px;
    background: #f0faf5;
}

.customer-cashback-detail strong,
.customer-cashback-detail span,
.customer-cashback-detail small {
    display: block;
}

.customer-cashback-detail strong {
    color: #15603f;
    margin-bottom: 4px;
}

.customer-cashback-detail span {
    color: #29493d;
    line-height: 1.4;
}

.customer-cashback-detail small {
    margin-top: 5px;
    color: #698078;
    line-height: 1.4;
}

.payment-cashback-profile {
    margin: 4px 0 16px;
    padding: 13px 15px;
    border: 1px solid #bfe3d2;
    border-radius: 12px;
    background: #f0faf5;
}

.payment-cashback-profile > div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
}

.payment-cashback-profile-label {
    font-weight: 700;
    color: #1f4e3a;
}

.payment-cashback-profile strong {
    color: #11623f;
    font-size: 16px;
}

.payment-cashback-profile p {
    margin: 7px 0 0;
    color: #5b7068;
    line-height: 1.45;
    font-size: 12px;
}

.payment-cashback-summary {
    margin: 14px 0;
    padding: 14px;
    border: 1px solid #cfe2d9;
    border-radius: 12px;
    background: #f8fbfa;
}

.payment-cashback-summary-head {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding-bottom: 10px;
    margin-bottom: 6px;
    border-bottom: 1px solid #e3ece8;
    font-weight: 700;
    color: #214838;
}

.payment-cashback-summary-head span {
    font-size: 11px;
    color: #6e8079;
    font-weight: 600;
}

.payment-cashback-summary-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 6px 0;
    font-size: 13px;
}

.payment-cashback-summary-row span {
    color: #61736c;
}

.payment-cashback-summary-row strong {
    color: #243d34;
}

.payment-cashback-summary-row.cashback-out strong {
    color: #a13b35;
}

.payment-cashback-summary-row.effective {
    margin-top: 4px;
    padding-top: 10px;
    border-top: 1px solid #dce8e3;
}

.payment-cashback-summary-row.effective strong {
    color: #11623f;
    font-size: 15px;
}

.payment-cashback-server-state {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px dashed #d7e3de;
    color: #8a7a3f;
    font-size: 11px;
}

.payment-cashback-server-state.confirmed {
    color: #2a7857;
}

.customer-payment-cashback-detail {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px 12px;
    margin-top: 10px;
    padding: 11px 12px;
    border: 1px solid #d9e8e1;
    border-radius: 10px;
    background: #f8fbfa;
}

.customer-payment-cashback-detail > div {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.customer-payment-cashback-detail span {
    color: #6c7a75;
    font-size: 12px;
}

.customer-payment-cashback-detail strong {
    color: #30473e;
    font-size: 12px;
}

.customer-payment-cashback-detail .cashback-negative strong {
    color: #a13b35;
}

.customer-payment-cashback-detail .cashback-effective {
    grid-column: 1 / -1;
    padding-top: 7px;
    border-top: 1px solid #e2ebe7;
}

.customer-payment-cashback-detail .cashback-effective strong {
    color: #11623f;
}

.sales-detail-debt-payment-row.cashback-detail-row {
    display: block;
    padding: 12px;
}

.sales-detail-cashback-top {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 12px;
    align-items: center;
}

.sales-detail-cashback-top > :last-child {
    text-align: right;
}

.sales-detail-cashback-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px 14px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #e5ebe8;
}

.sales-detail-cashback-grid > div {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.sales-detail-cashback-grid span {
    color: #6f7d78;
    font-size: 12px;
}

.sales-detail-cashback-grid strong {
    font-size: 12px;
}

.sales-detail-cashback-grid .effective {
    grid-column: 1 / -1;
    padding-top: 6px;
    border-top: 1px solid #e5ebe8;
}

.sales-detail-cashback-grid .effective strong {
    color: #11623f;
}

@media (max-width: 720px) {
    .customer-payment-cashback-detail,
    .sales-detail-cashback-grid {
        grid-template-columns: 1fr;
    }

    .customer-payment-cashback-detail .cashback-effective,
    .sales-detail-cashback-grid .effective {
        grid-column: 1;
    }

    .sales-detail-cashback-top {
        grid-template-columns: 1fr;
    }

    .sales-detail-cashback-top > :last-child {
        text-align: left;
    }
}
\n\n/* ==========================================================\n   WOOD_BANK_CASHBACK_UI_POLISH_STYLE_V2\n   ========================================================== */\n\n.customer-list-name > strong {\n    min-width: 0;\n    flex: 1 1 auto;\n}\n\n.customer-list-cashback-badge {\n    flex: 0 0 auto;\n    display: inline-flex;\n    align-items: center;\n    justify-content: center;\n    min-height: 22px;\n    padding: 3px 8px;\n    border: 1px solid rgba(22, 131, 75, .22);\n    border-radius: 999px;\n    background: rgba(22, 131, 75, .08);\n    color: #16834b;\n    font-size: 10px;\n    font-weight: 800;\n    line-height: 1;\n    white-space: nowrap;\n}\n\n.customer-history-tabs {\n    grid-template-columns: repeat(4, minmax(0, 1fr));\n}\n\n.customer-history-tab {\n    min-width: 0;\n    white-space: nowrap;\n}\n\n.wood-payment-cashback-modal-section {\n    padding: 16px;\n    border: 1px solid rgba(22, 131, 75, .20);\n    border-radius: 16px;\n    background: rgba(22, 131, 75, .045);\n}\n\n.wood-payment-cashback-modal-head {\n    display: flex;\n    align-items: center;\n    justify-content: space-between;\n    gap: 16px;\n    margin-bottom: 14px;\n}\n\n.wood-payment-cashback-modal-head > div {\n    min-width: 0;\n}\n\n.wood-payment-cashback-modal-head span {\n    display: block;\n    color: #6f7f78;\n    font-size: 11px;\n    font-weight: 700;\n}\n\n.wood-payment-cashback-modal-head strong {\n    display: block;\n    margin-top: 4px;\n    color: #172033;\n    font-size: 15px;\n}\n\n.wood-payment-cashback-modal-badge {\n    flex: 0 0 auto;\n    padding: 6px 9px;\n    border-radius: 999px;\n    background: rgba(22, 131, 75, .10);\n    color: #16834b !important;\n    font-size: 11px !important;\n    font-weight: 800 !important;\n}\n\n.wood-payment-cashback-modal-grid {\n    display: grid;\n    grid-template-columns: repeat(2, minmax(0, 1fr));\n    gap: 10px;\n}\n\n.wood-payment-cashback-modal-grid > div {\n    min-width: 0;\n    padding: 11px 12px;\n    border: 1px solid rgba(22, 131, 75, .12);\n    border-radius: 12px;\n    background: rgba(255,255,255,.72);\n}\n\n.wood-payment-cashback-modal-grid span {\n    display: block;\n    margin-bottom: 5px;\n    color: #74827b;\n    font-size: 11px;\n    font-weight: 650;\n}\n\n.wood-payment-cashback-modal-grid strong {\n    color: #24342e;\n    font-size: 14px;\n}\n\n.wood-payment-cashback-modal-grid .cashback-negative strong {\n    color: #a93a35;\n}\n\n.wood-payment-cashback-modal-grid .cashback-effective {\n    grid-column: 1 / -1;\n}\n\n.wood-payment-cashback-modal-grid .cashback-effective strong {\n    color: #137344;\n    font-size: 16px;\n}\n\n.wood-payment-cashback-modal-note {\n    margin: 12px 0 0;\n    padding-top: 12px;\n    border-top: 1px solid rgba(22, 131, 75, .13);\n    color: #6e7c76;\n    font-size: 11px;\n    line-height: 1.55;\n}\n\n@media (max-width: 640px) {\n    .customer-history-tabs {\n        grid-template-columns: repeat(2, minmax(0, 1fr));\n    }\n\n    .wood-payment-cashback-modal-grid {\n        grid-template-columns: 1fr;\n    }\n\n    .wood-payment-cashback-modal-grid .cashback-effective {\n        grid-column: auto;\n    }\n}\n\n/* END WOOD_BANK_CASHBACK_UI_POLISH_STYLE_V2 */\n
/* ==========================================================
   WOOD_BANK_CASHBACK_CUSTOMER_LIST_LABEL_STYLE_V3
   ========================================================== */

.customer-list-identity {
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
}

.customer-list-identity > strong {
    display: block;
    max-width: 100%;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.customer-list-cashback-badge {
    width: auto;
    min-width: 0;
    min-height: 20px;
    padding: 2px 8px;
    border-radius: 999px;
    border: 1px solid #c2ead4;
    background: #e9f8f0;
    color: #087443;
    font-size: 11px;
    font-weight: 650;
    line-height: 1.25;
    white-space: nowrap;
}

/* END WOOD_BANK_CASHBACK_CUSTOMER_LIST_LABEL_STYLE_V3 */

/* =========================================================
   WOOD_LEGACY_CUSTOMER_UI_CSS_V1_BEGIN
   ========================================================= */

.wood-legacy-summary-row {
    cursor: pointer;
    border-left: 4px solid #8a6d3b;
    background:
        linear-gradient(
            90deg,
            rgba(247, 241, 226, 0.92),
            rgba(255, 255, 255, 0.98)
        );
}

.wood-legacy-summary-row:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 22px rgba(35, 45, 65, 0.08);
}

.wood-legacy-summary-label {
    margin-top: 7px;
    font-weight: 700;
    color: #5f4b25;
}

.wood-legacy-summary-note {
    margin-top: 5px;
}

.wood-legacy-history-modal {
    z-index: 1400;
}

.wood-legacy-history-card {
    width: min(1180px, calc(100vw - 32px));
    max-width: 1180px;
    max-height: calc(100vh - 32px);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.wood-legacy-history-summary {
    display: grid;
    grid-template-columns:
        repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin: 4px 0 16px;
}

.wood-legacy-summary-card {
    min-width: 0;
    padding: 12px 14px;
    border: 1px solid #e4e8ee;
    border-radius: 12px;
    background: #f8fafc;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.wood-legacy-summary-card > span {
    font-size: 11px;
    color: #778397;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.wood-legacy-summary-card > strong {
    font-size: 14px;
    color: #263343;
    line-height: 1.35;
}

.wood-legacy-summary-card > small {
    color: #7b8798;
    line-height: 1.35;
}

.wood-legacy-history-table-wrap {
    overflow: auto;
    border: 1px solid #e4e8ee;
    border-radius: 12px;
    max-height: 58vh;
}

.wood-legacy-history-table {
    width: 100%;
    min-width: 980px;
    border-collapse: collapse;
    font-size: 12px;
}

.wood-legacy-history-table th {
    position: sticky;
    top: 0;
    z-index: 2;
    padding: 10px 11px;
    background: #f3f6f9;
    border-bottom: 1px solid #dfe5ec;
    text-align: left;
    white-space: nowrap;
    color: #536174;
}

.wood-legacy-history-table td {
    padding: 10px 11px;
    border-bottom: 1px solid #edf0f4;
    vertical-align: top;
    color: #354255;
    line-height: 1.4;
}

.wood-legacy-history-table tbody tr:last-child td {
    border-bottom: 0;
}

.wood-legacy-history-table tbody tr:hover {
    background: #fafbfd;
}

.wood-legacy-negative {
    font-weight: 700;
    color: #167a52 !important;
}

.wood-legacy-reconcile {
    margin-top: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    font-size: 12px;
    line-height: 1.4;
}

.wood-legacy-reconcile.ok {
    border: 1px solid #bfe6ce;
    background: #effaf3;
    color: #1d6840;
}

.wood-legacy-reconcile.warn {
    border: 1px solid #ead7ad;
    background: #fff9eb;
    color: #795d24;
}

@media (max-width: 900px) {
    .wood-legacy-history-summary {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

    .wood-legacy-history-card {
        width: calc(100vw - 18px);
        max-height: calc(100vh - 18px);
    }
}

@media (max-width: 560px) {
    .wood-legacy-history-summary {
        grid-template-columns: 1fr;
    }

    .wood-legacy-history-table-wrap {
        max-height: 55vh;
    }
}


/* =========================================================
   WOOD_LEGACY_MODAL_SCROLL_LOCK_CSS_V1_BEGIN

   Legacy history modal:
   - modal daxilində scroll qalır;
   - scroll limitinə çatanda background-a keçmir;
   - modal açıq ikən əsas səhifə scroll etmir.
   ========================================================= */

html.wood-legacy-history-open,
body.wood-legacy-history-open {
    overflow: hidden !important;
    overscroll-behavior: none !important;
}


.wood-legacy-history-modal {
    overscroll-behavior: none !important;
}


.wood-legacy-history-card {
    overscroll-behavior: contain !important;
}


.wood-legacy-history-table-wrap {
    overscroll-behavior:
        contain !important;

    overscroll-behavior-y:
        contain !important;

    overscroll-behavior-x:
        contain !important;
}


/* WOOD_LEGACY_MODAL_SCROLL_LOCK_CSS_V1_END */


/* WOOD_LEGACY_CUSTOMER_UI_CSS_V1_END */


/* =========================================================
   WOOD_OPENING_SECTION_UI_CSS_V1_BEGIN
   ========================================================= */


.opening-section-head-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 10px;
}


.opening-section-status,
.opening-section-mode-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 30px;
    padding: 6px 11px;

    border: 1px solid transparent;
    border-radius: 999px;

    font-size: 11px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: .02em;

    white-space: nowrap;
}


.opening-section-status--finalized {
    color: #166534;
    background: #f0fdf4;
    border-color: #86efac;
}


.opening-section-status--open {
    color: #92400e;
    background: #fffbeb;
    border-color: #fbbf24;
}


.opening-section-mode-badge {
    color: #1d4ed8;
    background: #eff6ff;
    border-color: #bfdbfe;
}


.opening-section-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;

    margin-top: 18px;
    padding-top: 18px;

    border-top:
        1px solid
        #e2e8f0;
}


.opening-section-lock-note {
    flex: 1 1 320px;

    color: #64748b;
    font-size: 12px;
    line-height: 1.55;
}


.opening-section-actions
.primary-btn {
    flex: 0 0 auto;
}


.opening-section-money-field {
    max-width: 420px;
}


.opening-section-money-readonly {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;

    max-width: 520px;

    padding: 16px;

    border:
        1px solid
        #e2e8f0;

    border-radius: 14px;

    background:
        #f8fafc;
}


.opening-section-money-readonly span {
    color: #64748b;
    font-size: 12px;
    font-weight: 600;
}


.opening-section-money-readonly strong {
    color: #0f172a;
    font-size: 18px;
}


.opening-section-parent-note {
    margin-top: 18px;
    padding: 14px 16px;

    border:
        1px solid
        #e2e8f0;

    border-radius: 12px;

    background:
        #f8fafc;
}


.opening-section-parent-note strong {
    margin-right: 6px;
}


@media (max-width: 700px) {

    .opening-section-head-actions {
        width: 100%;
        justify-content: flex-start;
    }


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


    .opening-section-actions
    .primary-btn {
        width: 100%;
    }


    .opening-section-money-readonly {
        align-items: flex-start;
        flex-direction: column;
    }
}


/* WOOD_OPENING_SECTION_UI_CSS_V1_END */


/* Real VAT account and canonical invoice breakdown. */
.finance-kpi-grid { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.finance-kpi-card.vat { border-top: 3px solid #168f8a; }
.vat-account-panel { display: grid; grid-template-columns: minmax(240px, 300px) minmax(0, 1fr); gap: 24px; margin-top: 20px; align-items: start; }
.vat-transfer-form, .vat-history-panel { min-width: 0; padding: 18px; border: 1px solid #dfe8e3; border-radius: 14px; background: #fff; }
.vat-transfer-form h4, .vat-history-panel h4 { margin: 0 0 12px; font-size: 16px; color: #203b30; }
.vat-transfer-form p, .vat-account-help { color: #63776a; font-size: 12px; line-height: 1.6; }
.vat-transfer-form .form-field { margin-bottom: 14px; }
.vat-transfer-form .primary-btn { width: 100%; }
.vat-account-message { overflow-wrap: anywhere; }
.vat-account-message.success { color: #137344; }
.vat-history-filters { display: grid; grid-template-columns: repeat(3, minmax(110px, 1fr)) auto; gap: 10px; align-items: end; }
.vat-history-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 16px; }
.vat-history-summary > div { padding: 10px; border-radius: 8px; background: #f5f8f6; }
.vat-history-summary span, .vat-history-summary strong { display: block; }
.vat-history-summary span { font-size: 11px; color: #6c7d73; margin-bottom: 5px; }
.vat-history-summary strong { font-size: 13px; color: #243d30; }
.vat-history-table-wrap { overflow-x: auto; }
.vat-history-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.vat-history-table th, .vat-history-table td { padding: 10px 8px; border-bottom: 1px solid #e7ece8; text-align: left; vertical-align: top; }
.vat-history-table th { color: #6a7b71; font-weight: 600; white-space: nowrap; }
.vat-history-table td:last-child { min-width: 130px; max-width: 260px; overflow-wrap: anywhere; }
.vat-money-in { color: #137344; white-space: nowrap; }
.vat-money-out { color: #a93a35; white-space: nowrap; }
.vat-history-pagination { display: flex; gap: 12px; align-items: center; justify-content: space-between; margin-top: 16px; font-size: 12px; }
#saleBankInvoiceRecalculate { margin-top: 8px; }
#saleBankInvoiceSummary .payment-cashback-summary-row, #paymentCashbackSummary .payment-cashback-summary-row { align-items: start; }
#saleBankInvoiceSummary .payment-cashback-summary-row strong, #paymentCashbackSummary .payment-cashback-summary-row strong { white-space: nowrap; }
#saleBankInvoiceSummary .payment-cashback-summary-row:nth-last-of-type(2), #paymentCashbackSummary .payment-cashback-summary-row:nth-last-of-type(2) { color: #137344; }
#salesDetailBankInvoiceBreakdown { margin-top: 16px; }
@media (max-width: 1100px) {
    .vat-account-panel { grid-template-columns: 1fr; }
    .vat-transfer-form { max-width: none; }
}
@media (max-width: 680px) {
    .vat-history-filters, .vat-history-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .vat-transfer-form, .vat-history-panel { padding: 12px; }
    .vat-history-pagination { flex-wrap: wrap; }
}

.bank-invoice-report { grid-column: 1 / -1; margin: 16px 0; padding: 16px; border: 1px solid #e2e9e4; border-radius: 12px; background: #fff; }
.bank-invoice-report h4 { margin: 0 0 12px; color: #243d30; }
.bank-invoice-report-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.bank-invoice-report-grid span, .bank-invoice-report-grid strong { display: block; }
.bank-invoice-report-grid span, .bank-invoice-report p { font-size: 12px; color: #617367; }
.bank-invoice-report-grid strong { margin-top: 5px; color: #243d30; }
.bank-invoice-report p { margin: 14px 0 0; }


/* Payment detail: one label/value pair per row; snapshot amounts are unchanged. */
.wood-payment-cashback-modal-section {
    padding: 16px;
    border: 1px solid #e7ebf0;
    border-radius: 14px;
    background: #fff;
}
.wood-payment-cashback-modal-head {
    margin-bottom: 14px;
    color: #172033;
    font-size: 14px;
    line-height: 1.5;
}
.wood-payment-cashback-modal-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
}
.wood-payment-cashback-modal-grid > .payment-finance-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: baseline;
    gap: 8px 24px;
    min-width: 0;
    padding: 14px 15px;
    border: 1px solid #e7ebf0;
    border-radius: 14px;
    background: #fbfcfd;
}
.wood-payment-cashback-modal-grid .payment-finance-row > span {
    min-width: 0;
    margin: 0;
    color: #617085;
    font-size: 13px;
    line-height: 1.5;
    overflow-wrap: anywhere;
}
.wood-payment-cashback-modal-grid .payment-finance-row > strong {
    min-width: 0;
    color: #172033;
    font-size: 14px;
    font-weight: 750;
    line-height: 1.5;
    text-align: right;
    font-variant-numeric: tabular-nums;
    overflow-wrap: anywhere;
}
.wood-payment-cashback-modal-grid .payment-finance-row > .payment-finance-value-positive {
    color: #16815d;
}
.wood-payment-cashback-modal-grid .payment-finance-row > .payment-finance-value-negative {
    color: #c44949;
}
.wood-payment-cashback-modal-grid > .payment-finance-row-total {
    border-color: #cbd9d3;
}
.wood-payment-cashback-modal-grid .payment-finance-row-total > span {
    color: #172033;
    font-weight: 700;
}
.wood-payment-cashback-modal-note {
    margin: 14px 0 0;
    padding-top: 12px;
    border-top: 1px solid #e7ebf0;
    color: #758195;
    font-size: 12px;
    line-height: 1.6;
}
@media (max-width: 640px) {
    .wood-payment-cashback-modal-section { padding: 12px; }
    .wood-payment-cashback-modal-grid > .payment-finance-row {
        grid-template-columns: minmax(0, 1fr);
        gap: 6px;
        padding: 12px;
    }
    .wood-payment-cashback-modal-grid .payment-finance-row > strong {
        text-align: left;
    }
}


/* Purchase/create detail overlays: escape the content stacking context only
   while open. Keep sibling expense/confirmation overlays in their existing order. */
.content:has(> #purchaseDetailModal:not(.hidden), > #newPurchaseModal:not(.hidden)) {
    isolation: auto;
    z-index: auto;
}

#purchaseDetailModal,
#newPurchaseModal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    box-sizing: border-box;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    max-width: none;
    max-height: none;
    margin: 0;
    padding: 20px;
    transform: none;
    overflow: hidden;
}

#purchaseDetailModal:not(.hidden),
#newPurchaseModal:not(.hidden) {
    display: flex;
    align-items: center;
    justify-content: center;
}

#purchaseDetailModal > .purchase-modal-card,
#newPurchaseModal > .purchase-modal-card {
    box-sizing: border-box;
    flex: 0 1 920px;
    width: 100%;
    min-width: 0;
    max-width: 920px;
    max-height: 100%;
    margin: 0;
    transform: none;
    overflow-y: auto;
    overflow-x: auto;
    overscroll-behavior: contain;
}

@media (max-width: 640px) {
    #purchaseDetailModal,
    #newPurchaseModal {
        padding: 12px;
    }
}


/* =========================================================
   WOOD_CALCULATOR_LOGIN_MODAL_V2

   On Login the calculator behaves as a centered modal.
   After authentication the normal full-page calculator
   behavior remains unchanged.
   ========================================================= */

/*
 * Keep Login visible behind the modal but block interaction.
 */
body.wood-calc-open.wood-calc-login-open #loginPage {
    visibility: visible !important;
    pointer-events: none !important;
}


/*
 * Full-screen modal backdrop.
 */
body.wood-calc-login-open .wood-calc-page {
    left: 0 !important;

    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    padding: 24px !important;

    background: rgba(15, 23, 42, 0.38) !important;
    background-color: rgba(15, 23, 42, 0.38) !important;

    -webkit-backdrop-filter: blur(4px) !important;
    backdrop-filter: blur(4px) !important;

    z-index: 9999 !important;

    overflow: hidden !important;
}


/*
 * Actual calculator window.
 */
body.wood-calc-login-open .wood-calc-shell {
    width: min(960px, 100%) !important;
    max-height: calc(100vh - 48px) !important;

    margin: 0 !important;
    padding: 30px 32px 34px !important;

    overflow-y: auto !important;
    overscroll-behavior: contain !important;

    background: #f4f7fb !important;

    border: 1px solid rgba(255, 255, 255, 0.82) !important;
    border-radius: 24px !important;

    box-shadow:
        0 28px 80px rgba(15, 23, 42, 0.28),
        0 8px 24px rgba(15, 23, 42, 0.12) !important;
}


/*
 * Keep the modal header visible while scrolling long content.
 */
body.wood-calc-login-open .wood-calc-topbar {
    position: sticky !important;
    top: -30px !important;

    z-index: 20 !important;

    margin:
        -30px
        -32px
        22px !important;

    padding:
        26px
        32px
        18px !important;

    background: rgba(244, 247, 251, 0.96) !important;

    -webkit-backdrop-filter: blur(8px) !important;
    backdrop-filter: blur(8px) !important;

    border-bottom: 1px solid rgba(223, 228, 234, 0.82) !important;
}


/*
 * Tablet / mobile modal.
 */
@media (max-width: 700px) {

    body.wood-calc-login-open .wood-calc-page {
        padding: 12px !important;
        align-items: flex-start !important;
    }

    body.wood-calc-login-open .wood-calc-shell {
        width: 100% !important;
        max-height: calc(100vh - 24px) !important;

        padding: 22px 16px 26px !important;

        border-radius: 18px !important;
    }

    body.wood-calc-login-open .wood-calc-topbar {
        top: -22px !important;

        margin:
            -22px
            -16px
            18px !important;

        padding:
            20px
            16px
            14px !important;
    }
}

/* WOOD_CALCULATOR_LOGIN_MODAL_V2_END */


/* WOOD_RESPONSIVE_OVERLAY_LAYOUT_V1 */
html.wood-overlay-scroll-locked {
    overflow: hidden !important;
    overscroll-behavior: none;
}
html.wood-overlay-scroll-locked body {
    position: fixed !important;
    top: var(--wood-overlay-scroll-top, 0px) !important;
    left: var(--wood-overlay-scroll-left, 0px) !important;
    width: 100%;
    overflow: hidden !important;
}

/* Generic dialogs, including dynamically inserted forms, share one viewport
   budget. Existing card widths and specialized dialog layouts stay intact. */
.modal-backdrop {
    height: 100vh;
    height: 100dvh;
    box-sizing: border-box;
    overflow-y: auto;
    overscroll-behavior: contain;
}
.modal-backdrop > .modal-card {
    min-height: 0;
    max-height: calc(100vh - 40px);
    max-height: calc(100dvh - 40px);
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}
.sales-detail-panel,
.wood-universal-detail-body,
.wood-calc-shell,
.wood-calc-preset-dialog {
    min-height: 0;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}
.wood-universal-detail-panel {
    max-height: min(88dvh, 900px);
    overflow-y: auto;
    overscroll-behavior: contain;
}
.wood-calc-preset-dialog {
    max-height: calc(100dvh - 48px);
    overflow-y: auto;
}
body.wood-calc-login-open .wood-calc-shell {
    max-height: calc(100dvh - 48px) !important;
}

@media (max-width: 768px) {
    /* Restore the full drawer, not the 769–900px icon-only rail.
       Do not override display/hidden: role-based privacy remains authoritative. */
    .sidebar .menu-item {
        min-width: 0;
        height: auto;
        min-height: 45px;
        padding: 10px 12px;
        justify-content: flex-start;
        font-size: 13px;
        line-height: 1.4;
        white-space: normal;
        overflow-wrap: anywhere;
    }
    .sidebar .menu-item > span:not(.menu-icon) {
        min-width: 0;
        font-size: inherit;
        line-height: inherit;
        white-space: normal;
        overflow-wrap: anywhere;
    }
    .sidebar .menu-item > .menu-icon {
        flex: 0 0 18px;
        font-size: 16px;
    }
    .sidebar { overscroll-behavior: contain; }

    /* Explicit areas replace inherited desktop minimum columns and the old
       debt row span. Both customer list renderers use these same classes. */
    .customer-table-head { display: none; }
    .customer-list-row {
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas: "name" "phone" "debt" "advance";
        gap: 8px;
        min-width: 0;
        padding: 14px;
    }
    .customer-list-name { grid-area: name; align-items: flex-start; }
    .customer-list-phone { grid-area: phone; padding-left: 0; }
    .customer-list-debt { grid-area: debt; }
    .customer-list-advance { grid-area: advance; }
    .customer-list-arrow { display: none; }
    .customer-list-row > div { min-width: 0; overflow-wrap: anywhere; }
    .customer-list-identity { flex: 1 1 0; }
    .customer-list-identity > strong,
    .customer-list-cashback-badge { white-space: normal; overflow-wrap: anywhere; }
    .customer-list-inactivity { display: block; margin-top: 4px; }
}
@media (max-width: 700px) {
    body.wood-calc-login-open .wood-calc-shell {
        max-height: calc(100dvh - 24px) !important;
    }
}
/* WOOD_RESPONSIVE_OVERLAY_LAYOUT_V1_END */

/* =========================================================
   WOOD_SUPPLIER_LIST_POSITION_CARD_COLORS_V1
   ========================================================= */

.supplier-list-row.supplier-list-row-advance {
    border-color: #b7e4c7;
    background: #f2fbf5;
}

.supplier-list-row.supplier-list-row-advance:hover {
    border-color: #86cfa2;
    background: #ecf9f0;
}

.supplier-list-row.supplier-list-row-advance.selected {
    border-color: #4f9f70;
    background: #edf9f1;
}


.supplier-list-row.supplier-list-row-debt {
    border-color: #fdc59f;
    background: #fff7f1;
}

.supplier-list-row.supplier-list-row-debt:hover {
    border-color: #f3a66f;
    background: #fff3e9;
}

.supplier-list-row.supplier-list-row-debt.selected {
    border-color: #dc742f;
    background: #fff4eb;
}


.supplier-list-row.supplier-list-row-neutral {
    border-color: #e2e8f0;
    background: #f8fafc;
}

/* =========================================================
   WOOD_SUPPLIER_LIST_COMPACT_ROWS_V1
   ========================================================= */

@media (min-width: 1101px) {

    /*
     * Give the company list enough horizontal space for a
     * proper table-like row while preserving the detail pane.
     */
    .supplier-layout {
        grid-template-columns:
            minmax(650px, 1.05fr)
            minmax(420px, .95fr);
    }


    /*
     * Always one company per row.
     */
    .supplier-list {
        grid-template-columns: 1fr !important;
        gap: 8px;
    }


    /*
     * Compact horizontal company row.
     */
    .supplier-list-row {
        width: 100%;
        min-height: 66px;
        box-sizing: border-box;

        grid-template-columns:
            minmax(0, 1fr)
            minmax(235px, auto);

        align-items: center;
        gap: 18px;

        padding: 10px 14px;

        border-radius: 10px;
    }


    /*
     * Left side:
     * COMPANY | STATUS | TYPE
     */
    .supplier-list-row > div:first-child {
        min-width: 0;

        display: grid;

        grid-template-columns:
            minmax(160px, 1fr)
            68px
            minmax(145px, auto);

        align-items: center;
        gap: 14px;
    }


    .supplier-list-row > div:first-child > strong {
        min-width: 0;

        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;

        font-size: 15px;
        line-height: 1.2;
    }


    .supplier-list-row .company-status-text {
        margin: 0;

        white-space: nowrap;

        font-size: 12px;
    }


    .supplier-list-row .company-type-badges {
        margin: 0;

        display: flex;
        align-items: center;
        justify-content: flex-start;

        flex-wrap: nowrap;

        min-width: 0;
    }


    .supplier-list-row .company-type-badge {
        max-width: 100%;

        overflow: hidden;
        text-overflow: ellipsis;
    }


    /*
     * Right side:
     * CURRENT TYPE | AMOUNT
     */
    .supplier-list-balance {
        min-width: 235px;

        display: grid;

        grid-template-columns:
            78px
            minmax(135px, auto);

        align-items: center;
        justify-content: end;

        gap: 12px;

        text-align: right;
    }


    .supplier-list-balance span {
        margin: 0;

        white-space: nowrap;
        text-align: right;
    }


    .supplier-list-balance strong {
        min-width: 135px;

        white-space: nowrap;
        text-align: right;

        font-size: 15px;
    }


    /*
     * Keep selected state visible without moving geometry.
     */
    .supplier-list-row.selected {
        box-shadow:
            inset 0 0 0 1px
            rgba(15, 23, 42, .16);
    }
}


/*
 * Tablet / narrower desktop:
 * still one row per company, but allow the metadata area
 * to breathe on two levels.
 */
@media (min-width: 701px) and (max-width: 1100px) {

    .supplier-list {
        grid-template-columns: 1fr !important;
    }

    .supplier-list-row {
        min-height: 68px;

        grid-template-columns:
            minmax(0, 1fr)
            auto;
    }

    .supplier-list-row > div:first-child {
        display: grid;

        grid-template-columns:
            minmax(150px, 1fr)
            70px
            minmax(140px, auto);

        align-items: center;
        gap: 10px;
    }

    .supplier-list-row .company-status-text,
    .supplier-list-row .company-type-badges {
        margin: 0;
    }
}



/* WOOD_STAGING_BANK_RULES_V2 */
.office-bank-dashboard-action { display: flex; justify-content: flex-end; margin: 0 0 16px; }
#woodCompanyConfirmModal.modal-backdrop { z-index: 2200; }
.office-bank-help { color: #64748b; font-size: 13px; line-height: 1.6; }
.office-bank-balances { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 16px 0; }
.office-bank-balances > div { padding: 14px; background: #f8fbff; border: 1px solid #dfe7f2; border-radius: 12px; }
.office-bank-balances span, .office-bank-balances strong { display: block; }
.office-bank-balances span { color: #64748b; font-size: 12px; margin-bottom: 7px; }
.office-bank-balances strong { font-size: 18px; }
#officeBankForm .form-field { margin-bottom: 14px; }
.office-bank-history-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 24px; }
.office-bank-history-head span { color: #64748b; font-size: 12px; }
.office-bank-history { max-height: 240px; overflow-y: auto; }
.office-bank-history-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid #e5ebf4; }
.office-bank-history-row span, .office-bank-history-row small { display: block; color: #64748b; font-size: 12px; margin-top: 5px; overflow-wrap: anywhere; }
.supplier-bank-breakdown { line-height: 1.55; }
.supplier-bank-funds.funds-short { color: #b45309; }
.supplier-bank-funds.funds-ok { color: #15803d; }
.supplier-bank-transfer-action { grid-column: 1 / -1; }
@media (max-width: 540px) {
    .office-bank-balances { grid-template-columns: 1fr; }
    .office-bank-history-row { align-items: flex-start; flex-wrap: wrap; }
}

/* WOOD_STAGING_BANK_RULES_V3 */
#supplierAdvanceSave:disabled,
#officeBankSubmit:disabled,
#supplierAdvanceSave:disabled:hover,
#officeBankSubmit:disabled:hover {
    background: #e2e8f0 !important;
    color: #64748b !important;
    border-color: #cbd5e1 !important;
    box-shadow: none !important;
    cursor: not-allowed !important;
    opacity: 0.75;
    transform: none !important;
}
.office-bank-preview { border: 1px solid #dfe7f2; border-radius: 12px; padding: 12px 14px; background: #f8fbff; }
.office-bank-preview > div { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; }
.office-bank-preview span { color: #64748b; }
.office-bank-preview strong { text-align: right; white-space: nowrap; }
.office-bank-funds { font-size: 13px; line-height: 1.6; color: #b45309; }
.office-bank-funds.funds-ok { color: #15803d; }
.office-bank-history-row > strong { text-align: right; font-size: 13px; }
@media (max-width: 540px) {
    .office-bank-preview > div { flex-wrap: wrap; }
}

/* WOOD_STAGING_OPENING_SAVE_UI_V1 */
.opening-money-save-message {
    margin: 12px 0 0; padding: 11px 14px; border: 1px solid #dfe7f2;
    border-radius: 10px; font-size: 13px; line-height: 1.6; overflow-wrap: anywhere;
}
.opening-money-save-message.error { color: #b45309; background: #fffbeb; border-color: #fde68a; }
.opening-money-save-message.success { color: #15803d; background: #f0fdf4; border-color: #bbf7d0; }
.opening-money-save-message.info { color: #475569; background: #f8fafc; }
[data-opening-money-save]:disabled {
    background: #e2e8f0 !important; color: #64748b !important;
    box-shadow: none !important; cursor: not-allowed !important;
}

/* WOOD_BANK_CASH_SETTLEMENT_V1: isolated styles. */
.bk-screen{padding-bottom:28px}.bk-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap;margin-bottom:16px}.bk-heading h2,.bk-heading h3{margin:0}.bk-heading p,.bk-help{color:#64748b;font-size:13px;line-height:1.6}.bk-balances,.bk-summary{display:grid;gap:12px;margin:16px 0}.bk-balances{grid-template-columns:repeat(3,minmax(0,1fr))}.bk-summary{grid-template-columns:repeat(4,minmax(0,1fr))}.bk-metric,.bk-card{background:#fff;border:1px solid #e2e8f0;border-radius:14px;padding:18px}.bk-metric span{display:block;font-size:13px;color:#64748b;margin-bottom:8px}.bk-metric strong{font-size:20px;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}.bk-profit{background:#eefbf3;border-color:#bbf7d0}.bk-profit strong{color:#15803d}.bk-toolbar{display:flex;gap:12px;align-items:end;flex-wrap:wrap;margin:22px 0}.bk-toolbar label,.bk-form label{display:flex;flex-direction:column;gap:6px;font-size:13px;font-weight:600}.bk-toolbar input,.bk-toolbar select,.bk-form input,.bk-form select,.bk-form textarea{border:1px solid #cbd5e1;background:#fff;border-radius:8px;padding:10px;font:inherit;min-width:0;max-width:100%}.bk-toolbar select{min-width:190px}.bk-table-wrap{overflow:auto;border:1px solid #e2e8f0;border-radius:12px;background:white}.bk-table{width:100%;border-collapse:collapse;font-size:13px;white-space:nowrap}.bk-table th,.bk-table td{text-align:left;padding:13px;border-bottom:1px solid #edf2f7}.bk-table th{background:#f8fafc;color:#475569}.bk-table td strong,.bk-table td small{display:block}.bk-table td small{color:#64748b;margin-top:4px}.bk-status{display:inline-block;border-radius:20px;padding:5px 9px;background:#f1f5f9;color:#475569}.bk-status-COMPLETED{background:#dcfce7;color:#166534}.bk-status-PARTIAL,.bk-status-RECEIVED{background:#fff7ed;color:#9a3412}.bk-status-CANCELLED{background:#fee2e2;color:#991b1b}.bk-pagination{display:flex;justify-content:center;align-items:center;gap:18px;margin-top:18px}.bk-message{padding:12px;border-radius:8px;background:#eff6ff;color:#1e40af;white-space:pre-wrap}.bk-message.error{background:#fff1f2;color:#9f1239}.bk-message.success{background:#ecfdf5;color:#166534}.bk-party-row{display:flex;justify-content:space-between;align-items:center;gap:12px;border-top:1px solid #e2e8f0;padding:14px 0}.bk-party-row small{display:block;color:#64748b;margin-top:5px}.bk-modal-card{width:min(900px,96vw);max-height:90vh;overflow:auto;padding:22px;background:#fff;border-radius:16px}.bk-modal-card .bk-form{display:grid;gap:14px}.bk-form .bk-check{flex-direction:row;align-items:flex-start;font-weight:400;line-height:1.5}.bk-form .bk-check input{margin-top:4px}.bk-actions{display:flex;justify-content:flex-end;gap:12px;flex-wrap:wrap;margin-top:12px}.bk-form .bk-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.bk-preview,.bk-detail-values{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;background:#f8fafc;border-radius:12px;padding:15px}.bk-preview span,.bk-detail-values span{display:block;color:#64748b;font-size:12px;margin-bottom:5px}.bk-modal-card h4{margin:22px 0 12px}.bk-modal-card details{border-top:1px solid #e2e8f0;padding:16px 0}.bk-modal-card summary{cursor:pointer;font-weight:600}.bk-modal-card .bk-form{margin-top:14px}.bk-warning{padding:12px;background:#fff7ed;color:#9a3412;border-radius:8px;font-size:13px;line-height:1.5}.bk-payout{border:1px solid #e2e8f0;border-radius:10px;padding:12px;margin:10px 0}.bk-payout small{display:block;color:#64748b;margin-top:6px}.bk-modal-card button:disabled,.bk-screen button:disabled{opacity:.5;cursor:not-allowed}@media(max-width:900px){.bk-summary{grid-template-columns:repeat(2,minmax(0,1fr))}.bk-balances{grid-template-columns:1fr}.bk-form .bk-grid,.bk-preview,.bk-detail-values{grid-template-columns:1fr}.bk-metric strong{font-size:18px}}

/* WOOD_MONEY_PAGES_UI_V3 */
.office-bank-screen{width:100%;min-width:0;padding:24px;box-sizing:border-box}
.office-bank-page-grid{display:grid;grid-template-columns:minmax(300px,440px) minmax(0,1fr);gap:24px;align-items:start}
.office-bank-form-card>h3{margin:0 0 18px}
.office-bank-screen .office-bank-history{max-height:none;overflow:visible}
.office-bank-screen .office-bank-history-row{gap:16px;overflow-wrap:anywhere}
.office-bank-screen .office-bank-balances{margin-bottom:24px}
.office-bank-screen input,.office-bank-screen select,.office-bank-screen textarea{width:100%;box-sizing:border-box}
.office-bank-screen .opening-money-input{display:flex;align-items:center;gap:8px}
.office-bank-screen .opening-money-input input{min-width:0}
.money-live-bar{display:flex;align-items:center;flex-wrap:wrap;justify-content:space-between;gap:8px;margin:10px 0 18px;color:#526477;font-size:13px}
.money-live-error{padding:12px 16px;background:#fff3e7;border:1px solid #f0ce9e;border-radius:10px;color:#8c4b10}
.money-live-error[hidden]{display:none!important}
@media(max-width:1000px){.office-bank-page-grid{grid-template-columns:minmax(0,1fr)} }
@media(max-width:600px){.office-bank-screen{padding:16px}.office-bank-screen .bk-heading{align-items:flex-start}.office-bank-screen .office-bank-history-row{flex-direction:column}.money-live-bar{align-items:flex-start;flex-direction:column}}

/* WOOD_BANK_CASH_REPORT_COMPACT_V2 */
#reportsScreen .reports-kpi-grid .report-kpi-card.bankcash-report-profit{
    border-color:#d5eee1;border-top:3px solid #24ad6a;
    background:linear-gradient(180deg,#fff 0%,#f3fbf7 100%);
}
.bankcash-report-profit[hidden],.bankcash-report-profit [hidden]{display:none!important}
.wood-report-visually-hidden{
    position:absolute!important;width:1px!important;height:1px!important;padding:0!important;
    margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;
    white-space:nowrap!important;border:0!important;
}

/* WOOD_RECEIVED_LOANS_LIST_UI_V4: standard list and compact dialogs. */
#personalLoansScreen{min-width:0;background:transparent;padding:0;border-radius:0;print-color-adjust:exact;-webkit-print-color-adjust:exact}
#rlTabs{display:inline-flex;gap:4px;padding:4px;margin:0 0 18px;background:#e2e9f2;border:1px solid #cbd5e1;border-radius:12px}
#rlTabs button{min-height:36px;height:auto;padding:8px 16px;font-size:13px;border-radius:9px;box-shadow:none}
#rlTabs button[aria-pressed="true"]{font-weight:700}
#rlReceivedPane .personal-loans-page-head{align-items:center;gap:16px;margin-bottom:16px}
#rlReceivedPane .personal-loans-page-head h2{font-size:22px;line-height:1.3;margin-bottom:5px}
#rlReceivedPane .personal-loans-page-head p{font-size:13px;color:#526277;opacity:1}
#rlReceivedPane .rl-actions{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
#rlReceivedPane button{min-height:36px;height:auto;padding:8px 14px;font-size:13px}
#rlReceivedPane .personal-loans-summary-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin-bottom:18px}
#rlReceivedPane .personal-loans-summary-card{background:#fff !important;border:1px solid #cbd5e1 !important;min-height:94px;height:auto;max-height:none;padding:16px;border-radius:14px;box-shadow:0 3px 10px rgba(31,55,91,.04)}
#rlReceivedPane .personal-loans-summary-card:nth-child(1){border-top:3px solid #ff8b35 !important}
#rlReceivedPane .personal-loans-summary-card:nth-child(2){border-top:3px solid #2485e9 !important}
#rlReceivedPane .personal-loans-summary-card:nth-child(3){border-top:3px solid #22a66c !important}
#rlReceivedPane .personal-loans-summary-card span{display:block;font-size:12px;line-height:1.4;min-height:18px;margin:0 0 10px;color:#526277;opacity:1}
#rlReceivedPane .personal-loans-summary-card strong{font-size:22px;line-height:1.25;margin:0;font-variant-numeric:tabular-nums}
#rlReceivedPane .rl-panel{background:#fff !important;border:1px solid #d5deea !important;border-radius:14px;padding:16px;margin:0 0 16px;box-shadow:0 3px 10px rgba(31,55,91,.04)}
#rlReceivedPane .rl-panel-head{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-bottom:12px}
#rlReceivedPane h3{font-size:16px;margin:0 0 12px;color:var(--text,#162033)}
#rlReceivedPane .rl-panel-head h3{margin:0 0 4px}
#rlSearch{height:40px;width:100%;max-width:260px;box-sizing:border-box;padding:8px 11px;border:1px solid #b9c7da !important;border-radius:9px;background:#fff !important;color:#162033;font-size:13px}
#rlReceivedPane .rl-table{overflow:auto;margin:0;border:1px solid #d5deea;border-radius:10px}
#rlReceivedPane .rl-table table{width:100%;border-collapse:collapse;text-align:left;font-size:13px;background:#fff}
#rlReceivedPane .rl-table th,#rlReceivedPane .rl-table td{padding:13px 14px;border-bottom:1px solid #dbe3ed !important;vertical-align:middle}
#rlReceivedPane .rl-table th{background:#f3f6fa !important;color:#526277;font-size:12px;font-weight:600}
#rlReceivedPane .rl-table tr:last-child td{border-bottom:0 !important}
#rlReceivedPane .rl-table tbody tr:hover{background:#f7f9fc}
#rlReceivedPane .rl-link{background:none;border:0;padding:0;color:#1569e8;cursor:pointer;text-align:left;font:inherit;font-weight:600;min-height:0}
#rlReceivedPane .rl-phone,#rlReceivedPane .rl-list-count{display:block;color:#718198;font-size:12px;margin-top:4px}
#rlReceivedPane .rl-money-col{text-align:right;white-space:nowrap;width:22%}
#rlReceivedPane .rl-debt-number{display:block;color:#c96520;font-size:17px;font-weight:700;font-variant-numeric:tabular-nums;white-space:nowrap}
#rlReceivedPane .rl-status{display:inline-flex;border-radius:6px;padding:4px 8px;font-size:12px;font-weight:600;white-space:nowrap}
#rlReceivedPane .rl-status.is-active{color:#16834b;background:#ecf8f0}
#rlReceivedPane .rl-status.is-inactive{color:#64748b;background:#eef2f7}
#rlReceivedPane .rl-row-actions{display:flex;justify-content:flex-end;align-items:center;gap:6px;flex-wrap:wrap}
#rlReceivedPane .rl-table button.secondary-btn{padding:6px 10px;min-height:30px;font-size:12px}
#rlReceivedPane .rl-status-button{border:0;background:transparent;color:#64748b;padding:6px;min-height:30px;font:inherit;font-size:12px;cursor:pointer}
#rlReceivedPane button:disabled{opacity:.45;cursor:not-allowed}
#rlReceivedPane .rl-actions-col{text-align:right;width:36%}
#rlReceivedPane .rl-error,#rlMessage.is-error,#rlDialogMessage.is-error{color:#b91c1c}
#rlMessage,#rlDialogMessage{color:#166534;font-size:13px;margin:0 0 12px}
#rlMessage:empty,#rlDialogMessage:empty{display:none}
#rlHistoryTitle{font-size:16px;line-height:1.5;overflow-wrap:break-word}
#rlReceivedPane #rlHistory td{font-variant-numeric:tabular-nums}
#rlReceivedPane #rlHistory th:nth-child(3),#rlReceivedPane #rlHistory td:nth-child(3){text-align:right;white-space:nowrap}
/* Use the same modal card and overlay as the existing application forms. */
#rlDialog{z-index:2100}
#rlDialog[hidden]{display:none !important}
#rlDialog .rl-dialog{width:min(520px,100%);box-sizing:border-box;background:#fff;border:1px solid #d5deea}
#rlDialog .modal-head{margin-bottom:16px;align-items:center}
#rlDialog .modal-head h3{font-size:19px;line-height:1.4}
#rlDialog .rl-form{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin:0}
#rlDialog .rl-form label{display:flex;flex-direction:column;gap:6px;font-size:12px;color:#526277;font-weight:600}
#rlDialog .rl-form input,#rlDialog .rl-form select{height:40px;width:100%;box-sizing:border-box;padding:8px 11px;border:1px solid #b9c7da;border-radius:9px;background:#fff;color:#162033;min-width:0;font:inherit;font-size:13px;box-shadow:none}
#rlDialog .rl-wide,#rlDialog .rl-submit{grid-column:1/-1}
#rlDialog .rl-selected-debt{margin:0;color:#c96520;font-size:14px;font-weight:600;font-variant-numeric:tabular-nums}
#rlDialog .rl-warning{margin:0;color:#b45309;font-size:13px;line-height:1.5}
#rlDialog .rl-submit{display:flex;justify-content:flex-end;gap:8px;margin-top:4px;padding-top:12px;border-top:1px solid #e2e8f0}
#rlDialog input:focus,#rlDialog select:focus,#rlSearch:focus{outline:2px solid #bcd8ff;outline-offset:1px}
#rlDialog .rl-submit button{min-height:36px;font-size:13px;padding:8px 16px}
/* Existing daily/company report typography stays intact. */
#rlDailyOutstanding,#rlDailyAssets{font:inherit;line-height:inherit;margin:0;overflow-wrap:normal;font-variant-numeric:tabular-nums}
/* Preserve the existing KPI value font size, weight and baseline. */
#rlReportOutstanding,#rlReportAssets,#rlReportBorrowed,#rlReportRepaid{font-variant-numeric:tabular-nums}
#reportsScreen .rl-loan-report-card{border-top:3px solid #94a3b8;background:linear-gradient(180deg,#fff 0%,#f8fafc 100%)}
#reportsScreen .rl-loan-report-card--outstanding{border-color:#f1d6c1;border-top-color:#ec8b3a;background:linear-gradient(180deg,#fff 0%,#fff7ed 100%)}
#reportsScreen .rl-loan-report-card--assets{border-color:#cee5fa;border-top-color:#4b8dde;background:linear-gradient(180deg,#fff 0%,#f3f8ff 100%)}
#reportsScreen .rl-loan-report-card--borrowed{border-color:#dbe1f4;border-top-color:#8c8bda;background:linear-gradient(180deg,#fff 0%,#f7f7ff 100%)}
#reportsScreen .rl-loan-report-card--repaid{border-color:#d5eee1;border-top-color:#43bd84;background:linear-gradient(180deg,#fff 0%,#f1faf5 100%)}
/* Keep the decorative background still, reducing continuous GPU work. */
@media(min-width:901px){#appPage .content::before{animation:none !important;will-change:auto !important;transform:none !important}}
@media(max-width:1100px){#rlReceivedPane .personal-loans-page-head{align-items:flex-start;flex-direction:column}#rlReceivedPane .rl-actions-col{width:auto}}
@media(max-width:600px){#rlReceivedPane .personal-loans-summary-grid{grid-template-columns:1fr}#rlReceivedPane .rl-panel-head{align-items:stretch;flex-direction:column}#rlSearch{max-width:none}#rlReceivedPane .rl-actions{width:100%}#rlReceivedPane .rl-actions button{flex:1}#rlTabs{display:flex}#rlTabs button{flex:1}#rlReceivedPane #rlParties table{min-width:700px}#rlDialog .rl-form{grid-template-columns:1fr}#rlDialog .modal-card{padding:18px}}

/* WOOD_SALE_TOTAL_ENTRY_V1 — keep the existing sale form grid. */
#saleScreen .sale-price-mode-toggle {
    display: inline-flex; align-items: center; gap: 7px;
    margin-top: 12px; font-size: 12px; color: var(--muted, #64748b);
}
#saleScreen .sale-price-mode-toggle input {
    width: 14px; height: 14px; margin: 0;
}
#saleScreen .sale-product-values input[readonly] {
    color: var(--muted, #64748b); cursor: default;
}

/* WOOD_DASHBOARD_TRENDS_V1 */
.chart-card {position:relative;}
.wood-trend-dates {display:flex;justify-content:space-between;gap:4px;padding:0 2.4%;margin-top:2px;color:#657181;font-size:11px;font-variant-numeric:tabular-nums;}
.wood-trend-today {font-weight:700;color:#34475b;}
.wood-trend-note {font-size:11px;line-height:1.5;color:#6c7785;margin:10px 0 0;}
.wood-trend-tip {position:absolute;top:95px;transform:translateX(-50%);z-index:3;max-width:92%;padding:9px 12px;background:#fff;color:#243446;border:1px solid #e1e6eb;border-radius:9px;box-shadow:0 5px 18px #172b4d20;pointer-events:none;white-space:nowrap;}
.wood-trend-tip[hidden] {display:none;}
.wood-trend-tip span {display:block;color:#657181;font-size:10px;margin-bottom:4px;}
.wood-trend-tip strong {font-size:14px;font-variant-numeric:tabular-nums;}
.blue-chart .wood-trend-dot {fill:#2878f0;stroke:#fff;stroke-width:1.5;}
.orange-chart .wood-trend-dot {fill:#ff812e;stroke:#fff;stroke-width:1.5;}
.wood-trend-hit {cursor:crosshair;}
.wood-trend-hit:focus {outline:none;stroke:#8a98aa;stroke-width:1;stroke-dasharray:3 3;}
@media(max-width:480px) {.wood-trend-dates {font-size:10px;}.wood-trend-tip strong {font-size:12px;}.wood-trend-note {font-size:10px;}}

/* WOOD_HERO_SALES_HOVER_V1 */
.hero-chart {position:relative;}
.wood-hero-sales-tip {position:absolute;z-index:5;top:51px;transform:translateX(-50%);max-width:92%;padding:9px 12px;background:#fff;color:#243446;border:1px solid #e1e6eb;border-radius:9px;box-shadow:0 5px 18px #172b4d20;pointer-events:none;white-space:nowrap;}
.wood-hero-sales-tip[hidden] {display:none;}
.wood-hero-sales-tip span {display:block;font-size:10px;color:#657181;margin-bottom:4px;}
.wood-hero-sales-tip strong {font-size:14px;font-variant-numeric:tabular-nums;color:#243446;}
.wood-hero-hover-hit {cursor:crosshair;pointer-events:all;}
.wood-hero-hover-hit:focus {outline:none;stroke:#ffffff70;stroke-width:1;stroke-dasharray:3 3;}
.wood-hero-hover-guide {stroke:#ffffff80;stroke-width:1;stroke-dasharray:3 3;pointer-events:none;}
@media(max-width:480px) {.wood-hero-sales-tip strong {font-size:12px;}}

/* WOOD_BANK_INTAKE_PARTIAL_AND_REFUND_STAGING_V1 */
.bk-status-FUNDS_PENDING{background:#fff3cf;color:#805b00}.bk-arrivals{border:1px solid #dbe4eb;border-radius:12px;padding:14px;margin:16px 0;background:#fbfcfd}.bk-arrivals h4{margin-top:0}.bk-arrivals .bk-table th{font-weight:600}.bk-arrivals .bk-table td{font-variant-numeric:tabular-nums}.bk-arrivals p{margin-bottom:0}#bkRefundNet{display:block;line-height:1.6;font-variant-numeric:tabular-nums}.bk-modal-card input[readonly]{background:#f1f5f9;color:#64748b}.bk-form details .bk-help{font-weight:400}@media(max-width:650px){.bk-modal-card{padding:16px}.bk-arrivals{padding:10px}.bk-table th,.bk-table td{padding:10px}}

/* WOOD_BANK_SIMPLE_V2_CUSTOMER_SEARCH */
.bk-form select[name="customer_id"][size]{height:190px;min-height:150px;padding:4px}.bk-form select[name="customer_id"][size] option{padding:9px 10px;border-radius:6px}.bk-form [data-bk-customer-search]{background:#fbfcfd}.bk-form [data-bk-search-status]{margin-top:-8px;font-weight:400}@media(max-width:650px){.bk-form select[name="customer_id"][size]{height:170px}}


/* WOOD_SEMANTIC_UI_V1 — appearance only; login layout and data stay intact. */
:root {
    --wood-cashback-color:#16834b; --wood-cashback-bg:#f1faf5; --wood-cashback-border:#bddfca;
    --wood-advance-color:#16834b; --wood-advance-bg:#f1faf5; --wood-advance-border:#bddfca;
    --wood-debt-color:#b95316; --wood-debt-bg:#fff7f2; --wood-debt-border:#f2d3bf;
    --wood-critical-color:#b42332; --wood-critical-bg:#fff1f2; --wood-critical-border:#efbcc3;
    --wood-warning-color:#865b08; --wood-warning-bg:#fff8e5; --wood-warning-border:#ead59a;
    --wood-ui-radius:14px; --wood-ui-field-radius:10px;
    --wood-ui-brand:#1569e8; --wood-ui-focus:#1569e82e;
    --wood-ui-hover:#edf3fc; --wood-ui-border:#d6dfed;
}
/* Shared badges: same size, outline, fill and typography in every screen. */
.wood-ui-badge,.customer-list-cashback-badge,.wood-payment-cashback-modal-badge {
    display:inline-flex!important;align-items:center;justify-content:center;gap:4px;
    width:auto;min-height:22px;padding:3px 9px!important;border:1px solid transparent;
    border-radius:999px!important;font-size:11px!important;line-height:1.25!important;
    font-weight:700!important;white-space:nowrap;vertical-align:middle;
}
.wood-ui-badge.wood-ui-cashback,.customer-list-cashback-badge,.wood-payment-cashback-modal-badge {
    color:var(--wood-cashback-color)!important;background:var(--wood-cashback-bg)!important;
    border-color:var(--wood-cashback-border)!important;
}
.wood-ui-badge.wood-ui-advance {color:var(--wood-advance-color)!important;background:var(--wood-advance-bg)!important;border-color:var(--wood-advance-border)!important}
.wood-ui-badge.wood-ui-debt {color:var(--wood-debt-color)!important;background:var(--wood-debt-bg)!important;border-color:var(--wood-debt-border)!important}
.wood-ui-badge.wood-ui-critical {color:var(--wood-critical-color)!important;background:var(--wood-critical-bg)!important;border-color:var(--wood-critical-border)!important}
.wood-ui-muted{color:var(--secondary,#7b8799)}
.wood-ui-cashback-box,.customer-cashback-detail,.payment-cashback-profile,.wood-payment-cashback-modal-section {
    border:1px solid var(--wood-cashback-border)!important;border-radius:var(--wood-ui-radius)!important;background:var(--wood-cashback-bg)!important;
}
.customer-cashback-detail>strong,.payment-cashback-profile strong,.wood-ui-cashback-value {color:var(--wood-cashback-color)!important}
/* Explicit semantic selectors. No text guessing, observers or new risk rules. */
.wood-money-debt,.wood-customer-debt-cell,.wood-payment-debt,.customer-list-debt.has-debt,
.customer-detail-debt strong,.customer-picker-debt,.supplier-position-debt strong,
.wood-ui-debt>strong,.wood-card-debt>strong,.sales-registry-status.debt {
    color:var(--wood-debt-color)!important;
}
.wood-money-advance,.wood-customer-advance-cell,.wood-payment-advance,.customer-list-advance.has-advance,
.customer-detail-advance strong,.customer-advance-history-amount,.customer-advance-preview-row strong,
.supplier-position-advance strong,.wood-ui-advance>strong,.wood-card-advance>strong {
    color:var(--wood-advance-color)!important;
}
.customer-detail-debt,.wood-balance-card-debt,.wood-detail-final-debt-v5,.supplier-position-debt,.wood-card-debt,.bk-detail-values>.wood-ui-debt {
    --wood-card-rgb:185,83,22;background-color:var(--wood-debt-bg)!important;border-color:var(--wood-debt-border)!important;
}
.customer-detail-advance,.wood-balance-card-advance,.wood-detail-final-advance-v5,.supplier-position-advance,.wood-card-advance,.bk-detail-values>.wood-ui-advance {
    --wood-card-rgb:22,131,75;background-color:var(--wood-advance-bg)!important;border-color:var(--wood-advance-border)!important;
}
.wood-daily-inactive-alert-row,.wood-ui-critical,.exec-daily-stock-status.critical {
    --wood-card-rgb:180,35,50;color:var(--wood-critical-color)!important;background-color:var(--wood-critical-bg)!important;border-color:var(--wood-critical-border)!important;
}
.page-screen .wood-daily-inactive-table tbody .wood-daily-inactive-alert-row td,
.page-screen .wood-daily-inactive-table tbody .wood-daily-inactive-alert-row td * {
    color:var(--wood-critical-color)!important;background:var(--wood-critical-bg)!important;
}
.page-screen .wood-daily-inactive-table tbody .wood-daily-inactive-alert-row:hover td {background:#ffe4e8!important}
.page-screen #pageDailyInactiveDebtor30d:not(:disabled) {color:var(--wood-critical-color)!important;background:var(--wood-critical-bg)!important;border-color:var(--wood-critical-border)!important}
/* Existing WOOD blue controls; neutral cards get a translucent colour wash. */
:is(.page-screen,#entryApplication) :is(.stat-card,.chart-card,.report-kpi-card,.exec-daily-kpi,.supplier-kpi,.stock-kpi-card,.bk-metric,.bk-card,.card),
.bk-detail-values>div {
    border-radius:var(--wood-ui-radius)!important;
    background-image:linear-gradient(135deg,rgba(var(--wood-card-rgb,21,105,232),.055),transparent 70%);
}
:is(.page-screen,#entryApplication) :is(.stat-card,.chart-card,.report-kpi-card,.exec-daily-kpi,.supplier-kpi,.stock-kpi-card,.bk-metric,.bk-card,.card):hover {
    box-shadow:inset 0 0 0 999px rgba(var(--wood-card-rgb,21,105,232),.025),0 9px 28px #1f375b12;
}
:is(.page-screen,#entryApplication,.modal-backdrop,dialog) :is(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):not([type="hidden"]),select,textarea) {
    border-radius:var(--wood-ui-field-radius)!important;border-color:var(--wood-ui-border);
}
:is(.page-screen,#entryApplication,.modal-backdrop,dialog) :is(input,select,textarea,button):focus-visible {
    outline:3px solid var(--wood-ui-focus)!important;outline-offset:2px;
}
:is(.page-screen,#entryApplication,.modal-backdrop,dialog) :is(input:not(:disabled),select:not(:disabled),textarea:not(:disabled)):hover {border-color:#9eb8df}
:is(.page-screen,#entryApplication,.modal-backdrop,dialog) button:not(.modal-close):not(.icon) {border-radius:var(--wood-ui-field-radius)}
.bk-detail-values>div {padding:12px;border:1px solid var(--wood-ui-border);background-color:#fff}
.bk-detail-values>div>strong {font-variant-numeric:tabular-nums}
.bk-status-COMPLETED {color:var(--wood-advance-color)!important;background:var(--wood-advance-bg)!important}
.bk-status-PARTIAL,.bk-status-RECEIVED,.bk-status-FUNDS_PENDING {color:var(--wood-warning-color)!important;background:var(--wood-warning-bg)!important}
.bk-status-CANCELLED {color:var(--wood-critical-color)!important;background:var(--wood-critical-bg)!important}
/* Search dropdown: one readable row, optional cashback badge on the right. */
#bkCustomerOptions button {display:flex;align-items:center;justify-content:space-between;gap:10px;border:1px solid transparent;border-radius:var(--wood-ui-field-radius);min-height:44px}
#bkCustomerOptions .wood-ui-customer-name {min-width:0;text-align:left;overflow-wrap:anywhere}
#bkCustomerOptions .wood-ui-badge {flex:0 0 auto}
#bkCustomerOptions button:hover,#bkCustomerOptions button:focus-visible {background:var(--wood-ui-hover)!important;outline:none;border-color:#b8cbed}
#bkCustomerOptions button[aria-selected="true"] {background:#eaf2ff!important;border-color:#aec8ef}
#bkCustomerToggle {display:flex;align-items:center;justify-content:space-between;gap:8px;color:var(--text,#162033);text-align:left;min-width:220px}
#bkCustomerToggle .wood-ui-customer-name {min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#bkCustomerToggle .wood-ui-badge {flex:0 0 auto}
#bkCustomerSearch {outline:none}
#bkCustomerPopup {border-color:var(--wood-ui-border);border-radius:var(--wood-ui-radius);box-shadow:0 12px 28px #1f375b24}
/* Staff entry page shares the same semantic palette; its login stays untouched. */
#entryApplication .choice[data-kind="customer_cashback"] {--tile-colour:22,131,75;--tile-edge:var(--wood-cashback-color)}
#entryApplication .choice[data-kind="payment"] {--tile-colour:185,83,22;--tile-edge:var(--wood-debt-color)}
#entryApplication :is(.card,.choice,.expense,.lookup-menu) {border-radius:var(--wood-ui-radius)}
#entryApplication .lookup-option:hover,#entryApplication .lookup-option.is-active {background:var(--wood-ui-hover)}
#entryApplication .badge.EXECUTED {color:var(--wood-advance-color);background:var(--wood-advance-bg)}
@media (max-width:650px) {
    #bkCustomerToggle {min-width:180px;width:100%;max-width:100%}
    #bkCustomerPopup {width:min(340px,calc(100vw - 32px));max-width:calc(100vw - 32px)}
    #bkCustomerOptions button {gap:6px;padding:10px 8px}
    .wood-ui-badge {font-size:10px!important;padding:3px 7px!important}
}
@media(prefers-reduced-motion:reduce) {:is(.page-screen,#entryApplication) * {scroll-behavior:auto!important}}
/* END WOOD_SEMANTIC_UI_V1 */


/* WOOD_OVERLAY_PAGE_HEIGHT_V1
   Login CSS gives body a viewport-sized height. With the existing fixed-body
   scroll lock and overflow:hidden, that clips the application at height-y.
   Let the locked body contain the full page, keeping the existing scroll
   offset, modal geometry, backdrop and close/scroll restoration untouched.
   This selector is more specific than the later login stylesheet's body rule.
*/
html.wood-overlay-scroll-locked body {
    height: auto !important;
    min-height: 100vh;
    min-height: 100dvh;
}
/* WOOD_OVERLAY_PAGE_HEIGHT_V1_END */

/* WOOD_REPORT_DESIGN_STANDARD_V2 — presentation only.
   Use the approved Reports card shape on other summary cards. Reports keeps
   its own existing selectors, tones and geometry without overrides here.
   Financial meanings use existing explicit classes, never text or amounts. */
:root {
    --wood-summary-radius:15px;
    --wood-summary-shadow:0 7px 20px rgba(31,55,91,.045);
}
#appPage :is(.kpi-card,.finance-kpi-card,.stock-kpi-card,.products-kpi-card,
    .supplier-kpi,.warehouses-kpi-card,.settlement-kpi-card,
    .other-expenses-summary-card,.personal-loans-summary-card,.exec-daily-kpi,
    .bk-metric,.customer-detail-debt,.customer-detail-advance),
#appPage :is(.purchase-summary-grid,.sales-registry-summary,.opening-summary-grid)>:is(.report-kpi-card,div,article),
.bk-detail-values>:is(.wood-ui-debt,.wood-ui-advance) {
    border:1px solid rgba(var(--wood-card-rgb,21,105,232),.18)!important;
    border-top:3px solid rgb(var(--wood-card-rgb,21,105,232))!important;
    border-radius:var(--wood-summary-radius)!important;
    background:linear-gradient(180deg,#fff 0%,rgba(var(--wood-card-rgb,21,105,232),.045) 100%),#fff!important;
    box-shadow:var(--wood-summary-shadow);
}
#appPage :is(.kpi-card,.finance-kpi-card,.stock-kpi-card,.products-kpi-card,
    .supplier-kpi,.warehouses-kpi-card,.settlement-kpi-card,
    .other-expenses-summary-card,.personal-loans-summary-card,.exec-daily-kpi,
    .bk-metric,.customer-detail-debt,.customer-detail-advance):hover,
#appPage :is(.purchase-summary-grid,.sales-registry-summary,.opening-summary-grid)>:is(.report-kpi-card,div,article):hover {
    box-shadow:inset 0 0 0 999px rgba(var(--wood-card-rgb,21,105,232),.02),var(--wood-summary-shadow);
}
/* Existing stable card positions: account/category colours, not new states. */
#appPage :is(.kpi-card.green,.finance-kpi-card.cash,.finance-kpi-card.seller-cash),
#appPage .bk-balances>.bk-metric:nth-child(1) {--wood-card-rgb:36,173,106}
#appPage :is(.kpi-card.orange,.finance-kpi-card.total) {--wood-card-rgb:255,122,41}
#appPage :is(.finance-kpi-card.card),
#appPage :is(.stock-kpi-card,.products-kpi-card,.warehouses-kpi-card):nth-child(3) {--wood-card-rgb:121,103,233}
#appPage .finance-kpi-card.vat,
#appPage .bk-balances>.bk-metric:nth-child(3),
#appPage :is(.stock-kpi-card,.products-kpi-card,.warehouses-kpi-card):nth-child(2) {--wood-card-rgb:28,166,174}
#appPage :is(.supplier-kpi,.settlement-kpi-card,.other-expenses-summary-card,.personal-loans-summary-card):nth-child(2),
#appPage .purchase-summary-grid>.report-kpi-card:nth-child(2) {--wood-card-rgb:36,173,106}
#appPage :is(.supplier-kpi,.settlement-kpi-card,.other-expenses-summary-card,.personal-loans-summary-card):nth-child(3),
#appPage .purchase-summary-grid>.report-kpi-card:nth-child(3) {--wood-card-rgb:255,122,41}
#appPage :is(.supplier-kpi,.settlement-kpi-card,.other-expenses-summary-card,.personal-loans-summary-card):nth-child(4),
#appPage .purchase-summary-grid>.report-kpi-card:nth-child(4) {--wood-card-rgb:121,103,233}
/* Semantic state wins over a category's position. Values/flags are untouched. */
#appPage :is(.wood-card-advance,.customer-detail-advance,.wood-balance-card-advance,.supplier-position-advance,.bk-profit),
.bk-detail-values>.wood-ui-advance {--wood-card-rgb:22,131,75}
#appPage :is(.wood-card-debt,.customer-detail-debt,.wood-balance-card-debt,.supplier-position-debt),
.bk-detail-values>.wood-ui-debt {--wood-card-rgb:185,83,22}
#appPage :is(.wood-ui-critical,.exec-daily-stock-status.critical) {--wood-card-rgb:180,35,50}
#appPage .bk-metric>span {
    color:#687589;font-size:13px;font-weight:650;line-height:1.35;
}
#appPage .bk-metric>strong {font-variant-numeric:tabular-nums;line-height:1.2}
/* A tall locked body now retains the page. Its sticky desktop sidebar must
   stay at the same viewport origin instead of following the negative body
   offset. Mobile uses its existing fixed drawer and is intentionally excluded.
   Neither the modal stack nor the existing close/scroll owner is changed. */
@media(min-width:769px) {
    html.wood-overlay-scroll-locked #appPage>.sidebar {
        top:calc(0px - var(--wood-overlay-scroll-top,0px))!important;
    }
}
/* END WOOD_REPORT_DESIGN_STANDARD_V2 */

/* WOOD_AUDIT_PAGINATION_V1: same palette and controls as the other WOOD pages. */
#auditScreen .audit-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px 20px;
    padding: 16px 20px;
    border-top: 1px solid var(--border);
    background: #fafbfd;
}
#auditScreen .audit-pagination.hidden,
#auditScreen .audit-pagination-controls.hidden { display: none; }
#auditScreen #auditPageInfo {
    min-width: 0;
    margin: 0;
    text-align: left;
    color: var(--secondary);
    font-size: 12px;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
#auditScreen .audit-pagination-controls,
#auditScreen .audit-page-numbers {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 0;
}
#auditScreen .audit-pagination-controls { gap: 8px; margin-left: auto; }
#auditScreen .audit-page-btn,
#auditScreen #auditPrevPage,
#auditScreen #auditNextPage {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    box-sizing: border-box;
    height: 36px;
    min-height: 36px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fff;
    color: #475569;
    font: inherit;
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
    box-shadow: none;
    transform: none;
    cursor: pointer;
    transition: background-color .15s, border-color .15s, color .15s;
}
#auditScreen .audit-page-btn {
    width: 36px;
    min-width: 36px;
    padding: 0 5px;
    font-variant-numeric: tabular-nums;
}
#auditScreen #auditPrevPage,
#auditScreen #auditNextPage { gap: 5px; padding: 0 11px; white-space: nowrap; }
#auditScreen .audit-pagination-controls svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}
#auditScreen .audit-page-btn:hover:not(.active),
#auditScreen #auditPrevPage:hover:not(:disabled),
#auditScreen #auditNextPage:hover:not(:disabled) {
    border-color: #c9daf5;
    background: var(--blue-soft);
    color: var(--blue);
    transform: none;
    box-shadow: none;
}
#auditScreen .audit-page-btn.active {
    border-color: var(--blue);
    background: var(--blue);
    color: #fff;
}
#auditScreen .audit-pagination-controls button:focus-visible {
    outline: 2px solid var(--blue);
    outline-offset: 3px;
}
#auditScreen .audit-pagination-controls button:disabled {
    opacity: .4;
    cursor: default;
    background: #fff;
    color: var(--secondary);
}
#auditScreen .audit-page-gap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 18px;
    width: 18px;
    height: 36px;
    color: var(--secondary);
    font-size: 13px;
    user-select: none;
}
@media (max-width: 700px) {
    #auditScreen .audit-pagination { gap: 12px; padding: 14px; }
    #auditScreen #auditPageInfo { width: 100%; }
    #auditScreen .audit-pagination-controls { margin-left: 0; width: 100%; }
}
@media (max-width: 560px) {
    #auditScreen .audit-pagination-controls {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-template-areas: "numbers numbers" "prev next";
        gap: 10px;
    }
    #auditScreen #auditPageNumbers { grid-area: numbers; gap: 4px; }
    #auditScreen #auditPrevPage { grid-area: prev; }
    #auditScreen #auditNextPage { grid-area: next; }
    #auditScreen .audit-page-btn { width: 30px; min-width: 30px; height: 34px; min-height: 34px; }
    #auditScreen .audit-page-gap { flex-basis: 14px; width: 14px; height: 34px; }
}


/* WOOD_DAILY_DEBT_AGING_V1: inactivity is amber; old unpaid sources are red. */
#dailyReportScreen #pageDailyInactiveDebtor30d {
    color: var(--wood-debt-color) !important; background: var(--wood-debt-bg) !important; border-color: var(--wood-debt-border) !important;
}
#dailyReportScreen #pageDailyAgedDebtor30d {
    color: var(--wood-critical-color, #b91c1c) !important;
    background: var(--wood-critical-bg, #fee2e2) !important;
    border-color: var(--wood-critical-border, #fca5a5) !important;
    cursor: pointer;
}
#woodUniversalDetailBody .wood-daily-inactive-table tbody .wood-daily-debtor-warning-row td,
#woodUniversalDetailBody .wood-daily-inactive-table tbody .wood-daily-debtor-warning-row td * {
    background: var(--wood-debt-bg) !important; color: var(--wood-debt-color) !important;
}
#woodUniversalDetailBody .wood-daily-inactive-table tbody .wood-daily-debtor-critical-row td,
#woodUniversalDetailBody .wood-daily-inactive-table tbody .wood-daily-debtor-critical-row td * {
    background: #d83c3c !important; color: #ffffff !important;
}
.wood-daily-inactive-table tr:focus-visible { outline: 3px solid #2563eb; outline-offset: 2px; }
.wood-daily-aged-table { min-width: 960px; }
.wood-daily-aged-table td:nth-child(2), .wood-daily-aged-table td:nth-child(3), .wood-daily-aged-table td:nth-child(4) { white-space: nowrap; }
.wood-debt-aging-date-note { display: block; margin-top: 4px; font-size: 11px; line-height: 1.4; max-width: 250px; white-space: normal; }


/* WOOD_DAILY_DEBT_REVIEW_V2: only debt list dialogs use the full viewport. */
#woodUniversalDetailModal:has(.wood-daily-debt-list-view) {
    padding: 16px;
}
#woodUniversalDetailModal:has(.wood-daily-debt-list-view) .wood-universal-detail-panel {
    width: 100% !important;
    max-width: none !important;
    max-height: calc(100vh - 32px) !important;
    max-height: calc(100dvh - 32px) !important;
}
#woodUniversalDetailModal:has(.wood-daily-debt-list-view) .wood-universal-detail-body {
    padding: 16px;
    overflow-x: hidden;
}
#woodUniversalDetailBody .wood-daily-debt-list-view .wood-daily-inactive-table {
    width: 100%; min-width: 0 !important; table-layout: fixed;
}
#woodUniversalDetailBody .wood-daily-debt-list-view th,
#woodUniversalDetailBody .wood-daily-debt-list-view td {
    box-sizing: border-box; padding: 10px; white-space: normal !important; overflow-wrap: anywhere;
}
#woodUniversalDetailBody .wood-daily-aged-table { font-size: 13px; }
#woodUniversalDetailBody .wood-daily-aged-table th:nth-child(1) { width: 20%; }
#woodUniversalDetailBody .wood-daily-aged-table th:nth-child(2),
#woodUniversalDetailBody .wood-daily-aged-table th:nth-child(3) { width: 13%; }
#woodUniversalDetailBody .wood-daily-aged-table th:nth-child(4) { width: 12%; }
#woodUniversalDetailBody .wood-daily-aged-table th:nth-child(5),
#woodUniversalDetailBody .wood-daily-aged-table th:nth-child(7) { width: 17%; }
#woodUniversalDetailBody .wood-daily-aged-table th:nth-child(6) { width: 8%; }
@media (max-width: 760px) {
    #woodUniversalDetailModal:has(.wood-daily-debt-list-view) { padding: 8px; }
    #woodUniversalDetailModal:has(.wood-daily-debt-list-view) .wood-universal-detail-panel {
        max-height: calc(100dvh - 16px) !important;
    }
    #woodUniversalDetailBody .wood-daily-aged-table thead { display: none; }
    #woodUniversalDetailBody .wood-daily-aged-table tbody { display: block; }
    #woodUniversalDetailBody .wood-daily-aged-table tr { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); margin-bottom: 10px; }
    #woodUniversalDetailBody .wood-daily-aged-table td { display: block; min-width: 0; border-radius: 0; }
    #woodUniversalDetailBody .wood-daily-aged-table td:first-child { grid-column: 1 / -1; }
    #woodUniversalDetailBody .wood-daily-aged-table td::before {
        content: attr(data-label); display: block; font-size: 10px; font-weight: 500; margin-bottom: 4px;
    }
}

/* WOOD_DAILY_REPEAT_DEBT_V3: make room for the evidence purchase column. */
#woodUniversalDetailBody .wood-daily-aged-table th:nth-child(1) { width: 18%; }
#woodUniversalDetailBody .wood-daily-aged-table th:nth-child(2),
#woodUniversalDetailBody .wood-daily-aged-table th:nth-child(3) { width: 12%; }
#woodUniversalDetailBody .wood-daily-aged-table th:nth-child(4) { width: 10%; }
#woodUniversalDetailBody .wood-daily-aged-table th:nth-child(5) { width: 13%; }
#woodUniversalDetailBody .wood-daily-aged-table th:nth-child(6) { width: 6%; }
#woodUniversalDetailBody .wood-daily-aged-table th:nth-child(7) { width: 11%; }
#woodUniversalDetailBody .wood-daily-aged-table th:nth-child(8) { width: 18%; }

/* WOOD_DAILY_SALES_CLICK_V1: preserve the existing blue count pill. */
#dailyReportScreen #pageDailySalesCount {
    appearance: none; border: 1px solid transparent; font-family: inherit;
    cursor: pointer;
}
#dailyReportScreen #pageDailySalesCount:not(:disabled):hover { background: #dcecff; border-color: #bed8fa; }
#dailyReportScreen #pageDailySalesCount:focus-visible { outline: 3px solid #2563eb; outline-offset: 3px; }
#dailyReportScreen #pageDailySalesCount:disabled { cursor: default; opacity: .62; }
#woodUniversalDetailModal:has(.wood-daily-sales-list-view) { padding: 16px; }
#woodUniversalDetailModal:has(.wood-daily-sales-list-view) .wood-universal-detail-panel {
    width: 100%; max-width: 1280px; max-height: calc(100dvh - 32px);
}
.wood-daily-sales-list-view .wood-daily-sales-note { margin: 0 0 12px; color: #64748b; line-height: 1.5; }
.wood-daily-sales-table { width: 100%; min-width: 680px; }
.wood-daily-sales-table th, .wood-daily-sales-table td { padding: 12px; }
.wood-daily-sales-table td:nth-child(3), .wood-daily-sales-table td:nth-child(4) { white-space: nowrap; }
.wood-daily-sales-table small { display: block; font-size: 11px; color: #64748b; margin-top: 4px; }
.wood-daily-sales-detail {
    border: 1px solid #bed8fa; border-radius: 8px; padding: 7px 12px;
    background: #eaf3ff; color: #1974dd; font: inherit; cursor: pointer;
}
.wood-daily-sales-detail:focus-visible { outline: 3px solid #2563eb; outline-offset: 2px; }
@media (max-width: 760px) {
    #woodUniversalDetailModal:has(.wood-daily-sales-list-view) { padding: 8px; }
    #woodUniversalDetailModal:has(.wood-daily-sales-list-view) .wood-universal-detail-panel { max-height: calc(100dvh - 16px); }
    .wood-daily-sales-table { min-width: 0; }
    .wood-daily-sales-table thead { display: none; }
    .wood-daily-sales-table tbody { display: block; }
    .wood-daily-sales-table tr { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); margin-bottom: 12px; }
    .wood-daily-sales-table td { display: block; min-width: 0; white-space: normal !important; overflow-wrap: anywhere; }
    .wood-daily-sales-table td:nth-child(2) { grid-column: 1 / -1; }
    .wood-daily-sales-table td::before { content: attr(data-label); display: block; color: #64748b; font-size: 11px; margin-bottom: 4px; }
}

/* WOOD_CUSTOMER_OPERATION_BALANCE_20261128_V1 */
.wood-operation-position {margin:20px 0;padding:20px;border:1px solid #dce6f3;border-radius:18px;background:#f7faff;}
.wood-operation-position h3 {margin:0 0 8px;font-size:18px;}
.wood-operation-position p {margin:8px 0;color:#687b94;}
.wood-operation-position-grid {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;}
.wood-operation-position-grid article {padding:14px;background:white;border:1px solid #e1e8f2;border-radius:12px;}
.wood-operation-position-grid span,.wood-operation-position-grid strong {display:block;}
.wood-operation-position-grid strong {font-size:21px;margin-top:6px;}
.wood-operation-position-debt {color:var(--debt-color,#c59112);}
.wood-operation-position-advance {color:#087e69;}
.wood-bank-balance-card {border-top:3px solid #2478d8;}
#dailyReportScreen .exec-daily-cashbox .exec-daily-grid.three {grid-template-columns:repeat(2,minmax(0,1fr));}
@media(max-width:600px){.wood-operation-position-grid,#dailyReportScreen .exec-daily-cashbox .exec-daily-grid.three{grid-template-columns:1fr;}}
/* WOOD_CUSTOMER_ACCOUNT_TABLE_20261128_V1 */
.wood-statement-button {grid-column:1/-1;width:100%;padding:15px 20px;border:1px solid #cbdcf1;border-radius:14px;color:var(--blue);background:#f4f8ff;font-weight:700;cursor:pointer;}
.wood-statement-button:hover {background:#eaf2ff;}
body.wood-statement-open {overflow:hidden;}
.wood-statement-overlay {z-index:11000;padding:16px;display:flex;align-items:center;justify-content:center;background:rgba(21,33,52,.48);}
.wood-statement-overlay .wood-statement-card {width:min(1880px,98vw);max-width:none;max-height:95vh;padding:0;border-radius:24px;display:flex;flex-direction:column;overflow:hidden;background:var(--surface,#fff);box-shadow:0 24px 80px #12274833;}
.wood-statement-head {padding:24px 28px 18px;display:flex;justify-content:space-between;gap:20px;border-bottom:1px solid var(--border);}
.wood-statement-eyebrow {font-size:12px;letter-spacing:.1em;color:var(--secondary);font-weight:800;}
.wood-statement-head h2 {margin:8px 0;font-size:26px;color:var(--text);}
.wood-statement-head p {margin:0;font-size:14px;color:var(--secondary);}
.wood-statement-tools {padding:16px 28px 10px;display:flex;gap:16px;align-items:end;}
.wood-statement-tools label {display:grid;gap:7px;flex:1;font-size:13px;color:var(--secondary);}
.wood-statement-tools input {width:100%;min-width:0;padding:11px 14px;border:1px solid var(--border);border-radius:11px;background:#f9fbfe;color:var(--text);}
.wood-statement-tools button {padding:11px 20px;border:1px solid var(--border);border-radius:11px;cursor:pointer;}
.wood-statement-summary {display:flex;gap:26px;align-items:center;padding:10px 28px 16px;flex-wrap:wrap;}
.wood-statement-summary article {display:grid;gap:5px;}.wood-statement-summary article span {font-size:12px;color:var(--secondary);}.wood-statement-summary article strong {font-size:21px;}
.wood-statement-summary p {margin:0 0 0 auto;font-size:12px;color:var(--secondary);}
.wood-statement-debt {color:#b9510a;}.wood-statement-advance {color:#118556;}
.wood-statement-error {margin:0 28px 12px;padding:12px;border-radius:10px;background:#fff1e8;color:#aa3d0a;}
.wood-statement-scroll {margin:0 28px;overflow:auto;min-height:100px;max-height:65vh;border:1px solid var(--border);border-radius:14px;}
.wood-statement-table {width:100%;min-width:1330px;border-collapse:separate;border-spacing:0;font-size:13px;line-height:1.5;}
.wood-statement-table th {position:sticky;top:0;z-index:1;text-align:left;background:#f3f7fc;color:#637590;font-weight:700;padding:13px 12px;border-bottom:1px solid var(--border);white-space:nowrap;}
.wood-statement-table td {padding:12px;border-bottom:1px solid #edf1f7;vertical-align:top;}
.wood-statement-table tbody tr:last-child td {border-bottom:0;}.wood-statement-table tbody tr:hover {background:#f8fbff;}
.wood-statement-table .wood-statement-opening {background:#fff8e9;}
.wood-statement-operation {font-weight:700;min-width:155px;}.wood-statement-notes {min-width:230px;max-width:350px;overflow-wrap:anywhere;color:#64738b;}
.wood-statement-money {font-variant-numeric:tabular-nums;text-align:right;white-space:nowrap;}
.wood-statement-detail {border:1px solid #d6e4f5;border-radius:8px;background:#f2f7ff;padding:5px 9px;color:var(--blue);white-space:nowrap;cursor:pointer;}
.wood-statement-footer {display:flex;justify-content:space-between;gap:15px;flex-wrap:wrap;padding:15px 28px;font-size:12px;color:var(--secondary);}
.wood-statement-empty {padding:35px!important;text-align:center;color:var(--secondary);}
@media(max-width:680px){.wood-statement-overlay{padding:6px;}.wood-statement-overlay .wood-statement-card{max-height:98vh;border-radius:16px;width:99vw;}.wood-statement-head{padding:18px 16px;}.wood-statement-head h2{font-size:21px;}.wood-statement-tools{padding:12px 16px;}.wood-statement-summary{padding:6px 16px 12px;gap:16px;}.wood-statement-summary p{width:100%;margin:0;}.wood-statement-scroll{margin:0 12px;}.wood-statement-footer{padding:12px 16px;}.wood-statement-error{margin:0 16px 10px;}}
