@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;800&display=swap');

:root {
    color-scheme: light;
    --blue: #1d4ed8;
    --green: #15803d;
    --ink: #172033;
    --muted: #667085;
    --line: #d9e2ec;
    --bg: #f5f8fb;
    --panel: #ffffff;
    --soft: #eaf3ff;
    --warn: #b45309;
    --danger: #b91c1c;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* Reference-style admin panel skin */
.app-body {
    --blue: #2e52df;
    --blue-deep: #2647d4;
    --mint: #66d9b7;
    --purple: #7468f4;
    --orange: #ffb354;
    --ink: #263a56;
    --muted: #8a98ad;
    --line: #edf1fa;
    --panel: #ffffff;
    --soft: #f8faff;
    min-height: 100vh;
    padding: 54px 66px;
    grid-template-columns: 194px minmax(0, 1fr);
    gap: 0;
    font-family: Poppins, Inter, ui-sans-serif, system-ui, sans-serif;
    background:
        radial-gradient(circle at 14% 2%, rgba(129, 117, 242, .18) 0 120px, transparent 121px),
        radial-gradient(circle at 88% 0%, transparent 0 80px, rgba(91, 76, 218, .18) 81px 83px, transparent 84px),
        radial-gradient(circle at 90% 100%, transparent 0 90px, rgba(91, 76, 218, .22) 91px 93px, transparent 94px),
        #ececfd;
    color: var(--ink);
    overflow-x: hidden;
}

.app-body::before,
.app-body::after {
    content: "";
    position: fixed;
    pointer-events: none;
    z-index: 0;
}

.app-body::before {
    width: 128px;
    height: 128px;
    left: 18px;
    bottom: 18px;
    background-image: radial-gradient(#9b9af8 3px, transparent 4px);
    background-size: 22px 22px;
    opacity: .75;
}

.app-body::after {
    width: 170px;
    height: 170px;
    top: 18px;
    right: 38px;
    background:
        radial-gradient(#9b9af8 4px, transparent 5px) 0 0 / 24px 24px,
        repeating-linear-gradient(45deg, transparent 0 11px, rgba(96, 88, 201, .28) 12px 13px);
    mask-image: radial-gradient(circle, black 0 74px, transparent 75px);
    opacity: .55;
}

.app-body .sidebar,
.app-body .shell {
    position: relative;
    z-index: 1;
}

.app-body .sidebar {
    height: calc(100vh - 108px);
    min-height: 650px;
    position: sticky;
    top: 54px;
    padding: 32px 22px 24px;
    border: 0;
    border-radius: 24px 0 0 24px;
    background: linear-gradient(180deg, var(--blue) 0%, #2344d0 100%);
    color: #fff;
    box-shadow: 0 28px 70px rgba(62, 76, 190, .25);
    overflow: visible;
}

.app-body .shell {
    min-width: 0;
    min-height: calc(100vh - 108px);
    padding: 36px;
    border-radius: 0 24px 24px 0;
    background: rgba(249, 251, 255, .96);
    box-shadow: 0 28px 70px rgba(72, 80, 148, .18);
}

.app-body .brand {
    padding: 0 4px 20px;
    gap: 10px;
}

.app-body .brand-mark,
.app-body .brand-logo {
    width: 44px;
    height: 44px;
    border-radius: 9px;
    background: rgba(255, 255, 255, .18);
    box-shadow: none;
    font-size: 20px;
}

.app-body .brand-logo {
    display: block;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, .24);
    background: rgba(255, 255, 255, .9);
    box-shadow: 0 14px 28px rgba(10, 24, 16, .18);
}

.app-body .brand strong {
    display: block;
    max-width: 94px;
    color: #fff;
    font-size: 15px;
    line-height: 1.05;
}

.app-body .brand small {
    color: rgba(255, 255, 255, .82);
    font-size: 10px;
}

.app-body nav {
    gap: 9px;
}

.app-body .nav-label {
    display: none;
}

.app-body .nav {
    min-height: 40px;
    gap: 12px;
    padding: 0 4px;
    border: 0;
    border-radius: 9px;
    color: rgba(255, 255, 255, .76);
    font-size: 13px;
    font-weight: 600;
    background: transparent;
    box-shadow: none;
}

.app-body .nav.active,
.app-body .nav:hover {
    color: #fff;
    background: rgba(255, 255, 255, .08);
}

.app-body .nav-icon {
    width: 26px;
    height: 26px;
    background: transparent;
    color: currentColor;
}

.app-body .nav.active .nav-icon {
    color: #fff;
    background: transparent;
}

.app-body .sidebar-card {
    position: absolute;
    left: -35px;
    bottom: 192px;
    width: 154px;
    min-height: 152px;
    padding: 16px 13px;
    border: 0;
    border-radius: 14px;
    background: #fff;
    color: var(--ink);
    box-shadow: 0 20px 40px rgba(78, 87, 168, .18);
}

.app-body .sidebar-card small {
    color: #41bd92;
    font-weight: 800;
    text-transform: uppercase;
}

.app-body .sidebar-card strong {
    color: #f29b3d;
    font-size: 12px;
}

.app-body .sidebar-card span {
    color: var(--muted);
    font-size: 11px;
    line-height: 1.45;
}

.app-body .account {
    margin-top: auto;
    padding: 12px 4px;
    border: 0;
    background: transparent;
    color: #fff;
}

.app-body .account a {
    color: rgba(255, 255, 255, .78);
    font-size: 12px;
}

.app-body .topbar {
    position: static;
    grid-template-columns: 1fr auto;
    margin: 0 0 22px;
    padding: 0;
    border: 0;
    background: transparent;
    backdrop-filter: none;
}

.app-body .menu {
    display: none;
}

.app-body .page-kicker,
.app-body .title-group p {
    display: none;
}

.app-body h1 {
    color: var(--ink);
    font-size: 23px;
    font-weight: 800;
    letter-spacing: 0;
}

.app-body .session-card {
    min-width: 250px;
    min-height: 54px;
    grid-template-columns: 44px 1fr auto auto;
    gap: 10px;
    padding: 7px 12px 7px 8px;
    border: 0;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 12px 28px rgba(79, 89, 153, .08);
}

.app-body .session-card::before {
    content: "SK";
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    color: #fff;
    background: linear-gradient(135deg, #35bfa5, #2f65dc);
    font-size: 12px;
    font-weight: 800;
}

.app-body .session-card strong {
    font-size: 12px;
}

.app-body .session-card small {
    color: var(--muted);
    font-size: 10px;
}

.app-body .role-pill {
    display: none;
}

.app-body #logout-button {
    width: 34px;
    min-width: 34px;
    min-height: 34px;
    padding: 0;
    border-radius: 11px;
    color: #95a0b5;
    background: transparent;
    box-shadow: none;
    font-size: 0;
}

.app-body #logout-button svg {
    width: 17px;
    height: 17px;
}

.hub-filters {
    display: grid;
    grid-template-columns: minmax(150px, 1.2fr) minmax(130px, 1fr) minmax(130px, 1fr) minmax(120px, .8fr) 52px;
    gap: 14px;
    margin-bottom: 22px;
}

.hub-filters label {
    min-height: 48px;
    padding: 8px 12px;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 10px 24px rgba(83, 90, 155, .06);
}

.hub-filters small {
    color: #9aa6ba;
    font-size: 9px;
    font-weight: 600;
}

.hub-filters select {
    min-height: 22px;
    padding: 0;
    border: 0;
    border-radius: 0;
    color: var(--ink);
    background: transparent;
    font-size: 12px;
    font-weight: 600;
}

.hub-search {
    min-height: 48px;
    border-radius: 13px;
    background: var(--mint);
    box-shadow: 0 12px 24px rgba(102, 217, 183, .35);
}

.dashboard-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 214px;
    gap: 22px;
}

.feed-stack {
    display: grid;
    gap: 14px;
}

.app-body .ops-hero {
    display: none;
}

.hub-list {
    display: grid;
    gap: 12px;
}

.hub-row {
    min-height: 96px;
    display: grid;
    grid-template-columns: 34px minmax(145px, 1fr) auto auto auto 108px 112px;
    gap: 12px;
    align-items: center;
    padding: 15px 16px;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 14px 28px rgba(79, 89, 153, .07);
}

.hub-row-icon {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    color: #c7d0de;
    background: #f1f4fa;
}

.hub-row h3 {
    margin: 0 0 3px;
    color: var(--ink);
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
}

.hub-row p,
.hub-row small {
    display: flex;
    align-items: center;
    gap: 4px;
    margin: 0;
    color: var(--muted);
    font-size: 10px;
}

.tag {
    min-height: 20px;
    display: inline-grid;
    place-items: center;
    padding: 0 8px;
    border-radius: 5px;
    font-size: 8px;
    font-weight: 800;
    text-transform: uppercase;
}

.tag.success {
    color: #38ad85;
    background: #dbf7ee;
}

.tag.warning {
    color: #fff;
    background: #f6a84c;
}

.hub-row > strong {
    color: var(--ink);
    font-size: 11px;
    white-space: nowrap;
}

.price-box {
    display: grid;
    gap: 3px;
    padding-left: 12px;
    border-left: 1px solid var(--line);
}

.price-box span {
    color: var(--muted);
    font-size: 10px;
}

.price-box strong {
    color: var(--ink);
    font-size: 18px;
}

.auction-btn {
    min-height: 38px;
    border-radius: 9px;
    color: #fff;
    background: var(--mint);
    box-shadow: none;
    font-size: 10px;
    text-transform: uppercase;
}

.shipment-card {
    position: relative;
    z-index: 2;
    width: min(92%, 690px);
    min-height: 100px;
    display: grid;
    grid-template-columns: 112px 1fr auto;
    gap: 20px;
    align-items: center;
    margin: -2px auto 2px;
    padding: 16px 20px;
    border-radius: 14px;
    color: #fff;
    background: linear-gradient(135deg, #7367f0, #7e70ff);
    box-shadow: 0 22px 45px rgba(111, 101, 240, .32);
}

.courier-illustration {
    width: 96px;
    height: 96px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: rgba(255, 255, 255, .16);
}

.courier-illustration svg {
    width: 48px;
    height: 48px;
}

.shipment-card strong {
    display: block;
    font-size: 15px;
    text-transform: uppercase;
}

.shipment-card span,
.shipment-card a {
    display: block;
    margin-top: 6px;
    color: rgba(255, 255, 255, .86);
    font-size: 12px;
}

.shipment-card a {
    color: #fff;
    font-size: 15px;
    font-weight: 700;
}

.shipment-card button {
    min-height: 38px;
    padding: 0 18px;
    border-radius: 8px;
    color: #fff;
    background: var(--orange);
    box-shadow: none;
    font-size: 10px;
    text-transform: uppercase;
}

.insights-rail {
    display: grid;
    align-content: start;
    gap: 16px;
}

.trend-card,
.tips-card {
    padding: 18px;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 14px 28px rgba(79, 89, 153, .07);
}

.trend-card .panel-head {
    margin-bottom: 14px;
}

.trend-card .panel-head h2,
.tips-card h2 {
    color: #a392f7;
    font-size: 13px;
    text-transform: uppercase;
}

.trend-card .panel-head a {
    color: var(--muted);
    font-size: 10px;
    text-decoration: none;
}

.trend-card h3 {
    margin: 0 0 8px;
    color: var(--ink);
    font-size: 13px;
}

.trend-card strong {
    display: block;
    margin-bottom: 8px;
    color: var(--ink);
    font-size: 12px;
}

.mini-chart {
    height: 74px;
    border-radius: 12px;
    background:
        linear-gradient(180deg, rgba(255,255,255,.2), rgba(255,255,255,.9)),
        repeating-linear-gradient(0deg, transparent 0 17px, rgba(131, 143, 169, .12) 18px),
        linear-gradient(135deg, transparent 0 30%, rgba(115, 103, 240, .35) 31% 34%, transparent 35% 48%, rgba(115, 103, 240, .45) 49% 52%, transparent 53% 68%, rgba(115, 103, 240, .5) 69% 72%, transparent 73%);
}

.mini-chart.pink {
    background:
        linear-gradient(180deg, rgba(255,255,255,.2), rgba(255,255,255,.9)),
        repeating-linear-gradient(0deg, transparent 0 17px, rgba(131, 143, 169, .12) 18px),
        linear-gradient(135deg, transparent 0 26%, rgba(255, 121, 164, .34) 27% 31%, transparent 32% 50%, rgba(255, 121, 164, .42) 51% 55%, transparent 56% 73%, rgba(255, 121, 164, .5) 74% 78%, transparent 79%);
}

.tips-card {
    min-height: 220px;
    overflow: hidden;
}

.tips-card p {
    margin-top: 12px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.55;
}

.tips-person {
    width: 132px;
    height: 92px;
    display: grid;
    place-items: center;
    margin: 18px -18px -18px auto;
    border-radius: 70px 0 16px 0;
    color: #f7a33b;
    background: #fff2bf;
}

.tips-person svg {
    width: 46px;
    height: 46px;
}

.app-body .dairy-ops-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.app-body .dairy-ops-grid article,
.app-body .kpi,
.app-body .panel,
.app-body .quick-grid button {
    border: 0;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 14px 28px rgba(79, 89, 153, .07);
}

.app-body .kpi-grid {
    grid-template-columns: repeat(4, minmax(145px, 1fr));
    gap: 12px;
}

.app-body .kpi {
    min-height: 116px;
    padding: 14px;
}

.app-body .kpi strong {
    font-size: 22px;
}

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

.app-body .quick-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.app-body .panel,
.app-body .form {
    border-radius: 16px;
}

.app-body .split {
    grid-template-columns: minmax(340px, 420px) minmax(0, 1fr);
}

.app-body input,
.app-body select,
.app-body textarea {
    border: 0;
    border-radius: 10px;
    background: #f8faff;
    box-shadow: inset 0 0 0 1px #edf1fa;
}

.app-body table {
    min-width: 900px;
}

.app-body th {
    background: #f8faff;
}

.app-body td {
    border-bottom-color: #f0f3fa;
}

@media (max-width: 1250px) {
    .app-body {
        padding: 28px;
        grid-template-columns: 190px minmax(0, 1fr);
    }

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

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

    .hub-row {
        grid-template-columns: 34px minmax(145px, 1fr) auto auto;
    }

    .hub-row .price-box,
    .hub-row .auction-btn {
        grid-column: auto;
    }
}

@media (max-width: 900px) {
    .app-body {
        padding: 14px;
        grid-template-columns: 1fr;
    }

    .app-body .sidebar {
        top: 14px;
        border-radius: 20px;
    }

    .app-body .shell {
        border-radius: 20px;
        padding: 22px;
    }

    .hub-filters,
    .insights-rail,
    .app-body .dairy-ops-grid,
    .app-body .kpi-grid,
    .app-body .quick-grid,
    .app-body .panel-grid,
    .shipment-card {
        grid-template-columns: 1fr;
    }

    .shipment-card {
        width: 100%;
    }
}

* { box-sizing: border-box; }
body {
    margin: 0;
    min-height: 100vh;
    display: grid;
    grid-template-columns: 280px 1fr;
    background: var(--bg);
    color: var(--ink);
}

button, input, select, textarea {
    font: inherit;
}

button {
    border: 0;
    border-radius: 6px;
    background: var(--blue);
    color: white;
    min-height: 40px;
    padding: 0 14px;
    cursor: pointer;
}

button:hover { filter: brightness(.96); }

.sidebar {
    background: #ffffff;
    border-right: 1px solid var(--line);
    padding: 22px 16px;
    display: flex;
    flex-direction: column;
    gap: 22px;
    position: sticky;
    top: 0;
    height: 100vh;
}

.brand, .account {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-mark,
.brand-logo {
    width: 42px;
    height: 42px;
    border-radius: 8px;
    display: grid;
    place-items: center;
    background: var(--green);
    color: white;
    font-weight: 800;
}

.brand-logo {
    display: block;
    object-fit: cover;
    background: rgba(255, 255, 255, .9);
}

.brand small, .account small {
    display: block;
    color: var(--muted);
    margin-top: 2px;
}

nav {
    display: grid;
    gap: 8px;
}

.nav {
    width: 100%;
    text-align: left;
    background: transparent;
    color: var(--ink);
    border: 1px solid transparent;
}

.nav.active {
    background: var(--soft);
    border-color: #bfd8ff;
    color: var(--blue);
}

.account {
    margin-top: auto;
    padding: 14px;
    background: #f7fafc;
    border: 1px solid var(--line);
    border-radius: 8px;
    display: block;
}

.shell {
    min-width: 0;
    padding: 24px;
}

.topbar {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 16px;
    align-items: center;
    margin-bottom: 20px;
}

.menu { display: none; background: white; color: var(--ink); border: 1px solid var(--line); }
h1, h2, p { margin: 0; }
h1 { font-size: 28px; line-height: 1.2; }
h2 { font-size: 17px; }
.topbar p { color: var(--muted); margin-top: 5px; }

.login-card, .session-card {
    display: grid;
    gap: 8px;
    align-items: center;
}

.login-card { grid-template-columns: 190px 130px auto; }

.session-card {
    grid-template-columns: 1fr auto;
    background: white;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 8px;
    min-width: 290px;
}

.session-card small {
    display: block;
    color: var(--muted);
    margin-top: 2px;
}

input, select, textarea {
    width: 100%;
    min-height: 40px;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 9px 10px;
    background: white;
    color: var(--ink);
}

textarea {
    min-height: 78px;
    resize: vertical;
}

.view { display: none; }
.view.active { display: block; }

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

.kpi, .panel {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
}

.kpi {
    padding: 16px;
    min-height: 106px;
}

.kpi small {
    color: var(--muted);
    display: block;
    margin-bottom: 14px;
}

.kpi strong {
    font-size: 28px;
}

.panel {
    padding: 16px;
    min-width: 0;
}

.panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.panel-head span {
    color: var(--muted);
    font-size: 13px;
}

.panel-grid, .split {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 16px;
}

.split {
    grid-template-columns: 420px 1fr;
}

.quick-grid, .report-grid, .plans {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.quick-grid button {
    background: white;
    color: var(--blue);
    border: 1px solid #bfd8ff;
}

.form {
    display: grid;
    gap: 12px;
    align-content: start;
}

label {
    display: grid;
    gap: 6px;
    color: var(--muted);
    font-size: 13px;
}

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

.table-wrap {
    width: 100%;
    overflow: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 720px;
}

th, td {
    text-align: left;
    padding: 11px 10px;
    border-bottom: 1px solid var(--line);
    white-space: nowrap;
}

th {
    font-size: 12px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0;
}

.badge {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 8px;
    border-radius: 999px;
    background: #eef6ee;
    color: var(--green);
    font-size: 12px;
}

.badge.pending, .badge.low_stock, .badge.paused, .badge.verification_pending {
    background: #fff7ed;
    color: var(--warn);
}

.badge.cancelled, .badge.expired {
    background: #fef2f2;
    color: var(--danger);
}

.plans span, .report-grid span {
    border: 1px solid var(--line);
    border-radius: 6px;
    min-height: 46px;
    display: grid;
    place-items: center;
    background: #fbfdff;
}

.event-list {
    display: grid;
    gap: 10px;
    padding: 0;
    margin: 0;
    list-style: none;
}

.event-list li {
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 11px;
    background: #fbfdff;
}

#toast {
    position: fixed;
    right: 18px;
    bottom: 18px;
    background: var(--ink);
    color: white;
    padding: 12px 14px;
    border-radius: 7px;
    opacity: 0;
    transform: translateY(8px);
    transition: .2s ease;
    pointer-events: none;
}

#toast.show {
    opacity: 1;
    transform: translateY(0);
}

.auth-body {
    display: block;
    background: linear-gradient(135deg, #f6fbff 0%, #eef8f1 100%);
}

.auth-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 520px;
    gap: 38px;
    align-items: center;
    padding: 42px;
    max-width: 1260px;
    margin: 0 auto;
}

.auth-copy {
    display: grid;
    gap: 22px;
    max-width: 620px;
}

.auth-copy h1 {
    font-size: 44px;
    line-height: 1.08;
}

.auth-copy p {
    color: var(--muted);
    font-size: 18px;
    line-height: 1.6;
}

.auth-brand {
    align-self: start;
}

.auth-brand .brand-logo {
    width: 58px;
    height: 58px;
    border-radius: 16px;
}

.auth-panel {
    background: white;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 18px;
    box-shadow: 0 22px 60px rgba(29, 78, 216, .12);
}

.auth-tabs {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 18px;
}

.auth-tab {
    background: #f7fafc;
    color: var(--ink);
    border: 1px solid var(--line);
}

.auth-tab.active {
    color: white;
    background: var(--blue);
    border-color: var(--blue);
}

.auth-form {
    display: none;
    gap: 13px;
}

.auth-form.active {
    display: grid;
}

.auth-form h2 {
    font-size: 22px;
    margin-bottom: 2px;
}

.inline-note {
    color: var(--muted);
}

.inline-note {
    border: 1px dashed #95b8ee;
    background: var(--soft);
    border-radius: 6px;
    padding: 10px;
}

.app-body {
    --blue: #1769d2;
    --green: #118444;
    --ink: #101828;
    --muted: #64748b;
    --line: #dbe5ee;
    --bg: #f6f9fc;
    --panel: #ffffff;
    --soft: #eef7f1;
    --sidebar: #0f1f17;
    --sidebar-soft: #172a20;
    --accent: #f59e0b;
    grid-template-columns: 292px minmax(0, 1fr);
    background:
        radial-gradient(circle at 76% 0%, rgba(23, 105, 210, .12), transparent 32rem),
        radial-gradient(circle at 22% 8%, rgba(17, 132, 68, .12), transparent 26rem),
        var(--bg);
}

.app-body button {
    min-height: 42px;
    border-radius: 8px;
    background: var(--green);
    font-weight: 750;
    box-shadow: 0 8px 18px rgba(17, 132, 68, .18);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.app-body button:hover {
    transform: translateY(-1px);
    filter: none;
}

.app-body .sidebar {
    background: linear-gradient(180deg, #102018 0%, #0b1711 100%);
    color: white;
    border-right: 0;
    padding: 22px 16px;
    gap: 18px;
}

.app-body .brand {
    padding: 8px;
}

.app-body .brand-mark,
.app-body .brand-logo {
    border-radius: 8px;
    background: linear-gradient(135deg, var(--green), #22c55e);
    box-shadow: 0 12px 30px rgba(34, 197, 94, .2);
}

.app-body .brand small,
.app-body .account small {
    color: rgba(255, 255, 255, .62);
}

.sidebar-card {
    display: grid;
    gap: 6px;
    padding: 14px;
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 8px;
    background: rgba(255, 255, 255, .06);
}

.sidebar-card small,
.sidebar-card span,
.nav-label {
    color: rgba(255, 255, 255, .58);
    font-size: 12px;
}

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

.nav-label {
    text-transform: uppercase;
    letter-spacing: 0;
    padding: 10px 10px 2px;
    font-weight: 800;
}

.app-body nav {
    gap: 5px;
}

.app-body .nav {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    border-radius: 8px;
    color: rgba(255, 255, 255, .72);
    background: transparent;
    box-shadow: none;
}

.app-body .nav:hover {
    background: rgba(255, 255, 255, .07);
    color: white;
}

.app-body .nav.active {
    background: white;
    color: var(--sidebar);
    border-color: white;
}

.nav-icon {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: rgba(255, 255, 255, .1);
    font-size: 12px;
    font-weight: 900;
}

.app-body i,
.app-body svg {
    width: 17px;
    height: 17px;
    stroke-width: 2.25;
    flex: 0 0 auto;
}

.brand-mark svg,
.nav-icon svg {
    width: 16px;
    height: 16px;
}

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

.app-body .account {
    color: white;
    border: 1px solid rgba(255, 255, 255, .1);
    background: rgba(255, 255, 255, .06);
    border-radius: 8px;
}

.app-body .account a {
    display: inline-flex;
    margin-top: 10px;
    color: #9ee6b9;
    text-decoration: none;
    font-weight: 800;
}

.app-body .shell {
    padding: 24px;
}

.app-body .topbar {
    position: sticky;
    top: 0;
    z-index: 5;
    margin: -24px -24px 22px;
    padding: 18px 24px;
    background: rgba(246, 249, 252, .84);
    border-bottom: 1px solid rgba(219, 229, 238, .78);
    backdrop-filter: blur(14px);
}

.title-group {
    display: grid;
    gap: 4px;
}

.page-kicker {
    color: var(--green);
    font-size: 12px;
    font-weight: 850;
    text-transform: uppercase;
    letter-spacing: 0;
}

.app-body h1 {
    font-size: 30px;
    letter-spacing: 0;
}

.app-body h2 {
    font-size: 18px;
}

.app-body .topbar p {
    color: var(--muted);
}

.app-body .menu {
    color: var(--ink);
    background: white;
    border: 1px solid var(--line);
    box-shadow: none;
}

.app-body .session-card {
    min-width: 390px;
    grid-template-columns: minmax(0, 1fr) auto auto;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 8px;
    box-shadow: 0 12px 28px rgba(15, 31, 23, .06);
}

.role-pill {
    min-height: 30px;
    display: inline-grid;
    place-items: center;
    padding: 0 10px;
    border-radius: 999px;
    color: var(--green);
    background: var(--soft);
    font-size: 12px;
    font-weight: 850;
    white-space: nowrap;
}

.app-body #logout-button {
    background: var(--ink);
    box-shadow: none;
}

.ops-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(340px, 420px);
    gap: 18px;
    align-items: stretch;
    margin-bottom: 18px;
    padding: 22px;
    border: 1px solid rgba(17, 132, 68, .16);
    border-radius: 8px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, .98), rgba(238, 247, 241, .95)),
        var(--panel);
    box-shadow: 0 20px 50px rgba(16, 24, 40, .06);
}

.ops-hero h2 {
    max-width: 780px;
    margin-top: 8px;
    font-size: 44px;
    line-height: 1.08;
}

.ops-hero p {
    max-width: 680px;
    margin-top: 12px;
    color: var(--muted);
    line-height: 1.65;
}

.hero-status-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    align-content: end;
}

