:root{--erp-bg:#fbf9f5;--erp-primary:#2d926d;--erp-text:#342f22}html,body,button,input,select,textarea,.tooltip,.popover{font-family:"Hind Siliguri",sans-serif!important}body{min-height:100vh;background:var(--erp-bg);color:var(--erp-text);font-size:1rem;line-height:1.65}.navbar-brand{font-size:1.35rem}.nav-link,.dropdown-item,.btn{font-weight:500}.role-label{color:rgba(255,255,255,.7);font-size:.82rem}.login-card{border-radius:1.25rem}.brand-mark{width:64px;height:64px;margin:0 auto;display:grid;place-items:center;border-radius:18px;background:var(--erp-primary);color:#fff;font-size:2rem;font-weight:700;box-shadow:0 12px 28px rgba(45, 146, 109,.25)}.form-control,.form-select,.btn{border-radius:.75rem}.form-control,.form-select{min-height:46px}.dashboard-card{border-radius:1rem;transition:transform .2s ease,box-shadow .2s ease}.dashboard-card:hover{transform:translateY(-2px);box-shadow:0 .75rem 1.5rem rgba(52, 47, 34,.08)!important}.catalog-count{min-width:48px;height:48px;display:inline-grid;place-items:center;padding:0 .75rem;border-radius:14px;background:rgba(45, 146, 109,.1);color:var(--erp-primary);font-size:1.25rem;font-weight:700}.color-dot{display:inline-block;width:17px;height:17px;margin-right:.35rem;border:1px solid #dfdacd;border-radius:50%;vertical-align:-3px}.error-page{padding:5rem 1rem}.table>:not(caption)>*>*{padding:1rem}.table th{white-space:nowrap;font-weight:600}.card-header{border-bottom-color:#f5f3ed}.detail-list dt,.detail-list dd{padding-top:.55rem;padding-bottom:.55rem;margin-bottom:0;border-bottom:1px solid #f5f3ee}.detail-list dt:last-of-type,.detail-list dd:last-of-type{border-bottom:0}.page-link{min-width:42px;text-align:center}@media(max-width:575.98px){body{font-size:.96rem}.detail-list dt{padding-bottom:.1rem;border-bottom:0}.detail-list dd{padding-top:0}.table>:not(caption)>*>*{padding:.8rem}}


.assignment-summary {
    padding: 1.1rem 1.25rem;
    border: 1px solid #f2efe6;
    border-radius: 1rem;
    background: #fdfcfa;
}

.price-pill {
    display: inline-block;
    min-width: 110px;
    padding: 0.45rem 0.75rem;
    border-radius: 999px;
    background: rgba(45, 146, 109, 0.10);
    color: #287a5c;
    font-weight: 700;
    text-align: center;
}


.purchase-summary-card {
    background: linear-gradient(145deg, #ffffff, #fcfaf5);
}

.preserve-lines {
    white-space: pre-line;
}

#orderItemsTable tbody tr {
    transition: background-color 0.15s ease;
}

#orderItemsTable tbody tr:hover {
    background-color: #fefdfb;
}

