/* MyTuitionA+ theme, the same as Portal Staf (dashboard-design.css there): sage greens with a gold accent,
   DM Sans for text, Plus Jakarta Sans for headings, a dark green sidebar. Loaded after styles.css and only
   changes colours, fonts and the sidebar / top bar; layout and behaviour stay in styles.css and app.js.
   Status colours (green / red / amber / blue ...) are unchanged so they keep meaning status. */
:root {
  --page: #f5f6f2;
  --panel: #ffffff;
  --sidebar: #1d3528;
  --chrome: #ffffff;
  --chrome-line: #e4e8e1;
  --gray-1: #ffffff;
  --gray-2: #f7f8f5;
  --gray-3: #eff2ec;
  --gray-4: #e7ebe3;
  --gray-5: #dfe5db;
  --gray-6: #d2dbcd;
  --gray-7: #c1ccbc;
  --gray-8: #a3b19e;
  --gray-9: #84917e;
  --gray-10: #667362;
  --gray-11: #61705f;
  --gray-12: #26352b;
  --placeholder: #74806f;
  --line: #e7ebe3;
  --line-strong: #d5ddd0;
  --brand: #315b45;
  --brand-soft: #eaf0e5;
  --gold: #d7b773;
  --on-accent: #ffffff;
  --heading-font: 'Plus Jakarta Sans', 'DM Sans', sans-serif;
  --shadow-card: 0 1px 3px #233a2710, 0 0 0 1px var(--line);
  --shadow-card-hover: 0 5px 20px #233a2710, 0 0 0 1px var(--line-strong);
}

/* Dark theme, and always on the login screen (as in styles.css). */
:root[data-theme="dark"], .auth-screen {
  --page: #141e19;
  --panel: #1c2922;
  --sidebar: #1d3528;
  --chrome: #1a261f;
  --chrome-line: #2b3b30;
  --gray-1: #141e19;
  --gray-2: #202e25;
  --gray-3: #28392d;
  --gray-4: #304337;
  --gray-5: #374b3d;
  --gray-6: #405546;
  --gray-7: #4d6353;
  --gray-8: #69816d;
  --gray-9: #829a83;
  --gray-10: #9aae98;
  --gray-11: #b3c1ad;
  --gray-12: #e9eee4;
  --placeholder: #8a9d88;
  --line: #304034;
  --line-strong: #435847;
  --brand: #b9d3a6;
  --brand-soft: #2c402e;
  --on-accent: #141e19;
  --shadow-card: 0 0 0 1px var(--line);
  --shadow-card-hover: 0 0 0 1px var(--line-strong);
}

body { font-family: 'DM Sans', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif; }
button, input, select, textarea { font-family: inherit; }
.page-title, .card-title, .dialog-title, .auth-title { font-family: var(--heading-font); }
.tnum, .guru-id { font-variant-numeric: tabular-nums; }

