/* Copied from the approved design canvas artboard (InspectorConsole.dc.html,
   Dudhal design canvas — sample regional inspector console). Its variables
   are scoped to .shell (rather than :root) so this stylesheet can be loaded
   on the same document as style.css without the two pages' --bg/--ink/etc.
   fighting over :root. Every selector below is scoped under .shell too, not
   just the variables — an earlier pass left several (.sidebar, .topbar,
   .badge, ...) as bare classes, which happened to be harmless only because
   their property lists matched school-console.css's scoped equivalents by
   coincidence. Re-copy from the canvas rather than hand-editing both
   independently if it changes. */

.shell {
  --bg: #f4f7f5; --ink: #16231f; --ink-soft: #5c6d67;
  --teal: #0f5c52; --teal-deep: #0a3f38; --gold: #dd9f34; --red: #c23b3b;
  --card-bg: #ffffff; --card-border: #e1e8e4;
  --ok-bg: #e6f3ec; --ok-ink: #157a4a; --warn-bg: #fbf1de; --warn-ink: #96660f; --crit-bg: #f6e6e6; --crit-ink: #a33131; --pend-bg: #eef1ef; --pend-ink: #5c6d67;

  font-family: "Work Sans", -apple-system, "Segoe UI", sans-serif; color: var(--ink);
  /* `100dvh` after `100vh`: real iOS Safari bug, see school-console.css's own doc comment on `.sidebar`
     for the full explanation — `100vh` alone locks in against the wrong viewport height while Safari's
     address bar is still animating on first paint, until a resize forces a recompute. Older browsers that
     don't understand `dvh` simply keep the `vh` declaration above it. */
  display: flex; min-height: 100vh; min-height: 100dvh; background: var(--bg);
}
/* :not(.navitem) because .shell (0,1,1) would otherwise outrank .navitem's
   own color (0,1,0) — the reverse of the original artboard, where the base
   rule was a bare `a` (0,0,1) and .navitem safely won. Scoping introduced
   the conflict; this is the fix, not a design change. */
.shell a:not(.navitem) { color: var(--teal); }

