/* ==========================================================================
   IAV ERP shell (copper) - adapted from the MN ERP look kit — one stylesheet for every screen.
   Part 1: tokens, left console, page frame, buttons, inputs, tables, pager,
           dialogs, toast, search bar.
   Part 2: page components (tabs, chips, record card, forms, File Manager,
           Control Panel rights grid, reporting).
   Change the brand by editing the --brand tokens below (colours, font) and the logo only.
   ========================================================================== */

:root {
  /* IAV muted royal blue theme (Virendra, 11 Oct 2026) - every screen takes its colours from these tokens only */
  --navy: #315A93; --navy-soft: #315A93; --navy-deep: #233F69;            /* primary accent, its pressed shade */
  --primary-hover: #294F84; --primary-press: #233F69; --focus: #315A93; --focus-ring: rgba(49, 90, 147, .18);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --ink: #25364A; --muted: #52667B; --faint: #75849A;                      /* headings + text, secondary, minor */
  --bg: #F7F9FC; --card: #FFFFFF; --line: #DDE5F0; --divider: #E4EAF2; --pill: #E2EBF7;
  --side-bg: #EAF0F8; --active-bg: #D5E3F5; --hover-bg: #E2EBF7; --disabled-bg: #EEF2F7; --disabled-ink: #75849A;
  --shade: 37, 54, 74;                                                     /* overlays and shadows: rgba(var(--shade), a) */
  --fill-go: #315A93;  --tint-go: #D5E3F5;  --ink-go: #233F69;
  --fill-yes: #26734D; --tint-yes: #E8F4EC; --ink-yes: #26734D;           /* success / completed */
  --fill-no: #B3261E;  --tint-no: #FCEAE9;  --ink-no: #B3261E;            /* error / overdue */
  --fill-hold: #946014; --tint-hold: #FFF2DF; --ink-hold: #946014;        /* warning / pending */
  --ok: #26734D; --ok-bg: #E8F4EC; --ok-line: #BFDCC9;
  --warn: #B3261E; --warn-bg: #FCEAE9; --warn-line: #F2C4C0;
  --side: 236px;
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--ink); min-height: 100vh;
  font-family: var(--font); font-size: 14px;
}

#console {
  position: fixed; inset: 0 auto 0 0; width: var(--side); z-index: 40;
  background: var(--side-bg); color: var(--ink); display: flex; flex-direction: column;
  border-right: 1px solid var(--line);
  
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}
#console .top { padding: 14px 16px 12px; border-bottom: 1px solid var(--line); }
#console .top img { width: 100%; max-width: 104px; display: block; margin: 0 auto 7px; }

#console .top b { display: block; font-size: 12.5px; text-align: center; font-weight: 600; letter-spacing: -.01em; padding: 0 32px; }
#console .top span { display: block; font-size: 11px; text-align: center; color: var(--faint); padding: 0 32px; }

#console .top { position: relative; }
#console .appsbtn {
  position: absolute; top: 8px; right: 8px; width: 30px; height: 30px; padding: 0;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  background: none; border: 1px solid transparent; border-radius: 8px; color: var(--faint);
}
#console .appsbtn:hover { background: var(--pill); border-color: var(--line); color: var(--navy); }
#console .appsbtn .ic { width: 18px; height: 18px; }

#console .appsbtn .ic path { fill: currentColor; stroke: none; }
#console .refbtn {   /* refresh, always on screen (2 Nov 2026) */
  position: absolute; top: 8px; right: 42px; width: 30px; height: 30px; padding: 0;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  background: none; border: 1px solid transparent; border-radius: 8px; color: var(--faint);
}
#console .refbtn:hover { background: var(--pill); border-color: var(--line); color: var(--navy); }
#console .refbtn .ic { width: 18px; height: 18px; }
#console .refbtn.spin .ic { animation: iavspin .8s linear infinite; }
@keyframes iavspin { to { transform: rotate(360deg); } }

.appswrap {
  position: fixed; inset: 0; z-index: 90; background: rgba(var(--shade), .34);
  display: flex; align-items: flex-start; justify-content: flex-start;
  padding: 14px 0 0 calc(var(--side) + 10px);
}
.appscard {
  width: 336px; max-width: calc(100vw - 24px); background: var(--card);
  border: 1px solid var(--line); border-radius: 14px; padding: 13px 13px 11px;
  box-shadow: 0 18px 44px rgba(var(--shade), .22);
  max-height: calc(100vh - 28px); display: flex; flex-direction: column;
}
.appshead { display: flex; align-items: baseline; gap: 10px; margin: 0 2px 10px; }
.appshead b { flex: 1; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.appsedit {
  background: none; border: 0; padding: 0; cursor: pointer; font-family: inherit;
  font-size: 12px; color: var(--navy-soft); text-decoration: underline; text-underline-offset: 2px;
}
.appsedit:hover { opacity: .75; }

.appsbody { flex: 1; min-height: 0; overflow-y: auto; scrollbar-width: thin; }

.appsgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; }
.apptile {
  display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center;
  padding: 12px 5px 11px; border-radius: 10px; text-decoration: none; color: var(--ink);
}
.apptile:hover { background: var(--pill); }
.apptile .ic { width: 23px; height: 23px; color: var(--navy-soft); }
.apptile span { font-size: 11px; line-height: 1.3; color: var(--muted); }
.apptile:hover span { color: var(--ink); }

