/* Three looks, all built from the Gayatri Dairy logo blues. Every colour below is a token. */
:root, :root[data-theme="sky"] {
  --band: #1a75bb; --on-band: #fff; --on-band-soft: rgba(255, 255, 255, .84); --band-chip: rgba(255, 255, 255, .17); --band-ring: rgba(255, 255, 255, .3);
  --bg: #eef6fc; --card: #fff; --ink: #17324a; --muted: #587086; --line: #e1ecf5; --field: #f1f7fc;
  --blue: #1a75bb; --blue-dark: #125a93; --sky: #5fb4ea; --blue-soft: #dcedfa;
  --tint-a: linear-gradient(140deg, #a9d8f6, #6fbcec); --on-a: #0f3f66;
  --tint-b: linear-gradient(140deg, #125a93, #2a8fd6); --on-b: #fff;
  --green: #1f7a4d; --green-soft: #dcf2e6; --red: #b3372f; --red-soft: #fbe6e3; --amber: #8a5a00; --amber-soft: #fdf0d3; --grey-soft: #e6edf3; --grey: #4f6172;
  --shadow: 0 6px 22px rgba(20, 84, 138, .09); --shadow-hi: 0 12px 30px rgba(20, 84, 138, .17); --edge: 0 0 0 0 transparent;
  --r: 20px; --r-s: 12px; --overlay: rgba(14, 44, 70, .45); --tip: #17324a; --on-tip: #fff;
}
:root[data-theme="milk"] {
  --band: #d6ecfb; --on-band: #125a93; --on-band-soft: #2f6c9c; --band-chip: rgba(255, 255, 255, .62); --band-ring: rgba(18, 90, 147, .22);
  --bg: #fbfdff; --card: #fff; --ink: #17324a; --muted: #587086; --line: #dcebf6; --field: #f4f9fd;
  --tint-a: linear-gradient(140deg, #eaf5fd, #cbe6f9); --on-a: #125a93;
  --tint-b: linear-gradient(140deg, #cfe8fa, #a9d8f6); --on-b: #0f3f66;
  --shadow: none; --shadow-hi: 0 8px 20px rgba(20, 84, 138, .1); --edge: 0 0 0 1px #d5e6f3;
  --r: 14px; --r-s: 10px;
}
:root[data-theme="night"] {
  --band: #12395c; --on-band: #eaf5fd; --on-band-soft: #b4d2e8; --band-chip: rgba(255, 255, 255, .1); --band-ring: rgba(255, 255, 255, .2);
  --bg: #0b1f33; --card: #142f49; --ink: #e8f2fa; --muted: #a3bdd2; --line: #24476a; --field: #0f2840;
  --blue: #5fb4ea; --blue-dark: #9bd2f5; --sky: #8fcdf3; --blue-soft: #1d4a72;
  --tint-a: linear-gradient(140deg, #1a75bb, #145c95); --on-a: #fff;
  --tint-b: linear-gradient(140deg, #1d4a72, #17395a); --on-b: #e8f2fa;
  --green: #6bd9a3; --green-soft: rgba(107, 217, 163, .16); --red: #ff9c93; --red-soft: rgba(255, 156, 147, .16); --amber: #f6c667; --amber-soft: rgba(246, 198, 103, .16); --grey-soft: rgba(255, 255, 255, .1); --grey: #b7c9d8;
  --shadow: 0 8px 24px rgba(0, 0, 0, .28); --shadow-hi: 0 14px 34px rgba(0, 0, 0, .42); --edge: 0 0 0 1px #24476a;
  --r: 16px; --r-s: 11px; --overlay: rgba(2, 10, 18, .65); --tip: #e8f2fa; --on-tip: #0b1f33;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--ink); font: 15px/1.42 -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans Gujarati", "Noto Sans Devanagari", Roboto, sans-serif; transition: background .3s, color .3s; }
h1 { font-size: 22px; margin: 0; color: var(--blue-dark); font-weight: 800; display: flex; align-items: center; gap: 8px; }
h2 { font-size: 16px; margin: 0 0 8px; color: var(--blue-dark); font-weight: 800; display: flex; align-items: center; gap: 7px; }
a { color: inherit; }
.ic { flex: none; vertical-align: -3px; }
.ic .f { fill: currentColor; opacity: .16; stroke: none; }
.cnt { background: var(--blue-soft); color: var(--blue-dark); font-size: 15px; font-weight: 800; padding: 1px 10px; border-radius: 12px; }

/* ---------- Opening screen ---------- */
#welcome { position: fixed; inset: 0; z-index: 50; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; background: var(--band); transition: opacity .3s; }
#welcome.hide { opacity: 0; pointer-events: none; }
#welcome img { width: 150px; height: 150px; animation: pop .55s cubic-bezier(.2, 1.4, .4, 1); }
#welcome div { font-size: 28px; font-weight: 800; color: var(--on-band); text-align: center; padding: 0 16px; animation: rise .55s .12s both cubic-bezier(.2, .8, .2, 1); }

/* ---------- Page frame ---------- */
.shell { display: flex; flex-direction: column; height: 100vh; }
.top { background: var(--band); padding: 10px 16px 12px; border-radius: 0 0 26px 26px; position: relative; z-index: 6; flex: none; transition: border-radius .3s, background .3s; }
.shell.home .top { border-radius: 0; padding-bottom: 6px; }
.pill-bar { display: flex; align-items: center; gap: 10px; background: var(--card); border-radius: 30px; padding: 6px 10px 6px 8px; box-shadow: var(--shadow), var(--edge); }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 800; color: var(--blue-dark); white-space: nowrap; font-size: 15px; }
.brand img { width: 38px; height: 38px; display: block; }
.nav { flex: 1; display: flex; justify-content: center; gap: 2px; position: relative; min-width: 0; }
.nav a { display: flex; align-items: center; gap: 6px; padding: 8px 12px; text-decoration: none; color: var(--muted); font-weight: 700; font-size: 15px; border-radius: 18px; white-space: nowrap; transition: color .2s, background .2s; }
.nav a:hover { color: var(--blue-dark); background: var(--blue-soft); }
.nav a.on { color: var(--blue-dark); }
.nav-ind { position: absolute; bottom: -6px; left: 0; width: 0; height: 4px; border-radius: 4px 4px 0 0; background: var(--blue); transition: left .38s cubic-bezier(.3, 1.3, .5, 1), width .38s cubic-bezier(.3, 1.3, .5, 1); }
.pill { background: #f2b33d; color: #2b1e00; border-radius: 10px; padding: 0 7px; font-size: 12px; font-weight: 800; animation: pulse 1.8s ease-in-out infinite; }
.top-tools { display: flex; align-items: center; gap: 8px; }
.swatches { display: flex; gap: 4px; }
.swatch { width: 24px; height: 24px; padding: 0; border-radius: 50%; border: 2px solid transparent; box-shadow: var(--edge), 0 1px 3px rgba(0, 0, 0, .2); }
.swatch.on { outline: 2px solid var(--blue); outline-offset: 1px; }
.swatch[data-theme-pick="sky"], .theme-card[data-theme-pick="sky"] .th-prev { background: linear-gradient(135deg, #1a75bb 50%, #eef6fc 50%); }
.swatch[data-theme-pick="milk"], .theme-card[data-theme-pick="milk"] .th-prev { background: linear-gradient(135deg, #d6ecfb 50%, #fff 50%); }
.swatch[data-theme-pick="night"], .theme-card[data-theme-pick="night"] .th-prev { background: linear-gradient(135deg, #0b1f33 50%, #5fb4ea 50%); }
.icon-btn { width: 36px; height: 36px; padding: 0; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.subnav { display: flex; justify-content: center; gap: 6px; padding-top: 10px; flex-wrap: wrap; }
.subnav:empty { display: none; }
.subnav a { display: flex; align-items: center; gap: 6px; padding: 5px 14px; border-radius: 16px; background: var(--band-chip); color: var(--on-band); font-weight: 700; font-size: 14px; text-decoration: none; transition: background .2s, color .2s, transform .15s; animation: rise .32s both cubic-bezier(.2, .8, .2, 1); }
.subnav a:hover { transform: translateY(-1px); }
.subnav a.on { background: var(--card); color: var(--blue-dark); }
main { flex: 1 1 0; min-height: 0; padding: 14px 18px; overflow-y: auto; min-width: 0; }
.shell.home main { padding-top: 0; }
.page { min-height: 100%; }
.page-fill { height: 100%; display: flex; flex-direction: column; }
.table-wrap.fill { flex: 1; min-height: 140px; overflow: auto; }
.table-wrap.fill th { position: sticky; top: 0; background: var(--card); z-index: 1; }

/* ---------- Motion ---------- */
@keyframes pop { from { transform: scale(.75); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes rise { from { transform: translateY(14px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes growx { from { transform: scaleX(0); } }
@keyframes growy { from { transform: scaleY(0); } }
@keyframes draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes fade { from { opacity: 0; } }
@keyframes float { 50% { transform: translateY(-6px); } }
@keyframes pulse { 50% { transform: scale(1.14); } }
@keyframes bump { 40% { transform: translateY(-3px) scale(1.14); } }
@keyframes drive { 40% { transform: translateX(3px); } 70% { transform: translateX(-1px); } }
@keyframes spin { to { transform: rotate(180deg); } }
@keyframes tilt { 35% { transform: rotate(-11deg); } 70% { transform: rotate(8deg); } }
@keyframes arc { from { stroke-dashoffset: 100; } }
@keyframes knob { from { transform: rotate(0deg); } }
@keyframes shake { 25%, 75% { transform: translateX(-5px); } 50% { transform: translateX(5px); } }
.enter .card, .enter .table-wrap, .enter .lane, .enter .tile, .enter .promo, .enter .money-card, .enter .alert, .enter .chips-row { animation: rise .5s both cubic-bezier(.2, .8, .2, 1); animation-delay: calc(var(--i, 0) * 38ms); }
.enter .hero-l, .enter .hero-r { animation: rise .5s both cubic-bezier(.2, .8, .2, 1); }
.enter .gauge { animation: pop .6s both cubic-bezier(.2, 1.3, .4, 1); }
.enter .bar i, .enter .hb-track i { transform-origin: left; animation: growx .8s .15s both cubic-bezier(.2, .8, .2, 1); }
.enter .col-plot i { transform-origin: bottom; animation: growy .7s .15s both cubic-bezier(.2, .8, .2, 1); }
.enter .draw-ic .ic path:not(.f), .enter .draw-ic .ic circle:not(.f), .enter .draw-ic .ic rect:not(.f) { stroke-dasharray: 1; animation: draw .8s .1s both ease-out; }
.enter .line-draw { stroke-dasharray: 1; animation: draw 1.1s .15s both ease-out; }
.enter .area-fade { animation: fade .9s .5s both; }
a:hover > .ic, button:hover > .ic, .tile:hover .ic { animation: bump .45s ease; }
a:hover > .ic-truck, button:hover > .ic-truck { animation: drive .55s ease; }
a:hover > .ic-gear, button:hover > .ic-gear, a:hover > .ic-sun { animation: spin .7s ease; }
a:hover > .ic-wallet, a:hover > .ic-bill, a:hover > .ic-pencil, button:hover > .ic-pencil { animation: tilt .5s ease; transform-origin: 50% 80%; }
.nav a.on > .ic path:not(.f), .nav a.on > .ic circle:not(.f), .nav a.on > .ic rect:not(.f) { stroke-dasharray: 1; animation: draw .6s ease-out; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---------- Home ---------- */
.hero { position: relative; background: var(--band); color: var(--on-band); margin: 0 -18px; padding: 8px 34px 20px; min-height: 96px; border-radius: 0 0 30px 30px; display: flex; align-items: center; justify-content: space-between; gap: 330px; transition: background .3s; }
.hero-l, .hero-r { display: flex; align-items: center; gap: 12px; min-width: 0; }
.hero-av { width: 54px; height: 54px; border-radius: 50%; background: #fff; display: grid; place-items: center; flex: none; box-shadow: 0 0 0 3px var(--band-ring); }
.hero-av img { width: 48px; height: 48px; }
.hero-hello { font-size: 16px; color: var(--on-band-soft); white-space: nowrap; }
.hero-name { font-size: 19px; font-weight: 800; white-space: nowrap; }
.hero-ic { width: 54px; height: 54px; border-radius: 50%; background: var(--band-chip); display: grid; place-items: center; flex: none; }
.hero-small { font-size: 12px; font-weight: 700; letter-spacing: .4px; color: var(--on-band-soft); text-transform: uppercase; white-space: nowrap; }
.hero-big { font-size: 34px; font-weight: 500; line-height: 1.1; font-variant-numeric: tabular-nums; white-space: nowrap; }
.dip { position: absolute; left: 50%; top: calc(100% - 1px); transform: translateX(-50%); width: 430px; height: 92px; fill: var(--band); pointer-events: none; transition: fill .3s; }
.gauge { position: absolute; left: 50%; top: -2px; margin-left: -130px; width: 260px; height: 178px; z-index: 2; color: var(--on-band); text-decoration: none; display: block; }
.gauge svg { position: absolute; inset: 0; overflow: visible; }
.gauge-track { fill: none; stroke: var(--band-ring); stroke-width: 7; stroke-linecap: round; }
.gauge-val { fill: none; stroke: var(--on-band); stroke-width: 7; stroke-linecap: round; stroke-dasharray: 100; animation: arc 1.2s .1s both cubic-bezier(.3, .7, .2, 1); }
.gauge-knob { transform-origin: 130px 22px; animation: knob 1.2s .1s both cubic-bezier(.3, .7, .2, 1); }
.gauge-knob circle:first-child { fill: var(--on-band); }
.gauge-knob circle:last-child { fill: var(--band); }
.gauge-in { position: absolute; inset: 14px 30px auto; text-align: center; }
.gauge-v { font-size: 38px; font-weight: 800; line-height: 1.12; font-variant-numeric: tabular-nums; }
.gauge-v small { font-size: 20px; font-weight: 600; opacity: .85; }
.gauge-l { font-size: 14px; color: var(--on-band-soft); }
.home-cols { display: grid; grid-template-columns: minmax(250px, 27%) minmax(0, 1fr) minmax(270px, 29%); gap: 16px; margin-top: 16px; }
.col-l, .col-m, .col-r { display: grid; gap: 14px; align-content: start; min-width: 0; }
.col-m { padding-top: 88px; }
.money-card { position: relative; overflow: hidden; background: var(--tint-a); color: var(--on-a); border-radius: var(--r); padding: 16px 18px; box-shadow: var(--shadow), var(--edge); min-height: 142px; display: flex; flex-direction: column; justify-content: space-between; text-decoration: none; transition: transform .25s cubic-bezier(.2, 1.3, .4, 1), box-shadow .25s; }
.money-card:hover, .promo:hover, .tile:hover { transform: translateY(-3px); box-shadow: var(--shadow-hi), var(--edge); }
.money-card::after { content: ""; position: absolute; right: -36px; top: -46px; width: 150px; height: 150px; border-radius: 50%; background: rgba(255, 255, 255, .22); }
.mc-top { display: flex; justify-content: space-between; align-items: center; font-weight: 700; }
.mc-big { font-size: 30px; font-weight: 800; font-variant-numeric: tabular-nums; }
.mc-low { display: flex; justify-content: space-between; font-size: 14px; font-weight: 600; }
.promo { display: flex; align-items: center; gap: 14px; background: var(--tint-b); color: var(--on-b); border-radius: var(--r); padding: 14px 16px; box-shadow: var(--shadow), var(--edge); text-decoration: none; transition: transform .25s cubic-bezier(.2, 1.3, .4, 1), box-shadow .25s; }
.promo-ic { animation: float 3s ease-in-out infinite; flex: none; }
.promo b { display: block; font-size: 16px; line-height: 1.3; }
.promo span { font-size: 13px; font-weight: 700; display: inline-flex; gap: 6px; align-items: center; margin-top: 4px; opacity: .92; }
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.tile { display: flex; flex-direction: column; align-items: center; justify-content: space-between; gap: 7px; background: var(--card); color: var(--blue); border-radius: var(--r); padding: 12px 5px 10px; box-shadow: var(--shadow), var(--edge); font-weight: 700; text-decoration: none; min-height: 108px; transition: transform .25s cubic-bezier(.2, 1.3, .4, 1), box-shadow .25s; }
.tile b { color: var(--ink); font-size: 13.5px; text-align: center; line-height: 1.2; }
.tile i { width: 24px; height: 24px; border-radius: 50%; background: var(--blue-soft); color: var(--blue-dark); display: grid; place-items: center; }
.mini-two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mini-stat { display: grid; gap: 3px; }
.mini-stat .lbl { display: flex; align-items: center; gap: 6px; color: var(--muted); font-weight: 700; font-size: 14px; }
.mini-stat .val { font-size: 24px; font-weight: 800; color: var(--blue-dark); font-variant-numeric: tabular-nums; }
.mini-stat .val small { font-size: 15px; color: var(--muted); font-weight: 600; }
.area-svg { width: 100%; height: auto; display: block; }
.area-svg text { fill: var(--muted); font-size: 10px; }
.area-line { fill: none; stroke: var(--blue); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.area-grid { stroke: var(--line); stroke-width: 1; }
.area-dot { fill: var(--blue); stroke: var(--card); stroke-width: 2; }
.area-hit { fill: transparent; }
.area-hit:hover { fill: var(--blue-soft); opacity: .45; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 8px; }
.card-head h2 { margin: 0; }
.card-head a { color: var(--blue); display: flex; }
.tx { display: flex; align-items: center; gap: 10px; background: var(--field); border-radius: var(--r-s); padding: 8px 11px; margin-top: 7px; }
.tx-ic { width: 32px; height: 32px; border-radius: 50%; background: var(--card); color: var(--blue); display: grid; place-items: center; flex: none; }
.tx-mid { flex: 1; min-width: 0; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tx-mid small { display: block; font-weight: 500; color: var(--muted); font-size: 12.5px; }
.tx-amt { font-weight: 800; font-variant-numeric: tabular-nums; color: var(--green); }
.pi { width: 30px; height: 30px; border-radius: 50%; background: var(--blue-soft); color: var(--blue-dark); display: inline-grid; place-items: center; flex: none; vertical-align: middle; margin-right: 3px; }
.list-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 5px 0; }
.list-row + .list-row { border-top: 1px solid var(--line); }
.list-row > span:last-child { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ---------- Shared parts ---------- */
.head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.tools { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.grid { display: grid; gap: 12px; }
.stats { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin-bottom: 12px; }
.two { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); margin-top: 12px; }
.card { background: var(--card); border-radius: var(--r); padding: 13px 16px; box-shadow: var(--shadow), var(--edge); transition: background .3s, box-shadow .25s; }
.stat .label { color: var(--muted); font-size: 14px; font-weight: 700; }
.stat .value { font-size: 24px; font-weight: 800; color: var(--blue-dark); font-variant-numeric: tabular-nums; }
.stat .value.small { font-size: 18px; }
.bar { height: 7px; background: var(--blue-soft); border-radius: 4px; margin-top: 5px; overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 4px; background: var(--blue); }
.table-wrap { background: var(--card); border-radius: var(--r); overflow-x: auto; box-shadow: var(--shadow), var(--edge); }
table { border-collapse: collapse; width: 100%; }
th { text-align: left; font-size: 13.5px; color: var(--muted); font-weight: 700; }
th, td { padding: 9px 13px; white-space: nowrap; }
tbody tr { border-top: 1px solid var(--line); transition: background .15s; }
tbody tr:hover { background: var(--blue-soft); }
td.wrap { white-space: normal; min-width: 170px; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
td.clip { max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
.two-line b { display: block; font-size: 15.5px; }
.two-line small { display: block; color: var(--muted); max-width: 300px; overflow: hidden; text-overflow: ellipsis; }
.mq { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; margin-right: 10px; font-variant-numeric: tabular-nums; }
.mq .ic-sun { color: #d98a00; }
.mq .ic-moon { color: var(--blue); }
.mq.none { opacity: .35; }
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px; border-radius: 11px; font-size: 13px; font-weight: 700; }
.b-green { background: var(--green-soft); color: var(--green); }
.b-red { background: var(--red-soft); color: var(--red); }
.b-amber { background: var(--amber-soft); color: var(--amber); }
.b-blue { background: var(--blue-soft); color: var(--blue-dark); }
.b-grey { background: var(--grey-soft); color: var(--grey); }
button, .btn { font: inherit; font-weight: 700; border: 0; background: var(--card); color: var(--blue-dark); padding: 8px 15px; border-radius: var(--r-s); cursor: pointer; box-shadow: var(--shadow), var(--edge), inset 0 0 0 1px var(--line); display: inline-flex; align-items: center; justify-content: center; gap: 6px; white-space: nowrap; transition: transform .14s, filter .15s, background .2s, color .2s; text-decoration: none; }
button:hover, .btn:hover { filter: brightness(1.04); }
button:active, .btn:active, .tile:active, .choice:active { transform: scale(.95); }
button.primary, a.btn.primary { background: var(--blue-dark); color: var(--card); box-shadow: var(--shadow); }
:root[data-theme="sky"] button.primary, :root[data-theme="milk"] button.primary, :root[data-theme="sky"] a.btn.primary, :root[data-theme="milk"] a.btn.primary { background: #1a75bb; color: #fff; }
:root[data-theme="night"] button.primary, :root[data-theme="night"] a.btn.primary { background: #5fb4ea; color: #0b1f33; }
button.danger { color: var(--red); }
button.danger-fill { background: var(--red) !important; color: var(--card) !important; }
button.small { padding: 5px 11px; font-size: 13.5px; box-shadow: inset 0 0 0 1px var(--line); }
button:disabled { opacity: .45; cursor: default; }
input, select, textarea { font: inherit; padding: 9px 12px; border: 1.5px solid var(--line); border-radius: var(--r-s); background: var(--field); color: var(--ink); width: 100%; transition: border-color .15s, box-shadow .15s; }
.tools input, .tools select { width: auto; }
input:focus, select:focus, textarea:focus { outline: 0; border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); }
button:focus-visible, a:focus-visible, summary:focus-visible, .choice input:focus-visible + .ch-body { outline: 2px solid var(--blue); outline-offset: 2px; }
input.bad { border-color: var(--red); animation: shake .3s; }
label { display: block; font-size: 14px; font-weight: 700; color: var(--ink); }
label > input, label > select, label > textarea { margin-top: 4px; }
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.modal.wide .form { grid-template-columns: repeat(3, 1fr); }
.form .full { grid-column: 1 / -1; }
.seg { display: inline-flex; border-radius: 13px; padding: 3px; background: var(--blue-soft); gap: 2px; }
.seg button { border-radius: 10px; background: transparent; box-shadow: none; color: var(--blue-dark); padding: 6px 12px; }
.seg button b { opacity: .75; font-weight: 800; }
.seg button.on { background: var(--card); color: var(--blue-dark); box-shadow: var(--shadow); }
.lang-seg { padding: 2px; }
.lang-seg button { padding: 4px 9px; font-size: 13.5px; }
.muted { color: var(--muted); }
p.muted { margin: 0 0 9px; font-size: 14px; }
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 14px; color: var(--muted); margin-bottom: 9px; align-items: center; }
.legend span { display: inline-flex; gap: 5px; align-items: center; }
.empty { padding: 24px; text-align: center; color: var(--muted); }
.alert { background: var(--amber-soft); color: var(--amber); padding: 8px 14px; border-radius: var(--r-s); margin-bottom: 10px; font-weight: 600; }
.alert a { font-weight: 800; }
.chips-row { display: flex; gap: 7px; flex-wrap: wrap; margin-bottom: 10px; }
.chip { padding: 6px 13px; border-radius: 16px; background: var(--card); color: var(--blue-dark); font-weight: 700; box-shadow: var(--shadow), inset 0 0 0 1px var(--line); }
.chip b { opacity: .65; }
.chip.on { background: var(--blue); color: var(--card); box-shadow: var(--shadow); }
.overlay { position: fixed; inset: 0; background: var(--overlay); display: flex; align-items: flex-start; justify-content: center; padding: 26px 14px; overflow-y: auto; z-index: 10; animation: fade .2s; }
.overlay.sure { z-index: 20; align-items: center; }
.modal { background: var(--card); border-radius: calc(var(--r) + 4px); padding: 18px 20px; width: 100%; max-width: 620px; box-shadow: 0 24px 60px rgba(0, 0, 0, .28); animation: pop .32s cubic-bezier(.2, 1.25, .4, 1); }
.modal.wide { max-width: 780px; }
.modal.sure-box { max-width: 380px; text-align: center; }
.sure-box p { font-size: 18px; font-weight: 700; margin: 8px 0 4px; }
.sure-ic { color: var(--amber); }
.modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; gap: 10px; }
.modal-head h2 { margin: 0; font-size: 21px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.modal-foot.center { justify-content: center; }
.modal-foot .spread { margin-right: auto; }
.modal-foot button { padding: 11px 22px; font-size: 16px; }
.qty-grid.single { display: grid; grid-template-columns: 1fr 120px; gap: 8px 12px; align-items: center; }
.error { color: var(--red); font-size: 15px; font-weight: 700; margin-top: 6px; min-height: 20px; }
#toast { position: fixed; bottom: 22px; left: 50%; transform: translate(-50%, 24px) scale(.92); background: var(--tip); color: var(--on-tip); padding: 11px 18px; border-radius: 14px; opacity: 0; pointer-events: none; transition: opacity .2s, transform .35s cubic-bezier(.2, 1.4, .4, 1); z-index: 40; font-weight: 700; display: flex; gap: 8px; align-items: center; }
#toast.show { opacity: 1; transform: translate(-50%, 0) scale(1); }
#typing-box { display: none; position: fixed; z-index: 30; min-width: 170px; background: var(--card); color: var(--ink); border-radius: 11px; padding: 4px; box-shadow: 0 8px 22px rgba(0, 0, 0, .28); }
.tr-row { padding: 6px 12px; border-radius: 8px; font-size: 17px; cursor: pointer; }
.tr-row.on { background: var(--blue); color: var(--card); }
.tr-row.tr-en { font-size: 14px; color: var(--muted); }
.tr-row.tr-en.on { color: var(--card); }
details.more { margin-top: 12px; border-radius: var(--r-s); background: var(--field); padding: 10px 13px; }
details.more summary { cursor: pointer; font-weight: 700; color: var(--blue-dark); display: flex; align-items: center; gap: 7px; }
details.more small { font-weight: 500; color: var(--muted); }
details.more[open] summary { margin-bottom: 11px; }

/* ---------- Login ---------- */
.login { min-height: 100vh; display: grid; place-items: center; padding: 16px; background: linear-gradient(var(--band) 44%, var(--bg) 44%); }
.login .card { width: 100%; max-width: 370px; padding: 26px; display: grid; gap: 13px; animation: pop .45s cubic-bezier(.2, 1.25, .4, 1); }
.login img { width: 96px; height: 96px; justify-self: center; }
.login h1 { justify-content: center; }
.login input, .login button { font-size: 18px; padding: 12px 14px; }

/* ---------- Add customer steps ---------- */
.wz-steps { display: flex; list-style: none; padding: 0; margin: 0 0 16px; }
.wz-steps li { flex: 1; position: relative; text-align: center; }
.wz-steps li::before { content: ""; position: absolute; top: 21px; left: -50%; width: 100%; height: 4px; background: var(--line); }
.wz-steps li::after { content: ""; position: absolute; top: 21px; left: -50%; width: 100%; height: 4px; background: var(--blue); transform: scaleX(0); transform-origin: left; transition: transform .35s ease; }
.wz-steps li.done::after, .wz-steps li.now::after { transform: scaleX(1); }
.wz-steps li:first-child::before, .wz-steps li:first-child::after { display: none; }
.wz-steps button { position: relative; z-index: 1; background: none; box-shadow: none; padding: 0; flex-direction: column; gap: 3px; color: var(--muted); font-size: 13.5px; width: 100%; white-space: normal; }
.wz-steps .dot { width: 46px; height: 46px; border-radius: 50%; background: var(--card); box-shadow: inset 0 0 0 2px var(--line); display: grid; place-items: center; transition: background .3s, color .3s, box-shadow .3s, transform .35s cubic-bezier(.2, 1.5, .4, 1); }
.wz-steps .now .dot, .wz-steps li.now .dot { background: var(--blue); color: var(--card); box-shadow: 0 0 0 4px var(--blue-soft); transform: scale(1.08); }
.wz-steps li.done .dot { background: var(--blue-soft); color: var(--blue-dark); box-shadow: none; }
.wz-steps li.now button { color: var(--blue-dark); }
.wz { display: none; }
.wz.on { display: grid; gap: 14px; animation: rise .32s cubic-bezier(.2, .8, .2, 1); }
.field { display: grid; gap: 5px; font-size: 16px; }
.field > span { display: flex; align-items: center; gap: 7px; color: var(--ink); font-weight: 700; }
.field > span .ic { color: var(--blue); }
.field small { color: var(--muted); font-weight: 500; }
.field input { font-size: 19px; padding: 12px 14px; margin: 0; }
.ask { font-size: 18px; font-weight: 800; color: var(--blue-dark); }
.choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(135px, 1fr)); gap: 10px; }
.choices.wide-c { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.choice { display: block; cursor: pointer; transition: transform .14s; }
.choice input { position: absolute; opacity: 0; width: 0; height: 0; }
.ch-body { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 14px 10px; border-radius: var(--r); background: var(--field); box-shadow: inset 0 0 0 2px var(--line); text-align: center; position: relative; transition: background .2s, box-shadow .2s, color .2s; color: var(--ink); }
.ch-body .big { font-size: 30px; font-weight: 800; line-height: 1.1; }
.ch-body .nm { font-size: 17px; font-weight: 800; }
.ch-body small { color: var(--muted); font-size: 14px; }
.ch-body .tick { position: absolute; top: 7px; right: 7px; width: 24px; height: 24px; border-radius: 50%; background: var(--blue); color: var(--card); display: grid; place-items: center; transform: scale(0); transition: transform .28s cubic-bezier(.2, 1.7, .4, 1); }
.choice input:checked + .ch-body { background: var(--blue-soft); box-shadow: inset 0 0 0 2.5px var(--blue); }
.choice input:checked + .ch-body .tick { transform: scale(1); }
.lits { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.lit { background: var(--field); border-radius: var(--r); padding: 12px; display: grid; gap: 9px; }
.lit-h { display: flex; gap: 7px; align-items: center; font-size: 17px; font-weight: 800; }
.lit-h .ic-sun { color: #d98a00; }
.lit-h .ic-moon { color: var(--blue); }
.stepper { display: grid; grid-template-columns: 46px 1fr 46px; gap: 7px; align-items: center; }
.stepper button { height: 46px; padding: 0; border-radius: 50%; background: var(--card); }
.stepper input { text-align: center; font-size: 24px; font-weight: 800; padding: 6px 2px; height: 46px; background: var(--card); -moz-appearance: textfield; appearance: textfield; }
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.lit-chips { display: flex; gap: 4px; }
.lit-chips button { flex: 1; padding: 6px 0; box-shadow: inset 0 0 0 1px var(--line); font-size: 15px; }
.lit-chips button.on { background: var(--blue); color: var(--card); }
.sum { display: grid; gap: 7px; }
.sum-row { display: flex; align-items: center; gap: 12px; background: var(--field); border-radius: var(--r-s); padding: 9px 12px; }
.sum-ic { width: 36px; height: 36px; border-radius: 50%; background: var(--card); color: var(--blue); display: grid; place-items: center; flex: none; }
.sum-txt { flex: 1; min-width: 0; }
.sum-txt small { display: block; color: var(--muted); }
.sum-txt b { font-size: 17px; overflow-wrap: anywhere; }
.pin-big { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--tint-a); color: var(--on-a); border-radius: var(--r-s); padding: 11px 16px; font-weight: 700; }
.pin-big b { font-size: 28px; letter-spacing: 6px; font-variant-numeric: tabular-nums; }

/* ---------- Excel upload and choosing many customers ---------- */
.bulk-bar { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; margin-bottom: 10px; }
.pick-all { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; cursor: pointer; }
input[type="checkbox"] { width: 20px; height: 20px; margin: 0; accent-color: var(--blue); cursor: pointer; flex: none; }
tr.picked { background: var(--blue-soft); }
.up-steps { display: grid; gap: 9px; }
.up-step { display: flex; align-items: center; gap: 13px; background: var(--field); border-radius: var(--r-s); padding: 12px 14px; min-height: 68px; }
.up-n { width: 38px; height: 38px; border-radius: 50%; background: var(--blue); color: var(--card); display: grid; place-items: center; font-weight: 800; font-size: 18px; flex: none; }
.up-t { flex: 1; min-width: 0; }
.up-t b { display: block; font-size: 16px; }
.up-t small { color: var(--muted); font-size: 14px; }
.modal.up-modal { max-width: 1040px; }
.up-sum { grid-template-columns: 1fr 1fr; margin-bottom: 10px; }
.up-milk { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; background: var(--amber-soft); color: var(--amber); padding: 9px 13px; border-radius: var(--r-s); margin-bottom: 10px; }
.up-table { max-height: 46vh; overflow: auto; box-shadow: var(--edge), inset 0 0 0 1px var(--line); }
.up-table th { position: sticky; top: 0; background: var(--card); z-index: 1; }
tr.row-bad { background: var(--red-soft); }
.prob { display: flex; gap: 5px; align-items: center; color: var(--red); font-weight: 700; font-size: 14px; }
.up-done { text-align: center; padding: 10px 0 4px; color: var(--green); }
.up-done h2 { justify-content: center; font-size: 22px; margin: 6px 0; }

/* ---------- Daily entries: who still has entries to make ---------- */
.chips-label { align-self: center; font-weight: 700; }
.chip .wait { opacity: 1; background: var(--red-soft); color: var(--red); border-radius: 10px; padding: 0 7px; min-width: 22px; text-align: center; display: inline-flex; justify-content: center; align-items: center; }
.chip .wait.done { background: var(--green-soft); color: var(--green); }
.chip.on .wait { background: var(--card); color: var(--red); }
.chip.on .wait.done { color: var(--green); }

/* ---------- Settings looks ---------- */
.theme-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.theme-card { flex-direction: column; align-items: stretch; gap: 3px; padding: 9px; text-align: left; white-space: normal; border-radius: var(--r); }
.theme-card .th-prev { height: 64px; border-radius: var(--r-s); margin-bottom: 4px; }
.theme-card small { color: var(--muted); font-weight: 500; }
.theme-card.on { box-shadow: inset 0 0 0 2.5px var(--blue); }

/* ---------- Analytics ---------- */
.hb-list { display: grid; gap: 7px; }
.hb { display: grid; grid-template-columns: minmax(100px, 140px) 1fr auto; gap: 8px; align-items: center; }
.hb-name { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hb-track { height: 13px; display: block; }
.hb-track i { display: block; height: 100%; background: var(--blue); border-radius: 0 5px 5px 0; }
.hb-val { font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; }
.cols { display: flex; gap: 3px; height: 84px; }
.cols.tall { height: 130px; }
.col { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.col-plot { flex: 1; display: flex; align-items: flex-end; justify-content: center; border-bottom: 1px solid var(--line); }
.col-plot i { display: block; width: min(70%, 44px); background: var(--blue); border-radius: 5px 5px 0 0; }
.col:hover .col-plot { background: var(--blue-soft); }
.col-label { font-size: 12px; color: var(--muted); text-align: center; height: 18px; line-height: 18px; white-space: nowrap; }
.multiples { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.mult-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 7px; font-size: 14px; }
#chart-tip { display: none; position: fixed; z-index: 35; background: var(--tip); color: var(--on-tip); font-size: 13px; padding: 6px 10px; border-radius: 9px; pointer-events: none; max-width: 280px; }
.invoice-head { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.invoice-total { margin-left: auto; max-width: 280px; margin-top: 8px; }
.invoice-total .list-row.grand { font-weight: 800; font-size: 17px; }

/* ---------- Not taking milk: every delivery person on one screen ---------- */
.board { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.lane { background: var(--card); border-radius: var(--r); padding: 10px 13px; box-shadow: var(--shadow), var(--edge); }
.lane-head { display: flex; justify-content: space-between; align-items: center; font-weight: 800; color: var(--blue-dark); margin-bottom: 4px; gap: 6px; }
.lane-head > span:first-child { display: flex; align-items: center; gap: 7px; }
.lane-count { background: var(--blue); color: var(--card); border-radius: 10px; min-width: 24px; text-align: center; font-size: 13px; padding: 1px 7px; }
.lane-count.zero { background: var(--green-soft); color: var(--green); }
.who { display: grid; grid-template-columns: 34px 1fr auto; gap: 5px; align-items: center; padding: 3px 0; border-top: 1px solid var(--line); }
.who b { color: var(--blue-dark); }
.who .tags { display: flex; gap: 4px; align-items: center; }
.who .ic-sun { color: #d98a00; }
.who .ic-moon { color: var(--blue); }
.lane .all-ok { color: var(--green); font-size: 14px; padding: 3px 0; display: flex; gap: 5px; align-items: center; font-weight: 600; }
.section-head { display: flex; align-items: center; gap: 10px; margin: 14px 0 7px; }
.section-head h2 { margin: 0; }
.section-head a { color: var(--blue); font-weight: 700; }

/* ---------- Milk White look: flat band, the gauge sits inside it ---------- */
:root[data-theme="milk"] .dip { display: none; }
:root[data-theme="milk"] .hero { min-height: 186px; }
:root[data-theme="milk"] .col-m { padding-top: 0; }
:root[data-theme="milk"] .gauge { top: 8px; }
:root[data-theme="milk"] .pill-bar { border-radius: 14px; }
:root[data-theme="milk"] .nav a { border-radius: 10px; }

/* ---------- Night Blue look: a soft glow on the hero and the main numbers ---------- */
:root[data-theme="night"] .gauge-val { filter: drop-shadow(0 0 7px rgba(95, 180, 234, .85)); stroke: #8fcdf3; }
:root[data-theme="night"] .gauge-knob circle:first-child { fill: #8fcdf3; }
:root[data-theme="night"] .mc-big, :root[data-theme="night"] .hero-big { text-shadow: 0 0 16px rgba(143, 205, 243, .5); }

@media (max-width: 1140px) {
  .brand span { display: none; }
  .nav a { padding: 8px 8px; font-size: 14px; }
  .hero { gap: 290px; padding: 8px 20px 20px; }
  .hero-big { font-size: 26px; }
  .hero-ic, .hero-av { width: 44px; height: 44px; }
  .hero-av img { width: 38px; height: 38px; }
  .hero-name { font-size: 16px; }
}
@media (max-width: 980px) {
  .hero { gap: 12px; flex-wrap: wrap; min-height: 0 !important; padding-bottom: 14px; }
  .gauge { position: relative; left: auto; top: auto !important; margin: 0 auto; order: 3; flex: 0 0 260px; }
  .gauge-in { inset: 16px 30px auto; }
  .dip { display: none; }
  .home-cols { grid-template-columns: 1fr; }
  .col-m { padding-top: 0; }
}
@media (max-width: 760px) {
  .pill-bar { flex-wrap: wrap; border-radius: 18px; }
  .brand { flex: 1; }
  .nav { order: 3; flex: 0 0 100%; justify-content: flex-start; overflow-x: auto; }
  .nav-ind { display: none; }
  .nav a.on { background: var(--blue-soft); }
  .top { padding: 8px 10px 10px; }
  main { padding: 10px; }
  .hero { margin: 0 -10px; }
  .shell { height: auto; min-height: 100dvh; }
  main { overflow: visible; flex: 1 0 auto; }
  .modal.wide .form, .form, .lits { grid-template-columns: 1fr; }
  .modal { padding: 14px; }
  .tools { width: 100%; }
  .tools input, .tools select { flex: 1; min-width: 120px; }
  .page-fill { height: auto; display: block; }
  .table-wrap.fill { max-height: 70vh; }
  .wz-steps button { font-size: 12px; }
}
@media print {
  body { background: #fff; }
  #app { display: none !important; }
}
