/* ==========================================================================
   ARM Console — shared design system
   One file for every page. Org colours are the only "loud" element.
   ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;500;600&family=IBM+Plex+Sans+Devanagari:wght@400;500;600&display=swap');

:root {
  --ink: #0f161e;
  --panel: rgba(28, 39, 51, .72);
  --panel-solid: #1c2733;
  --raised: rgba(36, 49, 62, .82);
  --hover: rgba(48, 63, 78, .7);
  --line: rgba(255, 255, 255, .07);
  --line-2: rgba(255, 255, 255, .14);
  --glass-blur: saturate(140%) blur(14px);
  --shadow-1: 0 1px 2px rgba(0,0,0,.28);
  --shadow-2: 0 10px 30px -12px rgba(0,0,0,.55);
  --sheen: linear-gradient(180deg, rgba(255,255,255,.055), rgba(255,255,255,0) 55%);
  --text: #e6ebf0;
  --muted: #8d9cac;
  --faint: #66768a;

  --brand: #f39a2c;
  --brand-ink: #1c1206;
  --in: #55bd86;
  --out: #e5645b;
  --warn: #eec04e;
  --info: #5aa7e4;

  /* org identity — the one bold system */
  --org-arm: #f39a2c;
  --org-airvimana: #5aa7e4;
  --org-honestdeal: #55bd86;
  --org-default: #8a97a6;

  --r-panel: 12px;
  --r-ctl: 8px;
  --side-w: 240px;
  --top-h: 60px;

  --font: 'IBM Plex Sans', 'IBM Plex Sans Devanagari', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --fs-12: 12px; --fs-13: 13px; --fs-14: 14px; --fs-16: 16px; --fs-20: 20px; --fs-26: 26px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