.apptile .apppath { display: block; font-size: 9.5px; color: var(--faint); margin-top: 2px; }
.appsgroup {
  font-size: 10px; text-transform: uppercase; letter-spacing: .07em; color: var(--faint);
  margin: 12px 4px 3px; position: sticky; top: 40px; background: var(--card, #fff); padding: 2px 0;
}
.appsfind { width: 100%; box-sizing: border-box; margin: 0 0 6px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px;
  font: inherit; font-size: 14px; position: sticky; top: 0; background: var(--card, #fff); z-index: 1; }
.appscat {
  font-size: 10px; text-transform: uppercase; letter-spacing: .07em; color: var(--faint);
  margin: 10px 4px 3px;
}
.appscat:first-child { margin-top: 0; }
.appsrow {
  display: flex; align-items: center; gap: 9px; width: 100%; padding: 7px 6px;
  background: none; border: 0; border-radius: 8px; cursor: pointer;
  font-family: inherit; font-size: 13px; color: var(--ink); text-align: left;
}
.appsrow:hover { background: var(--bg); }
.appsrow > span { flex: 1; }
.appsrow .ic { width: 17px; height: 17px; color: var(--faint); }

.appsrow .ic.star { color: var(--line); }
.appsrow.on .ic.star { color: #c9971a; fill: #f3c14b; }
.appsrow.on > span { font-weight: 600; }

.appsfoot { border-top: 1px solid var(--line); margin-top: 9px; padding-top: 9px; }
.appsfoot input[type=search] {
  width: 100%; padding: 7px 10px; font-size: 13px; font-family: inherit;
  border: 1px solid var(--line); border-radius: 8px; background: var(--card); color: var(--ink);
}
.appsnone { font-size: 12.5px; color: var(--muted); margin: 14px 6px; }

#console nav {
  flex: 1; min-height: 0; padding: 10px 8px 16px; overflow-y: auto;
  scrollbar-width: thin; scrollbar-color: #C8D3E3 transparent;
}
#console nav::-webkit-scrollbar { width: 8px; }
#console nav::-webkit-scrollbar-thumb { background: #C8D3E3; border-radius: 4px; }
#console nav::-webkit-scrollbar-thumb:hover { background: #AFC0D6; }
#console nav::-webkit-scrollbar-track { background: transparent; }

/* option B "soft cards" (Virendra, 16 Oct 2026): closed sections are plain rows with the arrow on the right;
   the open section sits in a white card with its name inside; no dark focus box */
#console .catbody.plain { margin: 0 0 6px; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
#console .catcard { border: 1px solid transparent; border-radius: 14px; margin: 0 0 1px; }
#console .catcard.open {
  background: var(--card); border-color: var(--line); padding: 4px; margin: 5px 0 7px;
  box-shadow: 0 1px 2px rgba(var(--shade), .06);
}
#console .cat {
  display: flex; align-items: center; gap: 8px; width: 100%; margin: 0; border: 0; background: none;
  padding: 8px 10px; border-radius: 9px; cursor: pointer; user-select: none; text-align: left;
  font-family: inherit; font-size: 13.5px; font-weight: 600; color: #3E5166; line-height: 1.3;
}
#console .cat .lbl { flex: 1; }
#console .cat:hover { background: var(--hover-bg); color: var(--navy-deep); }
#console .cat:focus { outline: none; }
#console .cat:focus-visible { outline: none; box-shadow: none; background: var(--hover-bg); }   /* keyboard only: a soft shade, never a box */
#console .cat .chev { width: 13px; height: 13px; }
#console .catcard.open .cat { color: var(--navy-deep); font-weight: 700; font-size: 14px; padding: 7px 8px 6px; }
#console .catcard.open .cat:hover { background: none; }
#console .catcard.open .cat:focus-visible { background: var(--hover-bg); }
#console .catcard.open .cat .chev { transform: rotate(90deg); color: var(--navy); }
#console .catbody { border: 0; margin: 0; padding: 0; background: none; }
#console .catbody.closed { display: none; }
#console .catcard.open a, #console .catcard.open .soon, #console .catcard.open .grouprow { padding: 7px 8px; }

#console a, #console .soon {
  display: flex; align-items: center; gap: 11px; padding: 8.5px 10px; border-radius: 8px;
  border: 0; margin: 0 0 2px; background: none; box-shadow: none;
  color: var(--ink); text-decoration: none; font-size: 13.5px; font-weight: 450;
  line-height: 1.35; cursor: pointer;
}
#console a:hover { background: var(--hover-bg); }
#console a.active { background: var(--active-bg); color: var(--navy); font-weight: 600; }
#console a.active .ic { color: var(--navy); }
#console a.active .ic { color: var(--navy); }

#console .soon { color: var(--faint); cursor: default; }

#console .soon.lit { color: var(--ink); cursor: pointer; }
#console .soon.lit .ic { color: var(--muted); }
#console .soon.active { color: var(--navy); font-weight: 600; }
#console .soon.active .ic { color: var(--navy); }
#console .soon em {
  font-style: normal; font-size: 9.5px; margin-left: auto; letter-spacing: .03em;
  color: var(--faint); background: var(--hover-bg); padding: 1px 6px; border-radius: 999px;
}

.ic {
  flex: none; fill: none; stroke: currentColor; stroke-width: 1.7;
  stroke-linecap: round; stroke-linejoin: round;
}
#console .ic { width: 17px; height: 17px; color: var(--muted); }
#console .lbl { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

#console .chev {
  width: 14px; height: 14px; flex: none; color: var(--faint);
  fill: none; stroke: currentColor; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
  transition: transform .15s ease;
}
#console .parent.open .chev { transform: rotate(90deg); }

#console .sub { margin: 0 0 4px 16px; padding: 0 0 0 12px; border: 0; border-left: 2px solid var(--line); background: none;
  font-size: inherit; color: inherit; font-style: normal; display: block; }
#console .sub.closed { display: none; }
#console .sub a, #console .sub .soon, #console .catcard.open .sub a, #console .catcard.open .sub .soon {
  font-size: 13px; padding: 5px 8px; gap: 0; color: #3E5166;
}
#console .sub a.active { color: var(--navy-deep); }
#console .sub .lbl { white-space: normal; }
#console .sub .soon { font-size: 12px; font-style: italic; }