.hero-status-grid span {
    min-height: 92px;
    display: grid;
    align-content: center;
    gap: 5px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: white;
    color: var(--muted);
}

.hero-status-grid svg {
    color: var(--green);
}

.hero-status-grid strong {
    color: var(--ink);
}

.dairy-ops-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}

.dairy-ops-grid article {
    min-height: 138px;
    display: grid;
    align-content: start;
    gap: 9px;
    padding: 15px;
    border: 1px solid rgba(219, 229, 238, .9);
    border-radius: 8px;
    background: rgba(255, 255, 255, .92);
    box-shadow: 0 10px 28px rgba(16, 24, 40, .05);
}

.dairy-ops-grid svg {
    width: 28px;
    height: 28px;
    padding: 5px;
    border-radius: 8px;
    color: var(--green);
    background: var(--soft);
}

.dairy-ops-grid strong {
    font-size: 15px;
}

.dairy-ops-grid span {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.4;
}

.app-body .kpi-grid {
    grid-template-columns: repeat(4, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 18px;
}

.app-body .kpi,
.app-body .panel {
    border: 1px solid rgba(219, 229, 238, .9);
    border-radius: 8px;
    background: rgba(255, 255, 255, .94);
    box-shadow: 0 14px 34px rgba(16, 24, 40, .06);
}

.app-body .kpi {
    position: relative;
    min-height: 138px;
    padding: 16px;
    overflow: hidden;
}

.app-body .kpi::after {
    content: "";
    position: absolute;
    right: -34px;
    top: -38px;
    width: 116px;
    height: 116px;
    border-radius: 999px;
    background: rgba(23, 105, 210, .08);
}

.kpi-icon {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    margin-bottom: 14px;
    border-radius: 8px;
    color: var(--green);
    background: var(--soft);
    font-weight: 900;
}

.app-body .kpi small {
    color: var(--muted);
    margin-bottom: 7px;
}

.app-body .kpi strong {
    display: block;
    font-size: 30px;
    letter-spacing: 0;
}

.app-body .kpi em {
    display: block;
    margin-top: 8px;
    color: var(--muted);
    font-size: 12px;
    font-style: normal;
}

.app-body .panel {
    padding: 18px;
}

.app-body .panel-head {
    margin-bottom: 16px;
}

.app-body .panel-head h2 {
    font-size: 19px;
}

.app-body .panel-head span {
    color: var(--muted);
}

.app-body .panel-grid,
.app-body .split {
    gap: 18px;
    margin-bottom: 18px;
}

.app-body .split {
    grid-template-columns: minmax(340px, 440px) minmax(0, 1fr);
}

.app-body .quick-grid {
    gap: 14px;
}

.app-body .quick-grid button {
    min-height: 58px;
    color: var(--ink);
    background: white;
    border: 1px solid var(--line);
    box-shadow: 0 10px 24px rgba(16, 24, 40, .05);
}

.app-body input,
.app-body select,
.app-body textarea {
    min-height: 44px;
    border-radius: 8px;
    border-color: var(--line);
    background: #fbfdff;
}

.location-row {
    display: grid;
    gap: 10px;
}

.location-row button {
    width: 100%;
    background: var(--blue);
    box-shadow: 0 8px 18px rgba(23, 105, 210, .16);
}

.app-body input:focus,
.app-body select:focus,
.app-body textarea:focus {
    outline: 3px solid rgba(23, 105, 210, .14);
    border-color: rgba(23, 105, 210, .45);
    background: white;
}

.app-body label {
    color: var(--muted);
    font-weight: 750;
}

.app-body table {
    border-collapse: separate;
    border-spacing: 0;
}

.app-body th {
    background: #f8fafc;
    color: #728198;
    font-size: 11px;
}

.app-body th:first-child {
    border-top-left-radius: 8px;
}

.app-body th:last-child {
    border-top-right-radius: 8px;
}

.app-body td {
    background: white;
    vertical-align: top;
}

.app-body td small,
.muted {
    color: var(--muted);
}

.app-body tbody tr:hover td {
    background: #fbfdf9;
}

.app-body .badge {
    border-radius: 999px;
    font-weight: 850;
}

.status-select {
    min-width: 148px;
    min-height: 34px;
    padding: 6px 9px;
    text-transform: capitalize;
}

.icon-action {
    min-height: 34px;
    padding: 0 10px;
    white-space: nowrap;
    box-shadow: none;
}

.map-link {
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0 10px;
    border-radius: 8px;
    color: var(--blue);
    background: var(--blue-soft, #edf5ff);
    text-decoration: none;
    font-weight: 800;
}

.app-body .plans span,
.app-body .report-grid span,
.app-body .event-list li {
    border-radius: 8px;
    background: #fbfdff;
}

.app-body #toast {
    border-radius: 8px;
    box-shadow: 0 18px 38px rgba(16, 24, 40, .22);
}

@media (max-width: 1100px) {
    body { grid-template-columns: 1fr; }
    .sidebar {
        position: fixed;
        z-index: 10;
        transform: translateX(-100%);
        transition: .2s ease;
        width: 280px;
    }
    body.nav-open .sidebar { transform: translateX(0); }
    .menu { display: inline-grid; place-items: center; }
    .topbar, .login-card, .session-card { grid-template-columns: 1fr; }
    .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .split, .panel-grid { grid-template-columns: 1fr; }
    .auth-shell { grid-template-columns: 1fr; padding: 24px; }
    .auth-copy h1 { font-size: 34px; }
}

@media (max-width: 620px) {
    .shell { padding: 16px; }
    .kpi-grid, .quick-grid, .report-grid, .plans, .two, .three { grid-template-columns: 1fr; }
    h1 { font-size: 23px; }
    .auth-shell { padding: 16px; gap: 18px; }
    .auth-tabs { grid-template-columns: 1fr; }
    .auth-copy h1 { font-size: 28px; }
}

@media (max-width: 1100px) {
    .app-body {
        grid-template-columns: 1fr;
    }

    .app-body .topbar {
        margin: -24px -24px 18px;
    }

    .app-body .session-card {
        min-width: 0;
        grid-template-columns: 1fr;
    }

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

    .app-body .split,
    .app-body .panel-grid {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 720px) {
    .app-body .shell {
        padding: 16px;
    }

    .app-body .topbar {
        margin: -16px -16px 16px;
        padding: 14px 16px;
    }

    .app-body .kpi-grid,
    .hero-status-grid,
    .dairy-ops-grid {
        grid-template-columns: 1fr;
    }

    .ops-hero {
        padding: 16px;
    }

    .ops-hero h2 {
        font-size: 30px;
    }
}

/* Final reference skin overrides: keep these last. */
.app-body {
    --blue: #2e52df;
    --blue-deep: #2647d4;
    --mint: #66d9b7;
    --purple: #7468f4;
    --orange: #ffb354;
    --ink: #263a56;
    --muted: #8a98ad;
    --line: #edf1fa;
    --panel: #ffffff;
    --soft: #f8faff;
    min-height: 100vh;
    padding: 54px 66px;
    grid-template-columns: 194px minmax(0, 1fr);
    gap: 0;
    font-family: Poppins, Inter, ui-sans-serif, system-ui, sans-serif;
    background:
        radial-gradient(circle at 14% 2%, rgba(129, 117, 242, .18) 0 120px, transparent 121px),
        radial-gradient(circle at 88% 0%, transparent 0 80px, rgba(91, 76, 218, .18) 81px 83px, transparent 84px),
        radial-gradient(circle at 90% 100%, transparent 0 90px, rgba(91, 76, 218, .22) 91px 93px, transparent 94px),
        #ececfd;
    color: var(--ink);
}

.app-body .sidebar {
    height: calc(100vh - 108px);
    min-height: 650px;
    position: sticky;
    top: 54px;
    padding: 32px 22px 24px;
    border: 0;
    border-radius: 24px 0 0 24px;
    background: linear-gradient(180deg, var(--blue) 0%, var(--blue-deep) 100%);
    box-shadow: 0 28px 70px rgba(62, 76, 190, .25);
}

.app-body .shell {
    min-height: calc(100vh - 108px);
    padding: 36px;
    border-radius: 0 24px 24px 0;
    background: rgba(249, 251, 255, .96);
    box-shadow: 0 28px 70px rgba(72, 80, 148, .18);
}

.app-body .topbar {
    position: static;
    grid-template-columns: 1fr auto;
    margin: 0 0 22px;
    padding: 0;
    border: 0;
    background: transparent;
    backdrop-filter: none;
}

.app-body .menu,
.app-body .page-kicker,
.app-body .title-group p,
.app-body .role-pill {
    display: none;
}

.app-body h1 {
    color: var(--ink);
    font-size: 23px;
    font-weight: 800;
}

.app-body .brand {
    padding: 0 4px 20px;
}

.app-body .brand-mark,
.app-body .brand-logo {
    width: 44px;
    height: 44px;
    border-radius: 9px;
    background: rgba(255, 255, 255, .18);
    box-shadow: none;
}

.app-body .brand-logo {
    display: block;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, .24);
    background: rgba(255, 255, 255, .9);
    box-shadow: 0 14px 28px rgba(10, 24, 16, .18);
}

.app-body .nav {
    min-height: 40px;
    padding: 0 4px;
    border: 0;
    color: rgba(255, 255, 255, .76);
    font-size: 13px;
    font-weight: 600;
    background: transparent;
    box-shadow: none;
}

.app-body .nav.active,
.app-body .nav:hover {
    color: #fff;
    background: rgba(255, 255, 255, .08);
}

.app-body .nav-icon,
.app-body .nav.active .nav-icon {
    background: transparent;
    color: currentColor;
}

.app-body .sidebar-card {
    position: absolute;
    left: -35px;
    bottom: 192px;
    width: 154px;
    min-height: 152px;
    padding: 16px 13px;
    border: 0;
    border-radius: 14px;
    background: #fff;
    color: var(--ink);
    box-shadow: 0 20px 40px rgba(78, 87, 168, .18);
}

.app-body .account {
    border: 0;
    background: transparent;
    color: #fff;
}

.app-body .session-card {
    min-width: 250px;
    min-height: 54px;
    grid-template-columns: 44px 1fr auto;
    gap: 10px;
    padding: 7px 12px 7px 8px;
    border: 0;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 12px 28px rgba(79, 89, 153, .08);
}

.app-body .session-card::before {
    content: "SK";
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    color: #fff;
    background: linear-gradient(135deg, #35bfa5, #2f65dc);
    font-size: 12px;
    font-weight: 800;
}

.app-body #logout-button {
    width: 34px;
    min-width: 34px;
    min-height: 34px;
    padding: 0;
    color: #95a0b5;
    background: transparent;
    box-shadow: none;
    font-size: 0;
}

.app-body .ops-hero {
    display: none;
}

.app-body .dairy-ops-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.app-body .dairy-ops-grid article,
.app-body .kpi,
.app-body .panel,
.app-body .quick-grid button {
    border: 0;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 14px 28px rgba(79, 89, 153, .07);
}

.app-body .kpi-grid {
    grid-template-columns: repeat(4, minmax(145px, 1fr));
    gap: 12px;
}

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

.app-body .quick-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.app-body .split {
    grid-template-columns: minmax(340px, 420px) minmax(0, 1fr);
}

.app-body input,
.app-body select,
.app-body textarea {
    border: 0;
    border-radius: 10px;
    background: #f8faff;
    box-shadow: inset 0 0 0 1px #edf1fa;
}

.brand-logo-wide,
.app-body .brand-logo-wide {
    width: 150px;
    height: 68px;
    max-width: 100%;
    object-fit: contain;
    object-position: center;
    border-radius: 16px;
    background: transparent;
}

.auth-brand .brand-logo-wide {
    width: 230px;
    height: 103px;
    max-width: min(72vw, 230px);
    border-radius: 20px;
}

.auth-brand {
    align-items: flex-start;
    gap: 14px;
}

.brand-horizontal {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
}

.auth-brand > div {
    padding-top: 8px;
}

@media (max-width: 1250px) {
    .app-body {
        padding: 28px;
        grid-template-columns: 190px minmax(0, 1fr);
    }

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

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

@media (max-width: 900px) {
    .app-body {
        padding: 14px;
        grid-template-columns: 1fr;
    }

    .app-body .sidebar {
        top: 14px;
        height: auto;
        min-height: auto;
        border-radius: 20px;
    }

    .app-body .shell {
        min-height: auto;
        border-radius: 20px;
        padding: 22px;
    }

    .hub-filters,
    .insights-rail,
    .app-body .dairy-ops-grid,
    .app-body .kpi-grid,
    .app-body .quick-grid,
    .app-body .panel-grid,
    .shipment-card {
        grid-template-columns: 1fr;
    }
}

/* Role-aware customer and admin login screens */
.auth-body {
    min-height: 100vh;
    font-family: Poppins, Inter, ui-sans-serif, system-ui, sans-serif;
    color: #263a56;
    background:
        radial-gradient(circle at 10% 4%, rgba(129, 117, 242, .18) 0 132px, transparent 133px),
        radial-gradient(circle at 84% 8%, rgba(16, 164, 92, .14) 0 150px, transparent 151px),
        linear-gradient(135deg, #f3f4ff 0%, #f7fcf4 48%, #fffaf0 100%);
    overflow-x: hidden;
}

.auth-shell {
    width: min(1180px, calc(100% - 32px));
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(380px, 480px);
    gap: clamp(24px, 5vw, 64px);
    align-items: center;
    padding: 40px 0;
}

.auth-copy {
    max-width: 660px;
}

.auth-home-link,
.auth-pill,
.auth-switch a {
    width: fit-content;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    font-weight: 800;
}

.auth-home-link {
    min-height: 42px;
    padding: 0 14px;
    border: 1px solid rgba(255, 255, 255, .86);
    border-radius: 999px;
    color: #40516b;
    background: rgba(255, 255, 255, .72);
    box-shadow: 0 12px 34px rgba(15, 23, 42, .06);
}

.auth-pill {
    min-height: 40px;
    padding: 0 13px;
    border-radius: 999px;
    color: #076b40;
    background: rgba(16, 164, 92, .1);
}

.admin-auth .auth-pill {
    color: #2647d4;
    background: rgba(46, 82, 223, .1);
}

.auth-copy h1 {
    font-size: clamp(42px, 6vw, 68px);
    line-height: 1.02;
    letter-spacing: 0;
}

.auth-copy p {
    max-width: 590px;
    color: #667085;
    font-size: 18px;
}

.auth-feature-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 6px;
}

.auth-feature-grid span {
    min-height: 126px;
    display: grid;
    gap: 8px;
    align-content: start;
    padding: 16px;
    border: 1px solid rgba(255, 255, 255, .82);
    border-radius: 22px;
    background: rgba(255, 255, 255, .72);
    color: #667085;
    box-shadow: 0 16px 40px rgba(15, 23, 42, .06);
}

.auth-feature-grid i,
.auth-feature-grid svg {
    width: 24px;
    height: 24px;
    color: #10a45c;
}

.admin-auth .auth-feature-grid i,
.admin-auth .auth-feature-grid svg {
    color: #2e52df;
}

.auth-feature-grid strong {
    display: block;
    color: #263a56;
}

.auth-panel {
    border: 1px solid rgba(255, 255, 255, .86);
    border-radius: 30px;
    padding: 24px;
    background: rgba(255, 255, 255, .9);
    box-shadow: 0 28px 72px rgba(29, 78, 216, .13);
}

.auth-panel-head {
    display: grid;
    gap: 4px;
    margin-bottom: 18px;
}

.auth-panel-head span {
    color: #10a45c;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.admin-auth .auth-panel-head span {
    color: #2e52df;
}

.auth-panel-head h2 {
    margin: 0;
    font-size: 28px;
}

.auth-panel-head p {
    margin: 0;
    color: #667085;
    line-height: 1.55;
}

.auth-tabs {
    grid-template-columns: repeat(auto-fit, minmax(106px, 1fr));
    padding: 6px;
    border-radius: 18px;
    background: #f7f9fd;
}

.auth-tab {
    min-height: 44px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    color: #40516b;
    background: transparent;
}

.auth-tab.active {
    color: white;
    background: linear-gradient(135deg, #10a45c, #13c987);
    border-color: transparent;
    box-shadow: 0 14px 28px rgba(16, 164, 92, .22);
}

.admin-auth .auth-tab.active {
    background: linear-gradient(135deg, #2e52df, #7468f4);
    box-shadow: 0 14px 28px rgba(46, 82, 223, .22);
}

.auth-form {
    gap: 14px;
}

.auth-form h2 {
    font-size: 22px;
}

.auth-form label {
    color: #40516b;
    font-weight: 800;
}

.auth-form input,
.auth-form textarea {
    margin-top: 7px;
    border-color: #edf1fa;
    border-radius: 14px;
    background: #f8faff;
}

.auth-form button,
.auth-switch a {
    min-height: 46px;
    border-radius: 999px;
}

.auth-form button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 0;
    color: white;
    background: linear-gradient(135deg, #10a45c, #13c987);
    font-weight: 900;
    box-shadow: 0 16px 34px rgba(16, 164, 92, .22);
}

.admin-auth .auth-form button {
    background: linear-gradient(135deg, #2e52df, #7468f4);
    box-shadow: 0 16px 34px rgba(46, 82, 223, .22);
}

.inline-note {
    border-radius: 14px;
    color: #40516b;
    background: #eef7f1;
}

.auth-switch {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 18px;
}

.auth-switch a {
    min-height: 42px;
    padding: 0 14px;
    color: #40516b;
    border: 1px solid #edf1fa;
    background: #fff;
}

.auth-body i,
.auth-body svg {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
}

@media (max-width: 960px) {
    .auth-shell {
        grid-template-columns: 1fr;
        align-content: center;
    }

    .auth-feature-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    .auth-shell {
        width: min(100% - 20px, 1180px);
        padding: 18px 0;
    }

    .auth-copy h1 {
        font-size: 36px;
    }

    .auth-panel {
        padding: 18px;
        border-radius: 24px;
    }
}

/* Final production polish */
.app-body .brand-logo,
.app-body .brand-logo-wide,
.auth-brand .brand-logo-wide {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    border-radius: 0 !important;
}

.secondary-action {
    margin-top: 6px;
    color: var(--blue) !important;
    background: #edf5ff !important;
}

@media (max-width: 1180px) {
    .app-body {
        padding: 24px;
        grid-template-columns: 1fr;
    }

    .app-body .sidebar {
        position: fixed;
        inset: 14px auto 14px 14px;
        z-index: 20;
        width: min(290px, calc(100vw - 28px));
        height: auto;
        min-height: 0;
        transform: translateX(calc(-100% - 24px));
        transition: transform .22s ease;
        border-radius: 22px;
        overflow-y: auto;
    }

    .app-body.nav-open .sidebar {
        transform: translateX(0);
    }

    .app-body .menu {
        display: inline-flex;
    }

    .app-body .shell {
        border-radius: 24px;
    }
}

@media (max-width: 760px) {
    .app-body {
        padding: 12px;
    }

    .app-body .shell {
        padding: 16px;
        border-radius: 20px;
    }

    .app-body .topbar,
    .app-body .session-card,
    .hub-filters,
    .hub-row,
    .shipment-card,
    .app-body .split,
    .app-body .panel-grid,
    .app-body .quick-grid,
    .app-body .kpi-grid,
    .app-body .dairy-ops-grid,
    .two,
    .three {
        grid-template-columns: 1fr !important;
    }

    .panel-head {
        align-items: stretch;
        flex-direction: column;
    }
}

/* Clean Svasth admin theme override */
.app-body {
    --blue: #2563eb;
    --blue-deep: #1d4ed8;
    --green: #10a45c;
    --green-dark: #076b40;
    --ink: #0f172a;
    --muted: #64748b;
    --line: #e6edf5;
    --panel: #ffffff;
    --soft: #effaf4;
    display: grid;
    grid-template-columns: 272px minmax(0, 1fr);
    gap: 20px;
    min-height: 100vh;
    padding: 20px;
    background:
        linear-gradient(90deg, rgba(16, 164, 92, .045) 1px, transparent 1px) 0 0 / 48px 48px,
        linear-gradient(0deg, rgba(37, 99, 235, .04) 1px, transparent 1px) 0 0 / 48px 48px,
        linear-gradient(135deg, #f6fff9 0%, #f4f7ff 44%, #fffaf1 100%);
    color: var(--ink);
    font-family: Poppins, Inter, ui-sans-serif, system-ui, sans-serif;
}

.app-body::before,
.app-body::after,
.app-body .sidebar-card,
.hub-filters,
.hub-list,
.shipment-card,
.insights-rail {
    display: none !important;
}

.app-body .sidebar {
    position: sticky;
    top: 20px;
    height: calc(100vh - 40px);
    min-height: 0;
    overflow-y: auto;
    padding: 20px 16px;
    border: 1px solid rgba(255, 255, 255, .86);
    border-radius: 28px;
    background: rgba(255, 255, 255, .88);
    color: var(--ink);
    box-shadow: 0 22px 60px rgba(15, 23, 42, .08);
    backdrop-filter: blur(18px);
}

.app-body .brand {
    padding: 0 4px 14px;
    border-bottom: 1px solid var(--line);
}

.app-body .brand small,
.app-body .account small,
.app-body .account a {
    color: var(--muted);
}

.app-body nav {
    gap: 6px;
}

.app-body .nav {
    min-height: 44px;
    padding: 0 12px;
    border-radius: 14px;
    color: #40516b;
    font-size: 13px;
    font-weight: 800;
    background: transparent;
}

.app-body .nav:hover,
.app-body .nav.active {
    color: var(--green-dark);
    background: var(--soft);
}

.app-body .nav-icon,
.app-body .nav.active .nav-icon {
    width: 30px;
    height: 30px;
    border-radius: 11px;
    color: var(--green-dark);
    background: #e6f8ee;
}

.app-body .account {
    margin-top: auto;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 18px;
    color: var(--ink);
    background: #f8fbf8;
}

.app-body .shell {
    min-height: calc(100vh - 40px);
    padding: 24px;
    border: 1px solid rgba(255, 255, 255, .86);
    border-radius: 28px;
    background: rgba(255, 255, 255, .78);
    box-shadow: 0 22px 60px rgba(15, 23, 42, .08);
    backdrop-filter: blur(18px);
}

.app-body .topbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
    margin: 0 0 18px;
    padding: 0 0 18px;
    border-bottom: 1px solid var(--line);
    background: transparent;
}

.app-body .page-kicker,
.app-body .title-group p,
.app-body .role-pill {
    display: block;
}

.app-body .page-kicker {
    color: var(--green-dark);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.app-body h1 {
    color: var(--ink);
    font-size: 30px;
    font-weight: 900;
}

.app-body .title-group p {
    max-width: 760px;
    color: var(--muted);
    line-height: 1.55;
}

.app-body .session-card {
    min-width: 300px;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 10px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 14px 34px rgba(15, 23, 42, .06);
}

.app-body .session-card::before {
    content: none;
}

.app-body #logout-button {
    width: auto;
    min-width: 42px;
    min-height: 42px;
    padding: 0 12px;
    border-radius: 999px;
    color: #fff;
    background: var(--ink);
    font-size: 0;
}

.app-body #logout-button svg {
    width: 18px;
    height: 18px;
}

.role-pill {
    min-height: 32px;
    padding: 0 11px;
    border-radius: 999px;
    color: var(--green-dark);
    background: var(--soft);
    font-size: 12px;
    font-weight: 900;
}

.dashboard-layout {
    display: block;
}

.feed-stack {
    gap: 18px;
}

.app-body .ops-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
    gap: 18px;
    align-items: stretch;
    margin-bottom: 18px;
    padding: 24px;
    border: 1px solid rgba(16, 164, 92, .16);
    border-radius: 24px;
    background: linear-gradient(135deg, #ffffff, #f2fbf5);
    box-shadow: 0 18px 44px rgba(15, 23, 42, .06);
}

.app-body .ops-hero h2 {
    max-width: 720px;
    margin-top: 8px;
    font-size: 34px;
    line-height: 1.08;
}

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

.hero-status-grid span,
.app-body .dairy-ops-grid article,
.app-body .kpi,
.app-body .panel,
.app-body .quick-grid button {
    border: 1px solid var(--line);
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 14px 34px rgba(15, 23, 42, .055);
}

.app-body .dairy-ops-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.app-body .kpi-grid {
    grid-template-columns: repeat(4, minmax(170px, 1fr));
    gap: 14px;
}

.kpi-icon,
.dairy-ops-grid svg {
    color: var(--green-dark);
    background: var(--soft);
}

.app-body .panel-grid,
.app-body .split {
    gap: 18px;
}

.app-body input,
.app-body select,
.app-body textarea {
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fbfdff;
    box-shadow: none;
}

.location-row button,
.app-body button {
    border-radius: 999px;
    background: linear-gradient(135deg, var(--green), #13c987);
    box-shadow: 0 14px 30px rgba(16, 164, 92, .18);
    font-weight: 850;
}

.app-body .quick-grid button,
.secondary-action {
    color: var(--ink) !important;
    background: #fff !important;
    border: 1px solid var(--line) !important;
    box-shadow: 0 12px 26px rgba(15, 23, 42, .055) !important;
}

.app-body th {
    background: #f8fafc;
    color: #607086;
}

.app-body tbody tr:hover td {
    background: #f8fbf8;
}

@media (max-width: 1180px) {
    .app-body {
        grid-template-columns: 1fr;
        padding: 12px;
    }

    .app-body .sidebar {
        position: fixed;
        inset: 12px auto 12px 12px;
        z-index: 20;
        width: min(300px, calc(100vw - 24px));
        height: auto;
        transform: translateX(calc(-100% - 24px));
        transition: transform .22s ease;
    }

    .app-body.nav-open .sidebar {
        transform: translateX(0);
    }

    .app-body .menu {
        display: inline-flex;
    }

    .app-body .shell {
        min-height: auto;
        border-radius: 24px;
    }
}

@media (max-width: 760px) {
    .app-body .topbar,
    .app-body .session-card,
    .app-body .ops-hero,
    .hero-status-grid,
    .app-body .dairy-ops-grid,
    .app-body .kpi-grid,
    .app-body .quick-grid,
    .app-body .panel-grid,
    .app-body .split,
    .two,
    .three {
        grid-template-columns: 1fr !important;
    }

    .app-body .shell {
        padding: 16px;
    }

    .app-body .ops-hero h2 {
        font-size: 26px;
    }
}

/* Admin functional controls */
.panel-head .table-filter,
.panel-head .search {
    min-height: 40px;
}
.panel-head .table-filter {
    width: min(170px, 100%);
    border: 1px solid rgba(21, 128, 61, 0.16);
    border-radius: 10px;
    padding: 0 12px;
    background: #fff;
    color: #214134;
    font-weight: 700;
}
.inline-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 210px;
}
.status-select.compact {
    min-width: 122px;
    height: 36px;
    border-radius: 10px;
    border-color: rgba(21, 128, 61, 0.18);
    background: #f8fffb;
    color: #214134;
    font-weight: 700;
}
.icon-action {
    white-space: nowrap;
}
.dashboard-activity {
    margin-top: 16px;
}
@media (max-width: 720px) {
    .panel-head {
        align-items: stretch;
    }
    .panel-head .search,
    .panel-head .table-filter {
        width: 100%;
    }
    .inline-actions {
        min-width: 180px;
        flex-wrap: wrap;
    }
}

/* Popup creation, bulk lists, privileges and account pages */
.app-body.font-compact { font-size: 13px; }
.app-body.font-normal { font-size: 13px; }
.app-body.font-comfort { font-size: 15px; }
.split.list-mode { display: block !important; }
.split.list-mode > .panel { width: 100%; }
.panel-head { gap: 10px; }
.panel-head .create-button {
    margin-left: auto;
    width: 38px;
    min-width: 38px;
    height: 38px;
    padding: 0;
    border-radius: 11px;
    justify-content: center;
    overflow: hidden;
    color: #fff !important;
    background: #15803d !important;
}
.panel-head .create-button svg { margin: 0; }
.entity-modal {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 18px;
    background: rgba(15, 23, 42, .48);
    backdrop-filter: blur(5px);
}
.entity-modal.open { display: flex; }
.modal-card {
    width: min(760px, 96vw);
    max-height: 90vh;
    overflow: auto;
    border-radius: 22px;
    border: 1px solid rgba(255,255,255,.55);
    background: #fafffb;
    box-shadow: 0 28px 90px rgba(15, 23, 42, .24);
}
.modal-head {
    position: sticky;
    top: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: #fff;
    border-bottom: 1px solid var(--line);
}
.modal-head h2 { font-size: 17px; margin: 0; }
.modal-head button { width: 36px; height: 36px; padding: 0; justify-content: center; }
#modal-body { padding: 16px; }
#modal-body .form { box-shadow: none !important; border-radius: 16px !important; }
.bulk-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin: 10px 0 12px;
    padding: 10px;
    border: 1px solid rgba(21,128,61,.14);
    border-radius: 14px;
    background: #f7fff9;
}
.bulk-bar span { font-weight: 800; color: #214134; }
.bulk-bar select { min-height: 36px; border-radius: 10px; border: 1px solid var(--line); padding: 0 10px; }
.bulk-bar button { min-height: 36px; padding: 0 12px; }
.check-col { width: 44px; text-align: center; }
.check-col input { width: 16px; height: 16px; accent-color: #15803d; }
.integration-grid,
.account-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 12px;
}
.integration-grid article,
.account-grid span {
    display: grid;
    gap: 4px;
    padding: 14px;
    border: 1px solid rgba(21,128,61,.13);
    border-radius: 16px;
    background: #fff;
}
.integration-grid svg,
.account-grid svg { color: #15803d; }
.integration-grid strong,
.account-grid strong { color: #18372a; }
.integration-grid em {
    width: max-content;
    padding: 4px 9px;
    border-radius: 999px;
    color: #166534;
    background: #dcfce7;
    font-style: normal;
    font-weight: 800;
}
.account-grid small { color: #64748b; font-weight: 700; }
@media (max-width: 720px) {
    .modal-card { width: 100%; max-height: 94vh; border-radius: 18px; }
    .bulk-bar { align-items: stretch; }
    .bulk-bar select,
    .bulk-bar button { width: 100%; }
}

/* Record action polish and order management responsiveness */
.row-actions,
.order-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.icon-only {
    width: 34px;
    min-width: 34px;
    height: 34px;
    padding: 0 !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    border: 1px solid rgba(21,128,61,.16) !important;
    background: #fff !important;
    color: #166534 !important;
    box-shadow: 0 8px 18px rgba(15,23,42,.05) !important;
}
.icon-only.danger {
    color: #b42318 !important;
    border-color: rgba(180,35,24,.16) !important;
    background: #fff7f6 !important;
}
.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
}
.detail-grid span {
    display: grid;
    gap: 4px;
    padding: 12px;
    border: 1px solid rgba(21,128,61,.12);
    border-radius: 12px;
    background: #fff;
}
.detail-grid small {
    color: #64748b;
    font-weight: 800;
    text-transform: capitalize;
}
.detail-grid strong {
    color: #18372a;
    overflow-wrap: anywhere;
}
#orders .panel { overflow: hidden; }
#orders .table-wrap {
    border-radius: 16px;
    border: 1px solid rgba(21,128,61,.12);
    background: #fff;
}
#orders-table { min-width: 1180px; }
#orders-table th,
#orders-table td {
    vertical-align: top;
    padding: 11px 10px;
}
#orders-table .status-select {
    width: 100%;
    margin: 2px 0;
}
#orders-table .map-link {
    min-width: 84px;
    justify-content: center;
}
@media (max-width: 1024px) {
    .app-body .table-wrap {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    table { min-width: 920px; }
    #orders-table { min-width: 1120px; }
}
@media (max-width: 720px) {
    .row-actions,
    .order-actions { gap: 5px; }
    .icon-only {
        width: 32px;
        min-width: 32px;
        height: 32px;
    }
    #orders .panel-head { align-items: stretch; }
}

/* Clean visible admin list layout fix */
.app-body .panel {
    overflow: hidden;
}
.app-body .panel-head {
    display: grid !important;
    grid-template-columns: minmax(130px, 170px) minmax(220px, 1fr) auto auto;
    align-items: center !important;
    gap: 10px !important;
}
.app-body .panel-head h2 {
    margin: 0;
    font-size: 18px !important;
    line-height: 1.25 !important;
    white-space: normal;
}
.app-body .panel-head > span {
    grid-column: 2 / -1;
    font-size: 12px !important;
}
.app-body .panel-head .search {
    width: 100% !important;
    min-width: 220px;
    height: 42px !important;
}
.app-body .panel-head .table-filter {
    width: 150px !important;
    min-width: 150px;
    height: 42px !important;
}
.app-body .panel-head .create-button {
    width: 44px !important;
    min-width: 44px !important;
    height: 44px !important;
    font-size: 0 !important;
    border-radius: 14px !important;
}
.app-body .panel-head .create-button svg {
    width: 20px;
    height: 20px;
}
.app-body .bulk-bar {
    display: flex !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
    gap: 8px !important;
    margin: 10px 0 14px !important;
    padding: 9px 12px !important;
    min-height: 54px;
}
.app-body .bulk-bar span {
    min-width: 90px;
    font-size: 13px;
}
.app-body .bulk-bar select {
    width: 170px !important;
    min-width: 150px;
    height: 38px !important;
    flex: 0 0 auto;
}
.app-body .bulk-bar button {
    width: auto !important;
    min-width: 42px;
    height: 38px !important;
    padding: 0 14px !important;
    border-radius: 999px !important;
}
.app-body .table-wrap {
    width: 100%;
    overflow-x: auto !important;
    overflow-y: hidden;
    border-radius: 16px;
}
.app-body table {
    width: 100%;
    min-width: 1060px;
    table-layout: auto;
}
.app-body th,
.app-body td {
    padding: 12px 10px !important;
    font-size: 13px !important;
    vertical-align: middle !important;
}
.app-body th {
    white-space: nowrap;
    font-size: 11px !important;
    letter-spacing: .02em;
    text-transform: uppercase;
}
.app-body .check-col {
    width: 38px !important;
    min-width: 38px !important;
}
.app-body .inline-actions {
    min-width: 158px !important;
    gap: 6px !important;
    flex-wrap: nowrap !important;
}
.app-body .status-select.compact {
    min-width: 114px !important;
    width: 114px !important;
    height: 38px !important;
    font-size: 12px !important;
}
.app-body .inline-actions .icon-action {
    width: 38px !important;
    min-width: 38px !important;
    height: 38px !important;
    padding: 0 !important;
    font-size: 0 !important;
    border-radius: 999px !important;
    justify-content: center !important;
}
.app-body .inline-actions .icon-action svg,
.app-body .row-actions .icon-only svg {
    width: 17px;
    height: 17px;
}
.app-body .row-actions {
    min-width: 122px;
    flex-wrap: nowrap !important;
    gap: 6px !important;
}
.app-body .row-actions .icon-only {
    width: 38px !important;
    min-width: 38px !important;
    height: 38px !important;
    border-radius: 999px !important;
}
#products-table {
    min-width: 1120px;
}
#products-table th:nth-child(4),
#products-table td:nth-child(4) { min-width: 140px; }
#products-table th:nth-child(5),
#products-table td:nth-child(5) { min-width: 160px; }
#products-table th:last-child,
#products-table td:last-child { min-width: 140px; }
#orders-table {
    min-width: 1240px;
}
#orders .panel-head {
    grid-template-columns: minmax(190px, 240px) minmax(220px, 1fr) auto auto !important;
}
#orders .order-actions {
    min-width: 250px;
    flex-wrap: wrap !important;
}
@media (max-width: 980px) {
    .app-body .panel-head {
        grid-template-columns: 1fr auto !important;
    }
    .app-body .panel-head h2 {
        grid-column: 1 / -1;
    }
    .app-body .panel-head .search,
    .app-body .panel-head .table-filter {
        width: 100% !important;
        min-width: 0;
    }
    .app-body .bulk-bar {
        flex-wrap: wrap !important;
    }
}
@media (max-width: 640px) {
    .app-body .shell {
        padding: 12px !important;
    }
    .app-body .panel {
        padding: 12px !important;
        border-radius: 18px !important;
    }
    .app-body .panel-head {
        grid-template-columns: 1fr 44px !important;
    }
    .app-body .panel-head .search,
    .app-body .panel-head .table-filter {
        grid-column: 1 / -1;
    }
    .app-body .bulk-bar select,
    .app-body .bulk-bar button {
        flex: 1 1 120px;
    }
    .app-body table,
    #products-table,
    #orders-table {
        min-width: 980px;
    }
}