body.ax {
  font-family: var(--font);
  background-image:
    radial-gradient(1100px 620px at 12% -8%, rgba(243,154,44,.07), transparent 62%),
    radial-gradient(900px 560px at 92% 4%, rgba(90,167,228,.06), transparent 60%);
  background-attachment: fixed;
  font-size: var(--fs-14);
  line-height: 1.5;
  color: var(--text);
  background: var(--ink);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "tnum" 1;
}
.ax a { color: inherit; }
.ax button, .ax input, .ax select, .ax textarea { font: inherit; color: inherit; }
.ax :focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.ax [hidden] { display: none !important; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.ico { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.ico-sm { width: 15px; height: 15px; }

/* ------------------------------------------------------------------ shell */
.app { display: flex; min-height: 100vh; }
.side {
  width: var(--side-w); flex: none;
  background: linear-gradient(180deg, rgba(31,43,56,.86), rgba(22,31,41,.86));
  backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur);
  border-right: 1px solid var(--line);
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh; z-index: 60;
  font-family: var(--font);
}
.side-brand { display: flex; align-items: center; gap: 10px; padding: 16px 18px; height: var(--top-h); border-bottom: 1px solid var(--line); }
.side-brand img { width: 30px; height: 30px; border-radius: 8px; object-fit: cover; }
.side-brand b { font-size: var(--fs-16); font-weight: 600; letter-spacing: .01em; color: var(--text); }
.side-brand span { display: block; font-size: var(--fs-12); color: var(--muted); line-height: 1.2; }
.side .side-close { margin-left: auto; display: none; }
.nav { flex: 1; overflow-y: auto; padding: 12px 10px; display: flex; flex-direction: column; gap: 2px; }
.nav a {
  transition: background .14s ease, color .14s ease;
  display: flex; align-items: center; gap: 12px;
  padding: 9px 12px; border-radius: var(--r-ctl);
  color: var(--muted); text-decoration: none; font-weight: 500; font-size: var(--fs-14);
  border-left: 2px solid transparent;
}
.nav a:hover { background: var(--hover); color: var(--text); }
.nav a.on { background: linear-gradient(90deg, rgba(243,154,44,.16), rgba(243,154,44,.02)); color: var(--text); border-left-color: var(--brand); }
.nav a.on .ico { color: var(--brand); }
.side-foot { padding: 12px 10px; border-top: 1px solid var(--line); }
.who { display: flex; align-items: center; gap: 10px; padding: 6px 8px 10px; font-size: var(--fs-13); color: var(--muted); }
.who b { color: var(--text); font-weight: 500; display: block; }
.logout { width: 100%; display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: var(--r-ctl); background: none; border: 0; color: var(--muted); cursor: pointer; font-weight: 500; }
.logout:hover { background: rgba(229,100,91,.12); color: var(--out); }
.side-backdrop { display: none; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.page > *, .panel { min-width: 0; }
  .topbar-placeholder{}
.topbar {
  height: var(--top-h); flex: none;
  display: flex; align-items: center; gap: 12px;
  padding: 0 24px; border-bottom: 1px solid var(--line);
  background: rgba(15,22,30,.72); backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur);
  position: sticky; top: 0; z-index: 40;
}
.topbar h1 { font-size: var(--fs-20); font-weight: 600; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .spacer { flex: 1; }
.btn.menu-btn { display: none; }
.page { padding: 24px; width: 100%; max-width: 1360px; }

/* sub navigation (organization section) */
.tabs { display: flex; gap: 4px; padding: 0 24px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { padding: 12px 14px; color: var(--muted); text-decoration: none; font-weight: 500; white-space: nowrap; border-bottom: 2px solid transparent; margin-bottom: -1px; display: flex; gap: 8px; align-items: center; }
.tabs a:hover { color: var(--text); }
.tabs a.on { color: var(--text); border-bottom-color: var(--brand); }

/* ---------------------------------------------------------------- controls */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 36px; padding: 0 14px; border-radius: var(--r-ctl);
  border: 1px solid var(--line-2); background: var(--raised); color: var(--text);
  font-weight: 500; font-size: var(--fs-14); cursor: pointer; white-space: nowrap; text-decoration: none;
  box-shadow: var(--shadow-1); transition: background .14s ease, border-color .14s ease, transform .14s ease;
}
.btn:hover { background: var(--hover); border-color: rgba(255,255,255,.2); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: linear-gradient(180deg, #ffab44, #ef9525); border-color: #d8821c; color: var(--brand-ink); font-weight: 600; box-shadow: 0 1px 0 rgba(255,255,255,.28) inset, 0 6px 16px -6px rgba(243,154,44,.6); }
.btn-primary:hover { background: linear-gradient(180deg, #ffb857, #f39a2c); }
.btn-danger { background: transparent; border-color: rgba(229,100,91,.5); color: var(--out); }
.btn-danger:hover { background: rgba(229,100,91,.12); }
.btn-quiet { background: transparent; border-color: transparent; color: var(--muted); }
.btn-quiet:hover { background: var(--hover); color: var(--text); }
.btn-sm { height: 30px; padding: 0 10px; font-size: var(--fs-13); }
.icon-btn { width: 36px; padding: 0; }
.btn .spin, .spin { animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-size: var(--fs-13); color: var(--muted); font-weight: 500; }
.field > span i { color: var(--out); font-style: normal; }
.input, .select, .textarea {
  width: 100%; height: 38px; padding: 0 12px;
  background: rgba(10,16,22,.55); transition: border-color .14s, box-shadow .14s; border: 1px solid var(--line-2); border-radius: var(--r-ctl);
  color: var(--text); outline: none;
}
.textarea { height: auto; min-height: 84px; padding: 10px 12px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(243,154,44,.16); }
.input::placeholder { color: var(--faint); }
.select { appearance: none; padding-right: 32px; 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='%238d9cac' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; }
.search { position: relative; }
.search .ico { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--faint); }
.search .input { padding-left: 36px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }
.hint { font-size: var(--fs-12); color: var(--faint); }

/* segmented control */
.seg { display: inline-flex; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-ctl); padding: 3px; gap: 2px; flex-wrap: wrap; }
.seg button { border: 0; background: none; color: var(--muted); padding: 6px 12px; border-radius: 6px; cursor: pointer; font-weight: 500; display: inline-flex; align-items: center; gap: 8px; }
.seg button:hover { color: var(--text); }
.seg button.on { background: var(--raised); color: var(--text); box-shadow: inset 0 0 0 1px var(--line-2); }
.seg .n { font-size: var(--fs-12); color: var(--faint); font-variant-numeric: tabular-nums; }
.seg button.on .n { color: var(--muted); }

/* ------------------------------------------------------------------ panels */
.panel { position: relative; background: var(--panel); backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--line); border-radius: var(--r-panel); box-shadow: var(--shadow-1), var(--shadow-2); }
.panel::before { content: ""; position: absolute; inset: 0; border-radius: inherit; background: var(--sheen); pointer-events: none; }
.panel > * { position: relative; }
.panel-h { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.panel-h h2 { font-size: var(--fs-16); font-weight: 600; margin: 0; }
.panel-b { padding: 18px; }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 16px; }
.toolbar .search { flex: 1; min-width: 200px; max-width: 360px; }
.toolbar .grow { flex: 1; }

/* stats strip */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 20px; }
.stat { background: var(--panel); backdrop-filter: var(--glass-blur); border: 1px solid var(--line); border-radius: var(--r-panel); padding: 14px 16px; box-shadow: var(--shadow-1); }
.stat p { margin: 0; color: var(--muted); font-size: var(--fs-13); }
.stat b { display: block; font-size: var(--fs-26); font-weight: 600; margin-top: 2px; }
.stat b small { font-size: var(--fs-14); color: var(--muted); font-weight: 400; }

/* table */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-weight: 500; font-size: var(--fs-13); color: var(--muted); padding: 10px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 11px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table td.nw { white-space: nowrap; }
.table tbody tr.click { cursor: pointer; }
.table tbody tr.click { transition: background .12s ease; }
.table tbody tr.click:hover td { background: rgba(255,255,255,.045); }

/* person + org identity */
.person { display: flex; align-items: center; gap: 12px; min-width: 0; }
.avatar { width: 34px; height: 34px; background-image: var(--sheen); border-radius: 50%; display: grid; place-items: center; font-size: var(--fs-12); font-weight: 600; background: var(--raised); color: var(--text); flex: none; box-shadow: inset 0 0 0 2px var(--org, var(--line-2)); }
.person b { display: block; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.person small { display: block; color: var(--muted); font-size: var(--fs-12); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.org-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--org, var(--org-default)); flex: none; display: inline-block; }
.org-tag { display: inline-flex; align-items: center; gap: 7px; font-size: var(--fs-13); color: var(--text); white-space: nowrap; }

.pill { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 999px; font-size: var(--fs-12); font-weight: 500; background: var(--raised); color: var(--muted); white-space: nowrap; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.in { color: var(--in); background: rgba(85,189,134,.12); }
.pill.out { color: var(--out); background: rgba(229,100,91,.12); }
.pill.warn { color: var(--warn); background: rgba(238,192,78,.12); }
.pill.plain::before { display: none; }

/* cards grid (used sparingly — lists are tables) */
.grid > * { min-width: 0; }
.grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.card { background: var(--panel); backdrop-filter: var(--glass-blur); border: 1px solid var(--line); border-radius: var(--r-panel); padding: 16px; box-shadow: var(--shadow-1); }
.card.click { cursor: pointer; }
.card.click:hover { border-color: var(--line-2); background: var(--hover); }
.card-org { border-left: 3px solid var(--org, var(--line)); }

/* empty / loading / notice */
.empty { text-align: center; padding: 48px 20px; color: var(--muted); }
.empty b { display: block; color: var(--text); font-weight: 500; font-size: var(--fs-16); margin-bottom: 4px; }
.empty .btn { margin-top: 14px; }
.skel { height: 14px; border-radius: 4px; background: linear-gradient(90deg, var(--raised), var(--hover), var(--raised)); background-size: 200% 100%; animation: sk 1.2s linear infinite; }
@keyframes sk { to { background-position: -200% 0; } }
.notice { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r-ctl); background: rgba(238,192,78,.08); border: 1px solid rgba(238,192,78,.3); color: var(--text); font-size: var(--fs-13); margin-bottom: 16px; }
.notice .ico { color: var(--warn); margin-top: 1px; }
.notice.info { background: rgba(90,167,228,.08); border-color: rgba(90,167,228,.3); }
.notice.info .ico { color: var(--info); }
.notice code { background: var(--raised); padding: 1px 5px; border-radius: 4px; font-size: var(--fs-12); }

/* --------------------------------------------------------------- overlays */
.modal { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(6,10,14,.6); backdrop-filter: blur(3px); }
.modal[hidden] { display: none; }
.dialog { width: 100%; max-width: 560px; max-height: calc(100vh - 32px); display: flex; flex-direction: column;
  background: linear-gradient(180deg, rgba(34,47,61,.96), rgba(25,35,46,.96));
  backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--line-2); border-radius: 16px; box-shadow: 0 24px 60px -16px rgba(0,0,0,.7); }
.dialog.wide { max-width: 760px; }
.dialog-h { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.dialog-h h3 { margin: 0; font-size: var(--fs-16); font-weight: 600; flex: 1; }
.dialog-b { padding: 20px; overflow-y: auto; }
.dialog-f { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; padding: 14px 20px; border-top: 1px solid var(--line); }
.dialog-f .left { margin-right: auto; display: flex; gap: 10px; flex-wrap: wrap; }

.toasts { position: fixed; right: 16px; bottom: 16px; z-index: 300; display: flex; flex-direction: column; gap: 8px; max-width: calc(100vw - 32px); }
.toast { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-radius: 12px; background: rgba(38,52,66,.94); backdrop-filter: var(--glass-blur); border: 1px solid var(--line-2); box-shadow: 0 12px 32px rgba(0,0,0,.45); font-size: var(--fs-13); max-width: 380px; }
.toast.ok .ico { color: var(--in); }
.toast.err .ico { color: var(--out); }

/* ----------------------------------------------------------- org hierarchy */
.tree-org { margin-bottom: 14px; overflow: hidden; }
.tree-org > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-left: 4px solid var(--org); }
.tree-org > summary::-webkit-details-marker { display: none; }
.tree-org > summary h2 { margin: 0; font-size: var(--fs-20); font-weight: 600; }
.tree-org > summary .chev { transition: transform .15s; color: var(--muted); }
.tree-org[open] > summary .chev { transform: rotate(90deg); }
.tree-meta { display: flex; gap: 18px; color: var(--muted); font-size: var(--fs-13); margin-left: auto; flex-wrap: wrap; justify-content: flex-end; }
.tree-meta b { color: var(--text); font-weight: 600; }
.tree-teams { border-top: 1px solid var(--line); }
.tree-team { border-bottom: 1px solid var(--line); }
.tree-team:last-child { border-bottom: 0; }
.tree-team > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 12px; padding: 12px 18px 12px 34px; }
.tree-team > summary::-webkit-details-marker { display: none; }
.tree-team > summary:hover { background: var(--hover); }
.tree-team > summary .chev { color: var(--faint); transition: transform .15s; }
.tree-team[open] > summary .chev { transform: rotate(90deg); }
.tree-team > summary b { font-weight: 500; }
.tree-people { padding: 4px 18px 12px 62px; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 4px 16px; }
.tree-people .person { padding: 7px 0; }

