:root {
  --navy: #0e2746;
  --navy-2: #16365f;
  --ink: #1b2c3f;
  --muted: #5d7188;
  --line: #e3ebf4;
  --bg: #eef3f8;
  --card: #ffffff;
  --blue: #1f6feb;
  --gold: #a9792a;
  --ok: #0e7a4b;
  --shadow: 0 10px 30px rgba(18, 48, 84, 0.06);
  --side: 232px;
  --control: 40px;
  --hint: #8ea0b5;
  --space-tight: 8px;
  --space: 16px;
  --space-block: 24px;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font: 15px/1.55 "Segoe UI", "PingFang SC", "Noto Sans SC", "Microsoft YaHei", sans-serif;
}
a { color: var(--blue); text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
.app { min-height: 100vh; display: flex; }
.side {
  width: var(--side);
  background: linear-gradient(180deg, var(--navy), #0b1e36);
  color: #d7e4f4;
  padding: 22px 14px;
  flex: none;
}
.brand { display: flex; gap: 10px; align-items: center; padding: 0 4px 16px; }
.brand img { display: block; width: 100%; height: auto; background: #fff; padding: 7px 8px; }
.quad-logo img { background: none; padding: 0; }
.app.quad {
  display: grid;
  grid-template-columns: var(--side) minmax(0, 1fr);
  grid-template-rows: 52px minmax(0, 1fr);
  height: 100vh;
  overflow: hidden;
  background: #f3f6fa;
}
.quad-logo {
  display: flex;
  align-items: center;
  padding: 0 16px;
  background: #f7f9fc;
  border-right: 1px solid var(--line);
}
.quad-logo img { display: block; width: 100%; height: auto; }
.app.quad .side { width: auto; min-height: 0; overflow: auto; }
.app.quad .main { min-height: 0; overflow: auto; background: var(--bg); }
.brand strong { display: block; color: #fff; font-size: 16px; }
.brand small, .who small { display: block; color: #9eb2c9; font-size: 12px; }
.brand.light strong { color: var(--ink); }
.brand.light small { color: var(--muted); }
.mark {
  width: 36px; height: 36px; border-radius: 10px;
  display: grid; place-items: center;
  background: #c6a15a; color: #1d2430; font-weight: 700;
}
nav a {
  display: flex; gap: 10px; align-items: center;
  color: #d5e3f3; padding: 11px 12px; border-radius: 10px; margin-bottom: 4px;
}
nav a svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
nav a.active, nav a:hover { background: rgba(255,255,255,.08); color: #fff; }
.main { flex: 1; min-width: 0; }
.top {
  display: flex; justify-content: space-between; gap: 16px; align-items: flex-start;
  padding: 22px 28px 8px;
}
.eyebrow { margin: 0; color: var(--muted); font-size: 13px; }
.top h1 { margin: 2px 0 8px; font-size: 26px; letter-spacing: .01em; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 1px solid var(--line); background: #fff; color: var(--ink); border-radius: 999px; padding: 4px 12px; font-size: 13px; }
.chip.on { background: var(--navy); color: #fff; border-color: var(--navy); }
.who { display: flex; align-items: center; gap: 10px; padding-top: 6px; }
.avatar {
  width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center; background: #d9e6f5; color: var(--navy); font-weight: 700;
}
.demo, .tag {
  font-size: 12px; color: var(--gold); background: #f8f1e3; border-radius: 999px; padding: 3px 8px;
}
.quiet { color: var(--muted); }
.brand-logo { display: block; padding: 0 2px 16px; }
.brand-logo img { display: block; width: 100%; height: auto; background: #fff; border-radius: 0; }
.app.quad .side {
  background: #f7f9fc;
  color: #3d5166;
  padding: 12px 12px 18px;
  border-right: 1px solid var(--line);
}
.app.quad nav a { color: #3d5166; }
.app.quad nav a.active,
.app.quad nav a:hover { background: #e7eef6; color: var(--navy); }
.app.quad .top.quad-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 52px;
  padding: 0 20px;
  background: #f7f9fc;
  border-bottom: 1px solid var(--line);
}
.app.quad .quad-bar .top-title {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1;
}
.app.quad .quad-bar h1 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  white-space: nowrap;
}
.app.quad .quad-bar .eyebrow {
  margin: 0;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.app.quad .quad-bar .chips { flex-wrap: nowrap; min-width: 0; overflow: auto; }
.app.quad .quad-bar .chip { padding: 2px 10px; white-space: nowrap; }
.app.quad .quad-bar .who { padding-top: 0; flex: none; gap: 8px; }
.app.quad .quad-bar .who > span:not(.demo):not(.avatar) {
  display: flex;
  align-items: baseline;
  gap: 6px;
  white-space: nowrap;
}
.app.quad .quad-bar .who small { display: inline; color: var(--muted); }
.app.quad .quad-bar .avatar { width: 28px; height: 28px; font-size: 13px; }
.app.quad.gold { grid-template-rows: 64px minmax(0, 1fr); background: var(--bg); }
.app.quad.gold .quad-logo,
.app.quad.gold .top.quad-bar {
  height: 64px;
  z-index: 4;
  border-bottom: 3px solid #c6a15a;
  box-shadow: 0 10px 22px rgba(14, 39, 70, .18);
}
.app.quad.gold .quad-logo {
  justify-content: center;
  padding: 0 18px;
  background: #fff;
}
.app.quad.gold .quad-logo img {
  width: auto;
  max-width: 100%;
  height: 28px;
  background: #fff;
}
.app.quad.gold .top.quad-bar { background: #d7e1ec; }
.app.quad.gold .side {
  background: linear-gradient(180deg, var(--navy), #0b1e36);
  color: #d7e4f4;
  border-right: 0;
}
.app.quad.gold nav a { color: #d5e3f3; }
.app.quad.gold nav a.active,
.app.quad.gold nav a:hover { background: rgba(255,255,255,.08); color: #fff; }
.app.band {
  display: grid;
  grid-template-columns: var(--side) minmax(0, 1fr);
  grid-template-rows: 60px minmax(0, 1fr);
  height: 100vh;
  overflow: hidden;
  background: var(--bg);
}
.band-bar {
  grid-column: 1 / -1;
  position: relative;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  height: 60px;
  padding: 0 18px 0 0;
  background: #d7e1ec;
  border-bottom: 3px solid #c6a15a;
  box-shadow: 0 10px 22px rgba(14, 39, 70, .18);
}
.band-brand { display: flex; align-items: center; gap: 0; min-width: 0; height: 100%; }
.band-logo { display: flex; align-items: center; height: 100%; padding-left: 16px; background: #fff; }
.band-logo img { display: block; height: 20px; width: auto; max-height: 20px; flex: none; }
.band-fade { width: 88px; height: 100%; flex: none; background: linear-gradient(90deg, #fff, #d7e1ec); }
.band-brand span { margin-left: 14px; color: var(--navy); font-size: 15px; font-weight: 600; white-space: nowrap; }
.band-mid {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  margin: 0;
  color: var(--navy);
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
}
.band-user { display: flex; align-items: center; gap: 14px; flex: none; color: var(--ink); }
.band-role { color: var(--muted); font-size: 13px; white-space: nowrap; }
.band-user > strong { font-size: 14px; font-weight: 600; white-space: nowrap; }
.band-menu { position: relative; }
.band-menu button {
  width: 36px; height: 36px; padding: 0; border: 0; border-radius: 8px;
  background: transparent; cursor: pointer;
  display: grid; gap: 4px; place-content: center;
}
.band-menu button span { display: block; width: 16px; height: 2px; background: var(--navy); border-radius: 1px; }
.band-menu button:hover { background: rgba(14, 39, 70, .06); }
.band-pop {
  position: absolute; top: calc(100% + 8px); right: 0;
  min-width: 128px; padding: 6px;
  background: #fff; border-radius: 10px;
  box-shadow: 0 10px 24px rgba(14, 39, 70, .16);
}
.band-pop a { display: block; padding: 8px 10px; border-radius: 8px; color: var(--ink); }
.band-pop a:hover { background: #eef3f8; }
.app.band .side {
  width: auto; min-height: 0; overflow: auto;
  background: linear-gradient(180deg, var(--navy), #0b1e36);
  color: #d7e4f4;
  padding: 12px 12px 18px;
}
.app.band .main,
.app.quad .main,
.app.band .side,
.app.quad .side { scrollbar-gutter: stable; }
.app.student .panel { max-width: none; }
.app.band .main { min-height: 0; overflow: auto; background: var(--bg); }
.app.band.roomy .side { padding-top: 32px; }
.app.band.roomy .content { padding-top: 32px; }
.app.band.roomy nav a { margin-bottom: 12px; }
.band-course { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 4px 0 12px; }
.band-course h1 { margin: 0; font-size: 20px; }
.content { padding: 8px 28px 36px; }
.flash { background: #e8f6ee; color: var(--ok); border-radius: 10px; padding: 10px 14px; }
.grid { display: grid; gap: 16px; }
.row-1 { grid-template-columns: 1fr 1.35fr; }
.row-1.with-sandbox { grid-template-columns: .9fr 1.2fr .8fr; }
.row-2 { grid-template-columns: .95fr 1.15fr; margin-top: 16px; }
.card {
  background: var(--card); border-radius: 16px; box-shadow: var(--shadow);
  padding: 18px 18px 16px; border: 1px solid rgba(255,255,255,.7);
}
.card h2 { margin: 0 0 12px; font-size: 16px; }
.panel { max-width: 760px; }
.panel.full { max-width: none; }
.file-row { display: flex; gap: 12px; align-items: flex-end; }
.file-row .field { flex: 1; min-width: 0; }
.file-row label { margin-top: 0; }
.file-row .btn { margin-top: 0; white-space: nowrap; }
.inline-create { display: flex; gap: 12px; align-items: flex-end; }
.inline-create .field { min-width: 0; }
.inline-create .grow { flex: 1.4; }
.inline-create .field:not(.grow) { flex: 1; }
.inline-create label { margin-top: 0; }
.inline-create .btn { margin-top: 0; white-space: nowrap; }
.panel h2 + h2, .panel form + h2 { margin-top: 28px; }
.checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px 12px; margin-top: 8px; }
.checks label { display: flex; gap: 8px; align-items: center; margin: 0; color: inherit; }
.checks input { width: auto; }
.block { scroll-margin-top: 16px; }
.block + .block { margin-top: 16px; }
.person { display: flex; gap: 14px; align-items: center; }
.person .avatar { width: 64px; height: 64px; font-size: 24px; }
.meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.meta span { background: #f4f7fb; border-radius: 8px; padding: 6px 8px; font-size: 13px; color: var(--muted); }
.schedule { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.schedule strong { display: block; }
.schedule small { color: var(--muted); }
.sandbox {
  background: linear-gradient(180deg, #fffaf1, #fff);
  border: 1px solid #f0e2c4;
}
.sandbox h2 { color: #8a5a12; }
.muted { color: var(--muted); }
.radar { width: 100%; height: auto; }
.radar text { font-size: 12px; fill: #4d6278; text-anchor: middle; }
.radar .grid { fill: none; stroke: #d5e0ec; }
.radar .axis { stroke: #e7eef6; }
.radar .series { fill-opacity: .16; stroke-width: 2; }
.radar .series.self { fill: #8aa4c8; stroke: #8aa4c8; }
.radar .series.other { fill: #1f6feb; stroke: #1f6feb; }
.radar circle.self { fill: #8aa4c8; }
.radar circle.other { fill: #1f6feb; }
.radar circle.ring { fill: none; stroke: #d5e0ec; }
.radar circle.hub { fill: #8aa4c8; }
.radar text.left { text-anchor: end; }
.radar text.right { text-anchor: start; }
.radar text.mid { text-anchor: middle; }
.quiz-item { margin: 0; padding: 16px 0; border: 0; border-top: 1px solid var(--line); min-width: 0; }
.quiz-item h3 { margin: 0 0 8px; font-size: 15px; }
.quiz-item p { margin: 0 0 10px; }
.choice { display: flex; gap: 8px; align-items: flex-start; margin: 8px 0; color: inherit; }
.choice input { width: auto; height: auto; margin-top: 4px; }
.legend { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; font-size: 13px; }
.swatch { width: 10px; height: 10px; border-radius: 50%; display: inline-block; margin-right: 4px; }
.swatch.self { background: #8aa4c8; }
.swatch.other { background: #1f6feb; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: top; font-size: 14px; }
th { color: var(--muted); font-weight: 600; }
.score { font-variant-numeric: tabular-nums; font-weight: 700; }
.unscored { color: var(--muted); font-weight: 500; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.split .survey-notes { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.split .survey-notes textarea { width: 100%; min-height: 72px; }
.note { background: #f7fafc; border-radius: 12px; padding: 12px; }
.note h3 { margin: 0 0 6px; font-size: 15px; }
label { display: block; font-size: 13px; color: var(--muted); margin: 10px 0 4px; }
input[type="text"], input[type="password"], input[type="url"], input[type="number"], input[type="search"], input[type="file"], input[type="datetime-local"], textarea, select {
  width: 100%; border: 1px solid #d5e0ec; border-radius: 10px; padding: 0 12px; background: #fff;
  height: var(--control); color: var(--ink); line-height: calc(var(--control) - 2px);
}
input[type="search"] { appearance: none; -webkit-appearance: none; }
textarea { height: auto; min-height: 88px; padding: 9px 12px; line-height: 1.55; resize: vertical; }
input::placeholder, textarea::placeholder { color: var(--hint); opacity: 1; }
input[type="file"] { color: var(--hint); padding: 4px 10px; line-height: 1; }
input[type="file"].has-file { color: var(--ink); }
input[type="file"]::file-selector-button,
input[type="file"]::-webkit-file-upload-button {
  height: 30px; margin: 0 10px 0 0; padding: 0 12px; border: 0; border-radius: 8px;
  background: #e8eef6; color: var(--navy); font: inherit; cursor: pointer; vertical-align: middle;
}
.btn {
  display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box;
  height: var(--control); border: 0; border-radius: 10px; background: var(--navy); color: #fff;
  padding: 0 16px; cursor: pointer; margin-top: 8px; line-height: 1;
}
.btn.secondary { background: #e8eef6; color: var(--navy); }
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.people { padding: 8px 8px 18px; }
.people-head { padding: 12px 14px 0; }
.people-head h2 { margin: 0 0 6px; }
.people-head p { margin: 0; max-width: 720px; }
.people-tools { display: flex; align-items: center; gap: 36px; padding: 14px 14px 0; }
.people-find { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 180px; }
.people-find input { width: 100%; }
.people-tools .btn { margin-top: 0; white-space: nowrap; }
.btn.gold { background: #d4b06a; color: #1c2430; }
#list-hint { margin: 8px 14px 0; }
.pass-dialog { position: fixed; inset: 0; z-index: 40; display: flex; align-items: center; justify-content: center; background: rgba(14, 39, 70, .45); padding: 16px; }
.pass-dialog[hidden] { display: none; }
.pass-card { width: min(420px, 100%); background: #fff; border-radius: 14px; padding: 22px 22px 18px; box-shadow: 0 18px 40px rgba(14, 39, 70, .22); }
.pass-card h3 { margin: 0 0 8px; }
.pass-card p { margin: 0; }
.pass-card .error { margin-top: 8px; }
.pass-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.pass-actions .btn { margin-top: 0; }
.portrait-view { width: 168px; height: 252px; border-radius: 12px; overflow: hidden; background: #e8eef6; display: grid; place-items: center; color: var(--muted); }
.portrait-view img { width: 100%; height: 100%; object-fit: cover; display: block; }
.portrait-mini { width: 72px; height: 108px; object-fit: cover; border-radius: 10px; flex: none; }
.dossier-no { margin: 4px 0 0; font-weight: 600; }
.dossier-fields { display: grid; grid-template-columns: 1fr 1fr; column-gap: 16px; }
.dossier-fields .wide { grid-column: 1 / -1; }
.dossier-fields .btn { justify-self: start; }
.fill-card { width: min(640px, 100%); }
.dossier4-page > h2 { margin-top: 9px; }
.dossier4 { display: grid; grid-template-columns: 240px minmax(0, 1fr); column-gap: 56px; row-gap: 48px; align-items: start; }
.dossier4-photo { grid-column: 1; grid-row: 1; }
.dossier4-photo .portrait-view { width: 240px; height: 360px; }
.dossier4-who { grid-column: 2; grid-row: 1; padding-top: var(--space); }
.dossier4-who h2 { margin: 0; font-size: 22px; }
.dossier4-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px 18px; margin: 22px 0 0; }
.dossier4-facts div { min-width: 0; padding-top: 10px; border-top: 1px solid var(--line); }
.dossier4-facts dt { font-size: 12px; color: var(--muted); }
.dossier4-facts dd { margin: 2px 0 0; overflow-wrap: anywhere; }
.dossier4-facts dd.missing { color: var(--hint); font-size: 13px; }
.dossier4-bar { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; }
.dossier4-upload { justify-self: start; width: 240px; margin: 0; }
.dossier4-fill, .dossier4-pass { margin: 0; }
.dossier4-pass { justify-self: end; }
.crop-card { width: min(420px, 100%); }
.crop-frame { width: 240px; height: 360px; margin: 12px auto; position: relative; overflow: hidden; border-radius: 12px; background: #0e2746; touch-action: none; cursor: grab; }
.crop-frame img { position: absolute; max-width: none; user-select: none; }
#crop-zoom { padding: 0; }
.crop4-card { width: min(520px, 100%); padding: var(--space-block); display: flex; flex-direction: column; gap: var(--space-block); }
.crop4-head { display: flex; flex-direction: column; gap: var(--space-tight); }
.crop4-head h3, .crop4-head p { margin: 0; }
.crop4-card .crop4-frame { width: 240px; height: 360px; margin: 0 auto; }
.crop4-frame img { pointer-events: none; -webkit-user-drag: none; }
.crop4-foot { display: flex; align-items: center; gap: var(--space); }
.crop4-foot label { margin: 0; white-space: nowrap; }
.crop4-foot input[type="range"] { flex: 1; min-width: 0; margin: 0; }
.crop4-foot .btn { margin: 0; }
.people-group { margin: 14px 8px 0; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.people-group summary.people-role {
  display: flex; align-items: center; gap: 8px;
  margin: 0; padding: 12px 16px; font-size: 15px; font-weight: 700;
  cursor: pointer; list-style: none; user-select: none;
}
.people-group summary.people-role::-webkit-details-marker { display: none; }
.people-group summary.people-role::before {
  content: ""; width: 7px; height: 7px; flex: none; margin-right: 2px;
  border-right: 2px solid var(--navy); border-bottom: 2px solid var(--navy);
  transform: rotate(-45deg); transition: transform .15s ease;
}
.people-group[open] summary.people-role::before { transform: rotate(45deg) translateY(-2px); }
.people-count {
  min-width: 22px; height: 22px; padding: 0 7px; border-radius: 999px;
  background: #eef3f8; color: var(--muted); font-size: 12px; font-weight: 600;
  display: inline-flex; align-items: center; justify-content: center;
}
.people-export {
  margin-left: 4px; height: 28px; padding: 0 12px; border-radius: 999px;
  background: #fff; color: var(--navy); font-size: 13px; font-weight: 600;
  line-height: 26px; text-decoration: none; border: 1px solid var(--line);
}
.people-export:hover { background: #eef3f8; }

.people-body { padding: 0 0 4px; }
.people-empty { margin: 0 16px 12px; }
.people-table { table-layout: fixed; width: 100%; }
.people-table col.col-who { width: 30%; }
.people-table col.col-no { width: 12%; }
.people-table col.col-role { width: 18%; }
.people-table col.col-state { width: 22%; }
.people-table col.col-ops { width: 30%; }
.people-table th, .people-table td { padding: 14px 16px; vertical-align: middle; }
.people-table th { font-size: 13px; font-weight: 600; border-bottom: 1px solid var(--line); }
.people-table td { border-bottom: 1px solid #eef3f8; }
.people-table th.col-role, .people-table td.col-role,
.people-table th.col-no, .people-table td.col-no,
.people-table th.col-state, .people-table td.col-state { text-align: center; }
.people-table th.col-role, .people-table td.col-role,
.people-table th.col-no, .people-table td.col-no { white-space: nowrap; }
.people-table th:last-child, .people-table td.ops { width: 250px; white-space: nowrap; text-align: right; }
.state-line { display: inline-flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 6px; }
.who-cell { display: flex; align-items: center; gap: 12px; }
.who-cell .avatar { width: 36px; height: 36px; flex: none; }
.who-cell strong { display: block; font-size: 14px; }
.who-cell small { display: block; color: var(--muted); font-size: 12px; }
.state { display: inline-block; border-radius: 999px; padding: 2px 10px; font-size: 12px; }
.state.on { background: #e7f6ee; color: #0e7a4b; }
.state.off { background: #fdecec; color: #9d2c2c; }
.state.mute { background: #f4f7fb; color: var(--muted); }
.people-table td.ops form { display: inline-flex; }
.people-table td.ops .btn { height: auto; margin: 0 0 0 8px; padding: 6px 12px; border-radius: 999px; font-size: 13px; line-height: 1.4; text-decoration: none; }
.people-table td.ops .btn.lit { background: var(--navy); color: #fff; }
.task-filter { margin: 4px 0 8px; }
.task-filter .field { flex: 0 1 280px; }
.task-course { margin: 22px 0 8px; font-size: 15px; }
.task-scroll { overflow-x: auto; }
.task-table { width: 100%; border-collapse: collapse; }
.task-table th, .task-table td { padding: 12px 10px; vertical-align: top; border-bottom: 1px solid #eef3f8; text-align: left; }
.task-table th { font-size: 13px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.task-table td.task-main { white-space: normal; }
.task-table .prompt { margin: 6px 0 0; color: var(--muted); font-size: 13px; white-space: normal; }
.task-table .state { white-space: nowrap; }
.task-table td.num { width: 52px; }
.task-table td.ops { white-space: nowrap; text-align: right; }
.task-table td.ops form { display: inline-flex; }
.task-table td.ops .btn { height: auto; margin: 0 0 0 8px; padding: 6px 12px; border-radius: 999px; font-size: 13px; line-height: 1.4; text-decoration: none; }
@media (max-width: 860px) {
  .task-table thead { display: none; }
  .task-table, .task-table tbody, .task-table tr, .task-table td { display: block; width: auto; white-space: normal; }
  .task-table tr { padding: 12px 0 8px; border-bottom: 1px solid #eef3f8; }
  .task-table td { border: 0; padding: 4px 0; }
  .task-table td.num { display: none; }
  .task-table td[data-label]::before { content: attr(data-label) " · "; color: var(--muted); font-size: 12px; }
  .task-table td.ops { text-align: left; white-space: normal; padding-top: 8px; }
  .task-table td.ops .btn { margin: 0 8px 8px 0; }
}
.task-form { display: grid; grid-template-columns: minmax(140px, .8fr) minmax(180px, 1.4fr) 120px 120px; gap: 12px 14px; align-items: end; margin-top: 8px; }
.task-form label { margin-top: 0; }
.task-form .span-all { grid-column: 1 / -1; }
.task-form .check { display: flex; align-items: center; gap: 8px; margin: 0; color: inherit; }
.task-form .check input { width: auto; }
.task-form .btn { margin: 0; justify-self: start; }
.task-edit-row td { background: #f7fafc; }
@media (max-width: 860px) {
  .task-form { grid-template-columns: 1fr; }
  .task-table td.ops { white-space: normal; }
}
.stack > * + * { margin-top: 14px; }
.gate {
  --blob: color-mix(in srgb, var(--gate-tone) 14%, white);
  --blob-2: color-mix(in srgb, var(--gate-tone) 7%, white);
  --ink: var(--gate-tone);
  --mid: color-mix(in srgb, var(--gate-tone) 68%, white);
  --soft: color-mix(in srgb, var(--gate-tone) 46%, white);
  --ground: color-mix(in srgb, var(--gate-tone) 16%, white);
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px 20px;
  color: #fff;
  background-color: var(--gate-tone);
  background-image:
    radial-gradient(ellipse at 50% 42%, color-mix(in srgb, var(--gate-tone) 55%, white), transparent 58%),
    radial-gradient(circle at 12% 20%, rgba(255,255,255,.08), transparent 180px);
}
.gate::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background: radial-gradient(ellipse at center, transparent 42%, rgba(0, 0, 0, .34) 100%);
}
.gate-glow { position: absolute; inset: -12%; z-index: 0; pointer-events: none; }
.gate-glow span {
  position: absolute;
  border-radius: 50%;
  filter: blur(22px);
  background: radial-gradient(circle, rgba(255,255,255,.72) 0, rgba(255,255,255,.16) 42%, transparent 70%);
  animation: gate-float 18s ease-in-out infinite;
}
.gate-glow span:nth-child(1) { width: 340px; height: 340px; left: 4%; top: 6%; }
.gate-glow span:nth-child(2) { width: 460px; height: 460px; right: -6%; bottom: -12%; animation-duration: 26s; animation-delay: -9s; opacity: .7; }
.gate-glow span:nth-child(3) {
  width: 220px; height: 220px; left: 42%; top: 62%;
  animation-duration: 15s; animation-delay: -4s;
  background: radial-gradient(circle, color-mix(in srgb, var(--gate-accent) 70%, white) 0, transparent 68%);
}
.gate-glow span:nth-child(4) { width: 180px; height: 180px; right: 22%; top: 8%; animation-duration: 22s; animation-delay: -12s; opacity: .8; }
@keyframes gate-float {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(36px, -28px, 0) scale(1.14); }
}
.gate.has-photo {
  background-image:
    linear-gradient(180deg, rgba(8, 22, 42, .58), rgba(8, 22, 42, .36) 42%, rgba(8, 22, 42, .62)),
    var(--gate-photo);
  background-size: cover;
  background-position: center 42%;
}
.gate.has-photo .gate-glow { opacity: .22; }
.gate-stage {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.gate-card {
  position: relative;
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  width: min(1020px, calc(100vw - 48px));
  height: min(620px, calc(100vh - 48px));
  min-height: 540px;
  border-radius: 28px;
  overflow: hidden;
  z-index: 1;
  background: var(--gate-panel);
  box-shadow:
    0 34px 80px rgba(4, 16, 36, .42),
    inset 0 1px 0 rgba(255,255,255,.2);
}
.gate-card::after {
  content: "";
  position: absolute;
  inset: -20% -40%;
  z-index: 3;
  pointer-events: none;
  background: linear-gradient(105deg, transparent 42%, rgba(255,255,255,.28) 50%, transparent 58%);
  transform: translateX(-70%);
  animation: gate-sheen 16s ease-in-out infinite;
}
@keyframes gate-sheen {
  0% { transform: translateX(-75%); }
  42%, 100% { transform: translateX(75%); }
}
.gate-visual {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 26px 48px 18px 28px;
}
.gate-visual::before,
.gate-visual::after {
  content: "";
  position: absolute;
  background: var(--gate-sheet);
  border-radius: 0 22% 18% 0 / 0 58% 42% 0;
}
.gate-visual::before {
  inset: 0;
  z-index: -1;
  box-shadow:
    12px 0 0 color-mix(in srgb, var(--gate-sheet) 78%, var(--gate-tone)),
    24px 0 0 color-mix(in srgb, var(--gate-sheet) 48%, var(--gate-tone)),
    28px 12px 28px rgba(6, 18, 36, .18);
}
.gate-visual::after {
  inset: 14px -10px 20px 8px;
  z-index: -2;
  opacity: .72;
  filter: blur(.2px);
  animation: gate-layer 11s ease-in-out infinite;
}
@keyframes gate-layer {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(7px, -4px); }
}
.gate-logo { display: flex; align-items: center; gap: 10px; min-height: 42px; }
.gate-visual.has-hero { justify-content: flex-end; padding: 0; }
.gate-visual.has-hero::before {
  background:
    linear-gradient(180deg, transparent 52%, rgba(8, 20, 40, .62)),
    var(--gate-hero, var(--gate-photo)) center 40% / cover no-repeat;
  box-shadow:
    14px 0 0 rgba(255,255,255,.62),
    26px 0 0 rgba(255,255,255,.24),
    30px 14px 26px rgba(6, 18, 36, .22);
}
.gate-visual.has-hero::after {
  background: var(--gate-hero, var(--gate-photo)) center 40% / cover no-repeat;
  opacity: .4;
  filter: none;
}
.gate-visual.has-hero .gate-copy {
  display: block;
  position: relative;
  z-index: 1;
  margin: 0;
  padding: 0 36px 18px 22px;
  color: #fff;
  font-size: 13px;
  line-height: 1.45;
  text-shadow: 0 1px 3px rgba(0, 0, 0, .55);
}
.gate-panel .gate-logo {
  width: 100%;
  min-height: 0;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 12px;
  background: #fff;
}
.gate-panel .gate-logo img {
  display: block;
  width: 100%;
  height: auto;
  max-width: none;
}
.gate-logo img { height: 42px; width: auto; max-width: 220px; object-fit: contain; }
.gate-logo .mark { width: 34px; height: 34px; border-radius: 9px; font-size: 14px; background: var(--gate-accent); color: var(--gate-accent-ink); }
.gate-logo strong { display: block; color: var(--gate-tone); font-size: 14px; font-weight: 600; letter-spacing: .01em; }
.gate-logo small { display: block; margin-top: 1px; color: #6d8296; font-size: 11px; line-height: 1.35; }
.gate-art { flex: 1; display: grid; place-items: center; min-height: 0; padding: 8px 0; }
.gate-scene { width: min(440px, 100%); height: auto; display: block; }
.gate-copy { margin: 0; color: #8ea0b0; font-size: 11px; line-height: 1.45; }
.gate-panel {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  min-width: 0;
  padding: 26px 22px 28px;
}
.gate-panel .gate-logo { width: min(360px, 100%); margin-top: 28px; }
.gate-stack {
  width: min(240px, 100%);
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.gate-form { width: 100%; margin: 0; }
.gate-form h1 {
  margin: 0 0 16px -16px;
  color: #fff;
  font-size: 26px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: .04em;
}
.gate-form label {
  margin: 14px 0 6px;
  color: rgba(255,255,255,.9);
  font-size: 13px;
  font-weight: 500;
}
.gate-form input[type="text"],
.gate-form input[type="password"] {
  height: 40px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: rgba(0, 0, 0, .28);
  color: #fff;
  font-size: 14px;
}
.gate-form input::placeholder { color: rgba(255,255,255,.5); }
.gate-form input:focus { outline: 2px solid var(--gate-accent); outline-offset: 1px; }
.gate-form input:-webkit-autofill,
.gate-form input:-webkit-autofill:focus {
  -webkit-text-fill-color: #fff;
  caret-color: #fff;
  box-shadow: 0 0 0 1000px #102844 inset;
}
.gate-form .btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 42px;
  margin-top: 20px;
  padding: 0 16px;
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.34), transparent 48%),
    var(--gate-accent);
  color: var(--gate-accent-ink);
  box-shadow: 0 10px 22px color-mix(in srgb, var(--gate-accent) 32%, transparent);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .06em;
}
.gate-form .btn:hover { filter: brightness(1.06); }
.gate-form .muted { margin: 14px 0 0; color: rgba(255,255,255,.62); font-size: 12px; line-height: 1.65; }
.gate-form .error { margin: 0 0 8px; color: #ffd0d0; font-size: 13px; line-height: 1.5; }
@media (max-width: 860px) {
  .gate { padding: 16px; align-items: start; }
  .gate-card {
    width: min(440px, 100%);
    height: auto;
    min-height: 0;
    grid-template-columns: 1fr;
  }
  .gate-visual { padding: 20px 20px 6px; }
  .gate-visual::before { inset: 0; border-radius: 0; box-shadow: none; }
  .gate-visual::after { display: none; }
  .gate-visual.has-hero { min-height: 210px; padding: 0; }
  .gate-visual.has-hero .gate-copy { padding: 0 16px 12px; font-size: 12px; }
  .gate-panel { padding: 16px 22px 22px; }
  .gate-panel .gate-logo { width: min(360px, 100%); }
  .gate-stack, .gate-form { width: min(240px, 100%); flex: none; }
  .gate-form input[type="text"],
  .gate-form input[type="password"] { font-size: 16px; }
}
@media (max-height: 680px) and (min-width: 861px) {
  .gate-card { height: auto; min-height: 0; }
  .gate-scene { width: min(280px, 86%); }
}
@media (prefers-reduced-motion: reduce) {
  .gate-glow span,
  .gate-card::after,
  .gate-visual::after { animation: none; }
}
.ver-switch {
  position: fixed;
  z-index: 30;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  display: flex;
  gap: 2px;
  padding: 4px;
  background: #0e2746;
  border-radius: 999px;
  box-shadow: 0 10px 24px rgba(14, 39, 70, .28);
}
.ver-switch a {
  color: rgba(255, 255, 255, .78);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 13px;
  line-height: 1.2;
  white-space: nowrap;
}
.ver-switch a.on { background: #fff; color: #0e2746; }
.ver-switch a:hover { color: #fff; }
.ver-switch a.on:hover { color: #0e2746; }
.ver-switch a:focus-visible { outline: 2px solid #c6a15a; outline-offset: 2px; }
.desk-page > h2 { margin-top: 9px; }
.desk {
  display: grid;
  grid-template-columns: 7.5fr 2.5fr;
  align-items: stretch;
  min-height: 480px;
  background: var(--card);
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.7);
  box-shadow: var(--shadow);
}
.desk-stage { min-width: 0; padding: 22px 24px 20px; }
.desk-stage h3 { margin: 18px 0 12px; font-size: 18px; }
.desk-pane > h3:first-child { margin-top: 0; }
.desk-list { min-width: 0; border-left: 1px solid var(--line); padding: 12px 8px; }
.desk-cap { margin: 2px 12px 8px; color: var(--muted); font-size: 12px; }
.desk-list button {
  display: block; width: 100%; text-align: left;
  background: transparent; border: 0; border-radius: 10px;
  padding: 10px 12px; cursor: pointer;
}
.desk-list button + button { margin-top: 2px; }
.desk-list button strong {
  display: block; font-weight: 600; font-size: 14px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.desk-list button small {
  display: block; margin-top: 2px; color: var(--muted); font-size: 12px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.desk-list button.on { background: #eef3f8; }
.desk-list button:hover { background: #f4f7fb; }
.desk-list button.on:hover { background: #e7eef6; }
.desk-list button:focus-visible { outline: 2px solid #c6a15a; outline-offset: 2px; }
.desk-task .desk-list button.on,
.desk-task .desk-list button.on:hover {
  background: #fbf6ec;
  box-shadow: inset 0 0 0 1.5px #c6a15a;
}
.desk-task-joined .desk-list { border-left: 1px solid #c6a15a; padding-top: 22px; }
.desk-task-joined .desk-list > h3.desk-cap {
  margin: 0 12px 12px;
  color: var(--ink);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.55;
}
.desk-task-joined .desk-list button { padding-left: 20px; }
.desk-task-split .desk {
  background: transparent;
  border: 0;
  box-shadow: none;
  gap: 16px;
}
.desk-task-split .desk-stage,
.desk-task-split .desk-list {
  background: var(--card);
  border: 1px solid rgba(255,255,255,.7);
  border-radius: 16px;
  box-shadow: var(--shadow);
}
.desk-task-split .desk-list { border-left: 0; }
.app.band.roomy.student:has(.overview-board) .main { overflow: hidden; }
.app.band.roomy.student:has(.overview-board) .content {
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 16px 20px 58px;
  overflow: hidden;
}
.overview-board {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-template-rows: minmax(0, 0.72fr) minmax(0, 1.38fr) minmax(0, 1fr);
  gap: 12px;
}
.ov-person { grid-column: 1 / span 3; grid-row: 1; }
.ov-progress { grid-column: 4 / span 6; grid-row: 1; }
.ov-badge { grid-column: 10 / span 3; grid-row: 1; }
.ov-radar { grid-column: 1 / span 5; grid-row: 2; }
.ov-tasks { grid-column: 6 / span 7; grid-row: 2; }
.ov-review {
  grid-column: 1 / span 9;
  grid-row: 3;
  display: grid;
  grid-template-columns: 1.35fr 0.9fr;
  gap: 12px;
  min-width: 0;
  min-height: 0;
}
.ov-coach { grid-column: 10 / span 3; grid-row: 3; }
.ov-slot {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: var(--card);
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, .7);
  box-shadow: var(--shadow);
  padding: 12px 14px 14px;
  overflow: hidden;
}
.ov-slot h2 {
  margin: 0 0 8px;
  flex: none;
  color: var(--ink);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
}
.ov-well {
  flex: 1;
  min-height: 0;
  border: 1px dashed #c5d3e2;
  border-radius: 10px;
  background: #f4f7fb;
}
.ov-split {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.hint { background: #f4f7fb; border-radius: 12px; padding: 10px 12px; font-size: 13px; color: var(--muted); }
.error { color: #9d2c2c; }
@media (max-width: 980px) {
  .app { display: block; }
  .app.quad { display: flex; flex-direction: column; height: auto; overflow: visible; }
  .app.band { display: flex; flex-direction: column; height: auto; overflow: visible; }
  .quad-logo, .quad-bar { position: static; }
  .app.quad .side, .app.quad .main, .app.band .side, .app.band .main { overflow: visible; }
  .side { width: auto; padding: 14px; }
  .brand { padding-bottom: 10px; }
  nav { display: flex; gap: 6px; overflow: auto; }
  nav a { margin: 0; white-space: nowrap; }
  .top, .content { padding-left: 16px; padding-right: 16px; }
  .top { display: block; }
  .app.quad .top.quad-bar { display: flex; height: auto; min-height: 52px; }
  .row-1, .row-1.with-sandbox, .row-2, .split, .inline-create, .dossier-fields, .dossier4, .dossier4-facts, .dossier4-bar, .desk { grid-template-columns: 1fr; }
  .desk-list { grid-row: 1; border-left: 0; border-bottom: 1px solid var(--line); max-height: 240px; overflow: auto; }
  .desk-task-joined .desk-list { border-left: 0; border-bottom: 1px solid #c6a15a; }
  .desk-task-split .desk-list { border-bottom: 0; }
  .desk-stage { grid-row: 2; }
  .dossier4-who, .dossier4-photo { grid-column: auto; grid-row: auto; }
  .app.band.roomy.student:has(.overview-board) .main { overflow: auto; }
  .app.band.roomy.student:has(.overview-board) .content { height: auto; overflow: visible; }
  .overview-board { height: auto; display: grid; grid-template-columns: 1fr; grid-template-rows: none; }
  .ov-person, .ov-progress, .ov-badge, .ov-radar, .ov-tasks, .ov-review, .ov-coach { grid-column: 1; grid-row: auto; }
  .ov-slot { min-height: 180px; }
  .ov-review { grid-template-columns: 1fr; }
  .dossier-fields .wide { grid-column: auto; }
  .inline-create { display: grid; }
  .inline-create .btn { width: fit-content; }
}