/* Global filters and advanced management modules */
.global-filter-bar {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) 170px 170px auto auto;
    gap: 10px;
    align-items: center;
    margin: 0 0 12px;
    padding: 12px;
    border: 1px solid rgba(21,128,61,.12);
    border-radius: 18px;
    background: #f8fffb;
}
.global-filter-bar label {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 42px;
    padding: 0 12px;
    border: 1px solid rgba(21,128,61,.14);
    border-radius: 13px;
    background: #fff;
}
.global-filter-bar label svg { color: #15803d; width: 17px; }
.global-filter-bar input {
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    color: #142235;
    font: inherit;
}
.global-filter-bar button {
    min-height: 42px;
    padding: 0 15px !important;
    border-radius: 13px !important;
    white-space: nowrap;
}
#integrations-table,
#plans-table,
#roles-table,
#inventory-table {
    min-width: 980px;
}
#inventory .panel-head,
#subscriptions .panel-head,
#privileges .panel-head,
#integrations .panel-head {
    grid-template-columns: minmax(170px, 240px) minmax(220px, 1fr) auto auto auto !important;
}
#inventory .panel-head button,
#subscriptions .panel-head button,
#privileges .panel-head button,
#integrations .panel-head button {
    min-height: 40px;
}
#integrations-table code,
#roles-table code {
    display: block;
    max-width: 360px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 11px;
    color: #214134;
}
@media (max-width: 1100px) {
    .global-filter-bar {
        grid-template-columns: 1fr 1fr;
    }
    .global-filter-bar label:first-child {
        grid-column: 1 / -1;
    }
}
@media (max-width: 640px) {
    .global-filter-bar {
        grid-template-columns: 1fr;
        padding: 10px;
    }
    .global-filter-bar button,
    .global-filter-bar label {
        width: 100%;
    }
}