.shell .sidebar { width: 240px; flex-shrink: 0; background: var(--teal-deep); color: #d9ece5; display: flex; flex-direction: column; padding-bottom: 16px; }
.shell .sidebar .brand { padding: 20px 20px 16px; border-bottom: 1px solid rgba(217,236,229,0.14); margin-bottom: 10px; position: relative; }
.shell .sidebar .brand .org { font-family: "Zilla Slab", serif; font-weight: 700; font-size: 0.98rem; color: #fff; line-height: 1.25; }
.shell .sidebar .brand .network { font-size: 0.64rem; letter-spacing: 0.06em; text-transform: uppercase; opacity: 0.6; margin-top: 4px; }
.shell .navlist { display: flex; flex-direction: column; gap: 1px; padding: 0 10px; }
.shell .navitem { display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 8px; color: #d9ece5; font-size: 0.86rem; opacity: 0.82; text-decoration: none; }
.shell .navitem svg { flex-shrink: 0; width: 17px; height: 17px; }
.shell .navitem.active { background: rgba(217,236,229,0.12); opacity: 1; font-weight: 600; }
.shell .navfoot { margin-top: auto; padding: 14px 20px 0; border-top: 1px solid rgba(217,236,229,0.14); font-size: 0.72rem; opacity: 0.55; }

/* Mobile drawer chrome — all three default to invisible/inert; the `max-width:640px` block below is what
   actually turns them on. On desktop the sidebar is never anything but the always-visible column above.
   Same shape as school-console.css's identical rules — real bug found live: this file's own `.sidebar`
   used to just `display:none` at this width with no toggle at all, stranding every nav item unreachable
   on a phone. */
.shell .menu-toggle {
  display: none; align-items: center; justify-content: center; width: 38px; height: 38px;
  border-radius: 8px; border: 1px solid var(--card-border); background: #fff; color: var(--teal-deep);
  cursor: pointer; padding: 0; flex-shrink: 0;
}
.shell .menu-toggle svg { width: 19px; height: 19px; }
.shell .sidebar-close {
  display: none; align-items: center; justify-content: center; position: absolute; top: 14px; right: 14px;
  width: 30px; height: 30px; border-radius: 8px; background: rgba(217,236,229,0.12); border: none;
  color: #d9ece5; cursor: pointer; padding: 0;
}
.shell .sidebar-close svg { width: 17px; height: 17px; }
.shell .sidebar-backdrop { display: none; }

.shell main { flex: 1; min-width: 0; }
.shell .topbar { display: flex; align-items: center; justify-content: space-between; padding: 16px 32px; background: var(--card-bg); border-bottom: 1px solid var(--card-border); }
.shell .topbar-head { display: flex; align-items: center; gap: 12px; }
.shell .topbar .eyebrow { font-size: 0.68rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-soft); }
/* line-height/letter-spacing reset: style.css's bare h1 (loaded on every
   page) sets both, and this rule doesn't otherwise touch them — without an
   explicit reset here they'd leak in even though nothing here wants them. */
.shell .topbar h1 { font-family: "Zilla Slab", serif; font-size: 1.2rem; font-weight: 700; line-height: normal; letter-spacing: normal; color: var(--teal-deep); margin: 2px 0 0; }
.shell .user { display: flex; align-items: center; gap: 10px; font-size: 0.84rem; }
.shell .user .avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--gold); color: #3a2c0c; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.8rem; }
.shell .user .role { font-size: 0.72rem; color: var(--ink-soft); margin-top: 1px; }
.shell .user .logout {
  font: inherit; font-size: 0.78rem; color: var(--teal); background: none; border: none; padding: 0;
  margin-left: 4px; cursor: pointer; text-decoration: underline;
}

.shell .content { padding: 26px 32px 50px; }
.shell .grid4 { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 14px; margin-bottom: 22px; }
.shell .stat-card { background: var(--card-bg); border: 1px solid var(--card-border); border-radius: 12px; padding: 18px 20px; }
.shell .stat-card .v { font-family: "Zilla Slab", serif; font-weight: 700; font-size: 1.7rem; color: var(--teal-deep); font-variant-numeric: tabular-nums; }
.shell .stat-card .l { font-size: 0.74rem; color: var(--ink-soft); margin-top: 4px; }

.shell .panel { background: var(--card-bg); border: 1px solid var(--card-border); border-radius: 12px; margin-bottom: 18px; overflow: hidden; }
.shell .panel-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--card-border); }
.shell .panel-head .title { font-size: 0.9rem; font-weight: 700; color: var(--teal-deep); }
.shell .panel-head a { font-size: 0.8rem; font-weight: 600; text-decoration: none; }

.shell table { width: 100%; border-collapse: collapse; font-size: 0.84rem; }
.shell th, .shell td { text-align: left; padding: 11px 20px; border-bottom: 1px solid var(--card-border); }
.shell th { font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink-soft); font-weight: 700; }
.shell tbody tr:last-child td { border-bottom: none; }
.shell .mono { font-family: "JetBrains Mono", monospace; font-size: 0.76rem; color: var(--ink-soft); }
.shell .badge { display: inline-block; font-size: 0.68rem; font-weight: 600; padding: 3px 10px; border-radius: 999px; }
.shell .badge.ok { background: var(--ok-bg); color: var(--ok-ink); }
.shell .badge.warn { background: var(--warn-bg); color: var(--warn-ink); }
.shell .badge.crit { background: var(--crit-bg); color: var(--crit-ink); }
.shell .badge.pending { background: var(--pend-bg); color: var(--pend-ink); }