@media print {
    @page {
        size: A4;
        margin: 12mm;
    }

    body {
        background: #ffffff !important;
        font-size: 12pt;
    }

    .no-print,
    nav,
    footer {
        display: none !important;
    }

    main.container {
        max-width: none !important;
        width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    .card {
        box-shadow: none !important;
        border: 1px solid #e5e1d7 !important;
        break-inside: avoid;
    }

    .table {
        font-size: 10pt;
    }

    .order-print-area {
        color: #000000;
    }
}

.finance-card {
    background: linear-gradient(145deg, #ffffff, #fdfcfa);
}

.milestone-line {
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 680px;
    margin-inline: auto;
}

.milestone-node {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    flex: 0 0 44px;
    border-radius: 50%;
    border: 3px solid #dfdacd;
    background: #ffffff;
    font-weight: 700;
    color: #8b8164;
}

.milestone-node.done {
    background: #198754;
    border-color: #198754;
    color: #ffffff;
}

.milestone-connector {
    height: 4px;
    flex: 1;
    max-width: 220px;
    background: #dfdacd;
}

.milestone-connector.done {
    background: #198754;
}

.milestone-card {
    border: 1px solid #f1ede3;
    border-radius: 1rem;
}

.milestone-card.milestone-complete {
    border-color: rgba(25, 135, 84, 0.35);
    background: rgba(25, 135, 84, 0.035);
}

.payment-order-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    padding: 1rem 1.25rem;
    border: 1px solid #f2efe5;
    border-radius: 1rem;
    background: #fdfcfa;
}

.payment-order-summary div {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

@media (max-width: 767.98px) {
    .payment-order-summary {
        grid-template-columns: 1fr;
        gap: 0.45rem;
    }
}


.sales-card-accent {
    background: linear-gradient(145deg, #ffffff, #f0fff7);
}
@media print {
    .no-print, nav, footer { display: none !important; }
    main.container-fluid { padding: 0 !important; }
    .card { box-shadow: none !important; border: 1px solid #ddd !important; }
}

/* ==============================================================
   PART 8 — PERSONAL FINANCE UI
   ============================================================== */

.personal-nav-link {
    color: #f8d77b !important;
    font-weight: 600;
}

.personal-subnav {
    display: flex;
    gap: .55rem;
    padding: .55rem;
    overflow-x: auto;
    border: 1px solid #f0ede6;
    border-radius: 1rem;
    background: rgba(255, 255, 255, .92);
    box-shadow: 0 .35rem 1rem rgba(52, 47, 34, .045);
    scrollbar-width: thin;
}

.personal-subnav a {
    flex: 0 0 auto;
    padding: .65rem 1rem;
    border-radius: .75rem;
    color: #756e59;
    font-weight: 600;
    text-decoration: none;
    transition: .18s ease;
}

.personal-subnav a:hover {
    color: #256a51;
    background: #fcfaf4;
}

.personal-subnav a.active {
    color: #fff;
    background: linear-gradient(135deg, #2f8163, #23634c);
    box-shadow: 0 .4rem .9rem rgba(47, 129, 99, .22);
}

.personal-eyebrow {
    display: inline-block;
    margin-bottom: .45rem;
    color: #338466;
    font-size: .76rem;
    font-weight: 700;
    letter-spacing: .13em;
}

.page-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.page-heading h1 {
    margin: 0 0 .35rem;
    font-size: clamp(1.75rem, 2.7vw, 2.45rem);
    font-weight: 700;
}

.page-heading p {
    max-width: 760px;
    margin: 0;
    color: #877f68;
}

.personal-hero {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(300px, .65fr);
    gap: 2rem;
    align-items: center;
    padding: clamp(1.7rem, 4vw, 3.2rem);
    overflow: hidden;
    border-radius: 1.6rem;
    color: #fff;
    background:
        radial-gradient(circle at 85% 20%, rgba(255,255,255,.18), transparent 28%),
        linear-gradient(135deg, #15382b 0%, #246950 55%, #2e936e 100%);
    box-shadow: 0 1.2rem 2.7rem rgba(31, 98, 73, .22);
}

.personal-hero::after {
    content: "";
    position: absolute;
    right: -90px;
    bottom: -120px;
    width: 300px;
    height: 300px;
    border: 55px solid rgba(255, 255, 255, .07);
    border-radius: 50%;
}

.personal-hero .personal-eyebrow {
    color: #6bdcb3;
}

.personal-hero h1 {
    position: relative;
    z-index: 1;
    max-width: 710px;
    margin-bottom: .7rem;
    font-size: clamp(2rem, 4vw, 3.35rem);
    font-weight: 700;
    line-height: 1.13;
}

.personal-hero p {
    position: relative;
    z-index: 1;
    max-width: 700px;
    margin: 0;
    color: rgba(255, 255, 255, .78);
    font-size: 1.03rem;
}

.net-worth-panel {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    padding: 1.4rem;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 1.25rem;
    background: rgba(255, 255, 255, .12);
    backdrop-filter: blur(12px);
}

.net-worth-panel span {
    color: rgba(255, 255, 255, .72);
}

.net-worth-panel strong {
    margin: .3rem 0;
    color: #fff;
    font-size: clamp(2rem, 4vw, 3.25rem);
    line-height: 1.1;
}

.net-worth-panel small {
    color: rgba(255, 255, 255, .72);
}

.quick-action-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: .85rem;
}

.quick-action-grid a {
    display: flex;
    flex-direction: column;
    min-height: 92px;
    padding: 1rem;
    border: 1px solid #f1eee4;
    border-radius: 1rem;
    color: #453e2c;
    text-decoration: none;
    background: #fff;
    box-shadow: 0 .35rem 1rem rgba(52, 47, 34, .04);
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.quick-action-grid a:hover {
    transform: translateY(-3px);
    border-color: #63daae;
    box-shadow: 0 .75rem 1.5rem rgba(31, 96, 72, .10);
}

.quick-action-grid span {
    color: #968d75;
    font-size: .78rem;
}

.quick-action-grid strong {
    margin-top: auto;
    font-size: 1rem;
}

.metric-card {
    height: 100%;
    padding: 1.25rem;
    border: 1px solid #f3f0e9;
    border-radius: 1.15rem;
    background: #fff;
    box-shadow: 0 .45rem 1.15rem rgba(52, 47, 34, .05);
}

.metric-card span,
.metric-card small {
    display: block;
    color: #958c74;
}

.metric-card strong {
    display: block;
    margin: .35rem 0;
    font-size: clamp(1.45rem, 2.6vw, 2.15rem);
    line-height: 1.15;
}

.metric-income {
    background: linear-gradient(145deg, #fff, #effcf5);
    border-color: #d8f3e4;
}

.metric-expense {
    background: linear-gradient(145deg, #fff, #fff3f3);
    border-color: #f5dddd;
}

.metric-saving {
    background: linear-gradient(145deg, #fff, #fff9e9);
    border-color: #f4e8bd;
}

.metric-balance {
    background: linear-gradient(145deg, #fff, #fcfaf4);
    border-color: #f7f2e4;
}

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

.account-tile {
    display: block;
    padding: 1.15rem;
    border: 1px solid #f2eee3;
    border-radius: 1rem;
    color: #3e3827;
    text-decoration: none;
    background: linear-gradient(145deg, #fff, #fefdfb);
    transition: .18s ease;
}

.account-tile:hover {
    transform: translateY(-2px);
    border-color: #5fd9ad;
    box-shadow: 0 .65rem 1.25rem rgba(39, 109, 84, .08);
}

.account-tile-top {
    display: flex;
    justify-content: space-between;
    gap: .75rem;
    align-items: center;
}

.account-tile h3 {
    margin: 1rem 0 .1rem;
    font-size: 1.08rem;
}

.account-tile > strong {
    font-size: 1.55rem;
}

.account-type-chip {
    display: inline-flex;
    align-items: center;
    min-height: 29px;
    padding: .25rem .65rem;
    border-radius: 999px;
    color: #2c745a;
    background: #fbf8f1;
    font-size: .78rem;
    font-weight: 600;
}

.worth-row,
.worth-total {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: .64rem 0;
}

.worth-row {
    border-bottom: 1px dashed #f0ede6;
}

.worth-row.liability strong {
    color: #c8424b;
}

.worth-total {
    margin-top: .5rem;
    padding: 1rem;
    border-radius: .85rem;
    color: #fff;
    background: linear-gradient(135deg, #246950, #308e6c);
    font-size: 1.05rem;
}

.worth-total strong {
    font-size: 1.25rem;
}

.due-alert {
    display: flex;
    justify-content: space-between;
    gap: .8rem;
    padding: .85rem 0;
    border-bottom: 1px solid #f5f3ed;
    color: #453e2c;
    text-decoration: none;
}

.due-alert:last-child {
    border-bottom: 0;
}

.due-alert div {
    display: flex;
    flex-direction: column;
}

.due-alert small {
    color: #98907b;
}

.due-alert > span {
    color: #c43f47;
    font-weight: 700;
}

.empty-state {
    padding: 3rem 1.5rem;
    border-radius: 1rem;
    text-align: center;
    color: #8a8169;
    background: #fefdfa;
}

.empty-state h3 {
    color: #49422f;
    font-size: 1.2rem;
}

.empty-state.compact {
    padding: 2rem 1rem;
}

.account-card,
.investment-card,
.asset-card {
    border-radius: 1.15rem;
    transition: transform .18s ease, box-shadow .18s ease;
}

.account-card:hover,
.investment-card:hover,
.asset-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 1rem 2rem rgba(52, 47, 34, .09) !important;
}

.account-balance,
.investment-value {
    font-size: clamp(1.7rem, 3vw, 2.35rem);
    font-weight: 700;
}

.account-detail-hero,
.due-detail-hero,
.loan-detail-hero {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    padding: 1.8rem;
    border-radius: 1.3rem;
    color: #fff;
    background: linear-gradient(135deg, #15382b, #318667);
    box-shadow: 0 .9rem 2rem rgba(33, 96, 73, .17);
}

.account-detail-hero h1,
.due-detail-hero h1,
.loan-detail-hero h1 {
    margin: .55rem 0 .2rem;
    font-weight: 700;
}

.account-detail-hero p,
.due-detail-hero p,
.loan-detail-hero p {
    margin: 0;
    color: rgba(255,255,255,.73);
}

.account-detail-hero > div:last-child,
.due-detail-hero > div:last-child,
.loan-detail-hero > div:last-child {
    display: flex;
    flex-direction: column;
}

.account-detail-hero > div:last-child > strong,
.due-detail-hero > div:last-child > strong,
.loan-detail-hero > div:last-child > strong {
    color: #fff;
    font-size: clamp(2rem, 4vw, 3rem);
}

.due-detail-hero.receivable,
.loan-detail-hero.given {
    background: linear-gradient(135deg, #124d3a, #1c8a63);
}

.due-detail-hero.payable,
.loan-detail-hero.taken {
    background: linear-gradient(135deg, #6b2330, #c44755);
}

.transaction-type-badge {
    display: inline-block;
    padding: .32rem .65rem;
    border-radius: 999px;
    color: #544c35;
    background: #f5f3ee;
    font-size: .78rem;
    font-weight: 600;
    white-space: nowrap;
}

.type-income,
.type-receivable_collection,
.type-loan_received,
.type-loan_collection,
.type-adjustment_in {
    color: #15734c;
    background: #e9f8f0;
}

.type-expense,
.type-payable_payment,
.type-loan_repayment,
.type-loan_given,
.type-investment_purchase,
.type-asset_purchase,
.type-adjustment_out {
    color: #a3343d;
    background: #fff0f1;
}

.type-transfer {
    color: #2b7258;
    background: #fbf8f1;
}

.transfer-visual {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 1rem;
    align-items: center;
    text-align: center;
}

.transfer-visual div {
    padding: 1rem;
    border-radius: .9rem;
    color: #2b6a53;
    background: #fbf8f1;
    font-weight: 700;
}

.transfer-visual span {
    color: #9a927c;
    font-size: 1.7rem;
}

.void-summary {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 1rem;
    align-items: center;
    padding: 1rem;
    border-radius: .9rem;
    background: #fff3f3;
}

.profit-chip {
    display: inline-flex;
    margin-top: .7rem;
    padding: .28rem .65rem;
    border-radius: 999px;
    font-weight: 700;
    font-size: .85rem;
}

.profit-chip.positive {
    color: #14744c;
    background: #e9f8ef;
}

.profit-chip.negative {
    color: #af3740;
    background: #fff0f1;
}

.personal-sticky {
    top: 90px;
}

.personal-dashboard-callout {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(320px, .8fr);
    gap: 2rem;
    align-items: center;
    padding: 1.75rem;
    border-radius: 1.25rem;
    color: #fff;
    background:
        radial-gradient(circle at 85% 10%, rgba(255,255,255,.15), transparent 26%),
        linear-gradient(135deg, #1c4e3c, #328969);
    box-shadow: 0 .9rem 2rem rgba(34, 100, 76, .17);
}

.personal-dashboard-callout .personal-eyebrow {
    color: #6dddb4;
}

.personal-dashboard-callout h2 {
    margin-bottom: .35rem;
}

.personal-dashboard-callout p {
    margin: 0;
    color: rgba(255,255,255,.75);
}

.personal-callout-numbers {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .75rem;
}

.personal-callout-numbers div {
    padding: .85rem;
    border: 1px solid rgba(255,255,255,.16);
    border-radius: .9rem;
    background: rgba(255,255,255,.10);
}

.personal-callout-numbers span,
.personal-callout-numbers strong {
    display: block;
}

.personal-callout-numbers span {
    color: rgba(255,255,255,.68);
    font-size: .8rem;
}

.personal-callout-numbers strong {
    font-size: 1.25rem;
}

.personal-callout-numbers .btn {
    grid-column: 1 / -1;
}

@media (max-width: 1199.98px) {
    .quick-action-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .personal-dashboard-callout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 991.98px) {
    .personal-hero {
        grid-template-columns: 1fr;
    }

    .page-heading,
    .account-detail-hero,
    .due-detail-hero,
    .loan-detail-hero {
        flex-direction: column;
        align-items: stretch;
    }

    .account-detail-hero .text-lg-end,
    .due-detail-hero .text-lg-end,
    .loan-detail-hero .text-lg-end {
        text-align: left !important;
    }
}

@media (max-width: 575.98px) {
    .quick-action-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .account-tile-grid,
    .personal-callout-numbers {
        grid-template-columns: 1fr;
    }

    .personal-callout-numbers .btn {
        grid-column: auto;
    }

    .personal-hero,
    .account-detail-hero,
    .due-detail-hero,
    .loan-detail-hero {
        padding: 1.35rem;
    }

    .personal-subnav {
        margin-inline: -.25rem;
    }

    .void-summary {
        grid-template-columns: 1fr;
    }
}


/* ==============================================================
   PART 9A — INVENTORY FOUNDATION
   ============================================================== */

.inventory-nav-link {
    color: #9ee6c0 !important;
    font-weight: 600;
}

.inventory-engine-banner {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    padding: 1.25rem;
    border-radius: 1.15rem;
    color: #fff;
    background:
        radial-gradient(circle at 90% 10%, rgba(255,255,255,.16), transparent 24%),
        linear-gradient(135deg, #123d33, #1d785f);
    box-shadow: 0 .8rem 1.8rem rgba(19, 91, 72, .16);
}

.inventory-engine-banner > div {
    padding: .75rem 1rem;
    border: 1px solid rgba(255,255,255,.14);
    border-radius: .85rem;
    background: rgba(255,255,255,.08);
}

.inventory-engine-banner span,
.inventory-engine-banner strong {
    display: block;
}

.inventory-engine-banner span {
    color: rgba(255,255,255,.68);
    font-size: .8rem;
}

.inventory-engine-banner strong {
    margin-top: .2rem;
    font-size: 1.05rem;
}

.inventory-summary-card {
    border-radius: 1rem;
    transition: transform .16s ease, box-shadow .16s ease;
}

.inventory-summary-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 .8rem 1.5rem rgba(52, 47, 34, .09) !important;
}

.inventory-rule {
    display: grid;
    grid-template-columns: 34px 1fr;
    gap: .8rem;
    align-items: start;
    padding: .8rem 0;
    border-bottom: 1px dashed #efece5;
}

.inventory-rule:last-child {
    border-bottom: 0;
}

.inventory-rule strong {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    color: #fff;
    background: #1d785f;
    font-size: .85rem;
}

.inventory-rule span {
    color: #766e58;
}

.inventory-dashboard-callout {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(360px, .8fr);
    gap: 2rem;
    align-items: center;
    padding: 1.75rem;
    border-radius: 1.25rem;
    color: #fff;
    background:
        radial-gradient(circle at 88% 8%, rgba(255,255,255,.14), transparent 25%),
        linear-gradient(135deg, #123d33, #228368);
    box-shadow: 0 .9rem 2rem rgba(22, 106, 82, .17);
}

.inventory-dashboard-callout .personal-eyebrow {
    color: #bdf3da;
}

.inventory-dashboard-callout h2 {
    margin-bottom: .4rem;
}

.inventory-dashboard-callout p {
    margin: 0;
    color: rgba(255,255,255,.76);
}

.inventory-callout-numbers {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .7rem;
}

.inventory-callout-numbers > div {
    padding: .85rem;
    border: 1px solid rgba(255,255,255,.14);
    border-radius: .85rem;
    background: rgba(255,255,255,.09);
}

.inventory-callout-numbers span,
.inventory-callout-numbers strong {
    display: block;
}

.inventory-callout-numbers span {
    color: rgba(255,255,255,.68);
    font-size: .75rem;
}

.inventory-callout-numbers strong {
    margin-top: .15rem;
    font-size: 1.05rem;
}

.inventory-callout-numbers .btn {
    grid-column: 1 / -1;
}

@media (max-width: 1199.98px) {
    .inventory-dashboard-callout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767.98px) {
    .inventory-engine-banner,
    .inventory-callout-numbers {
        grid-template-columns: 1fr;
    }

    .inventory-callout-numbers .btn {
        grid-column: auto;
    }
}

/* ==============================================================
   PART 9B — INVENTORY DASHBOARD & LEDGER
   ============================================================== */

.inventory-subnav {
    display: flex;
    gap: .55rem;
    padding: .55rem;
    overflow-x: auto;
    border: 1px solid #e1e9e5;
    border-radius: 1rem;
    background: rgba(255,255,255,.94);
    box-shadow: 0 .35rem 1rem rgba(24, 78, 62, .05);
    scrollbar-width: thin;
}

.inventory-subnav a {
    flex: 0 0 auto;
    padding: .65rem 1rem;
    border-radius: .75rem;
    color: #55665f;
    font-weight: 600;
    text-decoration: none;
    transition: .18s ease;
}

.inventory-subnav a:hover {
    color: #146b51;
    background: #eef9f4;
}

.inventory-subnav a.active {
    color: #fff;
    background: linear-gradient(135deg, #17684f, #209173);
    box-shadow: 0 .4rem .9rem rgba(25, 126, 96, .22);
}

.inventory-eyebrow {
    display: inline-block;
    margin-bottom: .45rem;
    color: #19775b;
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .08em;
}

.inventory-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(310px, .7fr);
    gap: 2rem;
    align-items: center;
    padding: clamp(1.7rem, 4vw, 3rem);
    overflow: hidden;
    border-radius: 1.55rem;
    color: #fff;
    background:
        radial-gradient(circle at 88% 14%, rgba(255,255,255,.17), transparent 27%),
        linear-gradient(135deg, #0d3b2f, #176f55 55%, #23a078);
    box-shadow: 0 1.1rem 2.6rem rgba(20, 100, 77, .22);
}

.inventory-hero .inventory-eyebrow {
    color: #b9f2da;
}

.inventory-hero h1 {
    max-width: 760px;
    margin-bottom: .7rem;
    font-size: clamp(2rem, 4vw, 3.2rem);
    font-weight: 700;
    line-height: 1.14;
}

.inventory-hero p {
    max-width: 740px;
    margin: 0;
    color: rgba(255,255,255,.78);
}

.inventory-valuation-panel {
    display: flex;
    flex-direction: column;
    padding: 1.35rem;
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 1.2rem;
    background: rgba(255,255,255,.11);
    backdrop-filter: blur(10px);
}

.inventory-valuation-panel > span,
.inventory-valuation-panel > small {
    color: rgba(255,255,255,.72);
}

.inventory-valuation-panel > strong {
    margin: .3rem 0;
    font-size: clamp(2rem, 4vw, 3rem);
}

.inventory-cost-method {
    margin-top: .9rem;
    padding: .55rem .7rem;
    border-radius: .7rem;
    background: rgba(255,255,255,.11);
    font-size: .82rem;
}

.inventory-rank-item {
    display: grid;
    grid-template-columns: 34px 1fr auto;
    gap: .8rem;
    align-items: center;
    padding: .8rem 0;
    border-bottom: 1px solid #edf1ef;
    color: #27352f;
    text-decoration: none;
}

.inventory-rank-item:last-child {
    border-bottom: 0;
}

.inventory-rank-item div {
    display: flex;
    flex-direction: column;
}

.inventory-rank-item small {
    color: #77847f;
}

.inventory-rank {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    color: #17684f;
    background: #e9f7f1;
    font-weight: 700;
}

.movement-chip {
    display: inline-flex;
    padding: .3rem .65rem;
    border-radius: 999px;
    font-size: .77rem;
    font-weight: 600;
    white-space: nowrap;
}

.movement-in {
    color: #126c4c;
    background: #e9f8f0;
}

.movement-out {
    color: #a63740;
    background: #fff0f1;
}

.inventory-filter-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    padding: .85rem 1rem;
    border: 1px solid #e2ebe7;
    border-radius: .9rem;
    color: #5f6d67;
    background: #f8fcfa;
}

.inventory-filter-summary strong {
    color: #1b6c54;
}

.stock-detail-hero {
    display: flex;
    justify-content: space-between;
    gap: 2rem;
    align-items: center;
    padding: 1.8rem;
    border-radius: 1.3rem;
    color: #fff;
    background:
        radial-gradient(circle at 88% 10%, rgba(255,255,255,.14), transparent 25%),
        linear-gradient(135deg, #123d33, #228368);
    box-shadow: 0 .9rem 2rem rgba(22, 106, 82, .17);
}

.stock-detail-hero .inventory-eyebrow {
    color: #bdf3da;
}

.stock-detail-hero h1 {
    margin: .45rem 0 .25rem;
    font-weight: 700;
}

.stock-detail-hero p {
    margin: 0;
    color: rgba(255,255,255,.75);
}

.stock-detail-hero > div:last-child {
    display: flex;
    flex-direction: column;
}

.stock-detail-hero > div:last-child > strong {
    color: #fff;
    font-size: clamp(2rem, 4vw, 3rem);
}

.opening-preview {
    display: flex;
    flex-direction: column;
    padding: 1rem;
    border: 1px solid #cfe9dd;
    border-radius: .9rem;
    color: #185b47;
    background: #f0faf6;
}

.opening-preview span {
    color: #71837b;
    font-size: .8rem;
}

@media (max-width: 991.98px) {
    .inventory-hero {
        grid-template-columns: 1fr;
    }

    .stock-detail-hero {
        flex-direction: column;
        align-items: stretch;
    }

    .stock-detail-hero .text-lg-end {
        text-align: left !important;
    }
}

@media (max-width: 575.98px) {
    .inventory-hero,
    .stock-detail-hero {
        padding: 1.35rem;
    }

    .inventory-subnav {
        margin-inline: -.25rem;
    }
}

/* ==============================================================
   PART 9C — ITEM-WISE SUPPLIER DELIVERY
   ============================================================== */

.delivery-entry-table .delivery-quantity {
    min-width: 110px;
    text-align: right;
    font-weight: 700;
}

.delivery-entry-table tbody tr:hover {
    background: #f7fcfa;
}

.delivery-post-warning {
    display: flex;
    flex-wrap: wrap;
    gap: .6rem;
    align-items: center;
    padding: 1rem 1.15rem;
    border: 1px solid #cfe9dd;
    border-radius: 1rem;
    color: #285f50;
    background: #f0faf6;
}

.delivery-post-warning span {
    padding: .3rem .65rem;
    border-radius: 999px;
    color: #17684f;
    background: #fff;
    font-size: .82rem;
    font-weight: 600;
}

.delivery-detail-hero {
    display: flex;
    justify-content: space-between;
    gap: 2rem;
    align-items: center;
    padding: 1.8rem;
    border-radius: 1.35rem;
    color: #fff;
    background:
        radial-gradient(circle at 88% 12%, rgba(255,255,255,.16), transparent 26%),
        linear-gradient(135deg, #0e4737, #1d8a68);
    box-shadow: 0 .95rem 2.1rem rgba(20, 110, 82, .18);
}

.delivery-detail-hero.void {
    background:
        radial-gradient(circle at 88% 12%, rgba(255,255,255,.12), transparent 26%),
        linear-gradient(135deg, #5b2630, #a84653);
}

.delivery-detail-hero h1 {
    margin: .35rem 0 .2rem;
    font-weight: 700;
}

.delivery-detail-hero p {
    margin: 0;
    color: rgba(255,255,255,.75);
}

.delivery-detail-hero > div:last-child {
    display: flex;
    flex-direction: column;
}

.delivery-detail-hero > div:last-child strong {
    color: #fff;
    font-size: clamp(2rem, 4vw, 3rem);
}

.delivery-stage-value {
    display: flex;
    justify-content: space-between;
    gap: .75rem;
    align-items: center;
    padding: .8rem;
    border-radius: .85rem;
    color: #17684f;
    background: #eef9f4;
}

.delivery-stage-value strong {
    font-size: 1.15rem;
}

@media (max-width: 991.98px) {
    .delivery-detail-hero {
        flex-direction: column;
        align-items: stretch;
    }

    .delivery-detail-hero .text-lg-end {
        text-align: left !important;
    }
}

@media (max-width: 575.98px) {
    .delivery-detail-hero {
        padding: 1.35rem;
    }

    .delivery-post-warning {
        align-items: flex-start;
        flex-direction: column;
    }
}



/* ==============================================================
   BRANDING UPDATE — LOGO + FAVICON + POLISHED HEADER
   ============================================================== */
body{
    background:
        radial-gradient(circle at top left, rgba(209, 195, 146, .13), transparent 20%),
        radial-gradient(circle at top right, rgba(45, 146, 109, .08), transparent 22%),
        var(--erp-bg);
}

.navbar.bg-dark{
    background: linear-gradient(90deg, #1d1a13 0%, #28241a 55%, #302c1f 100%) !important;
    border-bottom: 1px solid rgba(255,255,255,.07);
}

.navbar-brand.brand-lockup{
    display:flex;
    align-items:center;
    gap:.85rem;
    text-decoration:none;
    padding:.18rem 0;
}

.brand-logo-shell{
    width:54px;
    height:54px;
    display:grid;
    place-items:center;
    flex:0 0 54px;
    border-radius:16px;
    background:linear-gradient(180deg,#fffdf6,#f1ece0);
    box-shadow:0 10px 24px rgba(0,0,0,.18), inset 0 0 0 1px rgba(205,180,112,.45);
}

.brand-logo-img{
    width:44px;
    height:44px;
    object-fit:contain;
    display:block;
}

.brand-copy{
    display:flex;
    flex-direction:column;
    line-height:1.05;
}

.brand-title{
    color:#fff;
    font-size:1.14rem;
    font-weight:700;
    letter-spacing:.01em;
}

.brand-subtitle{
    color:rgba(255,255,255,.72);
    font-size:.74rem;
    font-weight:600;
    text-transform:uppercase;
    letter-spacing:.18em;
}

.navbar-nav .nav-link{
    border-radius:.7rem;
    transition:all .16s ease;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link:focus{
    color:#fff;
    background:rgba(255,255,255,.06);
}

.dropdown-menu{
    border:1px solid #f3f0e9;
    border-radius:1rem;
    box-shadow:0 20px 40px rgba(25, 23, 16,.14);
    padding:.55rem;
}

.dropdown-item{
    border-radius:.72rem;
}

.dropdown-item:hover,
.dropdown-item:focus{
    background:#fbf9f4;
}

.footer-brand{
    display:inline-flex;
    align-items:center;
    gap:.65rem;
    padding:.55rem .9rem;
    border-radius:999px;
    background:rgba(255,255,255,.7);
    box-shadow:0 8px 20px rgba(13, 28, 23,.05);
}

.footer-brand img{
    width:28px;
    height:28px;
    border-radius:8px;
}

.login-hero{
    position:relative;
}

.login-hero::before{
    content:"";
    position:absolute;
    inset:0;
    pointer-events:none;
    background:
        radial-gradient(circle at 18% 20%, rgba(45, 146, 109,.07), transparent 22%),
        radial-gradient(circle at 82% 24%, rgba(209,195,146,.12), transparent 20%),
        radial-gradient(circle at 50% 100%, rgba(29, 26, 19,.035), transparent 20%);
}

.login-card{
    backdrop-filter: blur(10px);
    background:rgba(255,255,255,.92);
}

.login-brand-wrap{
    display:flex;
    justify-content:center;
    align-items:center;
}

.login-brand-logo{
    width:92px;
    height:92px;
    border-radius:24px;
    box-shadow:0 18px 40px rgba(34, 31, 22,.12);
}

.login-favicon-note{
    display:inline-flex;
    align-items:center;
    gap:.4rem;
    margin-top:.75rem;
    padding:.3rem .7rem;
    border-radius:999px;
    color:#77705b;
    background:#fbf9f5;
    font-size:.84rem;
}

.alert{
    border-radius:1rem;
}

@media (max-width: 767.98px){
    .brand-logo-shell{
        width:46px;
        height:46px;
        flex-basis:46px;
        border-radius:14px;
    }
    .brand-logo-img{
        width:36px;
        height:36px;
    }
    .brand-title{
        font-size:1rem;
    }
    .brand-subtitle{
        font-size:.67rem;
        letter-spacing:.12em;
    }
}


/* PART 9D — CUSTOMER DELIVERY */
.sales-delivery-hero{background:radial-gradient(circle at 88% 12%,rgba(255,255,255,.16),transparent 26%),linear-gradient(135deg,#20493a,#36886a);}
.sales-delivery-hero.void{background:radial-gradient(circle at 88% 12%,rgba(255,255,255,.12),transparent 26%),linear-gradient(135deg,#5b2630,#a84653);}
.stock-warning{min-height:1.15rem;margin-top:.25rem;}
.delivery-entry-table tr.table-danger .form-control{border-color:#dc3545;}