/* -------------------------------------------------------- legacy-page bridge
   map / route-history / tasks still use their own Tailwind content; these rules
   only make our sidebar + route header sit correctly inside their flex body. */
body.legacy { font-family: var(--font); }
body.legacy #sidebar-container { flex: none; }
.rh-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px 16px; margin: 12px; border-radius: 12px; background: rgba(25,35,46,.94); border: 1px solid var(--line); position: relative; z-index: 50; font-family: var(--font); color: var(--text); }
.rh-bar .search-container { position: relative; min-width: 220px; flex: 1; max-width: 340px; }
.rh-bar #searchDropdown { position: absolute; top: calc(100% + 6px); left: 0; right: 0; max-height: 320px; overflow-y: auto; display: none; z-index: 60; background: var(--panel); border: 1px solid var(--line-2); border-radius: 10px; }
.rh-bar .input { background: var(--ink); }
.rh-stat { text-align: right; padding-left: 14px; }
.rh-stat p { margin: 0; font-size: var(--fs-12); color: var(--muted); }
.rh-stat b { font-size: var(--fs-16); font-weight: 600; }
.rh-bar .grow { flex: 1; }
.rh-info { display: flex; gap: 8px; }
.rh-info > div { background: var(--raised) !important; border: 1px solid var(--line) !important; border-radius: 8px !important; padding: 5px 12px !important; backdrop-filter: none !important; font-size: var(--fs-12) !important; }