.shell .checklist { padding: 6px 20px 16px; display: grid; gap: 10px; }
.shell .cl-item { display: flex; align-items: center; gap: 12px; font-size: 0.86rem; padding: 8px 0; border-bottom: 1px solid var(--card-border); }
.shell .cl-item:last-child { border-bottom: none; }
.shell .cl-item .box { width: 18px; height: 18px; border-radius: 5px; border: 2px solid var(--card-border); flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.shell .cl-item.done .box { background: var(--teal); border-color: var(--teal); }
.shell .cl-item.done .box svg { width: 11px; height: 11px; color: #fff; }
.shell .cl-item.done span.label { color: var(--ink); }
.shell .cl-item span.label { color: var(--ink-soft); }

.shell .two-col { display: grid; grid-template-columns: 1.5fr 1fr; gap: 18px; align-items: start; }

.shell .toolbar { display: flex; gap: 10px; padding: 14px 20px; border-bottom: 1px solid var(--card-border); flex-wrap: wrap; }
.shell .search { flex: 1; min-width: 180px; position: relative; }
.shell .search svg { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--ink-soft); width: 14px; height: 14px; }
.shell .search input { width: 100%; font: inherit; font-size: 0.85rem; padding: 8px 10px 8px 30px; border: 1px solid var(--card-border); border-radius: 7px; background: var(--bg); }
.shell select.filter { font: inherit; font-size: 0.84rem; padding: 8px 10px; border: 1px solid var(--card-border); border-radius: 7px; background: var(--bg); }
.shell .list-footnote { padding: 12px 20px; font-size: 0.78rem; color: var(--ink-soft); border-top: 1px solid var(--card-border); }

/* Added for the real InspectorConsole (login + cascading account
   creation) — copied from the approved design canvas artboards
   (Login.dc.html + Main.dc.html,
   https://claude.ai/code/artifact/17335797-3a68-46cc-ba7e-469a176a7854). */
.shell .scope-grid { display: flex; gap: 32px; padding: 18px 20px; flex-wrap: wrap; }
.shell .scope-grid .l { font-size: 0.74rem; color: var(--ink-soft); }
.shell .scope-grid .v { font-family: "Zilla Slab", serif; font-weight: 700; color: var(--teal-deep); font-size: 1.05rem; margin-top: 2px; }
.shell .scope-grid .v.mono { font-family: "JetBrains Mono", monospace; font-weight: 500; font-size: 0.86rem; }

.shell .note-form { padding: 14px 20px 18px; }
.shell .note-form-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.shell .note-form-row select,
.shell .note-form-row input {
  font: inherit; font-size: 0.82rem; padding: 7px 9px; border: 1px solid var(--card-border); border-radius: 6px; background: var(--bg);
}
.shell .note-form-row input[type="email"],
.shell .note-form-row input[type="text"],
.shell .note-form-row input[type="password"] { width: 168px; }
.shell .note-form-row .btn {
  font: inherit; font-size: 0.82rem; font-weight: 600; padding: 7px 14px; border: none; border-radius: 6px;
  background: var(--teal); color: #fff; cursor: pointer;
}
.shell .note-form-row .btn:disabled { opacity: 0.5; cursor: default; }
.shell .note-form-ok { display: block; margin-top: 8px; font-size: 0.78rem; color: var(--ok-ink); }
.shell .note-form-error { display: block; margin-top: 8px; font-size: 0.78rem; color: var(--red); }
.shell .no-subordonne { font-size: 0.84rem; color: var(--ink-soft); }

/* Full-screen login gate shown instead of .shell when logged out — its
   own root, not nested under .shell (there is no shell chrome to show
   before a real session exists). */
.login-screen {
  --bg: #f4f7f5; --ink: #16231f; --ink-soft: #5c6d67;
  --teal: #0f5c52; --teal-deep: #0a3f38; --card-bg: #ffffff; --card-border: #e1e8e4; --red: #c23b3b;
  font-family: "Work Sans", -apple-system, "Segoe UI", sans-serif; color: var(--ink);
  /* `100dvh` after `100vh`: same real iOS Safari bug as `.shell` above — this screen vertically centers
     its card against this height, so `100vh` alone computing too small on first paint (Safari's address
     bar still animating) pushes the bottom of the card off-screen until a resize settles it. */
  min-height: 100vh; min-height: 100dvh; background: var(--bg);
  display: flex; align-items: center; justify-content: center;
}
.login-screen a { color: var(--teal); }
.login-screen a:hover { color: var(--teal-deep); }
.login-screen .login-card {
  width: 340px; background: var(--card-bg); border: 1px solid var(--card-border); border-radius: 12px;
  padding: 32px 28px; box-shadow: 0 1px 3px rgba(10,63,56,0.06);
}
.login-screen .brand-mark {
  width: 40px; height: 40px; border-radius: 10px; background: var(--teal-deep); color: #fff;
  display: flex; align-items: center; justify-content: center; font-family: "Zilla Slab", serif; font-weight: 700; font-size: 1.1rem;
  margin-bottom: 16px;
}
.login-screen .eyebrow { font-size: 0.68rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-soft); }
.login-screen h1 { font-family: "Zilla Slab", serif; font-size: 1.3rem; font-weight: 700; color: var(--teal-deep); margin: 3px 0 22px; line-height: 1.25; }
.login-screen .field { margin-bottom: 14px; }
.login-screen .field label { display: block; font-size: 0.76rem; font-weight: 600; color: var(--ink-soft); margin-bottom: 5px; }
.login-screen .field input {
  width: 100%; box-sizing: border-box; font: inherit; font-size: 0.88rem; padding: 9px 11px;
  border: 1px solid var(--card-border); border-radius: 7px; background: var(--bg);
}
.login-screen .field input:focus { outline: 2px solid var(--teal); outline-offset: 1px; }
.login-screen .btn {
  width: 100%; font: inherit; font-size: 0.88rem; font-weight: 600; padding: 10px 14px; border: none; border-radius: 7px;
  background: var(--teal); color: #fff; cursor: pointer; margin-top: 4px;
}
.login-screen .btn:disabled { opacity: 0.6; cursor: default; }
.login-screen .login-error {
  display: block; margin-top: 12px; font-size: 0.8rem; color: var(--red); background: #f6e6e6; border-radius: 7px; padding: 9px 11px;
}
.login-screen .footnote { margin-top: 18px; font-size: 0.72rem; color: var(--ink-soft); line-height: 1.5; }

