/* Apps for schools: shared layout on top of the Lab tokens. Quiet borders, flat panels, square corners. */
@import url("../lab/lab.css");

.app { display: grid; grid-template-columns: 240px minmax(0, 1fr); min-height: calc(100svh - 62px); }
.side { background: var(--surface); padding: 1.25rem 1rem; display: flex; flex-direction: column; gap: 0.25rem; border-right: 1px solid var(--line); }
.side__title { font-size: 0.85rem; color: var(--muted); padding: 0.25rem 0.5rem 0.5rem; }
.side button { display: flex; align-items: center; gap: 0.6rem; width: 100%; text-align: left; padding: 0.6rem 0.7rem; color: var(--ink); font-weight: 500; }
.side button[aria-current="page"] { background: var(--accent); color: var(--accent-ink); }
.side button:hover:not([aria-current]) { background: var(--surface-2); }
.side__foot { margin-top: auto; font-size: 0.85rem; color: var(--muted); padding: 0.5rem; }
.main { padding: 1.5rem clamp(1rem, 3vw, 2.5rem) 3rem; min-width: 0; }
.main > h1 { font-size: 1.6rem; margin-bottom: 0.25rem; }
.main > .lead { margin-top: 0.25rem; margin-bottom: 1.25rem; font-size: 1rem; }
.topbar { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; justify-content: space-between; margin-bottom: 1.25rem; }
.topbar h1 { font-size: 1.5rem; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 1rem; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 4px; padding: 1rem 1.1rem; display: grid; gap: 0.25rem; align-content: start; }
.card .lbl { font-size: 0.85rem; color: var(--muted); }
.card .stat { font-size: 1.9rem; }
.card .sub { font-size: 0.85rem; color: var(--muted); }
.panel h2 { font-size: 1.15rem; margin-bottom: 0.75rem; }
.panel + .panel, .cards + .panel, .panel + .cards { margin-top: 1rem; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.split-3 { display: grid; grid-template-columns: 2fr 1fr; gap: 1rem; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.tbl th { text-align: left; font-weight: 500; color: var(--muted); font-size: 0.85rem; padding: 0.5rem 0.6rem; border-bottom: 1px solid var(--line); }
.tbl td { padding: 0.55rem 0.6rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:hover td { background: var(--surface-2); }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; }
.tbl .act { white-space: nowrap; }
.tbl button { color: var(--link); font-weight: 500; }
.tbl button + button { margin-left: 0.75rem; }
.pill { display: inline-block; padding: 0.1rem 0.55rem; font-size: 0.8rem; background: var(--surface-2); }
.pill--good { background: rgba(127, 181, 174, 0.18); color: #9fd0c9; }
.pill--bad { background: rgba(224, 163, 144, 0.18); color: #f0b3a3; }
.pill--warn { background: rgba(200, 162, 75, 0.18); color: #e3c67e; }
.field--sm { min-height: 2.4rem; padding: 0.3rem 0.6rem; }
.button--sm { min-height: 2.3rem; padding: 0 0.8rem; font-size: 0.9rem; }
.button--danger { background: rgba(224, 163, 144, 0.18); color: #f0b3a3; }
.toolbar { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; margin-bottom: 0.9rem; }
.toolbar .field { width: auto; min-width: 12rem; }
.empty { color: var(--muted); padding: 1.5rem 0; text-align: center; }
.bars { display: grid; gap: 0.45rem; }
.bars div { display: grid; grid-template-columns: 6rem 1fr 3rem; gap: 0.6rem; align-items: center; font-size: 0.9rem; }
.bars i { display: block; height: 10px; background: var(--accent); }
.hide { display: none !important; }
.grid-cells { display: grid; gap: 0.4rem; }
.cell { display: flex; justify-content: space-between; align-items: center; padding: 0.5rem 0.7rem; background: var(--bg); }
.cell button { padding: 0.2rem 0.6rem; background: var(--surface-2); }
.cell button[data-on="1"] { background: var(--accent); color: var(--accent-ink); }
.cell button[data-on="0"] { background: rgba(224, 163, 144, 0.18); color: #f0b3a3; }
.demo-note { font-size: 0.85rem; color: var(--muted); margin-top: 0.5rem; }
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .side { flex-direction: row; flex-wrap: wrap; border-right: 0; border-bottom: 1px solid var(--line); padding: 0.6rem; }
  .side__title, .side__foot { display: none; }
  .side button { width: auto; padding: 0.45rem 0.7rem; font-size: 0.95rem; }
  .split, .split-3 { grid-template-columns: 1fr; }
  .tbl { font-size: 0.9rem; }
  .tbl .hide-sm { display: none; }
}
@media print { .bar, .side, .toolbar, .foot, .button, .no-print { display: none !important; } .app { display: block; } body { background: #fff; } }