/* ZCRM-style single date filter popup */
.compact-filter-bar {
    grid-template-columns: minmax(260px, 1fr) auto auto !important;
    justify-content: end;
}
.date-filter-trigger {
    display: inline-flex !important;
    align-items: center;
    gap: 10px;
    min-width: 148px;
    min-height: 48px !important;
    padding: 7px 14px !important;
    border: 1px solid rgba(21, 128, 61, .14) !important;
    border-radius: 12px !important;
    background: #fff !important;
    color: #102033 !important;
    box-shadow: 0 10px 22px rgba(15,23,42,.045) !important;
}
.date-filter-trigger span {
    display: grid;
    gap: 1px;
    text-align: left;
    line-height: 1.1;
}
.date-filter-trigger small {
    color: #667085;
    font-size: 10px;
    font-weight: 800;
}
.date-filter-trigger strong {
    color: #0f172a;
    font-size: 12px;
    font-weight: 900;
}
.date-filter-modal {
    position: absolute;
    top: var(--date-filter-top, 84px);
    left: var(--date-filter-left, auto);
    right: var(--date-filter-right, 24px);
    z-index: 90;
    display: none;
    padding: 0;
    background: transparent;
    pointer-events: none;
}
.date-filter-modal.open { display: block; }
.date-filter-card {
    display: grid;
    grid-template-columns: 210px minmax(0, 1fr);
    width: var(--date-filter-width, min(820px, calc(100vw - 38px)));
    max-height: min(610px, calc(100vh - 28px));
    overflow: hidden;
    border: 1px solid #dbe6f2;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 28px 80px rgba(15,23,42,.18);
    pointer-events: auto;
}
.date-filter-modal.compact .date-filter-card {
    grid-template-columns: 190px minmax(0, 1fr);
}
.date-filter-modal.compact .date-calendars {
    grid-template-columns: 1fr;
}
.date-filter-modal.compact .calendar-month + .calendar-month {
    display: none;
}
.date-filter-modal.compact .date-presets {
    padding: 18px 16px;
}
.date-filter-modal.compact .date-filter-main {
    padding: 18px 16px 14px;
}
.date-presets {
    padding: 18px 16px;
    background: #f8fafc;
    border-right: 1px solid #e5edf6;
}
.date-presets h3 {
    margin: 0 0 12px;
    font-size: 16px;
    color: #182235;
}
.date-presets button {
    display: flex !important;
    align-items: center;
    justify-content: flex-start !important;
    gap: 12px;
    width: 100%;
    height: 36px !important;
    padding: 0 4px !important;
    color: #1f2937 !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    font-size: 13px;
    font-weight: 900;
}
.date-presets button span {
    width: 20px;
    height: 20px;
    border: 1px solid #bdd0e5;
    border-radius: 50%;
    background: #fff;
}
.date-presets button.active span {
    border-color: #3856f0;
    box-shadow: inset 0 0 0 5px #fff;
    background: #3856f0;
}
.date-filter-main {
    display: grid;
    grid-template-rows: auto auto auto auto auto;
    gap: 8px;
    padding: 16px 18px 14px;
    overflow: auto;
}
.date-filter-top {
    display: grid;
    grid-template-columns: 42px 1fr auto;
    align-items: center;
}
.date-filter-top h2 {
    margin: 0;
    text-align: center;
    font-size: 17px;
    color: #172033;
}
.date-filter-top > div {
    display: flex;
    gap: 8px;
}
.date-filter-top button {
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    padding: 0 !important;
    color: #526174 !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    justify-content: center !important;
}
.date-calendars {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    padding: 0 4px;
}
.calendar-month h3 {
    margin: 0 0 8px;
    text-align: center;
    color: #172033;
    font-size: 15px;
}
.calendar-week,
.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    align-items: center;
    text-align: center;
    gap: 4px;
}
.calendar-week span {
    color: #7a8698;
    font-size: 13px;
}
.calendar-days span,
.calendar-days button {
    width: 28px;
    height: 28px;
    margin: auto;
}
.calendar-days button {
    padding: 0 !important;
    color: #475467 !important;
    background: transparent !important;
    border: 0 !important;
    border-radius: 50% !important;
    box-shadow: none !important;
    justify-content: center !important;
    font-size: 13px;
    font-weight: 700;
}
.calendar-days button:hover,
.calendar-days button.in-range {
    background: #eef4ff !important;
    color: #3048d8 !important;
}
.calendar-days button.selected {
    background: #3856f0 !important;
    color: #fff !important;
}
.date-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.date-inputs label {
    display: grid;
    gap: 5px;
    color: #667085;
    font-weight: 900;
}
.date-inputs input {
    height: 42px;
    padding: 0 14px;
    border: 1px solid #d6e1ee;
    border-radius: 10px;
    color: #253244;
    font: inherit;
}
.date-filter-main p {
    margin: 0;
    color: #7a8698;
    font-size: 12px;
}
.date-filter-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding-top: 6px;
}
.date-filter-actions button {
    min-height: 38px !important;
    border-radius: 10px !important;
}
#global-reset {
    margin-left: auto;
    color: #111827 !important;
    background: #f8fafc !important;
    border: 0 !important;
    box-shadow: none !important;
}
@media (max-width: 900px) {
    .date-filter-card {
        grid-template-columns: 1fr;
        overflow: auto;
    }
    .date-presets {
        display: grid;
        grid-template-columns: repeat(2, minmax(130px, 1fr));
        gap: 4px 10px;
        border-right: 0;
        border-bottom: 1px solid #e5edf6;
        padding: 16px;
    }
    .date-presets h3 { grid-column: 1 / -1; }
    .date-calendars { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
    .compact-filter-bar { grid-template-columns: 1fr !important; }
    .date-filter-modal {
        top: 10px !important;
        left: 10px !important;
        right: 10px !important;
    }
    .date-filter-card { width: 100%; max-height: calc(100vh - 20px); }
    .date-filter-main { padding: 16px 12px; }
    .date-presets { grid-template-columns: 1fr; }
    .date-inputs { grid-template-columns: 1fr; }
    .date-filter-actions { flex-direction: column; align-items: stretch; }
    .date-filter-actions button { width: 100%; }
}

/* Warehouse inventory polish */
.inventory-filters {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.inventory-filters button {
    min-height: 36px !important;
    padding: 0 10px !important;
    border: 1px solid #dbe7df !important;
    border-radius: 10px !important;
    color: #214134 !important;
    background: #fff !important;
    box-shadow: none !important;
    font-size: 12px !important;
}
.inventory-filters button.active {
    color: #fff !important;
    background: #15803d !important;
    border-color: #15803d !important;
}
.badge.healthy {
    background: #dcfce7;
    color: #166534;
}
.badge.expired {
    background: #fee2e2;
    color: #991b1b;
}
.history-panel {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid var(--line);
}
.history-panel h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 10px;
    color: #18372a;
    font-size: 15px;
}
.inventory-detail-grid .badge {
    width: max-content;
}
.danger-action {
    color: #b91c1c !important;
    background: #fff5f5 !important;
    border: 1px solid #fecaca !important;
}
#inventory .panel-head {
    flex-wrap: wrap;
}