/* the footer is one line: you, ? (help) and the gear (settings); each opens a small card above it (16 Oct 2026) */
#console .bottom { flex: none; position: relative; padding: 8px 10px; border-top: 1px solid var(--line); background: var(--side-bg); }
#console .fline { display: flex; align-items: center; gap: 7px; }
#console .who { flex: 1; min-width: 0; display: flex; align-items: center; gap: 9px; padding: 0; margin: 0; border: 0; }
#console .who .av {
  width: 30px; height: 30px; flex: none; border-radius: 50%; background: var(--active-bg);
  color: var(--navy-deep); font-size: 11.5px; font-weight: 700; display: flex;
  align-items: center; justify-content: center; letter-spacing: -.02em;
}
#console .who .nm { min-width: 0; }
#console .who b { display: block; font-size: 12.5px; font-weight: 600; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#console .who span { display: block; font-size: 11px; color: var(--muted); line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#console .fbtn {
  flex: none; width: 34px; height: 34px; padding: 0; border-radius: 10px; border: 1px solid var(--line);
  background: var(--card); color: var(--navy); display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-family: inherit; font-weight: 700; font-size: 15px; line-height: 1;
}
#console .fbtn:hover, #console .fbtn[aria-expanded="true"] { border-color: var(--navy); background: var(--hover-bg); }
#console .fbtn:focus { outline: none; }
#console .fbtn:focus-visible { box-shadow: 0 0 0 3px var(--focus-ring); }
#console .fbtn .ic { width: 17px; height: 17px; color: inherit; }
#console .fpop {
  display: none; position: absolute; left: 8px; right: 8px; bottom: calc(100% + 6px); z-index: 50;
  background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 6px;
  box-shadow: 0 8px 24px rgba(var(--shade), .16);
}
#console .fpop.open { display: block; }
#console .fpop .act {
  display: flex; align-items: center; gap: 10px; width: 100%; margin: 0; padding: 8px 10px; border: 0; border-radius: 9px;
  background: none; font-family: inherit; font-size: 13px; font-weight: 450; color: var(--ink); line-height: 1.3;
  text-decoration: none; cursor: pointer; text-align: left;
}
#console .fpop .act:hover { background: var(--hover-bg); }
#console .fpop .act.active { background: var(--active-bg); color: var(--navy-deep); font-weight: 600; }
#console .fpop .act.sep { position: relative; margin-top: 7px; }
#console .fpop .act.sep::before { content: ''; position: absolute; left: 8px; right: 8px; top: -4px; height: 1px; background: var(--divider); }
#console .fpop .act.danger { color: var(--warn); }
#console .fpop .act.danger:hover { background: var(--warn-bg); }
#console .fpop .ic { width: 16px; height: 16px; color: var(--muted); }
#console .fpop .act.danger .ic { color: var(--warn); }
#console .reportlink {
  display: flex; align-items: center; gap: 8px; width: 100%; margin: 6px 0 0; padding: 4px 6px; border: 0; border-radius: 7px;
  background: none; font-family: inherit; font-size: 12.5px; color: var(--muted); cursor: pointer; text-align: left;
}
#console .reportlink:hover { color: var(--navy); background: var(--hover-bg); }
#console .reportlink .ic { width: 14px; height: 14px; color: inherit; }
@media (prefers-reduced-motion: reduce) { #console .chev { transition: none; } }

.shell { margin-left: var(--side); min-height: 100vh; }
.pagehead {
  background: var(--card); border-bottom: 1px solid var(--line);
  padding: 18px 30px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
}
.pagehead h1 { margin: 0; font-size: 17.5px; font-weight: 620; letter-spacing: -.012em; }
.pagehead p { margin: 2px 0 0; font-size: 12.5px; color: var(--muted); }
.pagehead .right { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.content { max-width: 1280px; padding: 26px 30px 60px; }

#burger { display: none; }

#console .drawer { display: contents; }
#console .dhead { display: none; }
#console .top .titles .scrname, #console .top .titles .scrsub { display: none; }    /* phone only (below) */

@media (max-width: 900px) {
  
  #console { position: static; width: auto; border-right: 0; border-bottom: 1px solid var(--line); overflow: visible; }
  #console .top { display: flex; align-items: center; gap: 10px; padding: 9px 12px; }
  #console .top img { width: 40px; margin: 0; padding: 2px; }
  #console .top .titles { text-align: left; min-width: 0; }
  #console .top b, #console .top span { text-align: left; padding: 0; }
  #console .top b { font-size: 14px; }
  #console .top .titles.hasscr .appn, #console .top .titles.hasscr .appsub { display: none; }
  #console .top .titles .scrname { display: block; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 62vw; }
  #console .top .titles .scrsub { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 62vw; }
  #console .appsbtn { position: static; margin-left: auto; width: 40px; height: 40px; }
  #console .refbtn { position: static; margin-left: auto; width: 40px; height: 40px; border-color: var(--line); color: var(--navy); }
  #console .refbtn + .appsbtn { margin-left: 2px; }
  #burger {
    display: flex; order: -1; align-items: center; justify-content: center; width: 40px; height: 40px;
    margin: 0; padding: 0; background: none; border: 1px solid var(--line); border-radius: 10px;
    color: var(--navy); font-family: inherit; font-size: 20px; line-height: 1; cursor: pointer;
  }
  #console .drawer {
    position: fixed; inset: 0 auto 0 0; width: min(72vw, 296px); z-index: 80;    display: flex; flex-direction: column;
    background: var(--side-bg); color: var(--ink);
    transform: translateX(-100%); transition: transform .18s ease; box-shadow: 0 0 40px rgba(0,0,0,.35); overflow: hidden;
  }
  #console.open .drawer { transform: none; }
  .dscrim { position: fixed; inset: 0; background: rgba(var(--shade), .45); z-index: 70; }
  body.drawer-open { overflow: hidden; }
  #console .dhead { display: flex; align-items: center; gap: 10px; padding: 14px 14px 12px; position: relative; }
  #console .dhead::after { content: ''; position: absolute; left: 14px; right: 14px; bottom: 0; height: 1px; background: var(--line); }
  #console .dhead img { width: 42px; height: 42px; object-fit: contain; background: transparent; border-radius: 10px; padding: 3px; flex: none; }
  #console .dtitles { min-width: 0; }
  #console .dhead b { display: block; font-size: 15px; font-weight: 650; letter-spacing: .2px; text-align: left; padding: 0; }
  #console .dhead span { display: block; font-size: 11px; color: var(--muted); text-align: left; padding: 0; }
  #console .dclose { margin-left: auto; width: 34px; height: 34px; flex: none; border: 0; background: var(--hover-bg); color: var(--ink); border-radius: 9px; font-family: inherit; font-size: 20px; line-height: 1; cursor: pointer; }
  #console nav { display: block; flex: 1; overflow-y: auto; padding: 6px 0 10px; }
  #console .catcard, #console .catcard.open { background: none; border: 0; border-radius: 0; padding: 0; margin: 0; box-shadow: none; }
  #console .catbody.plain { margin: 0; padding-bottom: 0; border-bottom: 0; }
  #console .cat, #console .catcard.open .cat { color: var(--navy); opacity: .9; font-size: 9.5px; font-weight: 600; letter-spacing: 1.6px; text-transform: uppercase; padding: 14px 16px 5px; gap: 4px; border-radius: 0; }
  #console .cat .lbl { flex: none; }
  #console .cat .chev { order: -1; width: 12px; height: 12px; margin: 0 2px 0 -2px; transform: rotate(0deg); }
  #console .catcard.open .cat .chev { transform: rotate(90deg); }
  #console .cat:hover, #console .catcard.open .cat:hover { background: none; color: var(--navy); }
  #console .cat .chev, #console .catcard.open .cat .chev { color: var(--navy); }
  #console .sub { margin: 0 0 2px; padding-left: 28px; border-left: 0; }
  #console .catcard.open a, #console .catcard.open .soon { padding: 9px 16px 9px 13px; }
  #console .catcard.open .grouprow { padding: 9px 16px 9px 13px; }
  #console a, #console .soon { color: var(--ink); border-left: 3px solid transparent; border-radius: 0; padding: 9px 16px 9px 13px; font-size: 13.5px; }
  #console .soon { color: var(--faint); }
  #console .soon.lit { color: var(--ink); }
  #console a:hover { background: var(--hover-bg); }
  #console a.active, #console .soon.active { background: var(--active-bg); border-left-color: var(--navy); color: var(--navy); font-weight: 650; }
  #console .ic, #console .soon.lit .ic { color: var(--muted); }
  #console a.active .ic, #console .soon.active .ic { color: var(--navy); }
  #console .soon em { color: var(--muted); background: var(--active-bg); }
  #console .sub a, #console .sub .soon, #console .catcard.open .sub a, #console .catcard.open .sub .soon { padding: 9px 16px 9px 40px; font-size: 13.5px; color: var(--ink); }
  #console .bottom { display: block; background: none; border-top: 0; padding: 8px 8px calc(env(safe-area-inset-bottom, 0px) + 10px); position: relative; }
  #console .bottom::before { content: ''; position: absolute; left: 14px; right: 14px; top: 0; height: 1px; background: var(--line); }
  #console .bottom .fline { padding: 8px 6px 0; }
  #console .fbtn { width: 40px; height: 40px; }
  #console .reportlink { padding: 6px; font-size: 13px; }
  .appswrap { padding: 8px 8px 0; align-items: flex-start; justify-content: center; }
  .appscard { width: 100%; max-width: 420px; }
  .apptile { padding: 14px 5px 13px; }
  .shell { margin-left: 0; }
  .content { padding: 20px 18px 50px; }
  .pagehead { padding: 16px 18px; }
}