/* map.html floating panels (kept class name from the old style.css) */
body.legacy .vip-glass { background: rgba(25,35,46,.88); backdrop-filter: var(--glass-blur); border: 1px solid var(--line); border-radius: 12px; color: var(--text); }
body.legacy { background: var(--ink); color: var(--text); display: flex; height: 100vh; overflow: hidden; margin: 0; }
body.legacy > main { flex: 1; min-width: 0; position: relative; }
@media (max-width: 900px) {
  body.legacy .w-\[420px\] { width: calc(100vw - 24px) !important; }
  .rh-bar .search-container { max-width: none; min-width: 100%; }
  .rh-bar .rh-stat { text-align: left; padding-left: 0; }
}



/* --------------------------------------------- live map / route history polish
   These pages keep their own logic; this only lines their panels up with the
   rest of the console (same radius, same glass, brand accents, avatars). */
body.legacy .vip-glass, body.legacy .glass-panel {
  border-radius: var(--r-panel) !important;
  border: 1px solid var(--line) !important;
  background: rgba(25, 35, 46, .88) !important;
  backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: var(--shadow-2);
}
body.legacy .rounded-full.bg-indigo-500, body.legacy .bg-indigo-500 { background: var(--raised) !important; box-shadow: inset 0 0 0 2px var(--brand); }
body.legacy .text-indigo-400, body.legacy .text-indigo-300 { color: var(--brand) !important; }
body.legacy .bg-green-500 { background: var(--in) !important; }
body.legacy input { border-radius: var(--r-ctl) !important; }
body.legacy #map, body.legacy .map-shell { border-radius: 0; }
/* the floating panels should never swallow the screen on a laptop */
body.legacy .w-\[420px\] { max-width: min(360px, 30vw); }
body.legacy .w-\[320px\] { max-width: min(280px, 26vw); }
/* a touch smaller and tighter, so more map is visible */
body.legacy .vip-glass, body.legacy .glass-panel { font-size: var(--fs-13); }
body.legacy .vip-glass .p-6, body.legacy .glass-panel .p-6 { padding: 14px !important; }
body.legacy .vip-glass .p-4 { padding: 12px !important; }
body.legacy .vip-glass .text-2xl, body.legacy .glass-panel .text-2xl { font-size: var(--fs-20) !important; }
body.legacy .vip-glass .text-xl { font-size: var(--fs-16) !important; }
body.legacy .rounded-full.w-12, body.legacy .w-12.h-12 { width: 34px !important; height: 34px !important; font-size: var(--fs-12) !important; }
body.legacy .timeline-container { max-width: min(340px, 28vw); }
.rh-bar { padding: 8px 12px; margin: 10px; gap: 8px; }
.rh-bar .btn { height: 32px; }
.rh-bar .input { height: 34px; }
.rh-stat b { font-size: var(--fs-14); }
.rh-info > div { padding: 4px 10px !important; }
@media (max-width: 900px) {
  body.legacy .w-\[420px\], body.legacy .w-\[320px\] { max-width: calc(100vw - 24px) !important; }
}