@media (max-width: 640px) {
  /* The old rule here was a plain `display:none` — the sidebar, and every nav item in it, was simply
     unreachable on a real phone, found live while testing the inspector console at this width. Now an
     off-canvas drawer: present but translated out of view until `.open`, which `sidebarOuvertVar` toggles
     via the hamburger button / backdrop tap / closing on any nav click — same shape as
     school-console.css's identical fix for `.school-console .sidebar`. */
  .shell .sidebar {
    display: flex; position: fixed; top: 0; left: 0; z-index: 60; width: 84vw; max-width: 300px;
    height: 100vh; height: 100dvh; transform: translateX(-100%); transition: transform 0.22s ease;
    box-shadow: 3px 0 20px rgba(0,0,0,0.3);
  }
  .shell .sidebar.open { transform: translateX(0); }
  .shell .menu-toggle { display: inline-flex; }
  .shell .sidebar-close { display: flex; }
  .shell .sidebar-backdrop {
    display: block; position: fixed; inset: 0; background: rgba(8,24,20,0.5); z-index: 55;
    opacity: 0; pointer-events: none; transition: opacity 0.22s ease;
  }
  .shell .sidebar-backdrop.open { opacity: 1; pointer-events: auto; }
  .shell .grid4 { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .shell .two-col { grid-template-columns: 1fr; }
  .shell .content { padding: 18px 16px 40px; }
  /* Same reasoning as school-console.css's identical rule: `.topbar-head` (hamburger + title) pinned on
     its own so it never scrolls out of reach on a long page; `display:contents` on `.topbar` makes
     `.topbar-head`'s containing block `main` instead of the short `.topbar` box. */
  .shell .topbar { display: contents; }
  .shell .topbar-head {
    position: sticky; top: 0; z-index: 50; background: var(--card-bg);
    border-bottom: 1px solid var(--card-border); padding: 14px 16px;
  }
  .shell table, .shell thead, .shell tbody, .shell tr, .shell td { display: block; }
  .shell th { display: none; }
  .shell tr { padding: 10px 0; border-bottom: 1px solid var(--card-border); }
  .shell td { border: none; padding: 3px 20px; }
}
