/* public/assets/app.css — the whole stylesheet. Plain CSS, no framework; light theme, tuned for a laptop at the end of a school day. */
:root {
  --bg: #f4f5f7; --card: #fff; --ink: #1c2330; --muted: #6b7280; --line: #e3e6eb;
  --brand: #1f4e79; --brand-ink: #fff; --ok: #1e7f4f; --bad: #b42318; --warn: #b54708; --warn-bg: #fff4e5;
  --t-cover_supervisor: #4b7bec; --t-priority_cover: #20bf6b; --t-department_led: #f7b731; --t-slt: #8854d0; --t-external: #eb3b5a; --t-creative: #fa8231;
}
* { box-sizing: border-box; }
html { font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--ink); background: var(--bg); }
body { margin: 0; }
a { color: var(--brand); }
h1 { font-size: 1.5rem; margin: 0; }
h2 { font-size: 1.05rem; margin: 0 0 .75rem; }
code { background: #eef1f5; padding: .05em .35em; border-radius: 4px; font-size: .9em; }
.muted { color: var(--muted); font-weight: normal; }
.nowrap { white-space: nowrap; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.ok { color: var(--ok); } .bad { color: var(--bad); font-weight: 600; }
.err { display: block; color: var(--bad); font-size: .85rem; margin-top: .2rem; }
.hint { display: block; color: var(--muted); font-size: .82rem; margin-top: .2rem; min-height: 1em; }

.top { background: var(--brand); color: var(--brand-ink); display: flex; align-items: center; gap: 1.5rem; padding: .6rem 1.25rem; flex-wrap: wrap; }
.top .brand { color: #fff; font-weight: 700; text-decoration: none; font-size: 1.1rem; }
.top nav { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; margin-left: auto; }
.top nav a { color: #dbe7f3; text-decoration: none; }
.top nav a:hover { color: #fff; }
.top nav button.link { color: #dbe7f3; text-decoration: none; }
.top nav button.link:hover { color: #fff; }
.top nav .btn.primary { background: #fff; color: var(--brand); }
main { max-width: 1240px; margin: 0 auto; padding: 1.25rem 1.25rem 3rem; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; flex-wrap: wrap; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 1rem 1.25rem; margin-bottom: 1rem; }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 860px) { .cols { grid-template-columns: 1fr; } }

.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .75rem; margin-bottom: 1rem; }
.tile { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: .8rem 1rem; text-decoration: none; color: inherit; display: flex; flex-direction: column; }
.tile b { font-size: 1.8rem; line-height: 1.1; }
.tile span { color: var(--muted); font-size: .85rem; }
.tile.warn { background: var(--warn-bg); border-color: #f5d0a9; }

table { width: 100%; border-collapse: collapse; font-size: .93rem; }
th, td { text-align: left; padding: .45rem .5rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-weight: 600; color: var(--muted); font-size: .82rem; text-transform: uppercase; letter-spacing: .02em; }
tbody tr:hover { background: #fafbfc; }
tr.problem td { background: #fff8f6; }
tr.inactive td { color: var(--muted); }
.table-wrap { overflow-x: auto; }
table.grid td, table.grid th { padding: .3rem; }
table.grid select { width: 100%; }

.tag { display: inline-block; padding: .1em .55em; border-radius: 999px; font-size: .78rem; font-weight: 600; color: #fff; background: var(--muted); white-space: nowrap; }
.tag.cover_supervisor { background: var(--t-cover_supervisor); } .tag.priority_cover { background: var(--t-priority_cover); }
.tag.department_led { background: var(--t-department_led); color: #3b2b00; } .tag.slt { background: var(--t-slt); }
.tag.external { background: var(--t-external); } .tag.creative { background: var(--t-creative); }

.bars .bar-row { display: grid; grid-template-columns: 150px 1fr 3rem; align-items: center; gap: .6rem; margin: .35rem 0; }
.bar { display: block; background: #eef1f5; border-radius: 4px; height: 14px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--brand); min-width: 2px; }
.bar i.cover_supervisor { background: var(--t-cover_supervisor); } .bar i.priority_cover { background: var(--t-priority_cover); }
.bar i.department_led { background: var(--t-department_led); } .bar i.slt { background: var(--t-slt); } .bar i.external { background: var(--t-external); }
.barcell { width: 30%; }
.chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.chip { background: #eef1f5; border-radius: 999px; padding: .2em .7em; font-size: .85rem; }
.chip b { margin-left: .3em; }

.btn { display: inline-block; padding: .45rem .9rem; border-radius: 7px; border: 1px solid var(--line); background: #fff; color: var(--ink); text-decoration: none; font: inherit; cursor: pointer; }
.btn.primary { background: var(--brand); color: #fff; border-color: var(--brand); }
.btn.link { border-color: transparent; background: transparent; color: var(--brand); }
button.link { background: none; border: 0; padding: 0; color: var(--brand); cursor: pointer; font: inherit; text-decoration: underline; }
button.link.danger { color: var(--bad); }
form.inline { display: inline; margin-left: .5rem; }

.form label { display: block; margin-bottom: .8rem; font-weight: 600; font-size: .9rem; }
.form label[hidden] { display: none; }
.form input:not([type=checkbox]):not([type=radio]), .form select, .form textarea {
  display: block; width: 100%; margin-top: .25rem; padding: .45rem .55rem; border: 1px solid #c9ced6; border-radius: 6px; font: inherit; background: #fff;
}
.form textarea { resize: vertical; }
.form label.check { font-weight: 500; display: flex; align-items: center; gap: .5rem; }
.form fieldset { border: 0; padding: 0; margin: 0 0 .8rem; }
.form legend { font-weight: 600; font-size: .9rem; margin-bottom: .35rem; }
.radios { display: flex; flex-wrap: wrap; gap: .5rem; }
.radios .radio { display: inline-flex; align-items: center; gap: .4rem; padding: .4rem .8rem; border: 1px solid var(--line); border-radius: 999px; font-weight: 500; cursor: pointer; margin: 0; }
.radios .radio:has(:checked) { border-color: var(--brand); background: #eaf1f8; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1rem; }
@media (max-width: 700px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }
.form.narrow { max-width: 560px; }
.actions { display: flex; gap: .5rem; align-items: center; margin-top: .5rem; }

.filters { display: flex; flex-wrap: wrap; gap: .6rem 1rem; align-items: end; }
.filters label { font-size: .82rem; color: var(--muted); font-weight: 600; }
.filters input, .filters select { display: block; margin-top: .2rem; padding: .35rem .45rem; border: 1px solid #c9ced6; border-radius: 6px; font: inherit; background: #fff; }

.flash { padding: .6rem .9rem; border-radius: 8px; margin-bottom: 1rem; border: 1px solid; }
.flash.ok { background: #ecfdf3; border-color: #abefc6; color: #067647; }
.flash.error { background: #fef3f2; border-color: #fecdca; color: #b42318; }

.login-page { display: grid; place-items: center; min-height: 100vh; margin: 0; }
.login { width: min(360px, 90vw); }
.login h1 { margin-bottom: 1rem; }
.login label { display: block; margin-bottom: .8rem; font-weight: 600; font-size: .9rem; }
.login input { display: block; width: 100%; margin-top: .25rem; padding: .5rem .6rem; border: 1px solid #c9ced6; border-radius: 6px; font: inherit; }
.login .btn { width: 100%; margin-top: .5rem; }
