@import url("https://fonts.googleapis.com/css2?family=Roboto+Slab:wght@500;600;700&family=Roboto:wght@400;500;700&display=swap");

/* Simplify Group "Nova" tokens, same palette as the Performance Review app. Light and dark are both defined. */
:root {
  --canvas: 216 33% 97%; --surface: 0 0% 100%; --border: 240 13% 86%; --muted: 216 33% 95%;
  --muted-foreground: 215 14% 44%; --foreground: 207 29% 16%;
  --brand: 154 100% 23%; --brand-foreground: 0 0% 100%; --brand-from: #006B40; --brand-to: #028A55;
  --accent: 207 74% 63%; --warning: 25 90% 48%; --success: 104 49% 30%; --destructive: 0 76% 48%;
  --ink: hsl(var(--foreground));
  color-scheme: light;
}
:root.dark {
  --canvas: 222 47% 11%; --surface: 217 33% 17%; --border: 217 25% 27%; --muted: 215 25% 22%;
  --muted-foreground: 220 12% 68%; --foreground: 210 40% 96%;
  --brand: 154 63% 46%; --warning: 25 90% 58%; --success: 104 49% 48%; --destructive: 0 80% 66%;
  color-scheme: dark;
}
* { box-sizing: border-box; }
body { margin: 0; background: hsl(var(--canvas)); color: hsl(var(--foreground)); font: 14px/1.5 Roboto, "Segoe UI", system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
h1, h2, h3 { font-family: "Roboto Slab", Georgia, serif; }
h2 { font-size: 20px; margin: 0 0 12px; } h3 { font-size: 15px; margin: 16px 0 8px; }
:focus-visible { outline: 2px solid hsl(var(--brand)); outline-offset: 2px; }

header { display: flex; align-items: center; gap: 16px; padding: 10px 24px; background: hsl(var(--surface)); border-bottom: 1px solid hsl(var(--border)); flex-wrap: wrap; box-shadow: 0 1px 2px rgba(16,24,40,.05); }
header h1 { font-size: 17px; margin: 0; flex: 1; color: hsl(var(--brand)); }
header .logo { height: 30px; }
:root.dark header .logo { background: #fff; padding: 4px 8px; border-radius: 8px; }
nav { display: flex; gap: 4px; flex-wrap: wrap; }
nav button { background: none; border: 0; padding: 7px 14px; border-radius: 12px; color: hsl(var(--muted-foreground)); cursor: pointer; font: inherit; font-weight: 500; }
nav button:hover { background: hsl(var(--muted)); color: hsl(var(--foreground)); }
nav button.on { background: hsl(var(--brand) / .12); color: hsl(var(--brand)); }

main { max-width: 1100px; margin: 24px auto; padding: 0 16px; }
.card { background: hsl(var(--surface)); border: 1px solid hsl(var(--border)); border-radius: 18px; padding: 20px; margin-bottom: 16px; box-shadow: 0 1px 2px rgba(16,24,40,.06), 0 1px 3px rgba(16,24,40,.08); }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid hsl(var(--border)); vertical-align: top; }
th { color: hsl(var(--muted-foreground)); font-weight: 500; font-size: 12px; text-transform: uppercase; letter-spacing: .03em; }
tr.click { cursor: pointer; } tr.click:hover { background: hsl(var(--muted)); }
input, select, textarea { font: inherit; padding: 8px 10px; border: 1px solid hsl(var(--border)); border-radius: 12px; background: hsl(var(--surface)); color: inherit; max-width: 100%; }
label { display: block; font-size: 12px; color: hsl(var(--muted-foreground)); margin: 10px 0 3px; }
code { word-break: break-all; }
a { color: hsl(var(--brand)); }

button.btn, a.btn { font: inherit; font-weight: 500; padding: 8px 16px; border-radius: 12px; border: 1px solid hsl(var(--border)); background: hsl(var(--surface)); color: inherit; cursor: pointer; text-decoration: none; display: inline-block; transition: background .15s; }
button.btn:hover, a.btn:hover { background: hsl(var(--muted)); }
button.pri { background: linear-gradient(90deg, var(--brand-from), var(--brand-to)); border-color: transparent; color: #fff; }
button.pri:hover { background: linear-gradient(90deg, var(--brand-to), var(--brand-from)); }
button.dng { color: hsl(var(--destructive)); }
button:disabled { opacity: .5; cursor: not-allowed; }

.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.pill { display: inline-flex; align-items: center; padding: 2px 10px; border-radius: 99px; font-size: 12px; font-weight: 500; border: 1px solid hsl(var(--border)); background: hsl(var(--muted)); }
.pill.ok { background: hsl(var(--success) / .12); border-color: transparent; } .pill.warn { background: hsl(var(--warning) / .14); border-color: transparent; } .pill.bad { background: hsl(var(--destructive) / .12); border-color: transparent; }
.ok { color: hsl(var(--success)); } .warn { color: hsl(var(--warning)); } .bad { color: hsl(var(--destructive)); } .mute { color: hsl(var(--muted-foreground)); }
.stat b { display: block; font: 600 26px "Roboto Slab", serif; color: hsl(var(--brand)); }
.msg { padding: 10px 14px; border-radius: 12px; background: hsl(var(--muted)); margin: 10px 0; }
.narrow { max-width: 520px; margin: 48px auto; }
.theme { background: none; border: 1px solid hsl(var(--border)); border-radius: 10px; padding: 5px 10px; cursor: pointer; color: inherit; font: inherit; }
@media print { header { display: none; } }

/* Staff shell: floating rounded sidebar + top bar card, same structure as the Performance Review app. */
.shell { display: flex; gap: 16px; padding: 16px; min-height: 100vh; }
#side { position: sticky; top: 16px; height: calc(100vh - 32px); width: 256px; flex: none; display: flex; flex-direction: column; background: hsl(var(--surface)); border: 1px solid hsl(var(--border)); border-radius: 18px; box-shadow: 0 10px 30px -12px rgba(16,24,40,.22); transition: width .2s; z-index: 20; }
#side .brand { padding: 20px 16px 12px; }
#side .logo { height: 34px; display: block; }
:root.dark #side .logo { background: #fff; padding: 4px 8px; border-radius: 8px; }
#side .tag { margin-top: 6px; font-size: 11px; color: hsl(var(--muted-foreground)); }
#nav { flex: 1; padding: 8px 12px; display: flex; flex-direction: column; gap: 4px; overflow-y: auto; }
#nav button, .navbtn { display: flex; align-items: center; gap: 12px; width: 100%; padding: 9px 12px; border: 0; border-radius: 12px; background: none; color: hsl(var(--muted-foreground)); font: 500 14px Roboto, sans-serif; cursor: pointer; text-align: left; position: relative; }
#nav button:hover, .navbtn:hover { background: hsl(var(--muted)); color: hsl(var(--foreground)); }
#nav button.on { background: hsl(var(--brand) / .12); color: hsl(var(--brand)); }
#side svg, .iconbtn svg { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.navbtn { margin: 12px; width: calc(100% - 24px); }
.content { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px; background: hsl(var(--surface)); border: 1px solid hsl(var(--border)); border-radius: 18px; box-shadow: 0 1px 2px rgba(16,24,40,.06), 0 1px 3px rgba(16,24,40,.08); }
.topbar .right { display: flex; align-items: center; gap: 8px; }
.avatar { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: hsl(var(--brand) / .15); color: hsl(var(--brand)); font-weight: 600; font-size: 13px; }
.iconbtn, .theme { background: none; border: 0; border-radius: 12px; padding: 8px; cursor: pointer; color: inherit; display: grid; place-items: center; }
.iconbtn:hover, .theme:hover { background: hsl(var(--muted)); }
.shell main { margin: 0; padding: 0; max-width: none; }
/* collapsed: icons only, label shows as a hover tooltip */
#side.collapsed { width: 68px; }
#side.collapsed .tag, #side.collapsed .label { display: none; }
#side.collapsed .logo { width: 36px; height: 34px; object-fit: cover; object-position: left; }
#side.collapsed #nav { overflow: visible; }
#side.collapsed #nav button { justify-content: center; }
#side.collapsed #nav button:hover::after, #side.collapsed #nav button:focus-visible::after { content: attr(data-label); position: absolute; left: calc(100% + 12px); background: hsl(var(--surface)); color: hsl(var(--foreground)); border: 1px solid hsl(var(--border)); border-radius: 10px; padding: 6px 10px; font-size: 12px; white-space: nowrap; box-shadow: 0 10px 30px -12px rgba(16,24,40,.22); }
@media (max-width: 760px) { .shell { flex-direction: column; } #side, #side.collapsed { position: static; width: 100%; height: auto; } #nav { flex-direction: row; flex-wrap: wrap; } #nav button { width: auto; } .navbtn { display: none; } }
.toc { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.toc a { padding: 4px 12px; border-radius: 99px; background: hsl(var(--muted)); text-decoration: none; font-size: 13px; color: hsl(var(--foreground)); }
.toc a:hover { background: hsl(var(--brand) / .12); color: hsl(var(--brand)); }
.card ol, .card ul { padding-left: 20px; } .card li { margin: 4px 0; }
html { scroll-behavior: smooth; }