/* A quiet, persistent navigation rail. Its own palette works in both themes. */
.sidebar {
  --panel: #284235;
  --gray-1: #192e24;
  --gray-2: #223c2e;
  --gray-3: #2d4838;
  --gray-9: #92aa97;
  --gray-10: #a1b5a3;
  --gray-11: #b7c8b8;
  --gray-12: #f3f4e9;
  --line: #ffffff13;
  --line-strong: #ffffff26;
  --blue-9: #d7b773;
  --green-9: #79bd88;
  gap: 28px;
  padding: max(28px, env(safe-area-inset-top)) 18px max(18px, env(safe-area-inset-bottom)) max(18px, env(safe-area-inset-left));
  background: #1d3528;
  border-right: 1px solid #1d3528;
  color: var(--gray-12);
}
.side-top { gap: 22px; }
.side-brand { padding-left: 0; }
.brand-link { display: flex; flex-direction: row; align-items: center; gap: 10px; padding: 0; text-decoration: none; color: var(--gray-12); }
.brand-mark {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 39px;
  height: 43px;
  border: 1px solid #dfc79255;
  border-radius: 12px 12px 12px 3px;
  color: #eddbad;
  background: #dfc7920c;
  font-family: var(--heading-font);
  font-size: 25px;
  font-weight: 800;
  letter-spacing: -2px;
}
.brand-mark > span { align-self: flex-start; margin: 7px 0 0 1px; font-size: 15px; letter-spacing: 0; }
.brand-copy { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.brand-name { font-family: var(--heading-font); font-size: 17px; font-weight: 700; letter-spacing: -.6px; }
.brand-company { font-size: 9.5px; font-weight: 400; letter-spacing: .1px; color: var(--gray-11); }
.side-eyebrow { display: block; margin: 4px 12px -8px; color: #95ad98; font-size: 10px; font-weight: 600; letter-spacing: 2px; text-transform: uppercase; }
.sidebar .side-label { padding: 0 10px; margin-bottom: 8px; font-size: 10px; font-weight: 500; letter-spacing: .5px; text-transform: uppercase; color: #95ad98; }
.nav-group { gap: 4px; }
.nav-item { min-height: 37px; height: auto; padding: 9px 10px; border-radius: 9px; font-size: 12.5px; }
.nav-item .ph { font-size: 17px; }
.nav-item[aria-current="page"], .nav-item[aria-pressed="true"] { background: #d9e4ba1a; box-shadow: none; color: #f5f3dc; }
.nav-item[aria-current="page"] .ph { color: #cfdbb2; }
.side-bottom { gap: 17px; padding-top: 24px; }
.sidebar .segmented { padding: 4px; border-radius: 9px; background: #12271c80; box-shadow: none; }
.sidebar .segmented button { height: 30px; font-size: 11px; }
.sidebar .segmented button[aria-pressed="true"] { background: #3b5140; color: #f1f1df; box-shadow: 0 1px 3px #0002; }
.user-card { gap: 10px; padding: 12px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); border-radius: 0; background: transparent; box-shadow: none; }
.user-avatar { display: grid; place-items: center; flex-shrink: 0; width: 35px; height: 37px; border-radius: 10px; color: #e7dcbb; background: #e7dcbb17; }
.sidebar #role-badge { background: transparent; padding: 0; height: auto; margin-bottom: 1px; color: #a1b5a3; font-size: 10px; }
.sidebar .user-name { font-size: 11.5px; }
.sidebar #sign-out-btn { width: 27px; min-width: 27px; }

/* Top bar: topics as soft pills, the current one in brand green. */
.app-header { height: calc(64px + env(safe-area-inset-top, 0px)); background: var(--chrome); border-bottom-color: var(--chrome-line); backdrop-filter: none; -webkit-backdrop-filter: none; }
.topic-tabs { align-items: center; gap: 5px; }
.topic-tab { height: 42px; gap: 8px; border-radius: 8px; padding: 0 12px; font-size: 12.5px; font-weight: 500; }
.topic-tab .ph { color: var(--gray-10); font-size: 17px; }
.topic-tab + .topic-tab::before, .topic-tab::after { display: none; }
.topic-tab[aria-current="page"] { background: var(--brand-soft); color: var(--brand); }
.topic-tab[aria-current="page"] .ph { color: var(--brand); }
@media (max-width: 767px) { .topic-tabs { gap: 2px; } .topic-tab { height: 46px; padding: 0 6px; } }
/* Seven tabs: on wide screens size each to its label so none wraps onto two lines. */
@media (min-width: 1280px) { .topic-tab { flex: 1 1 auto; white-space: nowrap; } }

@media (hover: hover) and (pointer: fine) {
  .topic-tab:not([aria-current]):hover { background: var(--gray-3); color: var(--brand); }
  .sidebar .nav-item:not([aria-current]):not([aria-pressed="true"]):hover { background: #ffffff0c; color: var(--gray-12); }
}

/* Shared desktop workspace: use the available width and make everyday data readable.
   Screen-only sizing keeps printed forms and invoices at their existing dimensions. */
@media screen and (min-width: 768px) {
  .app-shell { font-size: 15px; }
  .app-shell .safe-x { --px: 24px; }
  .view { gap: 16px; }
  .main .table { font-size: 15px; }
  .main .table th { font-size: 13px; }
  .main .btn, .dialog .btn { font-size: 14px; height: 40px; }
  .main .btn-sm { font-size: 13px; height: 34px; }
  .main .input, .dialog .input { font-size: 15px; min-height: 40px; }
  .main .segmented button { font-size: 14px; min-height: 34px; }
  .main .label, .dialog .label, .sub-tab { font-size: 14px; }
  .main .sg-sub, .main .guru-meta, .main .page-sub,
  .main .hint, .main .seg-count { font-size: 13px; }
  .main .perf-select { font-size: 14px; }
  .main .sg-who .guru-avatar { width: 38px; height: 38px; font-size: 13px; }
  .main .toolbar .field { max-width: 440px; }
  .dialog { max-width: 680px; }
  .sidebar .nav-item { font-size: 14px; min-height: 40px; }
  .sidebar .user-name { font-size: 13px; }
}
@media screen and (min-width: 1440px) {
  .topic-tab { font-size: 14px; }
}
