/* =====================================================================
   style.css  —  shared by Dashboard.aspx (app shell) and AccountDashboard.aspx
   Put this file at:  /CSS/dashboard/style.css
   ===================================================================== */

:root {
    /* Brand palette */
    --c-blue: #3b6cff;
    --c-indigo: #5b4bff;
    --c-violet: #8b5cf6;
    --c-pink: #ec4899;
    --c-teal: #14b8a6;
    --c-green: #22c55e;
    --c-orange: #f97316;
    --c-amber: #f59e0b;
    --c-red: #ef4444;
    --c-sky: #0ea5e9;

    /* Surfaces & text */
    --d-ink: #172033;
    --d-muted: #6b778c;
    --d-line: #e6e9f2;
    --d-bg: #f3f5fb;
    --d-surface: #ffffff;
    --d-soft: #f6f7fc;
    --d-track: #edf0f7;

    --d-radius-xl: 20px;
    --d-radius-lg: 16px;
    --d-radius-sm: 10px;
    --d-shadow: 0 1px 2px rgba(23, 32, 51, .04), 0 6px 20px -8px rgba(23, 32, 51, .12);
    --d-shadow-hover: 0 2px 4px rgba(23, 32, 51, .06), 0 14px 32px -12px rgba(23, 32, 51, .22);
}

html { scroll-behavior: smooth; }
body { background: var(--d-bg); color: var(--d-ink); }
.num { font-variant-numeric: tabular-nums; }
.grid-gap { margin-bottom: 1.1rem; }

/* ---------------------------------------------------------------------
   Hero header
   --------------------------------------------------------------------- */