/* Clean admin navigation override */
.app-body {
    grid-template-columns: 260px minmax(0, 1fr);
}
.app-body .sidebar {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 18px 16px;
    border-radius: 26px;
    background: rgba(255, 255, 255, .94);
    box-shadow: 0 24px 70px rgba(15, 23, 42, .09);
    scrollbar-width: thin;
    scrollbar-color: rgba(21, 128, 61, .34) transparent;
}
.app-body .sidebar::-webkit-scrollbar {
    width: 6px;
}
.app-body .sidebar::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(21, 128, 61, .28);
}
.app-body .brand {
    display: grid;
    justify-items: center;
    gap: 8px;
    padding: 6px 8px 16px;
    border-bottom: 1px solid #e8f0ec;
}
.app-body .brand-logo,
.app-body .brand-logo-wide {
    width: min(178px, 100%) !important;
    height: auto !important;
    max-height: 78px;
    object-fit: contain;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}
.app-body .brand small {
    color: #718096;
    font-size: 11px;
    font-weight: 700;
}
.app-body .admin-nav,
.app-body nav {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 2px 0;
}
.app-body .nav-label {
    display: block !important;
    margin: 12px 10px 5px;
    color: #8a9a92;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.app-body .nav-label:first-child {
    margin-top: 2px;
}
.app-body .nav {
    position: relative;
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr);
    align-items: center;
    min-height: 42px;
    width: 100%;
    padding: 0 12px 0 8px;
    border-radius: 13px;
    color: #3f5065;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.15;
    text-align: left;
    background: transparent;
    box-shadow: none;
}
.app-body .nav:hover {
    color: #12683c;
    background: #f0faf4;
}
.app-body .nav.active {
    color: #0f6b3a;
    background: linear-gradient(90deg, #e7f8ee 0%, #f6fcf8 100%);
    box-shadow: inset 0 0 0 1px rgba(21, 128, 61, .08);
}
.app-body .nav.active::before {
    content: "";
    position: absolute;
    left: 0;
    top: 10px;
    bottom: 10px;
    width: 3px;
    border-radius: 0 999px 999px 0;
    background: #15803d;
}
.app-body .nav-icon,
.app-body .nav.active .nav-icon {
    display: inline-grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 10px;
    color: #15803d;
    background: #e9f8ef;
}
.app-body .nav:hover .nav-icon,
.app-body .nav.active .nav-icon {
    color: #fff;
    background: #15803d;
}
.app-body .nav-icon svg {
    width: 16px;
    height: 16px;
    stroke-width: 2.4;
}
.app-body .account {
    display: grid;
    gap: 3px;
    margin-top: auto;
    padding: 12px 13px;
    border: 1px solid #e3eee8;
    border-radius: 16px;
    background: #f8fcf9;
}
.app-body .account span {
    color: #18372a;
    font-size: 12px;
    font-weight: 900;
}
.app-body .account small,
.app-body .account a {
    color: #64748b;
    font-size: 11px;
    font-weight: 700;
}
.app-body .account a {
    color: #15803d;
    text-decoration: none;
}
@media (max-width: 1180px) {
    .app-body {
        grid-template-columns: 1fr;
    }
    .app-body .sidebar {
        width: min(286px, calc(100vw - 24px));
        padding: 16px 14px;
    }
}
@media (max-width: 520px) {
    .app-body .sidebar {
        inset: 10px auto 10px 10px;
        width: min(280px, calc(100vw - 20px));
        border-radius: 22px;
    }
    .app-body .nav {
        min-height: 40px;
        font-size: 12px;
    }
}

/* Collapsible sidebar sections */
.app-body .admin-nav {
    gap: 7px;
}
.app-body .nav-section {
    display: grid;
    gap: 5px;
}
.app-body .nav-section[hidden] {
    display: none !important;
}
.app-body .nav-section-toggle {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 18px;
    align-items: center;
    width: 100%;
    min-height: 30px;
    padding: 0 8px 0 12px;
    border: 0;
    border-radius: 10px;
    color: #778579 !important;
    background: transparent !important;
    box-shadow: none !important;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
    text-align: left;
}
.app-body .nav-section-toggle:hover {
    color: #15803d !important;
    background: #f4fbf6 !important;
}
.app-body .nav-section-toggle svg {
    width: 15px;
    height: 15px;
    justify-self: end;
    transition: transform .16s ease;
}
.app-body .nav-section:not(.open) .nav-section-toggle svg {
    transform: rotate(-90deg);
}
.app-body .nav-section-items {
    display: grid;
    gap: 4px;
    padding-left: 6px;
    border-left: 1px solid #e6f0ea;
    margin-left: 8px;
}
.app-body .nav-section:not(.open) .nav-section-items {
    display: none;
}
.app-body .nav-label {
    display: none !important;
}
.app-body .nav {
    grid-template-columns: 34px minmax(0, 1fr);
    column-gap: 8px;
    min-height: 40px;
    padding: 0 10px 0 7px;
    white-space: normal;
}
.app-body .nav-icon,
.app-body .nav.active .nav-icon {
    width: 27px;
    height: 27px;
}
.app-body .nav.active::before {
    left: -7px;
    top: 9px;
    bottom: 9px;
}
@media (max-width: 520px) {
    .app-body .nav-section-items {
        margin-left: 6px;
        padding-left: 5px;
    }
}

/* My Account editable profile */
#my-account .account-form {
    align-content: start;
}
#my-account .account-form button {
    width: max-content;
    min-width: 168px;
}
#my-account .account-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}
#my-account input[type="password"] {
    letter-spacing: .02em;
}
@media (max-width: 720px) {
    #my-account .account-form button {
        width: 100%;
    }
}