/* ------------------------------------------------ Task forms in light mode
   Ye page white/xx wale rang istemal karta hai (text-white/40, bg-white/5).
   Dark me wo theek dikhte hain; light me ulta karna padta hai. */
body.ax[data-theme="light"].tasks-page {
  --ink: #eef1f5;
  --panel: rgba(255,255,255,.82);
  --panel-solid: #ffffff;
  --raised: rgba(255,255,255,.92);
  --hover: rgba(15,30,50,.055);
  --line: rgba(16,30,48,.10);
  --line-2: rgba(16,30,48,.18);
  --text: #16222e;
  --muted: #5d6e7f;
  --faint: #8493a3;
  color-scheme: light;
  background-image:
    radial-gradient(1100px 620px at 12% -8%, rgba(243,154,44,.13), transparent 62%),
    radial-gradient(900px 560px at 92% 4%, rgba(90,167,228,.12), transparent 60%);
}
body.ax[data-theme="light"].tasks-page .side {
  background: linear-gradient(180deg, rgba(255,255,255,.92), rgba(246,248,251,.92));
}
body.ax[data-theme="light"].tasks-page .topbar { background: rgba(238,241,245,.78); }
body.ax[data-theme="light"].tasks-page .nav a.on {
  background: linear-gradient(90deg, rgba(243,154,44,.22), rgba(243,154,44,.04));
}
/* safed par safed na ho jaye — ulta kar do */
body.ax[data-theme="light"].tasks-page .text-white { color: var(--text) !important; }
body.ax[data-theme="light"].tasks-page [class*="text-white/"] { color: var(--muted) !important; }
body.ax[data-theme="light"].tasks-page .text-white\/20,
body.ax[data-theme="light"].tasks-page .text-white\/10 { color: var(--faint) !important; }
body.ax[data-theme="light"].tasks-page [class*="bg-white/"] { background: rgba(16,30,48,.04) !important; }
body.ax[data-theme="light"].tasks-page [class*="border-white/"] { border-color: var(--line) !important; }
body.ax[data-theme="light"].tasks-page .vip-glass,
body.ax[data-theme="light"].tasks-page .glass-panel {
  background: rgba(255,255,255,.88) !important;
  border-color: var(--line) !important;
  box-shadow: var(--shadow-2);
}
body.ax[data-theme="light"].tasks-page input,
body.ax[data-theme="light"].tasks-page textarea,
body.ax[data-theme="light"].tasks-page select { background: rgba(255,255,255,.95) !important; color: var(--text) !important; }
body.ax[data-theme="light"].tasks-page .text-indigo-400,
body.ax[data-theme="light"].tasks-page .text-indigo-300 { color: #b96c0d !important; }

/* ------------------------------------------------------------ light mode
   Applies to the normal pages. Live map / route history / task forms keep
   their dark map styling (maps read better dark), so .legacy is left alone. */
body.ax[data-theme="light"]:not(.legacy), body.ax[data-theme="light"].tasks-page {
  --ink: #eef1f5;
  --panel: rgba(255, 255, 255, .78);
  --panel-solid: #ffffff;
  --raised: rgba(255, 255, 255, .92);
  --hover: rgba(15, 30, 50, .055);
  --line: rgba(16, 30, 48, .10);
  --line-2: rgba(16, 30, 48, .18);
  --text: #16222e;
  --muted: #5d6e7f;
  --faint: #8493a3;
  --brand-ink: #3a2405;
  --shadow-1: 0 1px 2px rgba(16, 30, 48, .07);
  --shadow-2: 0 12px 28px -16px rgba(16, 30, 48, .35);
  --sheen: linear-gradient(180deg, rgba(255,255,255,.7), rgba(255,255,255,0) 60%);
  color-scheme: light;
  background-image:
    radial-gradient(1100px 620px at 12% -8%, rgba(243,154,44,.13), transparent 62%),
    radial-gradient(900px 560px at 92% 4%, rgba(90,167,228,.12), transparent 60%);
}
body.ax[data-theme="light"]:not(.legacy) .side {
  background: linear-gradient(180deg, rgba(255,255,255,.92), rgba(246,248,251,.92));
}
body.ax[data-theme="light"]:not(.legacy) .topbar { background: rgba(238,241,245,.78); }
body.ax[data-theme="light"]:not(.legacy) .input,
body.ax[data-theme="light"]:not(.legacy) .select,
body.ax[data-theme="light"]:not(.legacy) .textarea { background: rgba(255,255,255,.9); }
body.ax[data-theme="light"]:not(.legacy) .dialog {
  background: linear-gradient(180deg, #ffffff, #f7f9fc);
  box-shadow: 0 24px 60px -18px rgba(16,30,48,.35);
}
body.ax[data-theme="light"]:not(.legacy) .modal { background: rgba(22, 34, 46, .38); }
body.ax[data-theme="light"]:not(.legacy) .toast { background: rgba(255,255,255,.96); }
body.ax[data-theme="light"]:not(.legacy) .nav a.on {
  background: linear-gradient(90deg, rgba(243,154,44,.22), rgba(243,154,44,.04));
}
body.ax[data-theme="light"]:not(.legacy) .table tbody tr.click:hover td { background: rgba(16,30,48,.035); }
body.ax[data-theme="light"]:not(.legacy) .pill { background: rgba(16,30,48,.06); }
body.ax[data-theme="light"]:not(.legacy) .skel { background: linear-gradient(90deg, #e6eaf0, #f2f5f8, #e6eaf0); background-size: 200% 100%; }
body.ax[data-theme="light"]:not(.legacy) .login-art { background: linear-gradient(180deg, #ffffff, #f4f7fa); }
body.ax[data-theme="light"]:not(.legacy) .sw i { background: rgba(16,30,48,.10); }

/* theme switch in the top bar */
.theme-btn { position: relative; }
.theme-btn .ico { transition: transform .2s ease, opacity .2s ease; }

/* chhoti screen par sirf icon */
@media (max-width: 560px) { .hide-sm { display: none; } }

/* ---------------------------------------------------------------- mobile */
@media (max-width: 1100px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .side { position: fixed; left: 0; top: 0; bottom: 0; transform: translateX(-100%); transition: transform .2s ease; box-shadow: 0 0 40px rgba(0,0,0,.5); }
  .side.open { transform: none; }
  .side .side-close { display: inline-flex; }
  .side-backdrop.open { display: block; position: fixed; inset: 0; background: rgba(6,10,14,.6); z-index: 55; }
  .btn.menu-btn { display: inline-flex; }
  .topbar { padding: 0 14px; }
  .tabs { padding: 0 10px; }
  .page { padding: 16px 14px; }
  .form-grid { grid-template-columns: 1fr; }
  .tree-org > summary { flex-wrap: wrap; }
  .tree-meta { margin-left: 0; width: 100%; justify-content: flex-start; }
  .tree-team > summary { padding-left: 18px; }
  .tree-people { padding-left: 18px; }
  /* tables become stacked rows */
  .table.stack thead { display: none; }
  .table.stack, .table.stack tbody, .table.stack tr, .table.stack td { display: block; width: 100%; }
  .table.stack tr { border-bottom: 1px solid var(--line); padding: 10px 14px; }
  .table.stack td { border: 0; padding: 3px 0; }
  .table.stack td[data-k]::before { content: attr(data-k); display: inline-block; min-width: 96px; color: var(--faint); font-size: var(--fs-12); }
  .topbar-hide-sm { display: none !important; }
}
@media (max-width: 560px) {
  .stats { grid-template-columns: 1fr 1fr; gap: 8px; }
  .stat b { font-size: var(--fs-20); }
  .dialog-f .btn { flex: 1; }
  .toolbar .search { max-width: none; }
  .seg { flex-wrap: nowrap; overflow-x: auto; max-width: 100%; scrollbar-width: none; }
  .seg button { white-space: nowrap; }
  .toolbar .select { flex: 1; min-width: 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