.hero {
    position: relative; overflow: hidden; isolation: isolate;
    margin: 1rem 0 0; padding: 1.4rem 1.6rem;
    border-radius: var(--d-radius-xl); color: #fff;
    background: linear-gradient(120deg, #3b3bff 0%, #6d3cff 45%, #c02fd9 100%);
    box-shadow: 0 18px 40px -18px rgba(91, 75, 255, .55);
    display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.hero::before, .hero::after {
    content: ""; position: absolute; border-radius: 50%; z-index: -1; filter: blur(2px);
}
.hero::before { width: 260px; height: 260px; right: -60px; top: -120px; background: radial-gradient(circle, rgba(255, 255, 255, .28), transparent 70%); }
.hero::after { width: 200px; height: 200px; left: 38%; bottom: -130px; background: radial-gradient(circle, rgba(255, 196, 77, .45), transparent 70%); }
.hero h1 { font-size: clamp(1.25rem, 1rem + 1.1vw, 1.75rem); font-weight: 700; margin: .15rem 0 .25rem; color: #fff; }
.hero-date { font-size: .8rem; opacity: .85; margin: 0; }
.hero-sub { font-size: .8rem; opacity: .9; margin: 0; }
.hero-pills { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: .75rem; }
.hero-pill {
    display: inline-flex; align-items: center; gap: .4rem; font-size: .78rem; font-weight: 500;
    background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .22);
    padding: .3rem .7rem; border-radius: 999px; color: #fff;
}
.hero-pill b { font-weight: 700; }
.hero-pill .dot { width: 7px; height: 7px; border-radius: 50%; background: #fde047; }
.hero-pill.alert .dot { background: #fda4af; animation: pulse-light 1.8s infinite; }
.btn-refresh {
    display: inline-flex; align-items: center; gap: .4rem; flex: 0 0 auto;
    background: rgba(255, 255, 255, .95); color: var(--c-indigo); border: 0;
    border-radius: 12px; padding: .55rem 1rem; font-weight: 600; font-size: .82rem; cursor: pointer;
    box-shadow: 0 6px 16px -6px rgba(0, 0, 0, .3); transition: transform .15s;
}
.btn-refresh:hover { transform: translateY(-1px); }
.btn-refresh:disabled { opacity: .8; cursor: default; transform: none; }
.btn-refresh svg { width: 16px; height: 16px; }
.btn-refresh.spinning svg { animation: spin .8s linear infinite; }

/* ---------------------------------------------------------------------
   Sticky section chips
   --------------------------------------------------------------------- */
.chips-bar {
    position: sticky; top: 0; z-index: 30;
    margin: 0 -15px 1rem; padding: .65rem 15px;
    background: rgba(243, 245, 251, .88);
    backdrop-filter: saturate(170%) blur(10px); -webkit-backdrop-filter: saturate(170%) blur(10px);
}
.chips { display: flex; gap: .45rem; overflow-x: auto; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
    flex: 0 0 auto; display: inline-flex; align-items: center; gap: .4rem;
    border-radius: 999px; padding: .38rem .9rem; font-size: .8rem; font-weight: 500;
    background: var(--d-surface); color: var(--d-ink); border: 1px solid var(--d-line);
    text-decoration: none !important; transition: background .2s, color .2s, border-color .2s, box-shadow .2s;
}
.chip i { width: 8px; height: 8px; border-radius: 50%; background: var(--tone); }
.chip:hover { border-color: var(--tone); color: var(--tone); }
.chip.active { background: var(--tone); border-color: var(--tone); color: #fff; box-shadow: 0 6px 14px -6px var(--tone); }
.chip.active i { background: #fff; }

.dash-section { scroll-margin-top: 70px; }
.section-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .5rem; margin: .4rem 0 .8rem; }
.section-title { display: flex; align-items: center; gap: .55rem; font-size: 1.05rem; font-weight: 700; margin: 0; }
.section-title .bar { width: 6px; height: 22px; border-radius: 4px; background: linear-gradient(180deg, var(--g1), var(--g2)); }

/* focus */
.chip:focus-visible, .btn:focus-visible, .btn-refresh:focus-visible, .nav-link:focus-visible,
[data-jump]:focus-visible, .range-btn:focus-visible { outline: 2px solid var(--c-indigo); outline-offset: 2px; }

/* ---------------------------------------------------------------------
   Cards
   --------------------------------------------------------------------- */
.card { border-radius: var(--d-radius-lg); border: 1px solid var(--d-line); box-shadow: var(--d-shadow); background: var(--d-surface); }
.card-header { background: transparent; border-bottom: 1px solid var(--d-line); }
.card-header-title { display: flex; align-items: center; gap: .55rem; font-size: .95rem; font-weight: 600; }
.head-ico {
    width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; flex: 0 0 auto;
    color: #fff; background: linear-gradient(135deg, var(--g1), var(--g2));
}
.head-ico svg { width: 16px; height: 16px; }

.range-btn {
    display: inline-flex; align-items: center; gap: .4rem; cursor: pointer;
    background: var(--d-surface); border: 1px solid var(--d-line); color: var(--d-ink);
    border-radius: 10px; padding: .4rem .75rem; font-size: .78rem; font-weight: 500;
}
.range-btn svg { width: 14px; height: 14px; color: var(--c-indigo); }
.range-btn:hover { border-color: var(--c-indigo); }

/* segmented tabs, colourful active */
.nav-segment .nav-link.active { background: linear-gradient(135deg, var(--c-blue), var(--c-violet)) !important; color: #fff !important; }

/* ---------------------------------------------------------------------
   Gradient KPI tiles (overview)
   --------------------------------------------------------------------- */
.tile {
    position: relative; overflow: hidden; height: 100%; isolation: isolate;
    border-radius: var(--d-radius-lg); padding: 1rem 1.1rem; color: #fff;
    background: linear-gradient(135deg, var(--g1), var(--g2));
    box-shadow: 0 14px 28px -16px var(--g1);
    transition: transform .2s, box-shadow .2s;
}
.tile:hover { transform: translateY(-2px); box-shadow: 0 20px 34px -16px var(--g1); }
.tile::after {
    content: ""; position: absolute; z-index: -1; width: 140px; height: 140px; right: -40px; bottom: -60px;
    border-radius: 50%; background: rgba(255, 255, 255, .14);
}
.tile-top { display: flex; justify-content: space-between; align-items: flex-start; gap: .5rem; }
.tile-label { font-size: .8rem; font-weight: 500; opacity: .92; margin: 0; }
.tile-ico { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; background: rgba(255, 255, 255, .2); flex: 0 0 auto; }
.tile-ico svg { width: 19px; height: 19px; }
.tile-value { font-size: clamp(1.3rem, 1rem + 1vw, 1.85rem); font-weight: 700; margin: .4rem 0 .35rem; line-height: 1.15; word-break: break-word; }
.tile-foot { display: flex; justify-content: space-between; align-items: center; gap: .4rem; flex-wrap: wrap; font-size: .74rem; opacity: .95; }
.tile .trend { background: rgba(255, 255, 255, .22); color: #fff; }

.g-blue   { --g1: #3b6cff; --g2: #6c8dff; }
.g-green  { --g1: #10b981; --g2: #34d399; }
.g-violet { --g1: #8b5cf6; --g2: #d946ef; }
.g-orange { --g1: #f97316; --g2: #fbbf24; }
.g-teal   { --g1: #0d9488; --g2: #2dd4bf; }
.g-pink   { --g1: #e11d48; --g2: #fb7185; }
.g-indigo { --g1: #4f46e5; --g2: #8b5cf6; }
.g-sky    { --g1: #0284c7; --g2: #38bdf8; }

/* Soft tinted KPI (inventory) */
.soft {
    height: 100%; border-radius: var(--d-radius-lg); padding: 1rem 1.1rem; position: relative; overflow: hidden;
    background: var(--d-surface); border: 1px solid var(--d-line); box-shadow: var(--d-shadow);
    transition: box-shadow .2s, border-color .2s;
}
.soft::before { content: ""; position: absolute; inset: 0 0 auto; height: 4px; background: linear-gradient(90deg, var(--g1), var(--g2)); }
.soft .tile-label { color: var(--d-muted); opacity: 1; }
.soft .tile-ico { color: #fff; background: linear-gradient(135deg, var(--g1), var(--g2)); box-shadow: 0 6px 14px -6px var(--g1); }
.soft .tile-value { color: var(--d-ink); }
.soft .tile-foot { color: var(--d-muted); }
.soft[data-jump] { cursor: pointer; }
.soft[data-jump]:hover { box-shadow: var(--d-shadow-hover); border-color: var(--g1); }

.trend { display: inline-flex; align-items: center; gap: 2px; font-weight: 700; padding: 2px 7px; border-radius: 7px; font-size: .72rem; }
.trend.up { color: #047857; background: rgba(16, 185, 129, .14); }
.trend.down { color: #be123c; background: rgba(225, 29, 72, .12); }
.trend svg { width: 12px; height: 12px; }

/* ---------------------------------------------------------------------
   Product health cards (inventory for a small catalogue)
   --------------------------------------------------------------------- */
.pcard {
    height: 100%; display: flex; flex-direction: column; overflow: hidden;
    border-radius: var(--d-radius-lg); background: var(--d-surface);
    border: 1px solid var(--d-line); box-shadow: var(--d-shadow); transition: box-shadow .25s, transform .25s;
}
.pcard:hover { box-shadow: var(--d-shadow-hover); transform: translateY(-2px); }
.pcard-head {
    position: relative; overflow: hidden; color: #fff; padding: 1rem 1.1rem .9rem;
    background: linear-gradient(135deg, var(--g1), var(--g2));
    display: flex; justify-content: space-between; align-items: flex-start; gap: .75rem;
}
.pcard-head::after { content: ""; position: absolute; width: 120px; height: 120px; right: -30px; top: -50px; border-radius: 50%; background: rgba(255, 255, 255, .15); }
.pcard-head h3 { font-size: 1rem; font-weight: 700; margin: 0 0 .15rem; color: #fff; line-height: 1.25; }
.pcard-head .sub { font-size: .74rem; opacity: .9; }
.status {
    position: relative; z-index: 1; flex: 0 0 auto; display: inline-flex; align-items: center; gap: .35rem;
    font-size: .7rem; font-weight: 700; padding: .25rem .6rem; border-radius: 999px; background: #fff; white-space: nowrap;
}
.status i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status.ok { color: #047857; }
.status.low { color: #b45309; }
.status.out { color: #be123c; }
.status.out i { animation: pulse 1.8s infinite; }
.status.over { color: #6d28d9; }

.pcard-body { display: grid; grid-template-columns: 124px 1fr; gap: 1rem; align-items: center; padding: 1rem 1.1rem .5rem; }
.ring-wrap { position: relative; width: 124px; height: 124px; }
.ring { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring .track { fill: none; stroke: var(--d-track); stroke-width: 11; }
.ring .fill { fill: none; stroke-width: 11; stroke-linecap: round; transition: stroke-dashoffset 1.3s cubic-bezier(.2, .7, .2, 1); }
.ring .mark { stroke: var(--d-ink); stroke-width: 2.5; opacity: .55; }
.ring-center { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; line-height: 1.1; }
.ring-center b { font-size: 1.25rem; font-weight: 700; }
.ring-center small { font-size: .7rem; color: var(--d-muted); }
.facts { display: grid; gap: .55rem; }
.fact { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; font-size: .78rem; color: var(--d-muted); }
.fact b { color: var(--d-ink); font-size: .9rem; font-weight: 600; }
.fact b.cover-low { color: #be123c; }
.fact b.cover-ok { color: #047857; }

.pstats { display: grid; grid-template-columns: repeat(4, 1fr); gap: .5rem; padding: .5rem 1.1rem .8rem; }
.pstat { background: var(--d-soft); border-radius: var(--d-radius-sm); padding: .45rem .5rem; text-align: center; min-width: 0; }
.pstat span { display: block; font-size: .66rem; color: var(--d-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pstat b { display: block; font-size: .82rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pstat.in b { color: #059669; }
.pstat.out b { color: #e11d48; }
.pstat.margin b { color: var(--g1); }

.spark { padding: 0 1.1rem 1rem; margin-top: auto; }
.spark svg { width: 100%; height: 54px; display: block; overflow: visible; }
.spark .line { fill: none; stroke: var(--g1); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.spark .area { opacity: .9; }
.spark .end { fill: var(--d-surface); stroke: var(--g1); stroke-width: 2.2; }
.spark-cap { display: flex; justify-content: space-between; font-size: .68rem; color: var(--d-muted); margin-top: .2rem; }

/* ---------------------------------------------------------------------
   Insights
   --------------------------------------------------------------------- */
.insights { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.insight {
    display: grid; grid-template-columns: 34px 1fr; gap: .7rem; align-items: start;
    padding: .7rem .8rem; border-radius: 12px; background: var(--tint); border: 1px solid transparent;
}
.insight .i-ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; color: #fff; background: var(--tone); }
.insight .i-ico svg { width: 17px; height: 17px; }
.insight p { margin: 0; font-size: .82rem; line-height: 1.45; color: var(--d-ink); }
.insight p b { font-weight: 700; }
.insight small { display: block; color: var(--d-muted); font-size: .72rem; margin-top: .15rem; }
.insight.danger { --tone: #e11d48; --tint: rgba(225, 29, 72, .07); }
.insight.warn   { --tone: #f59e0b; --tint: rgba(245, 158, 11, .09); }
.insight.good   { --tone: #10b981; --tint: rgba(16, 185, 129, .08); }
.insight.info   { --tone: #6366f1; --tint: rgba(99, 102, 241, .08); }

/* ---------------------------------------------------------------------
   Charts, money cards, table
   --------------------------------------------------------------------- */
.chart-box { height: 340px; width: 100%; }

.money-card .card-body { padding: 1.1rem 1.2rem; }
.money-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.money-head h6 { margin: 0; font-size: .82rem; font-weight: 600; color: var(--d-muted); }
.money-total { font-size: 1.5rem; font-weight: 700; margin: .3rem 0 .6rem; background: linear-gradient(90deg, var(--g1), var(--g2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.split-row { display: grid; grid-template-columns: 30px 1fr auto; align-items: center; gap: .25rem .6rem; padding: .45rem 0; }
.split-row + .split-row { border-top: 1px dashed var(--d-line); }
.split-row .ico { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; color: var(--tone); background: color-mix(in srgb, var(--tone) 14%, transparent); }
.split-row .ico svg { width: 15px; height: 15px; }
.split-row .lbl { font-size: .8rem; color: var(--d-muted); line-height: 1.3; }
.split-row .val { font-size: .85rem; font-weight: 600; text-align: right; }
.split-row .bar { grid-column: 2 / 4; height: 7px; border-radius: 7px; background: var(--d-track); overflow: hidden; }
.split-row .bar i { display: block; height: 100%; width: 0; border-radius: 7px; background: linear-gradient(90deg, var(--tone), color-mix(in srgb, var(--tone) 55%, #fff)); transition: width 1.1s cubic-bezier(.2, .7, .2, 1); }

.year-stat { padding: .9rem 1rem; border-radius: 14px; background: var(--d-soft); margin-bottom: .75rem; }
.year-stat h6 { font-size: .78rem; font-weight: 600; margin: 0 0 .25rem; color: var(--tone); }
.year-stat .h2 { margin: 0 0 .2rem; }

#tblMonthlyAnalysis th, #tblMonthlyAnalysis td { padding: .55rem .7rem !important; font-size: 12px; }
#tblMonthlyAnalysis thead th { background: linear-gradient(90deg, rgba(59, 108, 255, .08), rgba(139, 92, 246, .08)); color: var(--c-indigo); }
#tblMonthlyAnalysis tbody tr:hover td { background: rgba(59, 108, 255, .04); }
#tblMonthlyAnalysis tfoot th { border-top: 2px solid var(--c-indigo); font-weight: 700; color: var(--c-indigo); }

.empty-state { text-align: center; color: var(--d-muted); font-size: .85rem; padding: 2rem 1rem; }
.empty-state strong { display: block; color: var(--d-ink); margin-bottom: .25rem; }

/* ---------------------------------------------------------------------
   Loading skeleton + page-load sequence
   --------------------------------------------------------------------- */
.is-loading { position: relative; overflow: hidden; background: var(--d-track); border-radius: var(--d-radius-sm); }
.is-loading::after {
    content: ""; position: absolute; inset: 0; transform: translateX(-100%);
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .6), transparent); animation: shimmer 1.3s infinite;
}
.tile-value.is-loading { color: transparent; min-height: 1.7rem; width: 60%; background: rgba(255, 255, 255, .25); }
.soft .tile-value.is-loading { background: var(--d-track); }
.pcard-skel { height: 330px; border-radius: var(--d-radius-lg); }

.reveal { opacity: 0; transform: translateY(16px); }
.is-ready .reveal { animation: rise .6s cubic-bezier(.2, .7, .2, 1) forwards; animation-delay: calc(var(--i, 0) * 70ms); }

@keyframes rise { to { opacity: 1; transform: none; } }
@keyframes shimmer { to { transform: translateX(100%); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(225, 29, 72, .55); } 70% { box-shadow: 0 0 0 7px rgba(225, 29, 72, 0); } 100% { box-shadow: 0 0 0 0 rgba(225, 29, 72, 0); } }
@keyframes pulse-light { 0% { box-shadow: 0 0 0 0 rgba(255, 255, 255, .7); } 70% { box-shadow: 0 0 0 7px rgba(255, 255, 255, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0); } }

/* ---------------------------------------------------------------------
   Tablet  (768px – 1199px)
   --------------------------------------------------------------------- */
@media (max-width: 1199.98px) {
    .chart-box { height: 300px; }
    .hero { padding: 1.2rem 1.3rem; }
}

/* ---------------------------------------------------------------------
   Mobile  (< 768px)
   --------------------------------------------------------------------- */
@media (max-width: 767.98px) {
    .container-fluid { padding-left: 10px; padding-right: 10px; }
    .grid-gap { margin-bottom: .7rem; }
    .row.tight { margin-left: -5px; margin-right: -5px; }
    .row.tight > [class*="col"] { padding-left: 5px; padding-right: 5px; }

    .hero { margin-top: .6rem; padding: 1rem; border-radius: 16px; flex-direction: column; align-items: stretch; }
    .btn-refresh { justify-content: center; }
    .chips-bar { margin: 0 -10px .7rem; padding: .5rem 10px; }

    .tile, .soft { padding: .8rem .85rem; border-radius: 14px; }
    .tile-ico { width: 30px; height: 30px; border-radius: 9px; }
    .tile-ico svg { width: 16px; height: 16px; }
    .tile-foot .from { display: none; }

    .card-header { flex-direction: column; align-items: stretch !important; gap: .55rem; padding: .8rem 1rem; }
    .card-header .nav-segment, .card-header .range-btn { width: 100%; }
    .card-body { padding: .85rem 1rem; }
    .chart-box { height: 260px; }

    .pcard-body { grid-template-columns: 104px 1fr; gap: .8rem; }
    .ring-wrap { width: 104px; height: 104px; }
    .ring-center b { font-size: 1.05rem; }
    .pstats { grid-template-columns: repeat(2, 1fr); }
    .money-total { font-size: 1.3rem; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .reveal { opacity: 1; transform: none; }
    .is-ready .reveal, .is-loading::after, .status.out i, .hero-pill.alert .dot, .btn-refresh.spinning svg { animation: none; }
    .ring .fill, .split-row .bar i { transition: none; }
    .tile:hover, .pcard:hover, .btn-refresh:hover { transform: none; }
}

/* ---------------------------------------------------------------------
   Product card layout wrapper + single-product (wide) card
   --------------------------------------------------------------------- */
.pcard-main { display: flex; flex-direction: column; flex: 1 1 auto; }

@media (min-width: 768px) {
    .pcard.wide .pcard-main {
        display: grid; grid-template-columns: minmax(300px, 1fr) minmax(220px, .8fr); align-items: center;
        column-gap: .5rem; padding: .25rem 0 0;
    }
    .pcard.wide .pcard-body { grid-template-columns: 140px 1fr; }
    .pcard.wide .ring-wrap { width: 140px; height: 140px; }
    .pcard.wide .ring-center b { font-size: 1.5rem; }
    .pcard.wide .pstats { grid-template-columns: repeat(2, 1fr); gap: .6rem; padding: 1rem 1.1rem; }
    .pcard.wide .pstat { padding: .7rem .6rem; }
    .pcard.wide .pstat b { font-size: 1rem; }
    .pcard.wide .spark { grid-column: 1 / -1; }
    .pcard.wide .spark svg { height: 80px; }
    .pcard.wide .pcard-head h3 { font-size: 1.15rem; }
}
@media (min-width: 1200px) {
    .pcard.wide .pcard-main { grid-template-columns: minmax(320px, 1.1fr) minmax(240px, .8fr) minmax(280px, 1.1fr); }
    .pcard.wide .spark { grid-column: auto; padding: 1rem 1.1rem; margin-top: 0; }
    .pcard.wide .spark svg { height: 110px; }
}
.pcard.wide:hover { transform: none; }


/* =====================================================================
   APP SHELL  —  Dashboard.aspx  (AdminLTE 2 + iframe tabs)
   Everything below is scoped to <body class="app-shell ..."> so it
   never leaks into the pages that open inside the tabs.
   ===================================================================== */

.app-shell {
    --shell-header: linear-gradient(120deg, #3b3bff 0%, #6d3cff 55%, #c02fd9 100%);
    --shell-side: #141a2e;
    --shell-side-2: #1b2340;
    --shell-side-text: #c3c9de;
    --shell-side-muted: #7f89a8;
    --shell-active: linear-gradient(90deg, #4f46e5, #8b5cf6);
    background: var(--shell-side);
    font-family: inherit;
}
.app-shell .wrapper { background: var(--shell-side); }

/* ---------- Font Awesome 4 → 5 fixes for AdminLTE / tab plugin glyphs ---------- */
.app-shell .main-header .sidebar-toggle::before { content: none !important; }
.app-shell .fa-remove::before, .app-shell .fa-close::before { content: "\f00d"; }
.app-shell .fa-circle-o::before { content: "\f111"; font-weight: 400; }
.app-shell .fa-dashboard::before { content: "\f3fd"; }
.app-shell .fa-refresh::before { content: "\f021"; }

/* ---------- Header ---------- */
.app-shell .main-header { box-shadow: 0 6px 20px -10px rgba(91, 75, 255, .6); }
.app-shell.skin-blue .main-header .navbar { background: var(--shell-header); border: 0; min-height: 50px; }
.app-shell.skin-blue .main-header .logo {
    background: var(--shell-side); color: #fff; border: 0;
    display: flex; align-items: center; gap: 10px; padding: 0 14px; overflow: hidden;
}
.app-shell.skin-blue .main-header .logo:hover { background: var(--shell-side); }
.app-shell .main-header .logo .logo-mini {
    display: block; width: 34px; height: 34px !important; flex: 0 0 34px; object-fit: contain;
    background: #fff; border-radius: 10px; padding: 3px;
}
.app-shell .main-header .logo .logo-lg {
    display: block; font-size: 14px; font-weight: 600; line-height: 1.2; text-align: left;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.app-shell .main-header .sidebar-toggle {
    display: flex; align-items: center; justify-content: center;
    width: 50px; height: 50px; padding: 0; color: #fff; font-size: 18px;
}
.app-shell.skin-blue .main-header .navbar .sidebar-toggle:hover { background: rgba(255, 255, 255, .14); }
.app-shell .main-header .page-title-mobile { display: none; }

.app-shell .navbar-custom-menu > .nav > li > a {
    display: flex; align-items: center; gap: 8px; height: 50px; padding: 0 12px !important;
    color: #fff; font-size: 13px; font-weight: 500; transition: background .2s;
}
.app-shell.skin-blue .main-header .navbar .nav > li > a:hover,
.app-shell.skin-blue .main-header .navbar .nav > li > a:focus { background: rgba(255, 255, 255, .14); color: #fff; }
.app-shell .hdr-ico {
    width: 32px; height: 32px; border-radius: 10px; display: inline-grid; place-items: center; flex: 0 0 auto;
    background: rgba(255, 255, 255, .18); font-size: 14px;
}
.app-shell .hdr-ico.db { background: rgba(253, 224, 71, .25); color: #fde047; }
.app-shell .hdr-ico.off { background: rgba(253, 164, 175, .25); color: #fecdd3; }
.app-shell .fy-pill {
    display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px;
    background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .24); font-size: 12px; white-space: nowrap;
}
.app-shell .fy-short { display: none; }
.app-shell .avatar {
    width: 32px; height: 32px; border-radius: 50%; display: inline-grid; place-items: center; flex: 0 0 auto;
    background: linear-gradient(135deg, #f97316, #fbbf24); color: #fff; font-size: 12px; font-weight: 700;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, .5);
}

/* ---------- Sidebar ---------- */
.app-shell.skin-blue .main-sidebar, .app-shell.skin-blue .left-side { background: var(--shell-side); }
.app-shell .main-sidebar { padding-top: 58px; box-shadow: 4px 0 24px -12px rgba(0, 0, 0, .5); }
.app-shell .sidebar { padding-bottom: 20px; }
.app-shell .sidebar::-webkit-scrollbar { width: 6px; }
.app-shell .sidebar::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .15); border-radius: 6px; }

.app-shell.skin-blue .sidebar-menu > li > a {
    margin: 2px 10px; padding: 7px 34px 7px 8px; border-radius: 12px; border-left: 0 !important;
    color: var(--shell-side-text); font-size: 13.5px; font-weight: 500; transition: background .2s, color .2s;
}
.app-shell .sidebar-menu > li > a > .menu-ico {
    width: 32px; height: 32px; border-radius: 10px; display: inline-grid; place-items: center; vertical-align: middle;
    margin-right: 10px; font-size: 14px; color: var(--tone, #8b5cf6);
    background: rgba(255, 255, 255, .06); transition: background .2s, color .2s, transform .2s;
}
.app-shell.skin-blue .sidebar-menu > li:hover > a { background: var(--shell-side-2); color: #fff; }
.app-shell .sidebar-menu > li:hover > a > .menu-ico { transform: scale(1.06); }
.app-shell.skin-blue .sidebar-menu > li.active > a,
.app-shell.skin-blue .sidebar-menu > li.menu-open > a { background: var(--shell-side-2); color: #fff; }
.app-shell.skin-blue .sidebar-menu > li.active > a > .menu-ico,
.app-shell.skin-blue .sidebar-menu > li.menu-open > a > .menu-ico { background: var(--tone, #8b5cf6); color: #fff; box-shadow: 0 6px 14px -6px var(--tone, #8b5cf6); }
.app-shell .sidebar-menu > li > a .pull-right-container, .app-shell .sidebar-menu > li > a > .fa-angle-left { color: var(--shell-side-muted); }

.app-shell.skin-blue .sidebar-menu > li > .treeview-menu { background: transparent; margin: 2px 10px 6px; padding: 2px 0 2px 0; }
.app-shell.skin-blue .treeview-menu > li > a {
    position: relative; display: block; margin: 1px 0; padding: 7px 10px 7px 50px !important; border-radius: 10px;
    color: var(--shell-side-muted); font-size: 13px; transition: background .2s, color .2s;
}
.app-shell .treeview-menu > li > a > i:first-child,
.app-shell .treeview-menu > li > a > svg:first-child,
.app-shell .treeview-menu > li > a > .menu-ico { display: none; }
.app-shell .treeview-menu > li > a::before {
    content: ""; position: absolute; left: 24px; top: 50%; width: 7px; height: 7px; margin-top: -3.5px;
    border-radius: 50%; border: 2px solid var(--shell-side-muted); transition: background .2s, border-color .2s;
}
.app-shell .treeview-menu > li > a::after {
    content: ""; position: absolute; left: 27px; top: 0; bottom: 0; width: 1px; background: rgba(255, 255, 255, .06); z-index: -1;
}
.app-shell.skin-blue .treeview-menu > li > a:hover { color: #fff; background: rgba(255, 255, 255, .04); }
.app-shell.skin-blue .treeview-menu > li.active > a { color: #fff; background: var(--shell-active); }
.app-shell .treeview-menu > li.active > a::before { background: #fff; border-color: #fff; }
.app-shell .treeview-menu .treeview-menu > li > a { padding-left: 64px !important; }
.app-shell .treeview-menu .treeview-menu > li > a::before { left: 40px; width: 5px; height: 5px; margin-top: -2.5px; }

/* collapsed mini sidebar (desktop toggle / tablet default) */
.app-shell.sidebar-mini.sidebar-collapse .sidebar-menu > li > a { margin: 2px 0; padding: 9px; border-radius: 0; text-align: center; }
.app-shell.sidebar-mini.sidebar-collapse .sidebar-menu > li > a > .menu-ico { margin: 0; }
.app-shell.sidebar-mini.sidebar-collapse .sidebar-menu > li:hover > a > span:not(.pull-right-container) {
    background: var(--shell-side-2) !important; color: #fff; padding: 14px 16px !important; border-radius: 0 10px 0 0;
    top: 0 !important; font-weight: 600;
}
.app-shell.sidebar-mini.sidebar-collapse .sidebar-menu > li:hover > .treeview-menu {
    background: var(--shell-side-2) !important; margin: 0; padding: 4px 6px 8px; border-radius: 0 0 10px 0;
    box-shadow: 8px 8px 24px -12px rgba(0, 0, 0, .6);
}
.app-shell.sidebar-mini.sidebar-collapse .treeview-menu > li > a { padding-left: 34px !important; }
.app-shell.sidebar-mini.sidebar-collapse .treeview-menu > li > a::before { left: 14px; }
.app-shell.sidebar-mini.sidebar-collapse .main-header .logo { padding: 0 8px; justify-content: center; }

/* ---------- Tab strip ---------- */
.app-shell .content-wrapper { background: var(--d-bg); }
.app-shell .content-tabs {
    height: 46px; line-height: 46px; background: var(--d-surface); border-bottom: 1px solid var(--d-line);
    box-shadow: 0 2px 10px -6px rgba(23, 32, 51, .15);
}
.app-shell .content-tabs button, .app-shell .roll-nav {
    height: 46px; width: 42px; background: var(--d-surface); border: 0; color: var(--d-muted); font-size: 13px; outline: 0;
    transition: color .2s, background .2s;
}
.app-shell .content-tabs button:hover { color: var(--c-indigo); background: rgba(91, 75, 255, .06); }
.app-shell .roll-left { border-right: 1px solid var(--d-line); }
.app-shell .roll-right { border-left: 1px solid var(--d-line); }
.app-shell .content-tabs .tabClose {
    width: auto; padding: 0 14px; display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--d-ink);
}
.app-shell nav.page-tabs { height: 46px; margin-left: 42px; }
.app-shell .page-tabs a {
    position: relative; height: 34px; line-height: 34px; margin: 6px 4px 0; padding: 0 12px 0 14px;
    border: 1px solid var(--d-line) !important; border-radius: 10px; background: var(--d-soft);
    color: var(--d-muted); font-size: 12.5px; font-weight: 500; transition: background .2s, color .2s, box-shadow .2s;
}
.app-shell .page-tabs a:hover { color: var(--d-ink); background: var(--d-surface); }
.app-shell .page-tabs a.active {
    color: #fff; border-color: transparent !important; background: linear-gradient(135deg, #4f46e5, #8b5cf6);
    box-shadow: 0 6px 14px -6px rgba(91, 75, 255, .7);
}
.app-shell .page-tabs a i { margin-left: 6px; font-size: 11px; opacity: .65; border-radius: 50%; padding: 3px; transition: opacity .2s, background .2s; }
.app-shell .page-tabs a i:hover { opacity: 1; background: rgba(225, 29, 72, .15); color: #e11d48; }
.app-shell .page-tabs a.active i:hover { background: rgba(255, 255, 255, .25); color: #fff; }
.app-shell .dropdown-menu { border: 1px solid var(--d-line); border-radius: 12px; padding: 6px; box-shadow: 0 14px 30px -12px rgba(23, 32, 51, .3); }
.app-shell .dropdown-menu > li > a { display: flex; align-items: center; gap: 8px; border-radius: 8px; padding: 7px 10px; font-size: 13px; line-height: 1.4; }
.app-shell .dropdown-menu > li > a i { width: 16px; text-align: center; color: var(--c-indigo); }
.app-shell .dropdown-menu > li > a:hover { background: rgba(91, 75, 255, .08); color: var(--c-indigo); }
.app-shell .content-iframe { background: var(--d-bg) !important; }
.app-shell .content-iframe iframe { border: 0; }

/* ---------- Footer ---------- */
.app-shell .main-footer {
    background: var(--d-surface); border-top: 1px solid var(--d-line); color: var(--d-muted);
    padding: 8px 15px; font-size: 12px;
}
.app-shell .main-footer a { color: var(--c-indigo); }

.app-shell .sidebar-backdrop { display: none; }

/* focus */
.app-shell a:focus-visible, .app-shell button:focus-visible { outline: 2px solid #fde047; outline-offset: -2px; }
.app-shell .content-tabs a:focus-visible, .app-shell .content-tabs button:focus-visible { outline-color: var(--c-indigo); }

/* ---------- Tablet (768–1199px): mini sidebar by default (set in JS), compact header ---------- */
@media (max-width: 1199.98px) {
    .app-shell .fy-full { display: none; }
    .app-shell .fy-short { display: inline; }
    .app-shell .navbar-custom-menu .btn-label { display: none; }
}

/* ---------- Mobile (<768px): off-canvas sidebar, icon-only header, swipeable tabs ---------- */
@media (max-width: 767.98px) {
    .app-shell .main-header .logo { display: none; }
    .app-shell .main-header .navbar { display: flex; align-items: center; margin: 0; }
    .app-shell .main-header .navbar > .nav.pull-left { float: none !important; margin: 0; }
    .app-shell .main-header .page-title-mobile {
        display: block; flex: 1 1 auto; min-width: 0; color: #fff; font-weight: 600; font-size: 14px;
        white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-right: 6px;
    }
    .app-shell .main-header .navbar-custom-menu { float: none; margin-left: auto; }
    .app-shell .navbar-custom-menu > .nav { margin: 0; display: flex; }
    .app-shell .navbar-custom-menu > .nav > li { float: none; }
    .app-shell .navbar-custom-menu > .nav > li > a { padding: 0 6px !important; }
    .app-shell .fy-pill { padding: 0; border: 0; background: none; }
    .app-shell .fy-pill .fy-text { display: none; }
    .app-shell .fy-pill .hdr-ico { display: inline-grid; }
    .app-shell .main-sidebar { padding-top: 50px; width: 270px; transform: translate(-270px, 0); transition: transform .3s ease; }
    .app-shell.sidebar-open .main-sidebar { transform: translate(0, 0); }
    .app-shell.sidebar-open .content-wrapper, .app-shell.sidebar-open .main-footer { transform: none !important; }
    .app-shell .sidebar-backdrop {
        display: block; position: fixed; inset: 0; z-index: 805; background: rgba(10, 13, 25, .55);
        opacity: 0; visibility: hidden; transition: opacity .3s, visibility .3s;
    }
    .app-shell.sidebar-open .sidebar-backdrop { opacity: 1; visibility: visible; }

    .app-shell .tabLeft, .app-shell .tabRight, .app-shell #fullScreen { display: none !important; }
    .app-shell nav.page-tabs {
        margin: 0 52px 0 0 !important; width: auto !important; overflow-x: auto; overflow-y: hidden;
        -webkit-overflow-scrolling: touch; scrollbar-width: none;
    }
    .app-shell nav.page-tabs::-webkit-scrollbar { display: none; }
    .app-shell .page-tabs-content { margin-left: 0 !important; float: none !important; display: flex; white-space: nowrap; padding-right: 8px; }
    .app-shell .page-tabs a { float: none !important; flex: 0 0 auto; }
    .app-shell .content-tabs .btn-group.roll-nav { right: 0 !important; }
    .app-shell .content-tabs .tabClose { width: 52px; padding: 0; justify-content: center; }
    .app-shell .content-tabs .tabClose .btn-label, .app-shell .content-tabs .tabClose .fa-caret-down { display: none; }
    .app-shell .main-footer { display: none; }
}

@media (min-width: 768px) {
    .app-shell .fy-pill > .hdr-ico { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    .app-shell .main-sidebar, .app-shell .sidebar-backdrop, .app-shell .sidebar-menu > li > a > .menu-ico { transition: none; }
}


/* =====================================================================
   AUTH PAGES  —  FYSelection.aspx (company & financial year)
   Scoped to <body class="auth-page">.
   ===================================================================== */

/* These pages no longer load Bootstrap, so set box-sizing here.
   Without it, width:100% + padding pushes the text boxes outside the card. */
.auth-page *, .auth-page *::before, .auth-page *::after { box-sizing: border-box; }
.auth-page input, .auth-page select, .auth-page button { font-family: inherit; max-width: 100%; }

.auth-page {
    min-height: 100vh; margin: 0; background: var(--d-bg); color: var(--d-ink);
    font-family: inherit; -webkit-font-smoothing: antialiased;
}
.auth-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(380px, 46%) 1fr; }

/* ---------- Brand panel: live inventory & accounting scene ---------- */
.auth-brand {
    position: relative; overflow: hidden; isolation: isolate; color: #fff;
    background: linear-gradient(140deg, #3b3bff 0%, #6d3cff 50%, #c02fd9 100%);
    padding: 2rem 2rem 1.25rem; display: flex; flex-direction: column; gap: .75rem;
}
.auth-brand::before, .auth-brand::after { content: ""; position: absolute; border-radius: 50%; z-index: -1; }
.auth-brand::before { width: 460px; height: 460px; right: -160px; top: -160px; background: radial-gradient(circle, rgba(255, 255, 255, .22), transparent 68%); }
.auth-brand::after { width: 380px; height: 380px; left: -120px; bottom: -150px; background: radial-gradient(circle, rgba(255, 196, 77, .38), transparent 68%); }
.brand-grid { position: absolute; inset: 0; z-index: -1; opacity: .18; background-image: linear-gradient(rgba(255,255,255,.35) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.35) 1px, transparent 1px); background-size: 38px 38px; -webkit-mask-image: radial-gradient(ellipse at 50% 45%, #000 30%, transparent 75%); mask-image: radial-gradient(ellipse at 50% 45%, #000 30%, transparent 75%); }
.brand-foot { font-size: .72rem; opacity: .7; }

.scene { position: relative; flex: 1 1 auto; min-height: 480px; --mx: 0; --my: 0; }
.w { position: absolute; transform: translate3d(calc(var(--mx) * var(--d, 1) * 18px), calc(var(--my) * var(--d, 1) * 18px), 0); transition: transform .3s ease-out; }
.w-in {
    border-radius: 16px; padding: .85rem 1rem; background: rgba(255, 255, 255, .95); color: #172033; cursor: pointer;
    box-shadow: 0 24px 44px -20px rgba(20, 10, 80, .6); animation: floaty 6s ease-in-out infinite; animation-delay: var(--fd, 0s);
    transition: box-shadow .25s, scale .25s; user-select: none;
}
.w:hover .w-in { scale: 1.035; box-shadow: 0 32px 56px -18px rgba(20, 10, 80, .75); }
.w:active .w-in { scale: .98; }
.w-head { display: flex; align-items: center; gap: .45rem; font-size: .72rem; color: #6b778c; font-weight: 600; }
.w-head .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--tone, #4f46e5); }
.w-head b { margin-left: auto; font-size: .95rem; color: #172033; font-variant-numeric: tabular-nums; }
.w-sub { font-size: .66rem; color: #6b778c; }

/* sales chart */
.w-chart { left: 1%; top: 5%; width: 57%; --tone: #4f46e5; }
.bars { display: flex; align-items: flex-end; gap: 5px; height: 118px; margin-top: .7rem; }
.bars i { flex: 1; height: var(--h, 4%); border-radius: 5px 5px 2px 2px; background: linear-gradient(180deg, #8b5cf6, #4f46e5); transition: height .9s cubic-bezier(.2, .7, .2, 1); }
.bars i:last-child { background: linear-gradient(180deg, #fbbf24, #f97316); }
.bars i:nth-child(2n) { transition-delay: .05s; }
.months { display: flex; justify-content: space-between; margin-top: .35rem; font-size: .58rem; color: #9aa3b5; letter-spacing: .02em; }

/* stock */
.w-stock { right: 1%; top: 0; width: 37%; --tone: #0d9488; }
.stock-row { display: flex; align-items: center; gap: .7rem; margin-top: .55rem; }
.stock-ring { width: 62px; height: 62px; flex: 0 0 62px; transform: rotate(-90deg); }
.stock-ring circle { fill: none; stroke-width: 8; }
.stock-ring .tr { stroke: #e6f4f1; }
.stock-ring .fl { stroke: url(#ringGrad); stroke-linecap: round; transition: stroke-dashoffset 1s cubic-bezier(.2, .7, .2, 1); }
.stock-qty b { display: block; font-size: 1.15rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.crates { display: flex; flex-wrap: wrap; gap: 4px; margin-top: .6rem; min-height: 32px; }
.crates span { width: 14px; height: 14px; border-radius: 3px; background: linear-gradient(135deg, #14b8a6, #22c55e); box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .12); }
.crates span.new { animation: drop .5s cubic-bezier(.3, 1.4, .5, 1) both; }

/* ledger (dark glass) */
.w-ledger { right: 0; top: 37%; width: 45%; --tone: #fde047; }
.w-ledger .w-in { background: rgba(23, 14, 70, .42); color: #fff; border: 1px solid rgba(255, 255, 255, .2); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.w-ledger .w-head { color: rgba(255, 255, 255, .75); }
.w-ledger .w-head b { color: #fff; }
.ledger { list-style: none; margin: .55rem 0 0; padding: 0; display: grid; gap: 5px; }
.ledger li { display: grid; grid-template-columns: 26px 1fr auto; align-items: center; gap: .5rem; font-size: .74rem; font-variant-numeric: tabular-nums; padding: 4px 6px; border-radius: 8px; background: rgba(255, 255, 255, .07); }
.ledger li.in { animation: slideIn .5s cubic-bezier(.2, .7, .2, 1) both; }
.ledger .tag { font-size: .6rem; font-weight: 700; text-align: center; border-radius: 5px; padding: 1px 0; }
.ledger .dr { background: rgba(74, 222, 128, .25); color: #bbf7d0; }
.ledger .cr { background: rgba(251, 113, 133, .28); color: #fecdd3; }
.ledger .ph { height: 6px; border-radius: 4px; background: rgba(255, 255, 255, .22); }
.ledger-bal { display: flex; justify-content: space-between; margin-top: .55rem; padding-top: .45rem; border-top: 1px dashed rgba(255, 255, 255, .25); font-size: .72rem; color: rgba(255, 255, 255, .75); }
.ledger-bal b { color: #fde047; font-variant-numeric: tabular-nums; }

/* invoice */
.w-invoice { left: 5%; top: 50%; width: 42%; --tone: #f97316; }
.w-invoice .w-in { position: relative; overflow: hidden; }
.inv-lines { margin-top: .6rem; display: grid; gap: 6px; }
.inv-lines div { display: grid; grid-template-columns: 1fr auto; gap: .6rem; align-items: center; font-size: .72rem; font-variant-numeric: tabular-nums; }
.inv-lines .ph { height: 7px; border-radius: 4px; background: #eef0f6; }
.inv-total { display: flex; justify-content: space-between; margin-top: .6rem; padding-top: .45rem; border-top: 2px solid #f1f2f7; font-size: .8rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.stamp { position: absolute; right: 12px; top: 38px; font-size: .78rem; font-weight: 800; letter-spacing: .12em; color: #059669; border: 2px solid #059669; border-radius: 6px; padding: 2px 8px; rotate: -14deg; opacity: .9; }
.w-invoice.print .inv-lines div { animation: slideIn .45s cubic-bezier(.2, .7, .2, 1) both; }
.w-invoice.print .inv-lines div:nth-child(2) { animation-delay: .12s; }
.w-invoice.print .inv-lines div:nth-child(3) { animation-delay: .24s; }
.w-invoice.print .stamp { animation: stamp .45s .6s cubic-bezier(.3, 1.6, .5, 1) both; }

/* barcode scanner */
.w-scan { left: 51%; top: 79%; width: 23%; --tone: #ef4444; }
.w-scan .w-in { padding: .6rem .7rem; position: relative; overflow: hidden; }
.w-scan svg { display: block; width: 100%; height: 34px; }
.w-scan .beam { position: absolute; left: 6px; right: 6px; height: 2px; top: 10px; background: #ef4444; box-shadow: 0 0 10px 2px rgba(239, 68, 68, .6); animation: scan 1.8s ease-in-out infinite alternate; }

/* coins */
.coin {
    position: absolute; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 1rem;
    color: #92400e; background: radial-gradient(circle at 35% 30%, #fff7cc, #fbbf24 55%, #d97706); box-shadow: 0 10px 18px -8px rgba(120, 60, 0, .6), inset 0 -3px 0 rgba(0, 0, 0, .12);
    transform: translate3d(calc(var(--mx) * var(--d, 1) * 18px), calc(var(--my) * var(--d, 1) * 18px), 0); transition: transform .3s ease-out;
}
.coin span { animation: floaty 4.5s ease-in-out infinite; animation-delay: var(--fd, 0s); display: block; }
.coin:hover { animation: spinY .8s ease; }
.c1 { left: 59%; top: 3%; --d: 1.8; } .c2 { left: -1%; top: 44%; --d: 1.5; --fd: -1.5s; } .c3 { right: 44%; top: 40%; --d: 2; --fd: -3s; width: 30px; height: 30px; font-size: .8rem; }

/* delivery road */
.road { position: absolute; left: -2rem; right: -2rem; bottom: 0; height: 38px; }
.road::after { content: ""; position: absolute; left: 0; right: 0; bottom: 8px; border-bottom: 2px dashed rgba(255, 255, 255, .35); }
.truck { position: absolute; bottom: 10px; left: -80px; width: 64px; animation: drive 11s linear infinite; }
.truck svg { display: block; width: 100%; filter: drop-shadow(0 6px 8px rgba(20, 10, 80, .35)); }

@keyframes floaty { 0%, 100% { translate: 0 0; } 50% { translate: 0 -8px; } }
@keyframes drop { 0% { transform: translateY(-26px) scale(.6); opacity: 0; } 100% { transform: none; opacity: 1; } }
@keyframes slideIn { from { opacity: 0; transform: translateX(-14px); } to { opacity: 1; transform: none; } }
@keyframes stamp { 0% { scale: 2.2; opacity: 0; } 100% { scale: 1; opacity: .9; } }
@keyframes scan { from { top: 8px; } to { top: calc(100% - 10px); } }
@keyframes drive { 0% { left: -80px; } 100% { left: calc(100% + 80px); } }
@keyframes spinY { to { rotate: y 360deg; } }

/* ---------- Form side ---------- */
.auth-main { display: flex; align-items: center; justify-content: center; padding: 2.5rem 1.5rem; min-width: 0; }
.auth-card {
    width: 100%; max-width: 460px; min-width: 0; background: var(--d-surface); border: 1px solid var(--d-line);
    border-radius: 22px; padding: 2rem 2rem 1.6rem; box-shadow: 0 30px 60px -30px rgba(40, 30, 120, .35);
    animation: rise .6s cubic-bezier(.2, .7, .2, 1) both;
}
.auth-logo { display: flex; align-items: center; gap: .85rem; margin-bottom: 1.4rem; }
.auth-logo img { height: 52px; max-width: 130px; object-fit: contain; border-radius: 12px; background: var(--d-soft); padding: 4px 8px; }
.auth-logo .who { font-size: .78rem; color: var(--d-muted); line-height: 1.35; min-width: 0; }
.auth-logo .who b { display: block; color: var(--d-ink); font-size: .95rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.auth-title { font-size: 1.35rem; font-weight: 700; margin: 0 0 .3rem; }
.auth-sub { font-size: .86rem; color: var(--d-muted); margin: 0 0 1.5rem; }

.field { margin-bottom: 1.15rem; }
.field-label { display: flex; align-items: center; gap: .5rem; font-size: .82rem; font-weight: 600; margin-bottom: .45rem; color: var(--d-ink); }
.field-label .step {
    width: 22px; height: 22px; border-radius: 7px; display: inline-grid; place-items: center; font-size: .72rem; color: #fff;
    background: linear-gradient(135deg, var(--g1), var(--g2));
}
.field-label .req { color: #e11d48; }
.auth-select {
    width: 100%; height: 50px; border-radius: 12px; border: 1px solid var(--d-line); background: var(--d-surface);
    padding: 0 2.5rem 0 .9rem; font-size: .92rem; color: var(--d-ink); appearance: none; -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b778c' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right .9rem center; transition: border-color .2s, box-shadow .2s;
}
.auth-select:focus { outline: 0; border-color: #6d3cff; box-shadow: 0 0 0 4px rgba(109, 60, 255, .15); }

.co-opt { display: flex; align-items: center; gap: .6rem; }
.co-badge { width: 26px; height: 26px; border-radius: 8px; display: inline-grid; place-items: center; flex: 0 0 auto; color: #fff; font-size: .72rem; font-weight: 700; }

/* financial year dropdown */
.fy-opt { display: flex; align-items: baseline; gap: .55rem; min-width: 0; }
.fy-opt b { font-weight: 700; font-variant-numeric: tabular-nums; }
.fy-opt small { color: var(--d-muted); font-size: .76rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fy-opt .now { margin-left: auto; font-size: .64rem; font-weight: 700; color: #047857; background: rgba(16, 185, 129, .14); padding: 1px 7px; border-radius: 6px; }
.select2-results__option--highlighted .fy-opt small { color: rgba(255, 255, 255, .85); }
.select2-results__option--highlighted .fy-opt .now { color: #fff; background: rgba(255, 255, 255, .22); }

/* message */
.auth-msg:empty { display: none; }
.auth-msg { display: flex; align-items: center; gap: .55rem; padding: .65rem .8rem; border-radius: 12px; font-size: .84rem; margin: .2rem 0 1rem; animation: rise .3s ease both; }
.auth-msg svg { width: 18px; height: 18px; flex: 0 0 auto; }
.auth-msg.err { background: rgba(225, 29, 72, .08); color: #be123c; }
.auth-msg.ok { background: rgba(16, 185, 129, .1); color: #047857; }
.auth-msg.busy { background: rgba(91, 75, 255, .08); color: #4f46e5; }
.auth-msg .spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; }

/* buttons */
.auth-actions { display: grid; grid-template-columns: 1fr 1.6fr; gap: .7rem; margin-top: .4rem; }
.btn-auth {
    height: 50px; border-radius: 12px; font-size: .92rem; font-weight: 600; cursor: pointer; width: 100%;
    display: inline-flex; align-items: center; justify-content: center; gap: .5rem; transition: transform .15s, box-shadow .2s, opacity .2s, background .2s;
}
.btn-auth.primary { border: 0; color: #fff; background: linear-gradient(135deg, #4f46e5, #8b5cf6 60%, #c02fd9); box-shadow: 0 14px 26px -14px rgba(91, 75, 255, .9); }
.btn-auth.primary:hover { transform: translateY(-1px); box-shadow: 0 18px 30px -14px rgba(91, 75, 255, 1); }
.btn-auth.primary:disabled { opacity: .7; cursor: default; transform: none; }
.btn-auth.ghost { border: 1px solid var(--d-line); background: var(--d-surface); color: var(--d-muted); }
.btn-auth.ghost:hover { color: #e11d48; border-color: rgba(225, 29, 72, .4); background: rgba(225, 29, 72, .04); }
.btn-auth:focus-visible { outline: 2px solid #6d3cff; outline-offset: 2px; }
.auth-error { display: block; color: #be123c; font-size: .78rem; font-weight: 600; margin-top: .5rem; }
.auth-foot { margin-top: 1.4rem; padding-top: 1rem; border-top: 1px solid var(--d-line); font-size: .74rem; color: var(--d-muted); display: flex; justify-content: space-between; gap: .5rem; flex-wrap: wrap; }

/* ---------- Login form (Login.aspx) ---------- */
.input-wrap { position: relative; }
.input-wrap .in-ico { position: absolute; left: .9rem; top: 50%; width: 18px; height: 18px; margin-top: -9px; color: var(--d-muted); pointer-events: none; transition: color .2s; }
.auth-input {
    width: 100%; height: 50px; border-radius: 12px; border: 1px solid var(--d-line); background: var(--d-surface); color: var(--d-ink);
    padding: 0 .9rem 0 2.6rem; font: inherit; font-size: .95rem; transition: border-color .2s, box-shadow .2s;
}
.auth-input.has-eye { padding-right: 3rem; }
.auth-input:focus { outline: 0; border-color: #6d3cff; box-shadow: 0 0 0 4px rgba(109, 60, 255, .15); }
.input-wrap:focus-within .in-ico { color: #6d3cff; }
.eye {
    position: absolute; right: 6px; top: 50%; margin-top: -19px; width: 38px; height: 38px; border: 0; border-radius: 10px;
    background: transparent; color: var(--d-muted); cursor: pointer; display: grid; place-items: center;
}
.eye:hover { background: var(--d-soft); color: var(--d-ink); }
.eye:focus-visible { outline: 2px solid #6d3cff; outline-offset: 0; }
.eye svg { width: 18px; height: 18px; }
.eye .eye-off, .eye.on .eye-on { display: none; }
.eye.on .eye-off { display: block; }
.caps-hint { margin: .4rem 0 0; font-size: .74rem; font-weight: 600; color: #b45309; }
.btn-login { -webkit-appearance: none; appearance: none; letter-spacing: .01em; }
/* message box filled by login.js */
.login-msg { display: none; }
.login-msg.has { display: flex; background: rgba(225, 29, 72, .08); color: #be123c; }
.login-msg.has.ok { background: rgba(16, 185, 129, .1); color: #047857; }
.login-msg [class*="alert-"], .login-msg span { background: none !important; border: 0 !important; padding: 0 !important; color: inherit !important; font-size: .84rem !important; }

/* ---------- Tablet: brand becomes a top banner with a smaller scene ---------- */
@media (max-width: 991.98px) {
    .auth-shell { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
    .auth-brand { padding: 1.25rem 1.5rem 4rem; }
    .brand-foot, .road, .w-ledger, .w-scan, .c3 { display: none; }
    .scene { min-height: 230px; max-width: 760px; width: 100%; margin: 0 auto; }
    .w-chart { left: 0; top: 0; width: 46%; }
    .w-stock { left: 49%; right: auto; top: 6%; width: 27%; }
    .w-invoice { left: auto; right: 0; top: 0; width: 22%; }
    .w-invoice .inv-lines div:nth-child(3) { display: none; }
    .bars { height: 96px; }
    .c1 { left: 45%; top: 70%; } .c2 { left: auto; right: 24%; top: 72%; }
    .auth-main { align-items: flex-start; margin-top: -3.25rem; padding-top: 0; }
    .auth-card { max-width: 560px; }
}

/* ---------- Mobile: compact scene (chart + stock) ---------- */
@media (max-width: 575.98px) {
    .auth-brand { padding: 1rem 1rem 3.5rem; }
    .scene { min-height: 150px; }
    .w-invoice, .c2 { display: none; }
    .w-chart { width: 58%; }
    .w-stock { left: auto; right: 0; top: 4%; width: 39%; }
    .w-in { padding: .6rem .7rem; border-radius: 13px; }
    .bars { height: 62px; gap: 3px; margin-top: .45rem; }
    .months, .crates, .w-stock .w-sub { display: none; }
    .stock-ring { width: 44px; height: 44px; flex-basis: 44px; }
    .stock-qty b { font-size: .95rem; }
    .c1 { left: 52%; top: 72%; width: 30px; height: 30px; font-size: .8rem; }
    .auth-main { padding: 0 .75rem 1.5rem; margin-top: -2.75rem; }
    .auth-card { padding: 1.4rem 1.1rem 1.2rem; border-radius: 18px; }
    .auth-actions { grid-template-columns: 1fr; }
    .auth-actions .primary { order: -1; }
}

@media (prefers-reduced-motion: reduce) {
    .auth-card, .auth-msg, .w-in, .coin span, .coin:hover, .crates span.new, .ledger li.in, .w-invoice.print *, .w-scan .beam { animation: none !important; }
    .truck { display: none; }
    .w, .coin { transform: none; }
    .bars i, .stock-ring .fl { transition: none; }
    .btn-auth.primary:hover { transform: none; }
}


/* =====================================================================
   VOUCHER PAGES  —  BankVoucher.aspx (and other entry screens later)
   Scoped to <body class="voucher-page">. Bootstrap 3 stays loaded for
   the modal, datepicker and select2; these rules sit on top of it.
   ===================================================================== */

.voucher-page { --vt1: #4f46e5; --vt2: #8b5cf6; background: var(--d-bg); color: var(--d-ink); font-size: 13px; padding-bottom: 1.5rem; }
.voucher-page.vt-receipt { --vt1: #059669; --vt2: #22c55e; }
.voucher-page.vt-payment { --vt1: #ea580c; --vt2: #f59e0b; }
.voucher-page.vt-contra  { --vt1: #0284c7; --vt2: #38bdf8; }
.voucher-page *, .voucher-page *::before, .voucher-page *::after { box-sizing: border-box; }
.voucher-page .req { color: #e11d48; margin-left: 2px; }
.vp-hidden-input { position: absolute !important; width: 1px !important; height: 1px !important; opacity: 0; border: 0 !important; padding: 0 !important; pointer-events: none; }

/* ---------- Toolbar ---------- */
.vp-toolbar {
    position: sticky; top: 0; z-index: 20; margin: 0 -15px 14px; padding: 10px 15px;
    display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
    background: rgba(243, 245, 251, .92); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--d-line);
}
.vp-title { display: flex; align-items: center; gap: 12px; min-width: 0; }
.vp-badge {
    width: 42px; height: 42px; border-radius: 13px; flex: 0 0 auto; display: grid; place-items: center; color: #fff;
    background: linear-gradient(135deg, var(--vt1), var(--vt2)); box-shadow: 0 10px 20px -10px var(--vt1);
}
.vp-badge svg { width: 21px; height: 21px; }
.vp-title-text { min-width: 0; }
.vp-title h1 { margin: 0; font-size: 17px; font-weight: 700; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vp-sub { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--d-muted); margin-top: 3px; }
.vp-sub b { color: var(--d-ink); font-variant-numeric: tabular-nums; }
.vp-mode { font-size: 10.5px; font-weight: 700; padding: 1px 8px; border-radius: 999px; background: rgba(107, 119, 140, .14); color: var(--d-muted); }
.vp-mode[data-mode="new"] { background: rgba(16, 185, 129, .15); color: #047857; }
.vp-mode[data-mode="editing"] { background: rgba(245, 158, 11, .18); color: #b45309; }

.vp-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.vbtn {
    --c1: #4f46e5; --c2: #6366f1; --ico: none;
    height: 36px; padding: 0 14px 0 34px; border: 0; border-radius: 10px; color: #fff; font-size: 12px; font-weight: 700; letter-spacing: .02em; cursor: pointer;
    background-image: var(--ico), linear-gradient(135deg, var(--c1), var(--c2));
    background-repeat: no-repeat; background-position: 12px center, 0 0; background-size: 15px 15px, 100% 100%;
    box-shadow: 0 8px 16px -10px var(--c1); transition: transform .15s, box-shadow .2s, opacity .2s, filter .2s; white-space: nowrap;
}
.vbtn:hover { transform: translateY(-1px); box-shadow: 0 12px 20px -10px var(--c1); color: #fff; }
.vbtn:focus-visible { outline: 2px solid var(--c1); outline-offset: 2px; }
.vbtn[disabled], .vbtn.aspNetDisabled { opacity: .38; filter: grayscale(.4); transform: none; box-shadow: none; cursor: not-allowed; }
.vbtn-add    { --c1: #4f46e5; --c2: #7c3aed; --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round'%3E%3Cline x1='12' y1='5' x2='12' y2='19'/%3E%3Cline x1='5' y1='12' x2='19' y2='12'/%3E%3C/svg%3E"); }
.vbtn-edit   { --c1: #0284c7; --c2: #38bdf8; --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 20h9'/%3E%3Cpath d='M16.5 3.5a2.1 2.1 0 0 1 3 3L7 19l-4 1 1-4z'/%3E%3C/svg%3E"); }
.vbtn-save   { --c1: #059669; --c2: #22c55e; --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E"); }
.vbtn-delete { --c1: #e11d48; --c2: #fb7185; --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='3 6 5 6 21 6'/%3E%3Cpath d='M19 6l-1 14H6L5 6M10 11v6M14 11v6M9 6V4h6v2'/%3E%3C/svg%3E"); }
.vbtn-reset  { --c1: #64748b; --c2: #94a3b8; --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='1 4 1 10 7 10'/%3E%3Cpath d='M3.5 15a9 9 0 1 0 2.1-9.4L1 10'/%3E%3C/svg%3E"); }
.vbtn-print  { --c1: #7c3aed; --c2: #c026d3; --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 6 2 18 2 18 9'/%3E%3Cpath d='M6 18H4a2 2 0 0 1-2-2v-5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2h-2'/%3E%3Crect x='6' y='14' width='12' height='8'/%3E%3C/svg%3E"); }
.vbtn-cheque { --c1: #f59e0b; --c2: #fbbf24; --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2' y='5' width='20' height='14' rx='2'/%3E%3Cline x1='6' y1='15' x2='13' y2='15'/%3E%3Cline x1='6' y1='10' x2='10' y2='10'/%3E%3Cpath d='M15 15l2-2 2 2'/%3E%3C/svg%3E"); }

/* ---------- Cards ---------- */
.vp-card {
    background: var(--d-surface); border: 1px solid var(--d-line); border-radius: 16px; padding: 14px 16px 16px; margin-bottom: 14px;
    box-shadow: 0 1px 2px rgba(23, 32, 51, .04), 0 8px 24px -14px rgba(23, 32, 51, .18); position: relative;
}
.vp-card::before { content: ""; position: absolute; left: 16px; right: 16px; top: 0; height: 3px; border-radius: 0 0 4px 4px; background: linear-gradient(90deg, var(--vt1), var(--vt2)); }
.vp-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin: 4px 0 12px; }
.vp-card-head h2 { margin: 0; font-size: 14px; font-weight: 700; color: var(--d-ink); }
.vp-balance {
    display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; font-style: normal !important;
    color: #047857 !important; background: rgba(16, 185, 129, .12); border-radius: 999px; padding: 5px 12px; margin: 0;
}
.vp-balance::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.vp-count { font-size: 12px; color: var(--d-muted); background: var(--d-soft); border-radius: 999px; padding: 4px 10px; }
.vp-count b { color: var(--d-ink); }

/* ---------- Header fields ---------- */
.vp-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px 14px; }
.vp-field { min-width: 0; }
.vp-field.span-2 { grid-column: span 2; }
.vp-field label { display: block; font-size: 11.5px; font-weight: 600; color: var(--d-muted); margin: 0 0 5px; }
.voucher-page .vp-field input[type="text"], .voucher-page .vp-entry input[type="text"] {
    width: 100%; height: 38px; border: 1px solid var(--d-line); border-radius: 10px; background: var(--d-surface); color: var(--d-ink);
    padding: 0 10px; font-size: 13px; box-shadow: none; transition: border-color .2s, box-shadow .2s, background .2s;
}
.voucher-page .vp-field input[type="text"]:focus, .voucher-page .vp-entry input[type="text"]:focus { outline: 0; border-color: var(--vt1); box-shadow: 0 0 0 3px color-mix(in srgb, var(--vt1) 18%, transparent); }
.voucher-page input[type="text"][disabled], .voucher-page input[type="text"].aspNetDisabled, .voucher-page input[readonly] { background: var(--d-soft); color: var(--d-ink); cursor: default; }
.vp-input-btn { display: flex; }
.vp-input-btn input[type="text"] { border-radius: 10px 0 0 10px !important; }
.vp-search {
    flex: 0 0 40px; height: 38px; border: 0; border-radius: 0 10px 10px 0; color: #fff; cursor: pointer; display: grid; place-items: center;
    background: linear-gradient(135deg, var(--vt1), var(--vt2));
}
.vp-search svg { width: 16px; height: 16px; }
.vp-input-ico { position: relative; }
.vp-input-ico svg { position: absolute; right: 10px; top: 50%; width: 16px; height: 16px; margin-top: -8px; color: var(--d-muted); pointer-events: none; }
.vp-input-ico input[type="text"] { padding-right: 32px !important; }

/* typeahead suggestions */
.voucher-page .typeahead.dropdown-menu { border-radius: 10px; border: 1px solid var(--d-line); box-shadow: 0 14px 30px -12px rgba(23, 32, 51, .3); padding: 4px; max-height: 280px; overflow-y: auto; }
.voucher-page .typeahead.dropdown-menu > li > a { border-radius: 7px; padding: 6px 10px; }
.voucher-page .typeahead.dropdown-menu > .active > a { background: var(--vt1); color: #fff; }

/* ---------- Lines table ---------- */
.vp-table { width: 100%; table-layout: fixed; border-collapse: separate; border-spacing: 0; margin: 0; }
.vp-table .c-act { width: 4%; text-align: center; }
.vp-table .c-acc { width: 30%; }
.vp-table .c-nar { width: 30%; }
.vp-table .c-thr { width: 16%; }
.vp-table .c-amt { width: 12%; text-align: right; }
.vp-table .c-btn { width: 4%; text-align: center; }
.vp-entry thead th {
    font-size: 11px; font-weight: 700; color: var(--d-muted); text-transform: none; padding: 8px 6px; text-align: left;
    background: var(--d-soft); border-bottom: 1px solid var(--d-line);
}
.vp-entry thead th:first-child { border-radius: 10px 0 0 0; }
.vp-entry thead th:last-child { border-radius: 0 10px 0 0; }
.vp-entry thead th.c-amt { text-align: right; }
.vp-acc-bal { float: right; font-weight: 700; color: #047857; font-variant-numeric: tabular-nums; }
.vp-entry-row td { padding: 8px 4px; background: color-mix(in srgb, var(--vt1) 5%, var(--d-surface)); border-bottom: 1px dashed color-mix(in srgb, var(--vt1) 30%, transparent); vertical-align: middle; }
.vp-amount { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.vp-line-btn {
    width: 32px !important; height: 32px !important; padding: 7px; border-radius: 9px; cursor: pointer; vertical-align: middle;
    background: linear-gradient(135deg, var(--vt1), var(--vt2)); box-shadow: 0 6px 12px -8px var(--vt1); transition: transform .15s;
}
.vp-line-btn:hover { transform: scale(1.08); }
.vp-line-btn.aspNetDisabled, .vp-line-btn[disabled] { opacity: .35; filter: grayscale(1); transform: none; cursor: not-allowed; }

.vp-scroll { max-height: 320px; overflow-y: auto; border-bottom: 1px solid var(--d-line); height: auto !important; }
.vp-lines td { padding: 9px 6px; border-bottom: 1px solid var(--d-line); vertical-align: middle; font-size: 13px; word-wrap: break-word; }
.vp-lines tr:nth-child(even) td { background: color-mix(in srgb, var(--d-soft) 60%, transparent); }
.vp-lines tr:hover td { background: color-mix(in srgb, var(--vt1) 6%, var(--d-surface)); }
.vp-lines tr.is-selected td { background: color-mix(in srgb, var(--vt1) 12%, var(--d-surface)); box-shadow: inset 0 0 0 0 transparent; }
.vp-lines td:nth-child(1), .vp-lines td:nth-child(2) { width: 4%; text-align: center; }
.vp-lines td:nth-child(3) { width: 30%; font-weight: 600; }
.vp-lines td:nth-child(4) { width: 30%; color: var(--d-muted); }
.vp-lines td:nth-child(5) { width: 16%; color: var(--d-muted); }
.vp-lines td:nth-child(6) { width: 12%; text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.vp-lines td:nth-child(7) { width: 4%; }
.vp-lines input[type="image"] { width: 26px !important; height: 26px !important; padding: 5px; border-radius: 8px; background: var(--d-soft); transition: background .2s, transform .15s; }
.vp-lines input[type="image"]:hover { background: color-mix(in srgb, var(--vt1) 15%, var(--d-surface)); transform: scale(1.08); }
.vp-lines input[type="image"].aspNetDisabled, .vp-lines input[type="image"][disabled] { opacity: .35; }
.vp-empty { text-align: center; color: var(--d-muted); font-size: 12.5px; padding: 22px 12px; }
.vp-empty b { color: var(--d-ink); }

.vp-total {
    display: flex; justify-content: flex-end; align-items: center; gap: 14px; margin-top: 12px; padding: 12px 16px; border-radius: 12px; color: #fff;
    background: linear-gradient(120deg, var(--vt1), var(--vt2)); box-shadow: 0 12px 24px -16px var(--vt1);
}
.vp-total span { font-size: 12px; font-weight: 600; opacity: .9; }
.vp-total b { font-size: 18px; font-weight: 800; font-variant-numeric: tabular-nums; }

/* modal (voucher search) */
.voucher-page .modal-content { border-radius: 16px; border: 0; overflow: hidden; box-shadow: 0 30px 60px -20px rgba(23, 32, 51, .45); }
.voucher-page .modal-header { background: linear-gradient(120deg, var(--vt1), var(--vt2)) !important; color: #fff; border: 0; }
.voucher-page .modal-header .close { color: #fff; opacity: .85; text-shadow: none; }

/* ---------- Tablet ---------- */
@media (max-width: 991.98px) {
    .vp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .vp-actions { width: 100%; }
    .vbtn { flex: 1 1 auto; }
}

/* ---------- Mobile: entry row and lines become cards ---------- */
@media (max-width: 767.98px) {
    .voucher-page .container-fluid { padding-left: 10px; padding-right: 10px; }
    .vp-toolbar { margin: 0 -10px 10px; padding: 8px 10px; }
    .vp-actions { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
    .vp-actions::-webkit-scrollbar { display: none; }
    .vbtn { flex: 0 0 auto; height: 34px; }
    .vp-card { padding: 12px; border-radius: 14px; }
    .vp-grid { grid-template-columns: 1fr; gap: 10px; }
    .vp-field.span-2 { grid-column: auto; }
    .voucher-page .vp-field input[type="text"], .voucher-page .vp-entry input[type="text"] { height: 42px; font-size: 15px; }

    .vp-entry thead { display: none; }
    .vp-entry, .vp-entry tbody, .vp-entry tr { display: block; width: 100%; }
    .vp-entry-row { border-radius: 12px; background: color-mix(in srgb, var(--vt1) 6%, var(--d-surface)); padding: 6px 10px 10px; }
    .vp-entry-row td { display: block; width: 100% !important; background: transparent; border: 0; padding: 6px 0 0; text-align: left; }
    .vp-entry-row td.c-act { display: none; }
    .vp-entry-row td[data-label]::before { content: attr(data-label); display: block; font-size: 11.5px; font-weight: 600; color: var(--d-muted); margin-bottom: 4px; }
    .vp-entry-row td.c-btn { text-align: right; padding-top: 10px; }
    .vp-line-btn { width: 100% !important; height: 42px !important; padding: 11px; object-fit: contain; }

    .vp-scroll { max-height: none; border: 0; }
    .vp-lines, .vp-lines tbody, .vp-lines tr, .vp-lines td { display: block; width: 100% !important; }
    .vp-lines tr { position: relative; border: 1px solid var(--d-line); border-radius: 12px; margin-top: 8px; padding: 10px 70px 10px 12px; background: var(--d-surface); }
    .vp-lines tr:nth-child(even) td, .vp-lines tr td { background: transparent !important; border: 0; padding: 1px 0; text-align: left !important; }
    .vp-lines td:nth-child(1), .vp-lines td:nth-child(2) { position: absolute; top: 10px; width: 30px !important; }
    .vp-lines td:nth-child(1) { right: 40px; } .vp-lines td:nth-child(2) { right: 8px; }
    .vp-lines td:nth-child(3) { font-size: 14px; }
    .vp-lines td.is-blank, .vp-lines td:nth-child(7) { display: none !important; }
    .vp-lines td:nth-child(5)::before { content: "Through: "; font-weight: 600; }
    .vp-lines td:nth-child(6) { font-size: 15px; color: var(--vt1); margin-top: 4px; }
    .vp-total { justify-content: space-between; }
}

@media (prefers-reduced-motion: reduce) {
    .vbtn, .vp-line-btn, .vp-lines input[type="image"] { transition: none; }
    .vbtn:hover, .vp-line-btn:hover { transform: none; }
}


/* =====================================================================
   SELECT2 v4 (shared by .auth-page and .voucher-page)
   One set of rules for every select2 on these pages. Earlier versions had
   two separate blocks plus some unscoped rules (display:flex on the box,
   overflow:hidden on the drop-down) that broke the layout.
   ===================================================================== */
.auth-page    { --s2-h: 50px; --s2-r: 12px; --s2-accent: #6d3cff; --s2-fs: .92rem; }
.voucher-page { --s2-h: 38px; --s2-r: 10px; --s2-accent: var(--vt1); --s2-fs: 13px; }

/* the box */
.auth-page .select2-container, .voucher-page .select2-container { width: 100% !important; max-width: 100%; vertical-align: middle; }
/* !important: the theme / bootstrap CSS loaded before this file also styles these boxes */
.auth-page .select2-container .select2-selection--single,
.auth-page .select2-container--default .select2-selection--single,
.voucher-page .select2-container .select2-selection--single,
.voucher-page .select2-container--default .select2-selection--single {
    display: block; margin: 0; box-sizing: border-box;
    height: var(--s2-h) !important;
    border: 1px solid var(--d-line) !important;
    border-radius: var(--s2-r) !important;
    background: var(--d-surface) !important;
    transition: border-color .2s, box-shadow .2s; outline: 0;
}
.auth-page .select2-container .select2-selection--single .select2-selection__rendered,
.voucher-page .select2-container .select2-selection--single .select2-selection__rendered {
    display: block; height: 100%; line-height: calc(var(--s2-h) - 2px) !important; padding: 0 34px 0 12px !important;
    color: var(--d-ink); font-size: var(--s2-fs); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.auth-page .select2-container .select2-selection--single .select2-selection__placeholder,
.voucher-page .select2-container .select2-selection--single .select2-selection__placeholder { color: var(--d-muted); }
.auth-page .select2-container .select2-selection--single .select2-selection__arrow,
.voucher-page .select2-container .select2-selection--single .select2-selection__arrow {
    position: absolute; top: 1px; right: 8px; width: 20px; height: calc(var(--s2-h) - 2px) !important;
}
.auth-page .select2-container .select2-selection--single .select2-selection__arrow b,
.voucher-page .select2-container .select2-selection--single .select2-selection__arrow b { border-color: var(--d-muted) transparent transparent transparent; }
.auth-page .select2-container--open .select2-selection--single .select2-selection__arrow b,
.voucher-page .select2-container--open .select2-selection--single .select2-selection__arrow b { border-color: transparent transparent var(--d-muted) transparent; }
.auth-page .select2-container .select2-selection--single .select2-selection__clear,
.voucher-page .select2-container .select2-selection--single .select2-selection__clear { margin-right: 16px; color: var(--d-muted); }

/* multi-select (other entry pages) */
.auth-page .select2-container .select2-selection--multiple,
.voucher-page .select2-container .select2-selection--multiple { min-height: var(--s2-h); border: 1px solid var(--d-line); border-radius: var(--s2-r); background: var(--d-surface); }
.voucher-page .select2-container .select2-selection--multiple .select2-selection__choice { border-radius: 6px; border-color: var(--d-line); background: var(--d-soft); }

/* focus / open / disabled */
.auth-page .select2-container--focus .select2-selection, .auth-page .select2-container--open .select2-selection,
.voucher-page .select2-container--focus .select2-selection, .voucher-page .select2-container--open .select2-selection {
    border-color: var(--s2-accent) !important; box-shadow: 0 0 0 3px color-mix(in srgb, var(--s2-accent) 18%, transparent);
}
.auth-page .select2-container--disabled .select2-selection, .voucher-page .select2-container--disabled .select2-selection,
.auth-page .select2-container--default.select2-container--disabled .select2-selection--single,
.voucher-page .select2-container--default.select2-container--disabled .select2-selection--single { background: var(--d-soft) !important; cursor: default; box-shadow: none; }
.auth-page .select2-container--disabled .select2-selection__arrow, .voucher-page .select2-container--disabled .select2-selection__arrow { opacity: .4; }

/* the drop-down (select2 appends it to <body>, so these still match) */
.auth-page .select2-dropdown, .voucher-page .select2-dropdown {
    border: 1px solid var(--s2-accent); border-radius: var(--s2-r); background: var(--d-surface); z-index: 1060;
    box-shadow: 0 16px 36px -14px rgba(23, 32, 51, .35);
}
.auth-page .select2-dropdown--below, .voucher-page .select2-dropdown--below { margin-top: 4px; }
.auth-page .select2-dropdown--above, .voucher-page .select2-dropdown--above { margin-top: -4px; }
.auth-page .select2-container--open .select2-dropdown--below, .voucher-page .select2-container--open .select2-dropdown--below,
.auth-page .select2-container--open .select2-dropdown--above, .voucher-page .select2-container--open .select2-dropdown--above { border-radius: var(--s2-r); }
.auth-page .select2-search--dropdown, .voucher-page .select2-search--dropdown { padding: 8px; }
.auth-page .select2-search--dropdown .select2-search__field, .voucher-page .select2-search--dropdown .select2-search__field {
    width: 100%; height: 34px; box-sizing: border-box; padding: 0 10px; border: 1px solid var(--d-line); border-radius: 8px;
    font-size: var(--s2-fs); color: var(--d-ink); background: var(--d-surface); outline: 0;
}
.auth-page .select2-search--dropdown .select2-search__field:focus, .voucher-page .select2-search--dropdown .select2-search__field:focus { border-color: var(--s2-accent); }
.auth-page .select2-results > .select2-results__options, .voucher-page .select2-results > .select2-results__options { max-height: 260px; overflow-y: auto; padding: 4px; }
.auth-page .select2-results__option, .voucher-page .select2-results__option { padding: 7px 10px; border-radius: 7px; font-size: var(--s2-fs); line-height: 1.35; color: var(--d-ink); }
.auth-page .select2-container--default .select2-results__option[aria-selected="true"],
.voucher-page .select2-container--default .select2-results__option[aria-selected="true"] { background: color-mix(in srgb, var(--s2-accent) 10%, var(--d-surface)); font-weight: 600; }
.auth-page .select2-container--default .select2-results__option--highlighted[aria-selected],
.auth-page .select2-container--default .select2-results__option--highlighted.select2-results__option--selectable,
.voucher-page .select2-container--default .select2-results__option--highlighted[aria-selected],
.voucher-page .select2-container--default .select2-results__option--highlighted.select2-results__option--selectable { background: var(--s2-accent); color: #fff; }
.auth-page .select2-results__message, .voucher-page .select2-results__message { color: var(--d-muted); }

@media (max-width: 767.98px) {
    .voucher-page { --s2-h: 42px; --s2-fs: 15px; }
}


/* =====================================================================
   VOUCHER SEARCH  —  SearchVouchers.aspx (inside the voucher pop-up or alone)
   Scoped to .vs-wrap; colours follow the voucher page (--vt1 / --vt2).
   ===================================================================== */
.vs-standalone { padding: 14px; }
.vs-modal .modal-body { padding: 14px 16px 16px; background: var(--d-bg); }
.vs-wrap { color: var(--d-ink); font-size: 13px; }
.vs-wrap *, .vs-wrap *::before, .vs-wrap *::after { box-sizing: border-box; }

.vs-filters {
    display: grid; grid-template-columns: 1.3fr 1.5fr 1fr auto; gap: 10px; align-items: end;
    background: var(--d-surface); border: 1px solid var(--d-line); border-radius: 14px; padding: 12px;
}
.vs-f label { display: block; font-size: 11.5px; font-weight: 600; color: var(--d-muted); margin: 0 0 5px; }
.vs-wrap input[type="text"] {
    width: 100%; height: 38px; border: 1px solid var(--d-line); border-radius: 10px; background: var(--d-surface); color: var(--d-ink);
    padding: 0 10px; font-size: 13px; box-shadow: none; transition: border-color .2s, box-shadow .2s;
}
.vs-wrap input[type="text"]:focus { outline: 0; border-color: var(--vt1); box-shadow: 0 0 0 3px color-mix(in srgb, var(--vt1) 18%, transparent); }
.vs-input { position: relative; }
.vs-input svg { position: absolute; left: 10px; top: 50%; width: 15px; height: 15px; margin-top: -7.5px; color: var(--d-muted); pointer-events: none; }
.vs-input input[type="text"] { padding-left: 32px; }
.vs-range { display: flex; align-items: center; gap: 6px; }
.vs-range input[type="text"] { text-align: center; padding: 0 6px; }
.vs-arrow { color: var(--d-muted); font-weight: 700; flex: 0 0 auto; }
.vs-go {
    height: 38px; border: 0; border-radius: 10px; padding: 0 16px; color: #fff; font-weight: 700; font-size: 13px; cursor: pointer;
    display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
    background: linear-gradient(135deg, var(--vt1), var(--vt2, #8b5cf6)); box-shadow: 0 8px 16px -10px var(--vt1); transition: transform .15s, opacity .2s;
}
.vs-go svg { width: 15px; height: 15px; }
.vs-go:hover { transform: translateY(-1px); }
.vs-go:disabled { opacity: .6; transform: none; cursor: default; }
.vs-go:focus-visible, .vs-quick button:focus-visible { outline: 2px solid var(--vt1); outline-offset: 2px; }

.vs-quick { display: flex; gap: 6px; flex-wrap: wrap; margin: 10px 0 4px; }
.vs-quick button {
    border: 1px solid var(--d-line); background: var(--d-surface); color: var(--d-ink); border-radius: 999px;
    padding: 4px 12px; font-size: 12px; font-weight: 500; cursor: pointer; transition: background .2s, color .2s, border-color .2s;
}
.vs-quick button:hover { border-color: var(--vt1); color: var(--vt1); }
.vs-quick button.on { background: var(--vt1); border-color: var(--vt1); color: #fff; }

.vs-meta { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin: 10px 2px 6px; font-size: 12px; color: var(--d-muted); }
.vs-meta b { color: var(--d-ink); }

.vs-table-wrap { background: var(--d-surface); border: 1px solid var(--d-line); border-radius: 14px; overflow: hidden; }
.vs-table { width: 100%; border-collapse: separate; border-spacing: 0; table-layout: fixed; margin: 0; }
.vs-table thead th {
    position: sticky; top: 0; z-index: 1; background: var(--d-soft); color: var(--d-muted);
    font-size: 11px; font-weight: 700; padding: 9px 10px; text-align: left; border-bottom: 1px solid var(--d-line);
}
.vs-table .c-no { width: 15%; } .vs-table .c-date { width: 14%; } .vs-table .c-ref { width: 14%; } .vs-table .c-acc { width: 39%; }
.vs-table .c-amt { width: 18%; text-align: right; font-variant-numeric: tabular-nums; }
.vs-table thead th.c-amt { text-align: right; }
.vs-table tbody { display: block; max-height: 340px; overflow-y: auto; }
.vs-table thead, .vs-table tfoot, .vs-table tbody tr { display: table; width: 100%; table-layout: fixed; }
.vs-table tbody td { padding: 9px 10px; border-bottom: 1px solid var(--d-line); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vs-table tbody tr { cursor: pointer; outline: 0; transition: background .15s; }
.vs-table tbody tr:nth-child(even) td { background: color-mix(in srgb, var(--d-soft) 55%, transparent); }
.vs-table tbody tr:hover td { background: color-mix(in srgb, var(--vt1) 7%, var(--d-surface)); }
.vs-table tbody tr.is-sel td { background: color-mix(in srgb, var(--vt1) 14%, var(--d-surface)); }
.vs-table tbody tr.is-sel td:first-child { box-shadow: inset 3px 0 0 var(--vt1); }
.vs-table tbody tr:focus-visible td { box-shadow: inset 0 0 0 2px var(--vt1); }
.vs-table tbody tr.opening td { opacity: .55; }
.vs-table td.c-no b { color: var(--vt1); }
.vs-table td.c-amt { font-weight: 700; }
.vs-dash { color: var(--d-muted); }
.vs-table tfoot td {
    padding: 10px; font-weight: 800; color: #fff; background: linear-gradient(120deg, var(--vt1), var(--vt2, #8b5cf6));
    font-size: 13px; text-align: right;
}

.vs-state:empty { display: none; }
.vs-state { padding: 26px 16px; text-align: center; color: var(--d-muted); font-size: 13px; }
.vs-state b { display: block; color: var(--d-ink); margin-bottom: 3px; }
.vs-state.err { color: #be123c; background: rgba(225, 29, 72, .06); }
.vs-state.warn { color: #b45309; background: rgba(245, 158, 11, .08); }
.vs-state.warn b, .vs-state.err b { display: inline; color: inherit; margin: 0; }
.vs-spin { display: inline-block; width: 15px; height: 15px; margin-right: 8px; vertical-align: -3px; border-radius: 50%; border: 2px solid var(--vt1, #4f46e5); border-right-color: transparent; animation: spin .7s linear infinite; }

/* tablet */
@media (max-width: 991.98px) {
    .vs-filters { grid-template-columns: 1fr 1fr; }
    .vs-go { justify-content: center; }
}
/* mobile: results become cards */
@media (max-width: 767.98px) {
    .vs-modal { margin: 8px; width: auto; }
    .vs-filters { grid-template-columns: 1fr; }
    .vs-wrap input[type="text"] { height: 42px; font-size: 15px; }
    .vs-go { height: 42px; }
    .vs-hint { display: none; }
    .vs-table-wrap { background: transparent; border: 0; overflow: visible; }
    .vs-table thead { display: none; }
    .vs-table tbody { max-height: none; }
    .vs-table tbody tr {
        display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 10px 12px; margin-bottom: 8px;
        background: var(--d-surface); border: 1px solid var(--d-line); border-radius: 12px;
    }
    .vs-table tbody td, .vs-table tbody tr:nth-child(even) td { width: auto !important; padding: 0; border: 0; background: transparent !important; white-space: normal; }
    .vs-table td.c-no { grid-column: 1; } .vs-table td.c-amt { grid-column: 2; grid-row: 1; font-size: 15px; }
    .vs-table td.c-acc { grid-column: 1 / -1; font-weight: 600; }
    .vs-table td.c-date, .vs-table td.c-ref { font-size: 12px; color: var(--d-muted); }
    .vs-table td.c-date::before { content: "Date "; } .vs-table td.c-ref::before { content: "Ref "; }
    .vs-table tbody tr.is-sel { border-color: var(--vt1); }
    .vs-table tfoot { border-radius: 12px; overflow: hidden; }
    .vs-table tfoot td { border-radius: 12px; }
}
@media (prefers-reduced-motion: reduce) { .vs-go, .vs-quick button { transition: none; } .vs-go:hover { transform: none; } }


/* =====================================================================
   MULTI-CUSTOMER TRAY RETURN  —  SaleReturnMulti.aspx
   Grid: one row per customer, one column per tray / item.
   ===================================================================== */
.mr-msg:empty { display: none; }
.mr-msg { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; padding: 10px 14px; border-radius: 12px; font-size: 13px; }
.mr-msg.ok { background: rgba(16, 185, 129, .12); color: #047857; }
.mr-msg.err { background: rgba(225, 29, 72, .09); color: #be123c; }
.mr-msg.warn { background: rgba(245, 158, 11, .12); color: #92400e; }
.mr-msg.busy { background: color-mix(in srgb, var(--vt1) 10%, var(--d-surface)); color: var(--vt1); }

.mr-add { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.mr-add-pick { flex: 0 1 380px; min-width: 240px; }
.mr-add-hint { font-size: 12px; color: var(--d-muted); }
.mr-add-hint b { color: var(--d-ink); }

/* multi-select chips for the item columns */
.voucher-page .select2-container--default .select2-selection--multiple { min-height: 38px; border-radius: 10px; border: 1px solid var(--d-line); padding: 2px 4px; }
.voucher-page .select2-container--default .select2-selection--multiple .select2-selection__choice {
    background: color-mix(in srgb, var(--vt1) 12%, var(--d-surface)); border: 0; color: var(--d-ink); border-radius: 7px; padding: 2px 8px; margin-top: 4px; font-size: 12px; font-weight: 600;
}
.voucher-page .select2-container--default .select2-selection--multiple .select2-selection__choice__remove { color: var(--vt1); margin-right: 4px; }

.mr-grid-wrap { position: relative; overflow: auto; max-height: 62vh; border: 1px solid var(--d-line); border-radius: 12px; }
.mr-grid { border-collapse: separate; border-spacing: 0; width: max-content; min-width: 100%; font-size: 13px; }
.mr-grid th, .mr-grid td { padding: 6px 8px; border-bottom: 1px solid var(--d-line); background: var(--d-surface); white-space: nowrap; }
.mr-grid thead th { position: sticky; top: 0; z-index: 3; background: var(--d-soft); color: var(--d-muted); font-size: 11.5px; font-weight: 700; text-align: left; vertical-align: bottom; }
.mr-grid thead th small { display: block; font-weight: 500; font-size: 10.5px; opacity: .85; }
.mr-grid tfoot td { position: sticky; bottom: 0; z-index: 2; font-weight: 800; color: #fff; background: var(--vt1); border: 0; }
.mr-grid tfoot td.mr-c { background: var(--vt1); }
/* sticky first two columns so the customer stays visible while scrolling right */
.mr-grid .mr-n { position: sticky; left: 0; z-index: 2; width: 38px; min-width: 38px; text-align: center; color: var(--d-muted); }
.mr-grid .mr-c { position: sticky; left: 38px; z-index: 2; min-width: 200px; max-width: 260px; overflow: hidden; text-overflow: ellipsis; font-weight: 600; box-shadow: 1px 0 0 var(--d-line); }
.mr-grid thead .mr-n, .mr-grid thead .mr-c, .mr-grid tfoot .mr-n, .mr-grid tfoot .mr-c { z-index: 4; }
.mr-grid .mr-q { width: 96px; min-width: 96px; text-align: right; }
.mr-grid thead th.mr-q { text-align: right; max-width: 120px; overflow: hidden; text-overflow: ellipsis; }
.mr-grid .mr-t { width: 80px; text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.mr-grid .mr-s { min-width: 150px; max-width: 220px; }
.mr-grid .mr-x { width: 36px; text-align: center; }
.mr-grid tbody tr:nth-child(even) td { background: color-mix(in srgb, var(--d-soft) 55%, var(--d-surface)); }
.mr-grid tbody tr:hover td { background: color-mix(in srgb, var(--vt1) 6%, var(--d-surface)); }
.mr-grid td.mr-q input {
    width: 100%; height: 32px; text-align: right; font-weight: 700; font-variant-numeric: tabular-nums;
    border: 1px solid transparent; border-radius: 8px; background: color-mix(in srgb, var(--vt1) 5%, var(--d-surface)); color: var(--d-ink); padding: 0 8px;
    transition: border-color .15s, box-shadow .15s, background .15s;
}
.mr-grid td.mr-q input:hover { border-color: var(--d-line); }
.mr-grid td.mr-q input:focus { outline: 0; border-color: var(--vt1); background: var(--d-surface); box-shadow: 0 0 0 3px color-mix(in srgb, var(--vt1) 18%, transparent); }
.mr-grid td.mr-q input:disabled { background: transparent; color: var(--d-muted); }
.mr-grid tr.is-saved td { background: rgba(16, 185, 129, .07) !important; }
.mr-grid tr.is-failed td { background: rgba(225, 29, 72, .06) !important; }
.mr-chip { display: inline-block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; vertical-align: middle; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--d-soft); color: var(--d-muted); }
.mr-chip.ok { background: rgba(16, 185, 129, .15); color: #047857; }
.mr-chip.err { background: rgba(225, 29, 72, .12); color: #be123c; }
.mr-del { width: 26px; height: 26px; border: 0; border-radius: 8px; background: transparent; color: var(--d-muted); font-size: 18px; line-height: 1; cursor: pointer; }
.mr-del:hover { background: rgba(225, 29, 72, .12); color: #e11d48; }
.mr-empty { padding: 28px 16px; text-align: center; color: var(--d-muted); font-size: 13px; }
.mr-empty b { color: var(--d-ink); }

@media (max-width: 767.98px) {
    .mr-grid .mr-c { min-width: 130px; max-width: 150px; }
    .mr-grid .mr-q { width: 78px; min-width: 78px; }
    .mr-grid td.mr-q input { height: 38px; font-size: 15px; }
    .mr-grid .mr-s { min-width: 110px; }
    .mr-grid-wrap { max-height: none; }
    .mr-add-hint { display: none; }
}