/* Neat request-based login */
.auth-panel {
    padding: 28px;
}
.auth-panel-head {
    margin-bottom: 18px;
}
.auth-panel-head h2 {
    font-size: 30px;
}
.auth-tabs {
    display: none !important;
}
.auth-request-panel {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid #edf1fa;
}
.auth-request-panel.hidden {
    display: none;
}
.auth-request-panel button,
.auth-form .auth-back {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    min-height: 38px;
    width: 100%;
    padding: 0 10px;
    border: 1px solid transparent;
    border-radius: 12px;
    color: #40516b !important;
    background: #f8faff !important;
    box-shadow: none !important;
    font-size: 13px;
    font-weight: 800;
}
.auth-request-panel button:hover,
.auth-form .auth-back:hover {
    color: #0f6b3a !important;
    border-color: #d9efe2;
    background: #f2fbf6 !important;
}
.auth-form .auth-back {
    width: max-content;
    min-height: 34px;
    margin-bottom: 2px;
    padding: 0 10px;
}
.auth-form:not(.active) {
    display: none !important;
}
.auth-form.active {
    display: grid !important;
}
.auth-form h2 {
    margin: 0 0 2px;
    font-size: 20px;
}
.auth-form label {
    gap: 5px;
}
.auth-form input,
.auth-form textarea {
    min-height: 46px;
}
#password-form button[type="submit"],
#otp-request-form button:not(.auth-back),
#register-form button:not(.auth-back),
#reset-form button:not(.auth-back) {
    width: 100%;
}
.auth-switch {
    margin-top: 14px;
}
@media (max-width: 560px) {
    .auth-panel {
        padding: 20px;
    }
    .auth-panel-head h2 {
        font-size: 26px;
    }
}