.btn {
  padding: 7px 14px; font-size: 13px; font-family: inherit; cursor: pointer; line-height: 1.35;
  background: var(--card); color: var(--ink); border: 1px solid var(--line); border-radius: 8px;
}
.btn:hover { background: var(--bg); }

.btn.primary { background: var(--fill-go); color: #fff; border-color: var(--fill-go); font-weight: 550; }
.btn.primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.btn.primary:active { background: var(--primary-press); border-color: var(--primary-press); }

.btn.yes { background: var(--fill-yes); color: #fff; border-color: var(--fill-yes); font-weight: 550; }
.btn.yes:hover { background: #1F5E3F; border-color: #1F5E3F; }
.btn.no { background: var(--tint-no); color: var(--ink-no); border-color: var(--warn-line); font-weight: 550; }
.btn.no:hover { background: #F8DAD7; }
.btn.hold { background: var(--tint-hold); color: var(--ink-hold); border-color: #F1DDB8; font-weight: 550; }
.btn.hold:hover { background: #FBE7C6; }
.btn.small { padding: 5px 11px; font-size: 12px; border-radius: 7px; }
.btn.danger { color: var(--warn); border-color: var(--warn-line); }
.btn:disabled { opacity: .55; cursor: default; }

.btn.ghost { background: none; border-color: transparent; color: var(--navy-soft); }
.btn.ghost:hover { background: var(--pill); border-color: transparent; }
.pill.tiny { font-size: 9.5px; font-weight: 600; padding: 1px 6px; }
.formacts { display: flex; gap: 8px; align-items: center; margin-top: 13px; flex-wrap: wrap; }
.formacts 
.half { max-width: 1100px; }

.savemark { font-size: 12.5px; color: var(--ok); white-space: nowrap; opacity: 0;
  transition: opacity .15s; }
.savemark.show { opacity: 1; }
.savemark.busy { color: var(--muted); }

.hint { margin: 5px 0 0; font-size: 11.5px; font-style: italic; color: var(--muted);
  line-height: 1.45; }

.panel {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px; overflow: hidden;
  box-shadow: 0 1px 2px rgba(var(--shade), .04); margin-bottom: 22px;
}
.panel-head { padding: 18px 22px 14px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.panel-head h2 { margin: 0; font-size: 14.5px; font-weight: 620; letter-spacing: -.008em; }
.panel-head p { margin: 2px 0 0; font-size: 12.5px; color: var(--muted); }
.panel-head .right { margin-left: auto; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.banner {
  background: var(--pill); border: 1px solid var(--line); border-radius: 12px;
  padding: 12px 16px; font-size: 13.5px; line-height: 1.55; margin-bottom: 18px; color: var(--ink);
}
.scroll { overflow-x: auto; }

.dtyping { font-size: 11px; color: var(--muted); margin-top: 3px; letter-spacing: .04em;
  font-variant-numeric: tabular-nums; }
table { border-collapse: collapse; width: 100%; }
th {
  text-align: left; font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--faint); font-weight: 500; padding: 8px 16px; border-bottom: 1px solid var(--line);
  border-top: 1px solid var(--line); background: var(--bg); white-space: nowrap;
}
td { padding: 9px 16px; font-size: 13px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tbody tr:last-child td { border-bottom: none; }

input[type="text"], input[type="email"], input[type="tel"], input[type="date"],
input[type="datetime-local"], input[type="time"], input[type="month"],
input[type="number"], select, textarea {
  width: 100%; min-width: 0; padding: 8px 10px; font-size: 13.5px; font-family: inherit;
  color: var(--ink); background: var(--card); border: 1px solid var(--line); border-radius: 9px; outline: none;
}
textarea { min-height: 70px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--navy-soft); box-shadow: 0 0 0 3px var(--focus-ring); }
input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--navy); cursor: pointer; }
input[type="checkbox"]:disabled { cursor: not-allowed; opacity: .45; }
.pill { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 600; }
.pill.on { background: var(--ok-bg); color: var(--ok); border: 1px solid var(--ok-line); }
.pill.off { background: var(--warn-bg); color: var(--warn); border: 1px solid var(--warn-line); }
.empty { padding: 30px 22px; color: var(--muted); }
.hidden { display: none; }
.toast {
  position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%);
  background: var(--navy); color: #fff; padding: 10px 18px; border-radius: 9px; font-size: 13.5px;
  box-shadow: 0 8px 24px rgba(var(--shade), .25); display: none; z-index: 60; max-width: 90vw;
}
.toast.show { display: block; }
.toast.good { background: var(--ok); }
:focus-visible { outline: 2px solid var(--navy-soft); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* page bar: big enough to hit without aiming (18 Oct 2026, Virendra) - same look for the JS pager and _pages.html */
.pgbar { display: flex; align-items: center; gap: 12px 18px; flex-wrap: wrap;
  padding: 14px 22px; border-top: 1px solid var(--line); }
.pgbar .pgcount { font-size: 14px; color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.pgbar .pgper { font-size: 13.5px; color: var(--muted); display: inline-flex; white-space: nowrap; align-items: center; gap: 6px; }
.pgbar .pgper select { font: inherit; font-size: 14px; padding: 7px 10px; min-height: 38px; border-radius: 8px;
  border: 1px solid var(--line); background: var(--card); color: var(--ink); cursor: pointer; }
.pgbar .pgnav { margin-left: auto; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.pgbar .pgnav button, .pgbar .pgnav a, .pgbar .pgnav span.on, .pgbar .pgnav span.pgstep {
  font-family: inherit; font-size: 14.5px; cursor: pointer; padding: 9px 15px; min-width: 44px; min-height: 42px;
  display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box;
  border-radius: 9px; border: 1px solid var(--line); background: var(--card); color: var(--navy);
  font-variant-numeric: tabular-nums; text-decoration: none; font-weight: 550;
}
.pgbar .pgnav .pgstep { padding: 9px 20px; font-weight: 650; border-color: var(--navy-soft, var(--line)); }
.pgbar .pgnav button:hover, .pgbar .pgnav a:hover { background: var(--bg); color: var(--ink); }
.pgbar .pgnav button.on, .pgbar .pgnav span.on { background: var(--navy); border-color: var(--navy); color: #fff; font-weight: 700; cursor: default; }
.pgbar .pgnav button.off, .pgbar .pgnav span.off { opacity: .4; cursor: default; }
.pgbar .pgnav button.off:hover { background: var(--card); color: var(--navy); }
.pgbar .pggap { color: var(--faint); font-size: 14px; padding: 0 2px; }
@media (max-width: 700px) {
  .pgbar { padding: 12px 16px; }
  .pgbar .pgnav { margin-left: 0; width: 100%; flex-wrap: nowrap; }
  .pgbar .pgnav > * { flex: 1; min-height: 46px; }
  .pgbar .pgnav > :not(.on):not(.pgstep) { display: none; }
}

.expwrap { position: fixed; inset: 0; background: rgba(var(--shade), .45); z-index: 70;
  display: flex; align-items: center; justify-content: center; padding: 20px; }
.expcard { background: var(--card); border-radius: 14px; padding: 20px 22px;
  width: min(560px, 100%); max-height: 90vh; overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,.22); }
.expcard h2 { margin: 0; font-size: 15.5px; font-weight: 650; }
.expcard p { margin: 4px 0 14px; font-size: 12.5px; color: var(--muted); }
.expcard p.expnote { margin: 12px 0 0; font-size: 12px; color: var(--faint); line-height: 1.5; }
.expfields { display: flex; flex-wrap: wrap; gap: 7px; }
.expfields button {
  font-family: inherit; font-size: 12.5px; cursor: pointer; padding: 6px 12px;
  border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--muted);
}
.expfields button.on { background: var(--navy); border-color: var(--navy); color: #fff; font-weight: 600; }
.exprow { display: flex; gap: 8px; margin-top: 12px; }
.expfoot { display: flex; gap: 9px; margin-top: 18px; }
.expghost, .expgo {
  font-family: inherit; font-size: 13px; cursor: pointer; padding: 9px 16px; border-radius: 8px;
  border: 1px solid var(--line); background: var(--card); color: var(--muted);
}
.expghost:hover { background: var(--bg); color: var(--ink); }
.expgo { background: var(--navy); border-color: var(--navy); color: #fff; font-weight: 600; }
.expgo:hover { background: var(--primary-hover); }

.pickwrap { position: relative; }
.pickinput {
  width: 100%; font: inherit; font-size: 13.5px; padding: 7px 9px; border-radius: 8px;
  border: 1px solid var(--line); background: var(--card); color: var(--ink);
}
.pickinput:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px rgba(var(--shade), .08); }
.picklist {
  display: none; position: absolute; z-index: 40; left: 0; right: 0; top: calc(100% + 3px);
  background: var(--card); border: 1px solid var(--line); border-radius: 9px;
  box-shadow: 0 10px 26px rgba(var(--shade), .14); overflow-y: auto;

  
  --pickrow: 54px;
  max-height: calc(var(--pickrow) * 5.5);
}
.picklist.open { display: block; }

.pickrow { padding: 7px 11px; cursor: pointer; font-size: 13px; line-height: 1.35;
  border-bottom: 1px solid var(--line); height: 54px; box-sizing: border-box;
  overflow: hidden; }
.pickrow .nm, .pickrow .sub { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pickrow:last-child { border-bottom: 0; }
.pickrow:hover, .pickrow.on { background: var(--pill); }
.pickrow .nm { display: block; color: var(--ink); font-weight: 550; }

.pickrow .sub { display: block; margin-top: 4px; font-size: 11.5px; color: var(--muted); }
.pickrow.none { color: var(--muted); cursor: default; font-style: italic; }
.pickrow.none:hover { background: none; }

.pwwrap { position: fixed; inset: 0; background: rgba(var(--shade), .5); z-index: 90;
  display: flex; align-items: center; justify-content: center; padding: 20px; }
.pwcard { background: var(--card); border-radius: 14px; padding: 20px 22px;
  width: min(400px, 100%); box-shadow: 0 20px 60px rgba(0,0,0,.24); }
.pwcard h2 { margin: 0 0 4px; font-size: 15.5px; font-weight: 650; }
.pwcard p { margin: 0 0 14px; font-size: 12.5px; color: var(--muted); line-height: 1.5; }
.pwrow { display: flex; align-items: center; gap: 6px; }
.pwrow input { flex: 1; min-width: 0; font: inherit; font-size: 14px; padding: 9px 11px;
  border: 1px solid var(--line); border-radius: 8px; letter-spacing: .04em; }
.pwrow input:focus { outline: none; border-color: var(--navy); }
.pwrow .pweye { flex: none; background: none; border: 1px solid var(--line); border-radius: 8px;
  cursor: pointer; padding: 8px 10px; color: var(--navy-soft); line-height: 1; font-size: 13px; }
.pwrow .pweye:hover { border-color: var(--line); }
.pwerr { margin: 8px 0 0; font-size: 12px; color: #b3261e; min-height: 1em; }
.pwacts { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }

.askwrap { position: fixed; inset: 0; z-index: 130; background: rgba(var(--shade), .45);
  display: flex; align-items: center; justify-content: center; padding: 18px; }
.askbox { background: var(--card); border-radius: 16px; padding: 22px 22px 18px;
  max-width: 420px; width: 100%; box-shadow: 0 18px 50px rgba(var(--shade), .28); }

.askbox h4 { margin: 0 0 8px; font-size: 16px; font-weight: 560; letter-spacing: -.008em;
  line-height: 1.4; text-wrap: pretty; }

.askbox p { margin: 0 0 18px; font-size: 13.5px; color: var(--muted); line-height: 1.6;
  white-space: pre-line; text-wrap: pretty; }
.askrow { display: flex; gap: 9px; justify-content: flex-end; }

.needshot { display: block; margin: 8px 0 0; font-size: 12.5px; line-height: 1.6;
  color: var(--warn); }
.needshot.hidden { display: none; }
.askin { width: 100%; font: inherit; font-size: 15px; padding: 10px 12px; margin: 0 0 16px;
  border: 1px solid var(--line); border-radius: 9px; background: var(--card); color: var(--ink);
  resize: vertical; }
.askin:focus { outline: none; border-color: var(--navy); }

.askin::placeholder { color: var(--faint); opacity: 1; }

.askin[type="number"]::-webkit-outer-spin-button,
.askin[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.askin[type="number"] { -moz-appearance: textfield; }

.mnx {
  position: absolute; top: 10px; right: 10px; z-index: 5;
  width: 34px; height: 34px; border-radius: 999px;
  border: none; background: rgba(var(--shade), .06); color: var(--muted, var(--muted));
  font: inherit; font-size: 20px; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.mnx:hover { background: rgba(var(--shade), .12); color: var(--ink); }
.mnx:focus-visible { outline: 2px solid var(--navy); outline-offset: 2px; }

.sheet > h4:first-child, .sheet > h3:first-child { padding-right: 40px; }

#console .jump { position: relative; padding: 8px 10px; }

#console form.jrow { margin: 0; }

.mnsearch, #console .jrow {
  display: flex; align-items: center; gap: 7px;
  background: var(--hover-bg); border: 1px solid var(--line); border-radius: 9px; padding: 0 9px;
  margin: 0;
}
.mnsearch:focus-within { border-color: var(--navy); background: #fff; }
.mnsearch > .ic { width: 15px; height: 15px; flex: none; color: var(--faint); }
.mnsearch > input {
  flex: 1 1 auto; min-width: 0; border: 0; background: none; outline: none;
  font: inherit; font-size: 12.5px; padding: 7px 0; color: var(--ink);
  -webkit-appearance: none; appearance: none; border-radius: 0;
}

.mnsearch > input::-webkit-search-cancel-button,
.mnsearch > input::-webkit-search-decoration { -webkit-appearance: none; display: none; }

.mnsearch > input:focus, .mnsearch > input:focus-visible {
  outline: none; box-shadow: none; border: 0;
}
#console .jrow:focus-within { border-color: var(--navy); background: #fff; }

#console .jump input:focus,
#console .jump input:focus-visible { outline: none; box-shadow: none; border: 0; }
#console .jrow > .ic { width: 15px; height: 15px; flex: none; color: var(--faint); }
#console .jump input {
  flex: 1 1 auto; min-width: 0; border: 0; background: none; outline: none;
  font: inherit; font-size: 12.5px; padding: 7px 0; color: var(--ink);
  -webkit-appearance: none; appearance: none; border-radius: 0;
}

#console .jump input::-webkit-search-cancel-button,
#console .jump input::-webkit-search-decoration { -webkit-appearance: none; display: none; }
#console .jlist {
  display: none; position: absolute; left: 10px; right: 10px; z-index: 45;
  background: var(--card); border: 1px solid var(--line); border-radius: 11px; padding: 5px;
  box-shadow: 0 14px 34px rgba(var(--shade), .18);
}
#console .jlist.on { display: block; }

#console .jump:not(.up) .jlist { top: calc(100% + 2px); }
#console .jump.up .jlist { bottom: calc(100% + 2px); }

#console .jlist { max-height: min(46vh, 340px); overflow-y: auto; }

#console .bottom { overflow: visible; }
#console .jhit {
  display: flex; align-items: center; gap: 8px; padding: 7px 8px; border-radius: 8px;
  text-decoration: none; color: var(--ink);
}
#console .jhit.on { background: var(--active-bg); }
#console .jhit .ic { width: 15px; height: 15px; flex: none; color: var(--muted); }

#console .jtxt { min-width: 0; }
#console .jtxt b {
  display: block; font-size: 12.5px; font-weight: 600;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
#console .jtxt span { display: block; font-size: 10.5px; color: var(--faint); }
#console .jnone { padding: 8px; font-size: 12px; color: var(--faint); }

@media (max-width: 900px) {
  #console .bottom .jump { flex: 1 1 100%; padding: 4px 0 6px; }
}

.shell button:not([class]),
.panel button:not([class]),
.wrap button:not([class]) {
  font: inherit;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  color: var(--ink);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 8px 14px;
}
.shell button:not([class]):hover,
.panel button:not([class]):hover,
.wrap button:not([class]):hover { border-color: var(--navy); color: var(--navy); }
.shell button:not([class]):disabled,
.panel button:not([class]):disabled,
.wrap button:not([class]):disabled { opacity: .55; cursor: default; }

.tabbar, .scroll, .tblwrap {
  scrollbar-width: thin;
  scrollbar-color: #C8D3E3 transparent;
}
.tabbar::-webkit-scrollbar, .scroll::-webkit-scrollbar, .tblwrap::-webkit-scrollbar { height: 5px; width: 5px; }
.tabbar::-webkit-scrollbar-track, .scroll::-webkit-scrollbar-track, .tblwrap::-webkit-scrollbar-track { background: transparent; }
.tabbar::-webkit-scrollbar-thumb, .scroll::-webkit-scrollbar-thumb, .tblwrap::-webkit-scrollbar-thumb {
  background: #C8D3E3; border-radius: 3px;
}
.tabbar::-webkit-scrollbar-thumb:hover, .scroll::-webkit-scrollbar-thumb:hover, .tblwrap::-webkit-scrollbar-thumb:hover {
  background: #AFC0D6;
}

@media (min-width: 761px) {
  .shell .tabbar, .shell .tabs, .shell .gtabs, .shell .railtabs { flex-wrap: wrap; overflow-x: visible; row-gap: 4px; }
}

/* ==========================================================================
   PAGE COMPONENTS — the parts each MN ERP screen draws inside .content.
   In MN ERP these lived in each page's own <style>; here they are shared.
   ========================================================================== */

/* ---- header figures: the big numbers on the right of .pagehead ---- */
.counts { display: flex; gap: 22px; }
.counts div { text-align: right; }
.counts b { display: block; font-size: 24px; line-height: 1; color: var(--navy); font-variant-numeric: tabular-nums; }
.counts span { font-size: 12px; color: var(--muted); }

/* ---- TABS, kind 1: underline strip (the queue/view switcher above a list) ---- */
.tabbar { display: flex; align-items: center; gap: 2px; border-bottom: 1px solid var(--line);
  margin: 0 0 16px; overflow-x: auto; }
.tabbar button, .tabbar .tb { appearance: none; background: none; border: none; font-family: inherit; cursor: pointer;
  font-size: 13.5px; color: var(--muted); padding: 9px 15px 8px; white-space: nowrap;
  border-bottom: 2px solid transparent; margin-bottom: -1px; font-weight: 500; }
.tabbar button:hover { color: var(--ink); }
.tabbar button.on { color: var(--navy); font-weight: 650; border-bottom-color: var(--navy); }
.tabbar .count { font-size: 10.5px; font-weight: 700; background: var(--divider); color: var(--muted);
  border-radius: 999px; padding: 0 6px; margin-left: 6px; }
/* a labelled group break inside one strip (CRM style): <span class="brk"></span><span class="grp">Bill se</span> */
.tabbar .brk { flex-basis: 100%; height: 0; }
.tabbar .grp { font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); padding: 9px 6px 8px 4px; }

/* ---- TABS, kind 2: pill tabs (sections of one settings/admin screen) ---- */
.tabs { display: flex; gap: 8px; margin-bottom: 18px; flex-wrap: wrap; }
.tab { padding: 7px 16px; border-radius: 999px; cursor: pointer; font-size: 12.5px; font-family: inherit;
  background: var(--card); color: var(--ink); border: 1px solid var(--line); font-weight: 500; }
.tab:hover { border-color: var(--navy-soft); }
.tab.active, .tab.on { background: var(--navy); color: #fff; border-color: var(--navy); font-weight: 600; }

/* ---- TABS WRAP, never scroll (desktop); a strip that needs a 4th line is a design decision ---- */
@media (min-width: 761px) {
  .shell .tabbar, .shell .tabs { flex-wrap: wrap; overflow-x: visible; row-gap: 4px; }
}

/* ---- CHIPS: small filters / views with a count, under the tabs ---- */
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 12px; }
.chip { font-family: inherit; font-size: 12.5px; cursor: pointer; padding: 5px 11px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--card); color: var(--muted); white-space: nowrap; }
.chip:hover { color: var(--ink); border-color: #C8D3E3; }
.chip.on { background: var(--navy); border-color: var(--navy); color: #fff; font-weight: 600; }
.chip b { font-weight: 700; margin-left: 5px; opacity: .7; font-variant-numeric: tabular-nums; }

/* ---- status tags inside rows (never colour alone: always a word) ---- */
.st { display: inline-block; font-size: 11px; font-weight: 650; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.st.ok   { background: var(--tint-yes); color: var(--ink-yes); }
.st.wait { background: var(--tint-hold); color: var(--ink-hold); }
.st.bad  { background: var(--tint-no); color: var(--ink-no); }
.st.mute { background: var(--divider); color: var(--muted); }
.st.info { background: var(--tint-go); color: var(--ink-go); }
.st.off  { background: var(--hover-bg); color: var(--muted); }

/* ---- the action bar above a list: search · sort · spacer · buttons ---- */
.bar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 0 0 14px; }
.bar .spacer { margin-left: auto; }
.bar .mnsearch { flex: 1; min-width: 240px; max-width: 420px; }
.bar select { width: auto; min-width: 160px; }

/* ---- the list table (inside .panel > .tablewrap) ---- */
.tablewrap { overflow-x: auto; }
table.list td.firm b, table.list td .main { font-weight: 620; display: block; }
table.list td.firm span, table.list td .sub { display: block; font-size: 11.5px; color: var(--faint); }
table.list td.num, table.list th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.list tr.row { cursor: pointer; }
table.list tr.row:hover td { background: var(--hover-bg); }
table.list td.check { width: 34px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }
.dash { color: var(--faint); }

/* ---- the RECORD CARD: a sheet that slides in from the right when a row is clicked ---- */
.sheet-wrap { position: fixed; inset: 0; background: rgba(var(--shade), .45); z-index: 60; display: none; justify-content: flex-end; }
.sheet-wrap.show { display: flex; }
.sheet-wrap .card { position: relative; background: var(--card); width: min(720px, 100%); height: 100%; overflow-y: auto;
  box-shadow: -12px 0 40px rgba(0,0,0,.16); }
.sheet-wrap .head { position: sticky; top: 0; background: var(--card); border-bottom: 1px solid var(--line);
  padding: 16px 60px 16px 22px; z-index: 2; }
.sheet-wrap .head h2 { margin: 0; font-size: 16px; font-weight: 650; }
.sheet-wrap .head p { margin: 3px 0 0; font-size: 12.5px; color: var(--muted); }
.sheet-wrap .foot { position: sticky; bottom: 0; background: var(--card); border-top: 1px solid var(--line);
  padding: 12px 22px; display: flex; gap: 8px; justify-content: flex-end; }
.grp { padding: 14px 22px 4px; }
.grp h3 { margin: 0 0 10px; font-size: 11px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--faint); }
.kv { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 7px 14px; font-size: 13.5px; margin: 0; }
.kv dt { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.kv dd { margin: 0; overflow-wrap: anywhere; }
.kv dd.none { color: var(--faint); }
@media (max-width: 600px) { .kv { grid-template-columns: minmax(0, 1fr); } .kv dd { margin-bottom: 6px; } }

/* ---- FORMS: label ABOVE the box, quieter than the answer; boxes full width ---- */
.fgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px 14px; }
.fgrid > * { min-width: 0; }
.field label, label.fl { display: block; font-size: 11px; font-weight: 600; letter-spacing: .05em;
  text-transform: uppercase; color: var(--muted); margin: 0 0 5px; }
.field .hint { margin-top: 4px; }
.field.wide { grid-column: 1 / -1; }

/* ---- the centred DIALOG (small forms, confirmations that need fields) ---- */
.backdrop { position: fixed; inset: 0; background: rgba(var(--shade), .45); z-index: 70;
  display: none; align-items: center; justify-content: center; padding: 24px; }
.backdrop.show { display: flex; }
.backdrop .sheet, .dialog { position: relative; background: var(--card); border-radius: 14px; padding: 20px 22px;
  width: 560px; max-width: 100%; max-height: 88vh; overflow: auto; box-shadow: 0 18px 50px rgba(0,0,0,.22); }
.backdrop .sheet h2, .dialog h4 { margin: 0 40px 4px 0; font-size: 15.5px; font-weight: 650; }
.backdrop .sheet p.who { margin: 0 0 12px; font-size: 12.5px; color: var(--muted); }

/* ---- FILE MANAGER: a left rail of "App" shelves + a grid of shelves (sections) ---- */
.secwrap { display: grid; grid-template-columns: 272px 1px minmax(0, 1fr); gap: 18px; padding: 14px 20px 18px; align-items: start; }
.secrail { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.secdiv { align-self: stretch; background: var(--line); }
.secgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(236px, 1fr)); gap: 10px; align-content: start; min-width: 0; }
@media (max-width: 1000px) { .secwrap { grid-template-columns: minmax(0, 1fr); gap: 10px; } .secdiv { display: none; } }
.sec { border: 1px solid var(--line); border-radius: 10px; background: var(--card); padding: 12px 13px 10px;
  display: flex; flex-direction: column; gap: 7px; }
.sec:hover { border-color: #C8D3E3; }
.sec.locked { border-color: var(--line); background: #fff; }
.sec .top { display: flex; align-items: flex-start; gap: 8px; }
.sec .ib { flex: none; width: 24px; height: 24px; border-radius: 7px; background: var(--pill); display: grid; place-items: center; color: var(--navy-soft); }
.sec .ib .ic { width: 13px; height: 13px; }
.sec h3 { margin: 0; font-size: 13px; font-weight: 600; line-height: 1.35; }
.sec .kind { font-size: 10px; color: var(--faint); text-transform: uppercase; letter-spacing: .07em; }
.sec .note { margin: 0; font-size: 11.5px; color: var(--muted); line-height: 1.5; }
.sec .files { list-style: none; margin: 0; padding: 0; }
.sec .files li { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; font-size: 12px; padding: 6px 0; border-top: 1px solid var(--line); }
.sec .files .nm { flex: 1 1 160px; min-width: 0; overflow-wrap: anywhere; color: var(--navy-soft); text-decoration: none; }
.sec .files .nm:hover { text-decoration: underline; }
.sec .files .sz { font-size: 10.5px; color: var(--faint); }
.lockpill { font-size: 9.5px; font-weight: 650; color: var(--ink-hold); background: var(--tint-hold); border-radius: 999px; padding: 1px 6px; margin-left: 5px; }

/* ---- CONTROL PANEL: the rights grid (rows = modules, columns = rights) ---- */
table.rights th.r, table.rights td.r { text-align: center; width: 64px; }
table.rights td.mod { font-weight: 550; }
table.rights td.mod.child { padding-left: 34px; font-weight: 450; color: var(--muted); }
table.rights tr.cat td { background: var(--bg); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); font-weight: 600; }
table.rights td.r.plus { background: var(--tint-yes); }
table.rights td.r.minus { background: var(--tint-no); }
.diffpill { font-size: 10.5px; font-weight: 700; border-radius: 999px; padding: 1px 7px; margin-left: 6px; }
.diffpill.plus { background: var(--tint-yes); color: var(--ink-yes); }
.diffpill.minus { background: var(--tint-no); color: var(--ink-no); }

/* ---- REPORTING: KPI tiles + bar rows + verdict lists (the Analysis tab) ---- */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; margin: 0 0 16px; }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 13px 15px; }
.kpi span { display: block; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.kpi b { display: block; font-size: 22px; font-weight: 650; color: var(--ink); margin-top: 4px; font-variant-numeric: tabular-nums; }
.kpi small { display: block; font-size: 11.5px; color: var(--muted); margin-top: 3px; }
.hbars { display: flex; flex-direction: column; gap: 7px; }
.hbar { display: grid; grid-template-columns: minmax(120px, 30%) minmax(0, 1fr) 90px; gap: 10px; align-items: center; font-size: 12.5px; }
.hbar .lab { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbar .trk { height: 10px; background: var(--divider); border-radius: 4px; overflow: hidden; }
.hbar .fil { height: 100%; background: var(--navy); border-radius: 4px; }
.hbar .val { text-align: right; font-variant-numeric: tabular-nums; color: var(--muted); }
.verdict { border: 1px solid var(--line); border-left: 3px solid var(--fill-go); border-radius: 10px; padding: 12px 14px; margin: 0 0 12px; background: var(--card); }
.verdict.bad { border-left-color: var(--warn); }
.verdict.good { border-left-color: var(--ok); }
.verdict h4 { margin: 0 0 3px; font-size: 13.5px; font-weight: 650; }
.verdict .rule { font-size: 11.5px; color: var(--muted); font-style: italic; margin: 0 0 8px; }
.verdict ul { margin: 0; padding-left: 18px; font-size: 13px; line-height: 1.6; }

/* ---- navigation v2 (9 Oct 2026): sub-spaces, sections, Hindi lines, starred, phone bottom bar ---- */
#console .grouprow {
  display: flex; align-items: center; gap: 11px; padding: 8.5px 10px; border-radius: 8px; margin: 0 0 2px;
  color: var(--ink); font-size: 13.5px; font-weight: 550; line-height: 1.35; cursor: pointer; user-select: none;
}
#console .grouprow:hover { background: var(--hover-bg); }
#console .grouprow.active { color: var(--navy); }
#console .grouprow .ic { color: var(--muted); }
#console .sechead {
  display: flex; align-items: center; gap: 4px; width: 100%; border: 0; background: none; margin: 6px 0 2px;
  padding: 4px 10px 2px 12px; font-family: inherit; font-size: 10px; font-weight: 600; letter-spacing: .06em;
  text-transform: uppercase; color: var(--faint); text-align: left;
}
#console .sechead.fold { cursor: pointer; }
#console .sechead.fold:hover { color: var(--navy); }
#console .sechead .chev { width: 11px; height: 11px; margin-left: -2px; }
#console .sechead.open .chev { transform: rotate(90deg); }
#console .secbody.closed { display: none; }
#console .sechead.fold { text-transform: none; letter-spacing: 0; font-size: 12.5px; font-weight: 500; color: var(--faint);
  padding: 7px 8px 5px; margin: 4px 0 0; border-top: 1px solid var(--divider); border-radius: 0 0 9px 9px; }
#console .sechead.fold .lbl { flex: 1; }
#console .sechead.fold .chev { margin-left: 0; width: 12px; height: 12px; }
#console .lbl small.hi { display: block; font-size: 11.5px; font-weight: 400; color: var(--faint); white-space: normal; line-height: 1.3; }
#console .favbox:empty { display: none; }
#console .favbox { margin: 2px 0 6px; padding-bottom: 6px; border-bottom: 1px solid var(--line, var(--line)); }
#console .favhead { font-size: 10.5px; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); padding: 8px 10px 5px; font-weight: 600; }
.appsnone { margin: 6px 4px 10px; color: var(--muted); font-size: 13px; line-height: 1.45; }
.bottombar { display: none; }
@media (max-width: 900px) {
  #console .grouprow { color: var(--ink); padding: 9px 16px 9px 13px; border-left: 3px solid transparent; border-radius: 0; }
  #console .grouprow:hover { background: var(--hover-bg); }
  #console .grouprow .ic { color: var(--muted); }
  #console .sechead { color: var(--muted); padding-left: 16px; }
  #console .sechead.fold { text-transform: uppercase; letter-spacing: .06em; font-size: 10px; font-weight: 600; color: var(--muted); padding: 4px 10px 2px 16px; margin: 6px 0 2px; border-top: 0; border-radius: 0; }
  #console .sechead.fold .lbl { flex: none; }
  #console .sechead.fold .chev { order: -1; margin-left: -2px; width: 11px; height: 11px; }
  #console .lbl small.hi { color: var(--muted); }
  #console .favbox { border-bottom-color: var(--line); }
  #console .favhead { color: var(--navy); padding-left: 16px; }
  .bottombar {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; background: #fff; border-top: 1px solid var(--line, var(--line));
    padding: 4px 4px calc(env(safe-area-inset-bottom, 0px) + 4px); box-shadow: 0 -4px 14px rgba(0,0,0,.05);
  }
  .bottombar a, .bottombar button {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 5px 0; border: 0; background: none;
    color: var(--navy); font-family: inherit; font-size: 11px; text-decoration: none; cursor: pointer;
  }
  .bottombar .ic { width: 21px; height: 21px; }
  body { padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 62px); }
  body.drawer-open .bottombar { z-index: 90; }
  body.drawer-open #console .drawer { bottom: calc(env(safe-area-inset-bottom, 0px) + 58px); }   /* the drawer ends above the bar, so you, ? and the gear show */
}
@media print { .bottombar { display: none !important; } }

/* phone menu hint and pull-to-refresh (14 Oct 2026) */
.menuhint { position: fixed; top: 64px; left: 12px; z-index: 80; background: var(--navy-deep); color: #fff; font-size: 15px; font-weight: 600;
  padding: 10px 14px; border-radius: 12px; box-shadow: 0 4px 14px rgba(var(--shade), .3); max-width: 260px; }
.menuhint::before { content: ''; position: absolute; top: -7px; left: 18px; border: 7px solid transparent; border-top: 0; border-bottom-color: var(--navy-deep); }
.pullhint { position: fixed; top: 8px; left: 50%; transform: translateX(-50%); z-index: 80; background: var(--card); color: var(--navy-deep);
  border: 1px solid var(--line); border-radius: 999px; padding: 8px 16px; font-size: 14px; font-weight: 600; box-shadow: 0 2px 10px rgba(var(--shade), .2); }