.permission-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}
.permission-grid fieldset {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 12px;
    border: 1px solid #e2eadf;
    border-radius: 14px;
    background: #fbfefb;
}
.permission-grid legend {
    padding: 0 6px;
    color: #0f6b3a;
    font-size: 12px;
    font-weight: 900;
}
.permission-grid label {
    min-height: 28px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #334155;
    font-size: 12px;
    font-weight: 800;
}
.permission-grid input {
    width: 16px;
    height: 16px;
}
.compact-json textarea {
    min-height: 58px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 11px;
}
.report-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}
.report-summary-grid article {
    display: grid;
    gap: 7px;
    padding: 16px;
    border: 1px solid #e2eadf;
    border-radius: 16px;
    background: #fff;
}
.report-summary-grid span {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    color: #0f8a4a;
    background: #e9f8ef;
}
.report-summary-grid small,
.report-insight span {
    color: #64748b;
}
.report-summary-grid strong {
    color: #0f172a;
    font-size: 22px;
}
.report-insights-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 16px;
}
.report-insight {
    padding: 16px;
    border: 1px solid #e2eadf;
    border-radius: 16px;
    background: #fff;
}
.report-insight h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    font-size: 15px;
}
.report-insight ul,
.report-insight li {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.report-insight li {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    padding: 9px 0;
    border-bottom: 1px solid #eef3f0;
}
.event-list p {
    margin: 5px 0 0;
    color: #64748b;
    font-size: 12px;
}
@media (max-width: 980px) {
    .permission-grid,
    .report-insights-grid {
        grid-template-columns: 1fr;
    }
    .report-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
@media (max-width: 560px) {
    .report-summary-grid {
        grid-template-columns: 1fr;
    }
}

.deployment-page {
    display: grid;
    gap: 16px;
}
.deployment-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(240px, 320px);
    gap: 18px;
    align-items: center;
    overflow: hidden;
}
.deployment-hero h2 {
    max-width: 760px;
    color: #0f172a;
    font-size: clamp(28px, 3.5vw, 44px);
    line-height: 1.05;
}
.deployment-hero p {
    max-width: 760px;
    margin-top: 10px;
    color: #64748b;
    line-height: 1.65;
}
.deployment-status-card {
    display: grid;
    gap: 8px;
    padding: 18px;
    border: 1px solid #dcece2;
    border-radius: 20px;
    background: linear-gradient(135deg, #f2fbf6, #fff);
}
.deployment-status-card svg {
    width: 46px;
    height: 46px;
    padding: 10px;
    border-radius: 16px;
    color: #0f8a4a;
    background: #fff;
}
.deployment-status-card strong {
    color: #0f172a;
    font-size: 18px;
}
.deployment-status-card span,
.deployment-kpis small,
.deployment-domain-list small,
.deployment-list small,
.deployment-command-list small,
.deployment-timeline small {
    color: #64748b;
}
.deployment-kpis {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}
.deployment-kpis article {
    display: grid;
    gap: 8px;
    padding: 16px;
    border: 1px solid #e2eadf;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 18px 42px rgba(15, 23, 42, .05);
}
.deployment-kpis svg {
    width: 36px;
    height: 36px;
    padding: 9px;
    border-radius: 13px;
    color: #0f8a4a;
    background: #e9f8ef;
}
.deployment-kpis strong {
    color: #0f172a;
    font-size: 18px;
}
.deployment-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}
.deployment-panel {
    align-content: start;
}
.deployment-domain-list,
.deployment-checklist,
.deployment-command-list,
.deployment-list,
.deployment-timeline {
    display: grid;
    gap: 10px;
}
.deployment-domain-list span,
.deployment-list li,
.deployment-command-list button,
.deployment-timeline span {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 3px 12px;
    align-items: center;
    padding: 13px;
    border: 1px solid #e2eadf;
    border-radius: 16px;
    background: #fbfefb;
}
.deployment-domain-list svg,
.deployment-list svg,
.deployment-command-list svg {
    grid-row: span 2;
    width: 42px;
    height: 42px;
    padding: 10px;
    border-radius: 15px;
    color: #0f8a4a;
    background: #e9f8ef;
}
.deployment-domain-list strong,
.deployment-list strong,
.deployment-command-list strong,
.deployment-timeline strong {
    color: #0f172a;
}
.deployment-checklist label {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    padding: 11px 13px;
    border: 1px solid #e2eadf;
    border-radius: 14px;
    background: #fbfefb;
    color: #334155;
    font-weight: 800;
}
.deployment-checklist input {
    width: 17px;
    height: 17px;
}
.deployment-list {
    margin: 0;
    padding: 0;
    list-style: none;
}
.deployment-command-list button {
    width: 100%;
    border: 1px solid #e2eadf;
    color: inherit;
    text-align: left;
    cursor: pointer;
}
.deployment-command-list button:hover {
    border-color: #bde8ce;
    background: #f2fbf6;
}
.deployment-timeline {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}
.deployment-timeline span {
    grid-template-columns: 36px minmax(0, 1fr);
}
.deployment-timeline b {
    grid-row: span 2;
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    color: #fff;
    background: #0f8a4a;
}
@media (max-width: 1180px) {
    .deployment-kpis,
    .deployment-timeline {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
@media (max-width: 860px) {
    .deployment-hero,
    .deployment-grid {
        grid-template-columns: 1fr;
    }
}
@media (max-width: 560px) {
    .deployment-kpis,
    .deployment-timeline {
        grid-template-columns: 1fr;
    }
}
