/* CV Orbit — College Vidya blue & white.
   Brand colours live in :root — adjust here to fine-tune to the official palette. */

@font-face { font-family: "Manrope"; src: url("../fonts/manrope-latin-400-normal.1589a53d0b0e.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Manrope"; src: url("../fonts/manrope-latin-500-normal.f95b8f975304.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Manrope"; src: url("../fonts/manrope-latin-600-normal.58d382c3e448.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Manrope"; src: url("../fonts/manrope-latin-700-normal.ed9e261b92db.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Manrope"; src: url("../fonts/manrope-latin-800-normal.63c74bc8894a.woff2") format("woff2"); font-weight: 800; font-display: swap; }

:root {
  --navy: #0A2A66;
  --navy-2: #0F3580;
  --blue: #1A5FD6;
  --blue-hover: #144DB3;
  --sky: #E8F0FD;
  --sky-2: #F2F6FE;
  --paper: #F6F8FC;
  --white: #FFFFFF;
  --ink: #14213D;
  --ink-2: #44506A;
  --muted: #6B7790;
  --line: #DCE4F2;
  --line-2: #EBF0F8;
  --red: #C62828; --red-bg: #FDECEC;
  --green: #18794E; --green-bg: #E6F4EC;
  --amber: #A15C00; --amber-bg: #FFF3DF;
  --violet: #5B3CC4; --violet-bg: #EFEAFD;
  --r-sm: 6px; --r: 10px; --r-lg: 14px;
  --shadow: 0 1px 2px rgba(10, 42, 102, .06), 0 4px 14px rgba(10, 42, 102, .05);
  --font: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--font); font-size: 14.5px; line-height: 1.5; color: var(--ink); background: var(--paper); -webkit-font-smoothing: antialiased; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; line-height: 1.25; letter-spacing: -0.01em; }
h1 { font-size: 24px; font-weight: 800; }
h2 { font-size: 17px; font-weight: 700; }
h3 { font-size: 14.5px; font-weight: 700; }
p { margin: 0 0 .6em; }
small, .muted { color: var(--muted); }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; border-radius: 4px; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ------------------------------------------------------------ app shell */
.shell { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.side { background: var(--navy); color: #C9D8F5; padding: 18px 14px; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 4px; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 18px; color: var(--white); }
.brand img { width: 34px; height: 34px; }
.brand b { font-size: 17px; font-weight: 800; display: block; line-height: 1.1; }
.brand span { font-size: 11.5px; color: #8FA9D8; }
.nav-group { margin-top: 14px; padding: 0 10px 6px; font-size: 12px; color: #7E97C6; font-weight: 600; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--r-sm); color: #D7E3FA; font-weight: 600; font-size: 14px; }
.nav a:hover { background: rgba(255, 255, 255, .07); text-decoration: none; }
.nav a.active { background: var(--white); color: var(--navy); }
.nav .count { margin-left: auto; background: #FFB020; color: #3A2500; border-radius: 99px; font-size: 11.5px; padding: 0 7px; font-weight: 800; }
.nav svg { width: 17px; height: 17px; flex: none; }
.side-foot { margin-top: auto; padding-top: 14px; border-top: 1px solid rgba(255, 255, 255, .1); }
.me { display: flex; gap: 10px; align-items: center; padding: 6px 8px; }
.me b { color: var(--white); font-size: 13.5px; display: block; }
.me span { font-size: 12px; color: #8FA9D8; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; gap: 12px; padding: 12px 28px; background: var(--white); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.search { flex: 1; max-width: 460px; position: relative; }
.search input { width: 100%; padding: 9px 12px 9px 36px; border: 1px solid var(--line); border-radius: 99px; background: var(--paper); font: inherit; }
.search svg { position: absolute; left: 12px; top: 10px; width: 16px; color: var(--muted); }
.topbar .spacer { flex: 1; }
.bell { position: relative; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 99px; color: var(--ink-2); }
.bell:hover { background: var(--sky); }
.bell .dot { position: absolute; top: 4px; right: 3px; background: var(--red); color: #fff; font-size: 10.5px; font-weight: 800; border-radius: 99px; padding: 0 5px; border: 2px solid var(--white); }
.demo-switch { display: flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; color: var(--navy); }
.demo-switch select { font: inherit; border: 1px solid var(--line); border-radius: 99px; padding: 5px 10px; background: var(--sky-2); color: var(--navy); }
@media (max-width: 640px) { .demo-switch label, .demo-switch .btn { display: none; } }
.mode-pill { font-size: 12.5px; font-weight: 700; border-radius: 99px; padding: 6px 12px; border: 1px solid var(--line); background: var(--sky-2); color: var(--navy); cursor: pointer; font-family: inherit; }
.mode-pill.admin { background: var(--navy); color: var(--white); border-color: var(--navy); }
.content { padding: 24px 32px 48px; max-width: 1680px; width: 100%; }
.menu-btn { display: none; }

/* ------------------------------------------------------------ page header */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head p { margin: 4px 0 0; color: var(--muted); }
.crumbs { font-size: 13px; color: var(--muted); margin-bottom: 6px; }

/* ------------------------------------------------------------ buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 9px 15px; border-radius: var(--r-sm); border: 1px solid transparent; font: inherit; font-weight: 700; font-size: 14px; cursor: pointer; text-decoration: none !important; white-space: nowrap; }
.btn svg { width: 16px; height: 16px; }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-hover); }
.btn-ghost { background: var(--white); color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--blue); color: var(--blue); }
.btn-danger { background: var(--white); color: var(--red); border-color: #F2C7C7; }
.btn-danger:hover { background: var(--red-bg); }
.btn-success { background: var(--green); color: #fff; }
.btn-success:hover { background: #12643F; }
.btn-sm { padding: 6px 10px; font-size: 13px; }
.btn-block { width: 100%; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; }

/* ------------------------------------------------------------ surfaces */
.panel { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg); }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line-2); }
.panel-body { padding: 16px 18px; }
.panel + .panel, .stack > * + * { margin-top: 16px; }
.grid-2 { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 18px; align-items: start; }
.grid-halves { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }

/* KPI strip: one continuous band, not four floating cards */
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; margin-bottom: 18px; }
.kpi { padding: 16px 20px; border-left: 1px solid var(--line-2); display: block; color: inherit; }
.kpi:first-child { border-left: 0; }
a.kpi:hover { background: var(--sky-2); text-decoration: none; }
.kpi .n { font-size: 30px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; }
.kpi .l { color: var(--muted); font-size: 13px; font-weight: 600; }
.kpi.alert .n { color: var(--red); }
.kpi.focus { background: var(--sky); }
.kpi.focus .n { color: var(--blue); }

/* ------------------------------------------------------------ chips & badges */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 99px; font-size: 12px; font-weight: 700; white-space: nowrap; border: 1px solid transparent; }
.st-todo { background: #EEF1F6; color: #3B4763; }
.st-progress { background: var(--sky); color: var(--blue); }
.st-review { background: var(--amber-bg); color: var(--amber); }
.st-reopened { background: var(--violet-bg); color: var(--violet); }
.st-done { background: var(--green-bg); color: var(--green); }
.st-cancelled { background: #F1F1F1; color: #777; text-decoration: line-through; }
.pr-low { color: var(--muted); }
.pr-normal { color: var(--ink-2); }
.pr-high { color: #C2410C; }
.pr-urgent { color: #fff; background: var(--red); }
.pr { font-size: 12px; font-weight: 700; padding: 1px 7px; border-radius: 4px; }
.dept { background: var(--sky-2); color: var(--ink-2); border-color: var(--line); }
.dept::before { content: ""; width: 7px; height: 7px; border-radius: 99px; background: var(--dept, var(--blue)); }
.due { font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.due.late { color: var(--red); }
.creative-tag { background: #F3EEFF; color: #5B3CC4; }

/* "With you" — the ball-in-court marker, the signature element of CV Orbit */
.court { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; color: var(--ink-2); }
.court .ring { width: 18px; height: 18px; border-radius: 99px; border: 2px solid var(--line); display: grid; place-items: center; }
.court .ring::after { content: ""; width: 6px; height: 6px; border-radius: 99px; background: var(--muted); }
.court.you { color: var(--blue); }
.court.you .ring { border-color: var(--blue); }
.court.you .ring::after { background: var(--blue); }

.avatar { width: 30px; height: 30px; border-radius: 99px; background: var(--sky); color: var(--navy); display: inline-grid; place-items: center; font-weight: 800; font-size: 12px; flex: none; }
.avatar.lg { width: 40px; height: 40px; font-size: 14px; }
.side .avatar { background: var(--navy-2); color: var(--white); }

/* ------------------------------------------------------------ tables / task rows */
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 12.5px; font-weight: 700; color: var(--muted); padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--sky-2); }
.table td { padding: 11px 14px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: var(--sky-2); }
.task-title { font-weight: 700; color: var(--ink); }
.task-title:hover { color: var(--blue); }
.code { font-size: 12px; color: var(--muted); font-weight: 600; }
.cell-sub { font-size: 12.5px; color: var(--muted); }
.table-wrap { overflow-x: auto; }

.list-plain { list-style: none; margin: 0; padding: 0; }
.list-plain > li { padding: 12px 18px; border-bottom: 1px solid var(--line-2); display: flex; gap: 12px; align-items: center; }
.list-plain > li:last-child { border-bottom: 0; }
.list-plain .grow { flex: 1; min-width: 0; }
.empty { padding: 28px 18px; text-align: center; color: var(--muted); }
.empty b { display: block; color: var(--ink); margin-bottom: 4px; }

/* ------------------------------------------------------------ view switch & filters */
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.tabs { display: flex; gap: 2px; background: var(--white); border: 1px solid var(--line); border-radius: 99px; padding: 3px; }
.tabs a { padding: 6px 13px; border-radius: 99px; font-weight: 700; font-size: 13px; color: var(--ink-2); }
.tabs a:hover { text-decoration: none; background: var(--sky-2); }
.tabs a.on { background: var(--navy); color: #fff; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.filters select, .filters input[type=search] { padding: 7px 10px; border: 1px solid var(--line); border-radius: var(--r-sm); font: inherit; font-size: 13px; background: var(--white); color: var(--ink); }
.filters label.check { font-size: 13px; display: inline-flex; gap: 5px; align-items: center; font-weight: 600; color: var(--ink-2); }

/* ------------------------------------------------------------ board */
.board { display: grid; grid-template-columns: repeat(5, minmax(230px, 1fr)); gap: 12px; overflow-x: auto; padding-bottom: 8px; }
.col { background: #EEF2FA; border-radius: var(--r-lg); padding: 10px; min-height: 300px; }
.col.drop { outline: 2px dashed var(--blue); background: var(--sky); }
.col-head { display: flex; justify-content: space-between; align-items: center; padding: 2px 4px 10px; font-weight: 800; font-size: 13.5px; }
.col-head .n { color: var(--muted); font-weight: 700; }
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--r); padding: 11px 12px; margin-bottom: 8px; display: block; color: inherit; }
.card[draggable=true] { cursor: grab; }
.card:hover { border-color: var(--blue); text-decoration: none; }
.card .t { font-weight: 700; font-size: 13.5px; margin: 3px 0 8px; color: var(--ink); }
.card .meta { display: flex; justify-content: space-between; align-items: center; gap: 6px; flex-wrap: wrap; }
.card.dragging { opacity: .5; }

/* ------------------------------------------------------------ calendar */
.cal { display: grid; grid-template-columns: repeat(7, 1fr); background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.cal .dow { padding: 8px 10px; font-size: 12px; font-weight: 700; color: var(--muted); background: var(--sky-2); border-bottom: 1px solid var(--line); }
.cal .day { min-height: 112px; padding: 6px 8px; border-right: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); }
.cal .day:nth-child(7n) { border-right: 0; }
.cal .day.out { background: #FAFBFD; color: #A9B3C6; }
.cal .day .d { font-size: 12.5px; font-weight: 700; }
.cal .day.today .d { background: var(--blue); color: #fff; border-radius: 99px; padding: 1px 7px; }
.cal .ev { display: block; font-size: 12px; font-weight: 600; padding: 2px 6px; border-radius: 4px; margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ------------------------------------------------------------ forms */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; }
.form-grid .full { grid-column: 1 / -1; }
.field label, .field .label { display: block; font-weight: 700; font-size: 13px; margin-bottom: 5px; color: var(--ink); }
.field .req { color: var(--red); }
.field input[type=text], .field input[type=email], .field input[type=password], .field input[type=number],
.field input[type=date], .field input[type=datetime-local], .field input[type=url], .field input[type=search],
.field select, .field textarea, .field input:not([type]) {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-sm); font: inherit; background: var(--white); color: var(--ink);
}
.field textarea { resize: vertical; min-height: 44px; }
/* One clean chevron for every dropdown, the same in Safari, Chrome and Firefox */
html body select:not([multiple]) {
  -webkit-appearance: none; -moz-appearance: none; appearance: none; cursor: pointer;
  padding-right: 36px !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%235b6b85' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 12px 12px;
}
html body select:not([multiple])::-ms-expand { display: none; }
html body select:not([multiple]):focus { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%231a5fd6' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); }
.text-warn { color: #b45309; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--blue); outline: 3px solid rgba(26, 95, 214, .15); }
.field .help { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.field .err { font-size: 12.5px; color: var(--red); margin-top: 4px; font-weight: 600; }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: var(--red); }
.field input[type=checkbox] { width: 17px; height: 17px; accent-color: var(--blue); vertical-align: -3px; margin-right: 6px; }
.check-line { display: flex; align-items: center; gap: 4px; font-weight: 600; }

/* segmented radio choices (task type / post type / size) */
.choices > div, .choices ul { display: flex; gap: 8px; flex-wrap: wrap; list-style: none; padding: 0; margin: 0; }
.choices label { display: inline-flex !important; align-items: center; gap: 8px; padding: 9px 14px; border: 1.5px solid var(--line); border-radius: var(--r); cursor: pointer; font-weight: 700; font-size: 13.5px; background: var(--white); margin: 0 !important; }
.choices label:hover { border-color: var(--blue); }
.choices input[type=radio] { accent-color: var(--blue); margin: 0; }
.choices label.picked { border-color: var(--blue); background: var(--sky); color: var(--navy); }

.creative-box { background: var(--sky-2); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; display: grid; gap: 14px; }
.section-title { font-weight: 800; font-size: 15px; margin: 4px 0 2px; }

/* ------------------------------------------------------------ messages */
.flash { padding: 11px 14px; border-radius: var(--r-sm); margin-bottom: 12px; font-weight: 600; border: 1px solid; }
.flash.success { background: var(--green-bg); color: var(--green); border-color: #BFE3CF; }
.flash.error { background: var(--red-bg); color: var(--red); border-color: #F2C7C7; }
.flash.warning, .flash.info { background: var(--amber-bg); color: var(--amber); border-color: #F5D9A8; }
.toast { position: fixed; bottom: 20px; right: 20px; background: var(--ink); color: #fff; padding: 11px 16px; border-radius: var(--r-sm); font-weight: 600; z-index: 50; }

/* ------------------------------------------------------------ task detail */
.detail-head h1 { font-size: 23px; margin: 4px 0 8px; }
.meta-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.facts { display: grid; grid-template-columns: 120px 1fr; gap: 9px 12px; font-size: 13.5px; }
.facts dt { color: var(--muted); font-weight: 600; }
.facts dd { margin: 0; font-weight: 600; }
.brief { white-space: pre-wrap; word-wrap: break-word; line-height: 1.6; }
.checklist { list-style: none; margin: 0; padding: 0; }
.checklist li { display: flex; gap: 10px; align-items: flex-start; padding: 7px 0; border-bottom: 1px dashed var(--line-2); }
.checklist li:last-child { border-bottom: 0; }
.checklist button { width: 20px; height: 20px; border-radius: 5px; border: 2px solid var(--line); background: var(--white); cursor: pointer; flex: none; margin-top: 1px; display: grid; place-items: center; padding: 0; }
.checklist button:disabled { cursor: default; }
.checklist li.done span { text-decoration: line-through; color: var(--muted); }
.checklist li.done button { background: var(--green); border-color: var(--green); }
.checklist li.done button::after { content: ""; width: 5px; height: 9px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg) translate(-1px, -1px); }
.locked-note { font-size: 12.5px; color: var(--muted); display: flex; gap: 6px; align-items: center; }
.locked-note svg { width: 14px; height: 14px; }

.review-dock { border: 2px solid var(--amber); background: #FFFBF3; border-radius: var(--r-lg); padding: 16px 18px; }
.review-dock h2 { color: var(--amber); }
.decision { display: flex; gap: 8px; margin: 10px 0; }
.decision label { flex: 1; text-align: center; padding: 10px; border: 1.5px solid var(--line); border-radius: var(--r); cursor: pointer; font-weight: 800; background: #fff; }
.decision input { position: absolute; opacity: 0; }
.decision label.approve.picked { border-color: var(--green); background: var(--green-bg); color: var(--green); }
.decision label.reopen.picked { border-color: var(--violet); background: var(--violet-bg); color: var(--violet); }

.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line-2); }
.timeline li:last-child { border-bottom: 0; }
.timeline .ev-line { font-size: 13px; color: var(--muted); padding: 6px 0 6px 42px; border: 0; }
.timeline .bubble { flex: 1; min-width: 0; }
.timeline .who { font-weight: 700; font-size: 13.5px; }
.timeline .when { font-size: 12px; color: var(--muted); margin-left: 6px; }
.timeline .body { white-space: pre-wrap; word-wrap: break-word; margin-top: 3px; }
.kind { font-size: 11.5px; font-weight: 800; padding: 1px 7px; border-radius: 4px; margin-left: 6px; }
.kind-REOPEN { background: var(--violet-bg); color: var(--violet); }
.kind-APPROVAL { background: var(--green-bg); color: var(--green); }
.kind-SUBMISSION { background: var(--amber-bg); color: var(--amber); }
.kind-CANCEL { background: #EEE; color: #555; }
.kind-EXTENSION { background: var(--sky); color: var(--blue); }

details.more { border-top: 1px solid var(--line-2); }
details.more summary { padding: 12px 18px; cursor: pointer; font-weight: 700; list-style: none; }
details.more summary::-webkit-details-marker { display: none; }
details.more summary::after { content: "+"; float: right; color: var(--muted); }
details.more[open] summary::after { content: "–"; }
details.more > div { padding: 0 18px 16px; }

/* ------------------------------------------------------------ auth */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr; background: var(--white); }
.auth-art { background: var(--navy); color: #fff; padding: 48px 56px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.auth-art .brand { padding: 0; }
.auth-art h1 { font-size: 40px; line-height: 1.12; max-width: 460px; font-weight: 800; letter-spacing: -0.025em; }
.auth-art p { color: #B9CBEE; max-width: 420px; font-size: 15.5px; }
.orbits { position: absolute; right: -160px; top: 50%; transform: translateY(-50%); width: 520px; height: 520px; pointer-events: none; }
.orbits span { position: absolute; inset: 0; border: 1.5px solid rgba(141, 182, 255, .28); border-radius: 50%; }
.orbits span:nth-child(2) { inset: 70px; border-color: rgba(141, 182, 255, .4); }
.orbits span:nth-child(3) { inset: 150px; background: rgba(76, 141, 255, .18); border-color: rgba(141, 182, 255, .55); }
.orbits i { position: absolute; width: 14px; height: 14px; background: #4C8DFF; border-radius: 99px; top: 82px; left: 92px; box-shadow: 0 0 0 5px rgba(76, 141, 255, .25); }
.auth-form { display: grid; place-items: center; padding: 40px 24px; }
.auth-card { width: 100%; max-width: 400px; }
.auth-card h2 { font-size: 24px; font-weight: 800; margin-bottom: 6px; }
.auth-card .lead { color: var(--muted); margin-bottom: 22px; }
.auth-card .field { margin-bottom: 14px; }
.auth-foot { margin-top: 18px; font-size: 13.5px; color: var(--muted); text-align: center; }
.qr { width: 200px; height: 200px; border: 1px solid var(--line); border-radius: var(--r); padding: 6px; background: #fff; }
.secret { font-family: ui-monospace, Menlo, Consolas, monospace; background: var(--sky-2); padding: 6px 10px; border-radius: var(--r-sm); word-break: break-all; font-size: 13px; }

/* ------------------------------------------------------------ admin */
.admin-tabs { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 18px; border-bottom: 1px solid var(--line); }
.admin-tabs a { padding: 9px 14px; font-weight: 700; color: var(--ink-2); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.admin-tabs a.on { color: var(--navy); border-color: var(--blue); }
.admin-tabs a:hover { text-decoration: none; color: var(--blue); }
.admin-banner { background: var(--navy); color: #fff; border-radius: var(--r-lg); padding: 16px 20px; margin-bottom: 18px; display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.admin-banner p { margin: 2px 0 0; color: #B9CBEE; }
.swatch { width: 14px; height: 14px; border-radius: 4px; display: inline-block; vertical-align: -2px; background: var(--dept, #ccc); }
.status-pill { font-size: 12px; font-weight: 700; padding: 2px 9px; border-radius: 99px; }
.status-PENDING { background: var(--amber-bg); color: var(--amber); }
.status-ACTIVE { background: var(--green-bg); color: var(--green); }
.status-DEACTIVATED { background: #EEE; color: #666; }

.pager { display: flex; gap: 8px; justify-content: center; align-items: center; padding: 14px; font-size: 13.5px; }

.error-page { min-height: 70vh; display: grid; place-items: center; text-align: center; }
.error-page .big { font-size: 64px; font-weight: 800; color: var(--blue); letter-spacing: -0.03em; }

/* ------------------------------------------------------------ responsive */
@media (max-width: 1080px) {
  .grid-2 { grid-template-columns: 1fr; }
  .board { grid-template-columns: repeat(5, 240px); }
}
@media (min-width: 1681px) {
  .content { max-width: none; }
}
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; z-index: 30; width: 260px; transform: translateX(-100%); transition: transform .2s; }
  .side.open { transform: none; }
  .menu-btn { display: inline-grid; place-items: center; width: 38px; height: 38px; border: 1px solid var(--line); border-radius: var(--r-sm); background: #fff; cursor: pointer; }
  .topbar, .content { padding-left: 16px; padding-right: 16px; }
  .kpis { grid-template-columns: 1fr 1fr; }
  .kpi:nth-child(3) { border-left: 0; }
  .kpi:nth-child(n+3) { border-top: 1px solid var(--line-2); }
  .form-grid, .grid-halves { grid-template-columns: 1fr; }
  .auth { grid-template-columns: 1fr; }
  .auth-art { padding: 28px 24px; min-height: auto; }
  .auth-art h1 { font-size: 28px; margin-top: 24px; }
  .orbits { display: none; }
  .table .hide-sm { display: none; }
  .search { display: none; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
@media print { .side, .topbar { display: none; } .shell { display: block; } }

/* utilities (no inline styles anywhere — required by the Content-Security-Policy) */
.mt-8 { margin-top: 8px; } .mt-10 { margin-top: 10px; } .mt-12 { margin-top: 12px; } .mt-14 { margin-top: 14px; } .mt-18 { margin-top: 18px; }
.narrow { max-width: 640px; } .narrow-sm { max-width: 560px; }
@media (min-width: 861px) { .shell { background: linear-gradient(90deg, var(--navy) 0 240px, var(--paper) 240px); } }
.auth-art > div, .auth-art > p { position: relative; z-index: 1; }
.auth-art h1 { margin-bottom: 16px; }
.orbits { right: -230px; }
.grid-halves { align-items: start; }

/* =====================================================================
   v2 polish — richer surfaces, picker, combobox, subtasks, dashboard
   ===================================================================== */
:root {
  --grad: linear-gradient(135deg, #1A5FD6 0%, #0F3A99 55%, #0A2A66 100%);
  --shadow-lg: 0 10px 30px rgba(10, 42, 102, .10), 0 2px 6px rgba(10, 42, 102, .06);
  --teal: #0E9F6E;
}
body { background: var(--paper); }
.panel { box-shadow: var(--shadow); border-color: #E1E8F5; }
.panel-head h2 { display: flex; align-items: center; gap: 8px; }
.panel-head h2 .ico { width: 28px; height: 28px; border-radius: 8px; display: inline-grid; place-items: center; background: var(--sky); color: var(--blue); }
.panel-head h2 .ico svg { width: 15px; height: 15px; }
.btn-primary { background: var(--blue); box-shadow: 0 1px 0 rgba(255,255,255,.2) inset, 0 4px 12px rgba(26, 95, 214, .25); }
.btn { transition: background .15s, border-color .15s, color .15s, box-shadow .15s; }
.topbar { backdrop-filter: saturate(1.4) blur(6px); background: rgba(255,255,255,.92); }

/* ---------- optional tag on form labels */
.opt { font-size: 11.5px; font-weight: 600; color: var(--muted); background: #EEF2F9; border-radius: 99px; padding: 1px 8px; margin-left: 6px; vertical-align: 1px; }

/* ---------- dashboard hero */
.hero { background: var(--grad); color: #fff; border-radius: 18px; padding: 24px 26px; display: grid; grid-template-columns: 1fr auto; gap: 20px; align-items: center; margin-bottom: 18px; position: relative; overflow: hidden; box-shadow: var(--shadow-lg); }
.hero::after { content: ""; position: absolute; right: -80px; top: -120px; width: 320px; height: 320px; border-radius: 50%; border: 1.5px solid rgba(255,255,255,.14); box-shadow: 0 0 0 46px rgba(255,255,255,.04); pointer-events: none; }
.hero h1 { font-size: 26px; color: #fff; }
.hero p { color: #C9DAF8; margin: 6px 0 0; }
.hero .hero-actions { margin-top: 14px; display: flex; gap: 8px; flex-wrap: wrap; }
.hero .btn-light { background: #fff; color: var(--navy); }
.hero .btn-outline { background: rgba(255,255,255,.1); color: #fff; border-color: rgba(255,255,255,.35); }
.ring { --pct: 0; width: 112px; height: 112px; border-radius: 50%; background: conic-gradient(#7FB2FF calc(var(--pct) * 1%), rgba(255,255,255,.15) 0); display: grid; place-items: center; position: relative; z-index: 1; }
.ring::before { content: ""; position: absolute; inset: 10px; border-radius: 50%; background: #123C8C; }
.ring span { position: relative; text-align: center; line-height: 1.1; }
.ring b { display: block; font-size: 24px; font-weight: 800; }
.ring small { color: #C9DAF8; font-size: 11.5px; }

.kpis.v2 { background: transparent; border: 0; gap: 12px; overflow: visible; }
.kpis.v2 .kpi { background: #fff; border: 1px solid #E1E8F5; border-radius: 14px; box-shadow: var(--shadow); display: flex; gap: 14px; align-items: center; }
.kpis.v2 .kpi:first-child { border-left: 1px solid #E1E8F5; }
.kpi .ic { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; flex: none; }
.kpi .ic svg { width: 20px; height: 20px; }
.ic-blue { background: var(--sky); color: var(--blue); }
.ic-red { background: var(--red-bg); color: var(--red); }
.ic-amber { background: var(--amber-bg); color: var(--amber); }
.ic-green { background: var(--green-bg); color: var(--green); }
.kpis.v2 .kpi.focus { background: #fff; }

/* trend chart */
.trend { display: grid; grid-template-columns: repeat(14, 1fr); gap: 6px; align-items: end; height: 120px; padding: 6px 2px 0; }
.trend .day { display: flex; gap: 2px; align-items: flex-end; height: 100%; position: relative; }
.trend .bar { flex: 1; border-radius: 4px 4px 0 0; min-height: 2px; height: 2px; }
.trend .bar.done { background: var(--blue); }
.trend .bar.new { background: #BCD3FA; }
.trend-axis { display: grid; grid-template-columns: repeat(14, 1fr); gap: 6px; font-size: 10.5px; color: var(--muted); text-align: center; margin-top: 4px; }
.legend { display: flex; gap: 14px; font-size: 12.5px; color: var(--ink-2); font-weight: 600; }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; margin-right: 5px; vertical-align: -1px; }
.legend .l-done { background: var(--blue); } .legend .l-new { background: #BCD3FA; }

/* red flags */
.flag { display: flex; gap: 12px; padding: 12px 18px; border-bottom: 1px solid var(--line-2); align-items: flex-start; }
.flag:last-child { border-bottom: 0; }
.flag .dot { width: 9px; height: 9px; border-radius: 99px; margin-top: 7px; flex: none; background: var(--amber); box-shadow: 0 0 0 4px var(--amber-bg); }
.flag.SECURITY .dot, .flag.URGENT_OVERDUE .dot { background: var(--red); box-shadow: 0 0 0 4px var(--red-bg); }
.flag .k { font-size: 12px; font-weight: 800; color: var(--muted); }

/* ---------- progress bars */
.progress { height: 6px; background: #E6EDF8; border-radius: 99px; overflow: hidden; min-width: 60px; }
.progress > i { display: block; height: 100%; width: 0; background: var(--blue); border-radius: 99px; transition: width .3s; }
.progress.done > i { background: var(--green); }
.sub-meta { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); font-weight: 600; margin-top: 6px; }
.sub-meta .progress { width: 70px; }

/* ---------- people chips */
.person { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.person .avatar { width: 28px; height: 28px; font-size: 11px; }
.person b { font-weight: 700; font-size: 13.5px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.person small { display: block; font-size: 12px; color: var(--muted); }
.avatar.c0 { background: #E3EDFF; color: #1A4FB8; } .avatar.c1 { background: #E5F6EE; color: #146C43; }
.avatar.c2 { background: #F2EBFF; color: #5B3CC4; } .avatar.c3 { background: #FFF1E0; color: #9A5200; }
.avatar.c4 { background: #FDE8EF; color: #B0285A; } .avatar.c5 { background: #E3F5F8; color: #0E6E80; }
.pdot { width: 8px; height: 8px; border-radius: 99px; display: inline-block; margin-right: 6px; vertical-align: 1px; background: #9AA6BD; }
.pdot.pr-high { background: #EA580C; } .pdot.pr-urgent { background: var(--red); } .pdot.pr-normal { background: var(--blue); } .pdot.pr-low { background: #9AA6BD; }
.table td .pr-text { font-size: 13px; font-weight: 600; color: var(--ink-2); }

/* ---------- task form (assign) */
.composer { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 18px; align-items: start; }
.compose-card { background: #fff; border: 1px solid #E1E8F5; border-radius: 16px; box-shadow: var(--shadow); }
.compose-sec { padding: 20px 22px; border-bottom: 1px solid var(--line-2); }
.compose-sec:last-child { border-bottom: 0; }
.compose-sec > h3 { display: flex; align-items: center; gap: 10px; font-size: 15px; margin-bottom: 14px; }
.compose-sec > h3 .ico { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--sky); color: var(--blue); }
.compose-sec > h3 .ico svg { width: 16px; height: 16px; }
.compose-sec > h3 small { font-weight: 600; color: var(--muted); font-size: 12.5px; }
.title-input input { font-size: 18px !important; font-weight: 700; padding: 12px 14px !important; }
.compose-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 16px 22px; background: var(--sky-2); border-radius: 0 0 16px 16px; flex-wrap: wrap; }
.preview { position: sticky; top: 84px; }
.preview-card { background: var(--grad); color: #fff; border-radius: 16px; padding: 18px; box-shadow: var(--shadow-lg); }
.preview-card .lbl { font-size: 12px; color: #BFD2F7; font-weight: 600; }
.preview-card h4 { margin: 4px 0 14px; font-size: 17px; line-height: 1.3; word-wrap: break-word; }
.preview-card .row { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-top: 1px solid rgba(255,255,255,.14); font-size: 13.5px; }
.preview-card .row span:first-child { color: #BFD2F7; }
.preview-card .row b { text-align: right; }

/* tiles (radio choices with icons) */
.tiles > div { display: grid !important; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
.tiles label { flex-direction: column; align-items: flex-start !important; padding: 12px 14px !important; border-radius: 12px !important; position: relative; min-height: 64px; }
.tiles label input { position: absolute; top: 12px; right: 12px; }
.tiles label .tile-ic { width: 30px; height: 22px; display: block; margin-bottom: 6px; }
.shape { display: inline-block; border: 2px solid currentColor; border-radius: 3px; opacity: .8; }
.shape.h { width: 30px; height: 18px; } .shape.v { width: 14px; height: 24px; }
.choices.pills > div { gap: 6px; }
.choices.pills label { border-radius: 99px !important; padding: 7px 14px !important; font-size: 13px !important; }
.choices.pills label.picked.p-LOW { background: #F1F4F9; border-color: #9AA6BD; color: #44506A; }
.choices.pills label.picked.p-NORMAL { background: var(--sky); border-color: var(--blue); color: var(--navy); }
.choices.pills label.picked.p-HIGH { background: #FFF1E6; border-color: #EA580C; color: #9A3412; }
.choices.pills label.picked.p-URGENT { background: var(--red-bg); border-color: var(--red); color: var(--red); }
.quick { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.quick button { font: inherit; font-size: 12.5px; font-weight: 700; padding: 5px 10px; border-radius: 99px; border: 1px solid var(--line); background: #fff; color: var(--ink-2); cursor: pointer; }
.quick button:hover { border-color: var(--blue); color: var(--blue); }

/* combobox */
.combo { position: relative; }
.combo-input { width: 100%; padding: 11px 12px 11px 44px; border: 1px solid var(--line); border-radius: 10px; font: inherit; background: #fff; }
.combo-input:focus { border-color: var(--blue); outline: 3px solid rgba(26, 95, 214, .15); }
.combo .combo-av { position: absolute; left: 8px; top: 7px; width: 30px; height: 30px; }
.combo-list { position: absolute; left: 0; right: 0; top: calc(100% + 6px); background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg); max-height: 320px; overflow-y: auto; z-index: 20; list-style: none; margin: 0; padding: 6px; }
.combo-list li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; cursor: pointer; }
.combo-list li[aria-selected=true], .combo-list li:hover { background: var(--sky); }
.combo-list .grow { flex: 1; min-width: 0; }
.combo-list b { font-size: 13.5px; display: block; }
.combo-list small { color: var(--muted); font-size: 12px; }
.load { font-size: 11.5px; font-weight: 800; border-radius: 99px; padding: 1px 8px; background: var(--green-bg); color: var(--green); white-space: nowrap; }
.load.mid { background: var(--amber-bg); color: var(--amber); }
.load.high { background: var(--red-bg); color: var(--red); }
.combo-empty { padding: 12px; color: var(--muted); font-size: 13px; }

/* subtask editor (form) */
.sub-rows { display: grid; gap: 8px; }
.sub-row { display: grid; grid-template-columns: 22px minmax(0, 1fr) 190px 150px 34px; gap: 8px; align-items: center; }
.sub-row .grip { color: #B4BFD3; font-weight: 800; text-align: center; }
.sub-row input, .sub-row select { width: 100%; padding: 9px 10px; border: 1px solid var(--line); border-radius: 8px; font: inherit; font-size: 13.5px; background: #fff; }
.sub-row .rm { width: 34px; height: 36px; border: 1px solid var(--line); background: #fff; border-radius: 8px; cursor: pointer; color: var(--muted); font-size: 18px; line-height: 1; }
.sub-row .rm:hover { color: var(--red); border-color: #F2C7C7; }
.add-row { margin-top: 10px; }

/* subtasks on detail page */
.subtasks { list-style: none; margin: 0; padding: 0; }
.subtasks li { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line-2); }
.subtasks li:last-child { border-bottom: 0; }
.subtasks .tick { width: 22px; height: 22px; border-radius: 7px; border: 2px solid #C5D2E8; background: #fff; cursor: pointer; display: grid; place-items: center; padding: 0; flex: none; }
.subtasks .tick:disabled { cursor: default; opacity: .7; }
.subtasks li.done .tick { background: var(--green); border-color: var(--green); }
.subtasks li.done .tick::after { content: ""; width: 5px; height: 10px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg) translate(-1px, -1px); }
.subtasks li.done .st-title { text-decoration: line-through; color: var(--muted); }
.subtasks .grow { flex: 1; min-width: 0; }
.subtasks .st-title { font-weight: 600; }
.subtasks .st-meta { font-size: 12px; color: var(--muted); margin-top: 2px; }
.subtasks .st-meta .late { color: var(--red); font-weight: 700; }
.sub-add { display: grid; grid-template-columns: minmax(0, 1fr) 180px 150px auto; gap: 8px; margin-top: 12px; }
.sub-add input, .sub-add select { padding: 9px 10px; border: 1px solid var(--line); border-radius: 8px; font: inherit; font-size: 13.5px; }
.icon-btn { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 16px; padding: 4px 6px; border-radius: 6px; }
.icon-btn:hover { color: var(--red); background: var(--red-bg); }

/* list polish */
.table thead th { position: sticky; top: 0; z-index: 1; }
.table td .task-title { font-size: 14.5px; }
.row-late td:first-child { box-shadow: inset 3px 0 0 var(--red); }

/* board card polish */
.card { box-shadow: 0 1px 2px rgba(10,42,102,.05); }
.card .foot { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; gap: 6px; }
.col-head .dot { width: 8px; height: 8px; border-radius: 99px; display: inline-block; margin-right: 6px; }
.col[data-status=TODO] .dot { background: #8C98B0; } .col[data-status=IN_PROGRESS] .dot { background: var(--blue); }
.col[data-status=REOPENED] .dot { background: var(--violet); } .col[data-status=SUBMITTED] .dot { background: var(--amber); }
.col[data-status=APPROVED] .dot { background: var(--green); }

/* detail header */
.detail-hero { background: #fff; border: 1px solid #E1E8F5; border-radius: 16px; padding: 18px 22px; box-shadow: var(--shadow); margin-bottom: 16px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: flex-start; }
.detail-hero h1 { font-size: 24px; margin: 6px 0 10px; }
.people-line { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.people-line .arrow { color: #B4BFD3; }

/* email budget meter */
.meter { height: 10px; background: #E6EDF8; border-radius: 99px; overflow: hidden; }
.meter > i { display: block; height: 100%; width: 0; background: var(--green); }
.meter.warn > i { background: var(--amber); } .meter.full > i { background: var(--red); }
.switch-list .field { padding: 10px 0; border-bottom: 1px dashed var(--line-2); }
.switch-list .field:last-child { border-bottom: 0; }
.switch-list .help { margin-left: 27px; }

/* signup other */
.other-field { margin-top: -6px; }

/* flatpickr theme */
.flatpickr-calendar { font-family: var(--font) !important; border-radius: 12px !important; box-shadow: var(--shadow-lg) !important; border: 1px solid var(--line) !important; }
.flatpickr-day.selected, .flatpickr-day.selected:hover { background: var(--blue) !important; border-color: var(--blue) !important; }
.flatpickr-day.today { border-color: var(--blue) !important; }
.flatpickr-months .flatpickr-month, .flatpickr-current-month .flatpickr-monthDropdown-months { font-weight: 700; }
input.flatpickr-input[readonly] { background: #fff; cursor: pointer; }

@media (max-width: 1080px) { .composer { grid-template-columns: 1fr; } .preview { position: static; } }
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; } .ring { display: none; }
  .kpis.v2 { grid-template-columns: 1fr 1fr; }
  .sub-row { grid-template-columns: minmax(0, 1fr) 34px; } .sub-row .grip { display: none; }
  .sub-row select, .sub-row .sub-due { grid-column: 1 / 2; }
  .sub-add { grid-template-columns: 1fr; }
  .trend .day:nth-child(-n+7), .trend-axis span:nth-child(-n+7) { display: none; }
  .trend, .trend-axis { grid-template-columns: repeat(7, 1fr); }
}
.panel-head h2 .ico.ic-red { background: var(--red-bg); color: var(--red); }
.panel-head h2 .ico.ic-amber { background: var(--amber-bg); color: var(--amber); }
.panel-head h2 .ico.ic-green { background: var(--green-bg); color: var(--green); }
.field .combo-input, .combo .combo-input { padding-left: 46px !important; }
.tiles label .tile-ic { width: auto; height: 24px; display: flex; align-items: center; gap: 4px; }
.tiles label .tile-ic svg { width: 22px; height: 22px; }
.auth-art > .orbits { position: absolute; }

/* ---------- College Vidya logo slot */
.brand-logo { display: inline-flex; align-items: center; background: #fff; border-radius: 8px; padding: 6px 10px; }
.brand-logo.on-dark { background: transparent; padding: 0; }
.brand-logo img { height: 26px; width: auto; max-width: 170px; display: block; }
.side-brand { padding: 0 8px 12px; margin-top: -6px; }
.auth-brand-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; position: relative; z-index: 1; flex-wrap: wrap; }
.logo-preview { background: #F2F6FE; border: 1px dashed var(--line); border-radius: 10px; padding: 16px; }
.logo-preview.dark { background: var(--navy); }
.kind-DEADLINE { background: #FFF1E6; color: #9A3412; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ---------- toolbar & filters: never wrap words inside pills, scroll instead */
.toolbar { align-items: stretch; }
.tabs { flex-wrap: nowrap; overflow-x: auto; max-width: 100%; scrollbar-width: none; align-items: center; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { white-space: nowrap; flex: none; }
.filters { width: 100%; }
.filters input[type=search] { flex: 1 1 200px; min-width: 0; }
.filters select { flex: 0 1 auto; min-width: 0; }
.filters .check { white-space: nowrap; padding: 0 4px; }
.filters .btn { flex: none; }
@media (max-width: 1100px) {
  .filters { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
  .filters input[type=search] { grid-column: 1 / -1; }
  .filters .check, .filters .btn { justify-self: start; }
  .filters .check { align-self: center; }
}
@media (max-width: 560px) {
  .filters { grid-template-columns: 1fr 1fr; }
  .filters .btn { justify-self: stretch; }
  .page-head .btn-row { width: 100%; }
}

/* ---------- small-screen tidy-ups */
.show-xs { display: none; }
.form-grid > *, .grid-halves > *, .grid-2 > *, .composer > * { min-width: 0; }
.field select, .field input, .field textarea { max-width: 100%; }
@media (max-width: 560px) {
  .hide-xs { display: none !important; }
  .show-xs { display: block; }
  .topbar { gap: 8px; }
  .topbar .btn-primary { padding: 9px 11px; }
  .mode-pill { padding: 6px 10px; }
  .content { padding: 18px 14px 40px; }
  .hero { padding: 20px; } .hero h1 { font-size: 22px; }
  .hero .hero-actions .btn { flex: 1 1 auto; }
  .kpis.v2 .kpi { padding: 12px; gap: 10px; } .kpis.v2 .kpi .n { font-size: 24px; } .kpi .ic { width: 34px; height: 34px; }
  .page-head h1 { font-size: 22px; }
  .table td, .table th { padding: 10px 10px; }
  .detail-hero { padding: 16px; } .detail-hero h1 { font-size: 20px; }
  .choices.pills > div { display: grid !important; grid-template-columns: 1fr 1fr; }
  .quick button { flex: 1 1 auto; }
  .admin-tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .admin-tabs a { white-space: nowrap; }
  .admin-banner { padding: 14px 16px; }
}

/* ---------- How to use (help) page ---------- */
.help-hero { grid-template-columns: 1fr; }
.help-h { display: flex; align-items: center; gap: 10px; font-size: 17px; color: var(--navy); margin: 22px 0 10px; }
.help-n { width: 26px; height: 26px; border-radius: 50%; background: var(--blue); color: #fff; font-size: 13px; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 26px; }
.help-grid { display: grid; gap: 14px; }
.help-grid.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.help-grid.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.help-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px 18px; box-shadow: var(--shadow); }
.help-card.sky { background: var(--sky-2); }
.help-card h3 { font-size: 14.5px; margin: 0 0 6px; }
.help-card p, .help-card li { color: var(--ink-2); font-size: 13.5px; margin: 0 0 6px; }
.help-card ul { margin: 0; padding-left: 18px; }
.help-card .badge { margin-bottom: 8px; }
.help-k { display: inline-flex; width: 26px; height: 26px; border-radius: 8px; background: var(--sky); color: var(--blue); font-weight: 800; align-items: center; justify-content: center; margin-bottom: 8px; }
.help-note { margin: 10px 2px 0; font-size: 13px; }
.help-flow { display: flex; align-items: stretch; gap: 6px; margin-bottom: 14px; }
.help-flow > div { flex: 1; text-align: center; padding: 12px 8px; border-radius: 12px; font-weight: 700; font-size: 14px; }
.help-flow > div small { display: block; font-weight: 500; font-size: 12px; opacity: .85; margin-top: 2px; }
.help-flow > span { display: flex; align-items: center; color: var(--muted); font-weight: 800; }
.help-rules { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 26px; }
.help-rules p { padding-left: 24px; position: relative; }
.help-rules p::before { content: "✓"; position: absolute; left: 0; top: 0; width: 17px; height: 17px; border-radius: 50%; background: var(--green-bg); color: var(--green); font-size: 11px; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.help-foot { margin: 22px 2px 8px; font-size: 13px; }
.tone-blue { background: var(--sky); color: var(--blue); }
.tone-green { background: var(--green-bg); color: var(--green); }
.tone-violet { background: var(--violet-bg); color: var(--violet); }
.tone-amber { background: var(--amber-bg); color: var(--amber); }
kbd { font-family: var(--font); font-weight: 800; font-size: 12px; background: #fff; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px; padding: 0 6px; color: var(--ink); }
.help-promo { display: flex; gap: 12px; align-items: center; }
.help-promo .grow { min-width: 0; }
@media (max-width: 1100px) { .help-grid.g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 720px) {
  .help-grid.g4, .help-grid.g2, .help-rules { grid-template-columns: 1fr; }
  .help-flow { flex-direction: column; } .help-flow > span { justify-content: center; transform: rotate(90deg); }
}
.help-promo .ico { flex: 0 0 36px; width: 36px; height: 36px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; }
.help-promo .ico svg { width: 18px; height: 18px; }

/* ---------- Feedback & bugs ---------- */
.made-by { margin: 10px 8px 0; font-size: 11px; color: #7F98C9; }
.fb-reply { margin-top: 6px; padding: 8px 10px; background: var(--sky-2); border-left: 3px solid var(--blue); border-radius: 6px; font-size: 13px; color: var(--ink-2); }
.fb-msg { margin: 10px 0 12px; font-size: 14px; color: var(--ink); white-space: normal; }
.fb-shot { display: inline-block; margin-bottom: 12px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; max-width: 100%; }
.fb-shot img { display: block; max-width: 100%; max-height: 320px; }
.fb-update { display: grid; grid-template-columns: 200px minmax(0, 1fr) auto; gap: 12px; align-items: end; border-top: 1px solid var(--line-2); padding-top: 12px; }
.fb-update .field { margin: 0; }
.badge.fb-NEW { background: var(--sky); color: var(--blue); }
.badge.fb-SEEN { background: var(--sky-2); color: var(--ink-2); border-color: var(--line); }
.badge.fb-PLANNED { background: var(--violet-bg); color: var(--violet); }
.badge.fb-DONE { background: var(--green-bg); color: var(--green); }
.badge.fb-CLOSED { background: #EEF1F6; color: var(--muted); }
.badge.fb-kind-BUG { background: var(--red-bg); color: var(--red); }
.badge.fb-kind-IDEA { background: var(--amber-bg); color: var(--amber); }
.badge.fb-kind-FEEDBACK { background: var(--sky); color: var(--blue); }
@media (max-width: 720px) { .fb-update { grid-template-columns: 1fr; } }
.mb-14 { margin-bottom: 14px; }

/* ---------- Orbit loading screen ---------- */
.orbit-loader { position: fixed; inset: 0; z-index: 9999; display: flex; align-items: center; justify-content: center;
  background: rgba(10, 42, 102, .28); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
  opacity: 0; visibility: hidden; transition: opacity .18s ease, visibility 0s linear .18s; }
.orbit-loader.show { opacity: 1; visibility: visible; transition: opacity .18s ease; }
.ol-box { background: var(--white); border-radius: 18px; padding: 22px 28px 18px; box-shadow: 0 18px 50px rgba(10, 42, 102, .25);
  display: flex; flex-direction: column; align-items: center; gap: 10px; min-width: 170px; }
.ol-orbit { position: relative; width: 74px; height: 74px; }
.ol-core { position: absolute; left: 50%; top: 50%; width: 22px; height: 22px; margin: -11px 0 0 -11px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #4C8DFF, var(--navy)); box-shadow: 0 0 0 5px rgba(26, 95, 214, .12); animation: ol-pulse 1.4s ease-in-out infinite; }
.ol-ring { position: absolute; inset: 0; border-radius: 50%; border: 2px solid transparent; }
.ol-ring.r1 { border-top-color: var(--blue); border-right-color: rgba(26, 95, 214, .35); animation: ol-spin 1.1s linear infinite; }
.ol-ring.r2 { inset: 11px; border-bottom-color: #8DB6FF; border-left-color: rgba(141, 182, 255, .4); animation: ol-spin 1.6s linear infinite reverse; }
.ol-sat { position: absolute; left: 50%; top: 50%; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; background: #4C8DFF;
  border: 2px solid var(--white); box-shadow: 0 0 0 2px var(--navy); animation: ol-orbit 1.8s linear infinite; }
.ol-label { margin: 0; font-weight: 700; font-size: 13.5px; color: var(--navy); }
@keyframes ol-spin { to { transform: rotate(360deg); } }
@keyframes ol-orbit { from { transform: rotate(0deg) translateX(37px) rotate(0deg); } to { transform: rotate(360deg) translateX(37px) rotate(-360deg); } }
@keyframes ol-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.12); } }
@media (prefers-reduced-motion: reduce) { .ol-ring, .ol-sat, .ol-core { animation-duration: 4s; } }

/* ---------- Do Not Disturb + features ---------- */
.ic-violet { background: var(--violet-bg); color: var(--violet); }
.dnd-panel.on { border-color: #CFC3F5; }
.dnd-note { margin: 0 0 8px; }
.dnd-panel .choices.pills > div { flex-wrap: wrap; }
.feature-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 26px; }
@media (max-width: 720px) { .feature-grid { grid-template-columns: 1fr; } }
.stars { display: inline-flex; flex-direction: row-reverse; gap: 2px; }
.stars input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.stars label { font-size: 26px; line-height: 1; color: #CBD5E6; cursor: pointer; transition: color .12s; padding: 0 1px; }
.stars input:checked ~ label, .stars label:hover, .stars label:hover ~ label { color: #F5A524; }
.stars input:focus-visible + label { outline: 2px solid var(--blue); border-radius: 4px; }
.help-card .help-k svg { width: 15px; height: 15px; }
.help-card.is-you { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(26, 95, 214, .12); }
.help-card .you { float: right; font-size: 11px; font-weight: 800; color: var(--blue); background: var(--sky); padding: 2px 8px; border-radius: 99px; }
.mail-list { list-style: none; padding: 0 !important; margin: 0; }
.mail-list li { display: flex; align-items: center; gap: 8px; padding: 5px 0; border-bottom: 1px solid var(--line-2); margin: 0 !important; }
.mail-list li:last-child { border-bottom: 0; }
.mail-list small { margin-left: auto; font-weight: 700; font-size: 11.5px; }
.mail-list .mdot { width: 8px; height: 8px; border-radius: 50%; flex: 0 0 8px; }
.mail-list li.on .mdot { background: var(--green); } .mail-list li.on small { color: var(--green); }
.mail-list li.off { color: var(--muted); } .mail-list li.off .mdot { background: #CBD5E6; } .mail-list li.off small { color: var(--muted); }

/* =====================================================================
   v3 design system — calm, dense, consistent. Overrides the layers above.
   One accent (brand blue), neutral greys for chrome, colour only for meaning.
   ===================================================================== */
:root {
  --navy: #0B1D45; --navy-2: #13295C;
  --blue: #2257D6; --blue-hover: #1A47B5; --blue-soft: #EEF3FE;
  --sky: #EEF3FE; --sky-2: #F7F9FC;
  --paper: #F5F6F8; --white: #FFFFFF;
  --ink: #101828; --ink-2: #344054; --muted: #667085; --faint: #98A2B3;
  --line: #E4E7EC; --line-2: #F0F2F5;
  --red: #C4320A; --red-bg: #FEF3F2;
  --green: #067647; --green-bg: #ECFDF3;
  --amber: #B54708; --amber-bg: #FFFAEB;
  --violet: #5925DC; --violet-bg: #F4F3FF;
  --r-sm: 8px; --r: 10px; --r-lg: 12px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .04);
  --shadow-lg: 0 12px 32px -8px rgba(16, 24, 40, .14), 0 4px 8px -4px rgba(16, 24, 40, .06);
  --side-w: 248px;
  --content-max: 1560px;
}
body { font-size: 14px; color: var(--ink); background: var(--paper); font-feature-settings: "tnum" 1, "cv11" 1; }
h1 { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; }
h2 { font-size: 15px; font-weight: 700; letter-spacing: -0.005em; }
a { color: var(--blue); }
a:hover { text-decoration: none; color: var(--blue-hover); }
::selection { background: #D3E0FB; }

/* helpers */
.truncate { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
b.truncate, a.truncate, span.truncate { max-width: 100%; }
.clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.nowrap { white-space: nowrap; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.btn-row.nowrap { flex-wrap: nowrap; }
.ok-dot, .bad-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; background: #12B76A; }
.bad-dot { background: var(--red); }
.cell-sub, small, .muted { color: var(--muted); }
.cell-sub { font-size: 12.5px; }
.list-plain .grow, .person .grow, .person > span:last-child { min-width: 0; }

/* ------------------------------------------------------------ shell */
@media (min-width: 861px) { .shell { grid-template-columns: var(--side-w) minmax(0, 1fr); } }
@media (min-width: 861px) { .shell { background: linear-gradient(90deg, var(--navy) 0 var(--side-w), var(--paper) var(--side-w)); } }
.side { background: var(--navy); padding: 16px 12px; gap: 2px; color: #B7C3DD; }
.brand { padding: 4px 10px 16px; gap: 10px; }
.brand img { width: 30px; height: 30px; }
.brand b { font-size: 15.5px; font-weight: 700; letter-spacing: -0.01em; }
.brand span { font-size: 11.5px; color: #7F8FB3; }
.nav-group { margin-top: 18px; padding: 0 10px 6px; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: #6E7FA6; font-weight: 700; }
.nav a { position: relative; gap: 11px; padding: 8px 10px; border-radius: 8px; color: #C3CEE6; font-weight: 600; font-size: 13.5px; }
.nav a svg { width: 16px; height: 16px; opacity: .8; }
.nav a:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.nav a.active { background: rgba(255, 255, 255, .10); color: #fff; }
.nav a.active svg { opacity: 1; }
.nav a.active::before { content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: #7DA2FF; }
.nav .count { background: rgba(255, 255, 255, .14); color: #fff; font-size: 11px; font-weight: 700; padding: 0 7px; line-height: 18px; }
.side-foot { border-top: 1px solid rgba(255, 255, 255, .08); padding-top: 12px; }
.me { padding: 6px 10px; border-radius: 8px; color: inherit; }
.me:hover { background: rgba(255, 255, 255, .06); }
.me b { font-size: 13px; font-weight: 600; }
.me span { color: #7F8FB3; }
.side .avatar { background: rgba(255, 255, 255, .12); color: #fff; }
.side-logout { width: 100%; margin-top: 6px; padding: 8px 10px; border-radius: 8px; border: 1px solid rgba(255, 255, 255, .12); background: transparent; color: #C3CEE6; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; text-align: left; }
.side-logout:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.made-by { color: #5F7099; margin: 10px 10px 0; }

.topbar { height: 60px; padding: 0 28px; gap: 10px; background: rgba(255, 255, 255, .9); border-bottom: 1px solid var(--line); backdrop-filter: saturate(1.6) blur(8px); }
.search { max-width: 420px; }
.search input { padding: 8px 12px 8px 36px; border-radius: 8px; background: var(--paper); border-color: transparent; font-size: 13.5px; transition: background .15s, border-color .15s; }
.search input:hover { border-color: var(--line); }
.search input:focus { background: #fff; border-color: var(--blue); outline: 3px solid rgba(34, 87, 214, .12); }
.search svg { top: 50%; transform: translateY(-50%); width: 15px; }
.mode-pill { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 600; padding: 6px 12px; border-radius: 8px; background: #fff; color: var(--ink-2); border: 1px solid var(--line); }
.mode-pill:hover { border-color: #C9CFD9; }
.mode-pill .mode-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--faint); }
.mode-pill.admin { background: #fff; color: var(--ink); border-color: var(--line); }
.mode-pill.admin .mode-dot { background: #F79009; box-shadow: 0 0 0 3px #FEF0C7; }
.bell { width: 36px; height: 36px; border-radius: 8px; color: var(--ink-2); }
.bell:hover { background: var(--paper); }
.bell svg { width: 18px; height: 18px; }
.bell .dot { top: 2px; right: -2px; min-width: 18px; height: 18px; line-height: 14px; text-align: center; font-size: 10px; padding: 0 4px; }
.demo-switch select { border-radius: 8px; background-color: #fff; }

.content { padding: 28px 32px 56px; max-width: var(--content-max); margin: 0 auto; }
@media (min-width: 1681px) { .content { max-width: var(--content-max); } }
@media (min-width: 2200px) { :root { --content-max: 1840px; } }

/* ------------------------------------------------------------ page header */
.page-head { align-items: flex-end; margin-bottom: 20px; gap: 12px 20px; }
.page-head h1 { font-size: 22px; }
.page-head p { color: var(--muted); font-size: 13.5px; margin-top: 4px; max-width: 760px; }
.crumbs { font-size: 12.5px; margin-bottom: 4px; }
.crumbs a { color: var(--muted); } .crumbs a:hover { color: var(--blue); }

/* ------------------------------------------------------------ buttons */
.btn { height: 36px; padding: 0 14px; border-radius: 8px; font-size: 13.5px; font-weight: 600; gap: 6px; line-height: 1; }
.btn-sm { height: 30px; padding: 0 10px; font-size: 12.5px; border-radius: 7px; }
.btn svg { width: 15px; height: 15px; }
.btn-primary { background: var(--blue); color: #fff; box-shadow: 0 1px 2px rgba(16, 24, 40, .08); border-color: var(--blue); }
.btn-primary:hover { background: var(--blue-hover); border-color: var(--blue-hover); color: #fff; }
.btn-ghost { background: #fff; color: var(--ink-2); border-color: #D0D5DD; box-shadow: 0 1px 2px rgba(16, 24, 40, .04); }
.btn-ghost:hover { background: var(--sky-2); border-color: #B8C0CC; color: var(--ink); }
.btn-success { background: var(--green); border-color: var(--green); }
.btn-success:hover { background: #05603A; }
.btn-danger { border-color: #FDA29B; color: var(--red); }
.btn-block { width: 100%; }
button.btn { font-family: inherit; }

/* ------------------------------------------------------------ surfaces */
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow); min-width: 0; }
.panel + .panel, .stack > * + * { margin-top: 16px; }
.grid-2 > *, .grid-halves > *, .composer > * { margin-top: 0 !important; }
.panel-head { min-height: 52px; padding: 12px 18px; border-bottom: 1px solid var(--line-2); flex-wrap: wrap; row-gap: 4px; }
.panel-head h2 { font-size: 14.5px; font-weight: 700; gap: 8px; min-width: 0; }
.panel-head h2 .ico { width: auto; height: auto; background: none !important; color: var(--faint); border-radius: 0; }
.panel-head h2 .ico.ic-red { color: var(--red); }
.panel-head h2 .ico svg { width: 16px; height: 16px; }
.panel-head > a { font-size: 13px; font-weight: 600; white-space: nowrap; }
.panel-head > .muted small { font-size: 12px; }
.panel-body { padding: 16px 18px; }
.panel-foot { padding: 10px 18px; border-top: 1px solid var(--line-2); font-size: 13px; font-weight: 600; }
.sub-head { display: flex; align-items: baseline; gap: 8px; padding: 14px 18px 6px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.sub-head small { text-transform: none; letter-spacing: 0; font-weight: 500; color: var(--faint); }
.grid-2 { grid-template-columns: minmax(0, 1fr) clamp(300px, 27%, 380px); gap: 20px; }
.grid-2.side-wide { grid-template-columns: minmax(0, 1fr) clamp(320px, 34%, 460px); }
.grid-halves { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.mt-18 { margin-top: 20px; }

/* ------------------------------------------------------------ KPIs */
.kpis { gap: 0; margin-bottom: 20px; border-radius: var(--r-lg); border-color: var(--line); box-shadow: var(--shadow); }
.kpi { padding: 16px 20px; border-left-color: var(--line-2); transition: background .15s; }
.kpi .l { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.kpi .n { font-size: 28px; font-weight: 700; letter-spacing: -0.02em; margin: 2px 0 1px; color: var(--ink); }
.kpi .s { font-size: 12px; color: var(--faint); }
.kpi.focus { background: #fff; }
.kpi.focus .n { color: var(--blue); }
.kpi.alert .n { color: var(--red); }
a.kpi:hover { background: var(--sky-2); }
.kpis.v2 { gap: 14px; box-shadow: none; }
.kpis.v2 .kpi { padding: 16px 18px; border-color: var(--line); box-shadow: var(--shadow); border-radius: var(--r-lg); gap: 14px; }
.kpis.v2 .kpi .n { margin: 0; font-size: 26px; }
.kpis.v2 .kpi .l { margin-top: 1px; }
.kpi .ic { width: 38px; height: 38px; border-radius: 10px; }
.kpi .ic svg { width: 18px; height: 18px; }
.ic-blue { background: var(--blue-soft); }

/* ------------------------------------------------------------ dashboard header (was a gradient hero) */
.hero { background: #fff; color: var(--ink); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow); padding: 22px 24px; margin-bottom: 20px; }
.hero::after { display: none; }
.hero h1 { color: var(--ink); font-size: 22px; }
.hero p { color: var(--muted); margin-top: 4px; }
.hero .hero-actions { margin-top: 16px; }
.hero .ring { width: 96px; height: 96px; background: conic-gradient(var(--blue) calc(var(--pct) * 1%), #E8EDF7 0); }
.hero .ring::before { inset: 8px; background: #fff; }
.hero .ring b { font-size: 20px; color: var(--ink); font-weight: 700; }
.hero .ring small { color: var(--muted); font-size: 11px; }

/* ------------------------------------------------------------ badges */
.badge { padding: 2px 8px; border-radius: 6px; font-size: 11.5px; font-weight: 600; line-height: 18px; }
.st-todo { background: #F2F4F7; color: #344054; }
.st-progress { background: var(--blue-soft); color: #1F4BB8; }
.st-review { background: var(--amber-bg); color: var(--amber); }
.st-reopened { background: var(--violet-bg); color: var(--violet); }
.st-done { background: var(--green-bg); color: var(--green); }
.dept { background: #fff; border-color: var(--line); color: var(--ink-2); }
.status-pill { border-radius: 6px; font-size: 11.5px; font-weight: 600; padding: 2px 8px; white-space: nowrap; }
.status-DEACTIVATED { background: #F2F4F7; color: var(--muted); }
.code { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 11.5px; font-weight: 500; color: var(--muted); }
.avatar { width: 30px; height: 30px; font-size: 11.5px; font-weight: 700; background: #EEF1F6; color: #344054; }
.avatar.sm { width: 26px; height: 26px; font-size: 10.5px; }

/* ------------------------------------------------------------ tables */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { font-size: 13.5px; }
.table th { font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); background: #FAFBFC; padding: 10px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 12px 16px; border-bottom: 1px solid var(--line-2); }
.table tbody tr { transition: background .1s; }
.table tbody tr:hover { background: #FAFBFD; }
.table td .task-title { font-size: 13.5px; font-weight: 600; }
.task-title { color: var(--ink); font-weight: 600; }
.task-title:hover { color: var(--blue); }
.row-late td:first-child { box-shadow: inset 2px 0 0 var(--red); }
.col-check { width: 44px; padding-right: 0 !important; }
.col-check input { width: 16px; height: 16px; accent-color: var(--blue); vertical-align: middle; }
.col-actions { width: 1%; text-align: right; white-space: nowrap; }
.people-table .col-person { min-width: 220px; max-width: 340px; }
.people-table td:nth-child(3) { max-width: 200px; }
.person { gap: 10px; max-width: 100%; }
.person b { font-size: 13.5px; font-weight: 600; }
.table-actions h2 { font-size: 14px; }

/* plain lists */
.list-plain > li { padding: 12px 18px; gap: 12px; }
.list-plain > li:hover { background: #FCFCFD; }
.list-plain b { font-weight: 600; }
.list-plain a.read { color: var(--ink-2); }
.activity > li { padding: 10px 18px; }
.empty { padding: 32px 20px; font-size: 13.5px; }
.empty b { font-weight: 600; margin-bottom: 2px; }

/* red flags */
.flag { padding: 12px 18px; gap: 12px; align-items: center; }
.flag .grow { min-width: 0; flex: 1; }
.flag .dot { margin-top: 0; align-self: flex-start; margin-top: 6px; width: 8px; height: 8px; box-shadow: none; }
.flag .k { font-size: 11.5px; font-weight: 600; color: var(--muted); text-transform: none; }
.flag a { font-size: 13px; }

/* ------------------------------------------------------------ toolbar, tabs, filters */
.toolbar { gap: 10px; margin-bottom: 16px; }
.tabs { border-radius: 8px; padding: 3px; background: #EEF0F3; border: 0; gap: 2px; }
.tabs a { border-radius: 6px; padding: 6px 12px; font-weight: 600; color: var(--ink-2); }
.tabs a:hover { background: rgba(255, 255, 255, .6); }
.tabs a.on { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(16, 24, 40, .1); }
.filters select, .filters input[type=search] { height: 36px; padding: 0 12px; border-radius: 8px; border-color: #D0D5DD; font-size: 13.5px; background-color: #fff; }
.filters input[type=search]:focus, .filters select:focus { border-color: var(--blue); outline: 3px solid rgba(34, 87, 214, .12); }

/* admin */
.admin-head { margin-bottom: 14px; }
.admin-tabs { flex-wrap: nowrap; overflow-x: auto; gap: 2px; margin-bottom: 22px; border-bottom: 1px solid var(--line); scrollbar-width: none;
  -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 32px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 32px), transparent); padding-right: 24px; }
.admin-tabs::-webkit-scrollbar { display: none; }
.admin-tabs a { white-space: nowrap; padding: 10px 12px; font-size: 13.5px; font-weight: 600; color: var(--muted); border-bottom-width: 2px; }
.admin-tabs a:hover { color: var(--ink); }
.admin-tabs a.on { color: var(--ink); border-color: var(--blue); }
.admin-tabs + .page-head { margin-top: -6px; }
.admin-tabs + .page-head p { margin: 0; }
.admin-banner { display: none; }
.meter-line { display: flex; align-items: baseline; gap: 6px; margin-bottom: 10px; }
.meter-line b { font-size: 20px; font-weight: 700; }
.meter { height: 8px; background: #EEF0F3; }
.facts { grid-template-columns: minmax(110px, 34%) minmax(0, 1fr); gap: 10px 14px; font-size: 13.5px; margin: 0; }
.facts dt { font-weight: 500; }
.facts dd { font-weight: 600; min-width: 0; overflow-wrap: anywhere; }

/* pagination */
.pager { justify-content: space-between; gap: 12px; padding: 12px 18px; border-top: 1px solid var(--line-2); flex-wrap: wrap; }
.pager-info { font-size: 13px; color: var(--muted); }
.pager-links { display: flex; gap: 4px; flex-wrap: wrap; }
.pg { min-width: 32px; height: 32px; padding: 0 8px; display: inline-grid; place-items: center; border-radius: 8px; font-size: 13px; font-weight: 600; color: var(--ink-2); border: 1px solid transparent; }
a.pg:hover { background: var(--sky-2); border-color: var(--line); color: var(--ink); }
.pg.on { background: var(--ink); color: #fff; }
.pg.off { color: #C4CAD4; }
.pg.gap { color: var(--faint); min-width: 20px; }

/* ------------------------------------------------------------ forms */
.field label, .field .label { font-weight: 600; font-size: 13px; color: var(--ink-2); }
.field input[type=text], .field input[type=email], .field input[type=password], .field input[type=number],
.field input[type=date], .field input[type=datetime-local], .field input[type=url], .field input[type=search],
.field select, .field textarea, .field input:not([type]) {
  border-color: #D0D5DD; border-radius: 8px; padding: 9px 12px; box-shadow: 0 1px 2px rgba(16, 24, 40, .04); transition: border-color .15s, box-shadow .15s;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--blue); outline: none; box-shadow: 0 0 0 3px rgba(34, 87, 214, .14); }
.field .help { color: var(--muted); }
.switch-list .field label { font-weight: 600; color: var(--ink); }
.choices label { border-width: 1px; border-color: #D0D5DD; border-radius: 8px; padding: 8px 12px; font-weight: 600; font-size: 13px; }
.choices label.picked { border-color: var(--blue); background: var(--blue-soft); box-shadow: 0 0 0 1px var(--blue) inset; }
.choices.pills label { padding: 6px 12px !important; }
.choices.pills > div { gap: 6px; }
.compose-card { border-radius: var(--r-lg); border-color: var(--line); }
.compose-sec { padding: 20px 24px; }
.compose-sec > h3 .ico { background: none; color: var(--faint); width: auto; height: auto; }
.compose-foot { background: #FAFBFC; border-top: 1px solid var(--line-2); border-radius: 0 0 var(--r-lg) var(--r-lg); }
.preview-card { background: #fff; color: var(--ink); border: 1px solid var(--line); box-shadow: var(--shadow); border-radius: var(--r-lg); }
.preview-card .lbl, .preview-card .row span:first-child { color: var(--muted); }
.preview-card .row { border-top-color: var(--line-2); }
.title-input input { font-size: 17px !important; font-weight: 600; }
.quick button { border-radius: 7px; font-weight: 600; border-color: #D0D5DD; }
.opt { background: #F2F4F7; border-radius: 6px; }

/* flash messages */
.flash { border-radius: 10px; font-weight: 500; padding: 11px 14px; font-size: 13.5px; }
.flash.info { background: var(--blue-soft); color: #1F4BB8; border-color: #CFDCFB; }

/* detail */
.detail-hero { border-radius: var(--r-lg); border-color: var(--line); padding: 20px 24px; }
.detail-hero h1 { font-size: 22px; overflow-wrap: anywhere; }
.subtasks li { padding: 11px 0; }
.subtasks .tick { border-radius: 6px; border-width: 1.5px; border-color: #C2C9D4; }
.timeline .body { color: var(--ink-2); }
.review-dock { border-width: 1px; border-color: #FEC84B; background: #FFFCF5; }

/* board & calendar */
.col { background: #EEF0F3; border-radius: var(--r-lg); }
.card { border-radius: 10px; border-color: var(--line); box-shadow: 0 1px 2px rgba(16, 24, 40, .05); }
.card:hover { border-color: #B8C4DA; box-shadow: 0 4px 10px -4px rgba(16, 24, 40, .12); }
.card .t { font-weight: 600; overflow-wrap: anywhere; }
.cal { border-radius: var(--r-lg); border-color: var(--line); box-shadow: var(--shadow); }
.cal .dow { background: #FAFBFC; font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; font-weight: 600; }

/* help & misc cards keep calm */
.help-card { border-color: var(--line); border-radius: var(--r-lg); }

/* auth */
.auth-art { background: var(--navy); }
.auth-card h2 { font-weight: 700; letter-spacing: -0.02em; }

/* loader */
.orbit-loader { background: rgba(16, 24, 40, .18); }

/* ------------------------------------------------------------ responsive */
@media (max-width: 1280px) {
  .grid-2, .grid-2.side-wide { grid-template-columns: minmax(0, 1fr) 320px; }
}
@media (max-width: 1080px) {
  .grid-2, .grid-2.side-wide { grid-template-columns: minmax(0, 1fr); }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi:nth-child(3) { border-left: 0; }
  .kpi:nth-child(n+3) { border-top: 1px solid var(--line-2); }
  .kpis.v2 .kpi:nth-child(n+3) { border-top: 1px solid var(--line); }
}
@media (max-width: 860px) {
  .topbar { height: 56px; padding: 0 14px; }
  .content { padding: 20px 16px 48px; }
  .grid-halves { grid-template-columns: minmax(0, 1fr); }
  .side { width: 272px; box-shadow: var(--shadow-lg); }
  .menu-btn { border-radius: 8px; border-color: var(--line); }
}
@media (max-width: 560px) {
  .content { padding: 16px 12px 40px; }
  .page-head h1, .hero h1 { font-size: 20px; }
  .panel-head { padding: 12px 14px; min-height: 48px; }
  .panel-body { padding: 14px; }
  .list-plain > li, .flag, .activity > li { padding: 11px 14px; }
  .table td, .table th { padding: 10px 12px; }
  .kpi { padding: 14px; } .kpi .n { font-size: 24px; } .kpi .s { display: none; }
  .kpis.v2 { gap: 10px; }
  .kpis.v2 .kpi { padding: 12px; } .kpis.v2 .kpi .ic { display: none; }
  .pager { justify-content: center; } .pager-info { width: 100%; text-align: center; }
  .table-actions .btn-row { width: 100%; }
  .mode-pill { padding: 6px 9px; font-size: 12px; }
  .hero { padding: 18px; }
  .people-table .col-person { min-width: 180px; }
}
/* v3: keep short table values on one line; give the side column room */
.table td .pr-text, .table td .due, .table td .badge, .table td .status-pill { white-space: nowrap; }
@media (min-width: 1281px) { .grid-2 { grid-template-columns: minmax(0, 1fr) clamp(320px, 30%, 400px); } }
.list-plain > li > .badge { flex: none; }
@media (max-width: 1400px) { .hide-md { display: none !important; } }
.task-table .col-task { width: 40%; min-width: 260px; }
.task-table td:first-child { min-width: 260px; }
.task-table .court { max-width: 200px; }
.task-table .person { max-width: 230px; }
.task-table .sub-meta { white-space: nowrap; }
.court .truncate { min-width: 0; }
.people-table .col-person { max-width: 300px; }
.people-table td:nth-child(3) .cell-sub { max-width: 180px; }
.show-md { display: none; }
@media (max-width: 1400px) { .show-md { display: inline; } }
.task-table .col-task { width: 34%; }
.task-table .court { max-width: 160px; }
.task-table .person { max-width: 190px; }
.task-table th, .task-table td { padding-left: 14px; padding-right: 14px; }
.board { grid-template-columns: repeat(5, minmax(200px, 1fr)); }
.people-table .col-person { max-width: 270px; }
@media (max-width: 860px) {
  .task-table td:first-child, .task-table .col-task { min-width: 0; width: auto; }
  .board { grid-template-columns: repeat(5, 260px); scroll-snap-type: x mandatory; }
  .board .col { scroll-snap-align: start; }
}
.filters input[type=search] { flex: 1 1 160px; }

/* phones: list tables become stacked cards; numeric tables scroll with the first column pinned */
@media (max-width: 560px) {
  .table.cards-sm thead { display: none; }
  .table.cards-sm, .table.cards-sm tbody { display: block; width: 100%; }
  .table.cards-sm tr { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 12px 14px; border-bottom: 1px solid var(--line-2); }
  .table.cards-sm tr:last-child { border-bottom: 0; }
  .table.cards-sm td { display: block; padding: 0; border: 0; min-width: 0; max-width: 100%; }
  .table.cards-sm td:first-child, .table.cards-sm td.col-check + td { flex: 1 1 100%; }
  .table.cards-sm td.col-check { flex: 0 0 auto; width: auto; }
  .table.cards-sm td.col-check + td { flex: 1 1 calc(100% - 40px); }
  .table.cards-sm td.col-actions { margin-left: auto; width: auto; }
  .table.cards-sm td.empty { flex: 1 1 100%; }
  .table.cards-sm tr.row-late { box-shadow: inset 3px 0 0 var(--red); }
  .table.cards-sm tr.row-late td:first-child { box-shadow: none; }
  .table.cards-sm td .person { max-width: 100%; }
  .people-table .col-person, .task-table .court, .task-table .person { max-width: 100%; }
  .table-wrap .table:not(.cards-sm) th:first-child, .table-wrap .table:not(.cards-sm) td:first-child { position: sticky; left: 0; z-index: 1; background: #fff; box-shadow: 1px 0 0 var(--line-2); }
  .table-wrap .table:not(.cards-sm) th:first-child { background: #FAFBFC; }
}

@media (max-width: 860px) { .table.cards-sm td.hide-sm { display: none; } }
@media (max-width: 560px) {
  .table.cards-sm td.hide-xs { display: none; }
  .list-plain > li { flex-wrap: wrap; }
  .list-plain > li > .grow { flex: 1 1 calc(100% - 50px); }
  .list-plain > li > form, .list-plain > li > .btn { margin-left: 42px; }
  .list-plain > li > form + .btn { margin-left: 0; }
  .list-plain > li > .badge { margin-left: 42px; }
}
.stack > input[type=hidden] + *, .stack > input[type=hidden]:first-child + * { margin-top: 0; }

/* =====================================================================
   v4 brand layer — College Vidya blue, used with intent.
   Gradient for the hero moments (dashboard, control centre, sign-in),
   tinted icon chips and soft blue depth everywhere else.
   ===================================================================== */
:root {
  --brand-1: #1C4FD8; --brand-2: #1237A6; --brand-3: #0B1D5E;
  --brand-grad: linear-gradient(118deg, #1D54E0 0%, #1439B0 42%, #0C1F63 100%);
  --btn-grad: linear-gradient(180deg, #2F68F2 0%, #1F52D6 100%);
  --paper: #F3F6FB;
  --line: #E3E8F1; --line-2: #EEF2F8;
  --shadow: 0 1px 2px rgba(16, 33, 82, .05), 0 4px 16px -10px rgba(16, 33, 82, .14);
  --shadow-hover: 0 2px 4px rgba(16, 33, 82, .06), 0 14px 30px -14px rgba(28, 79, 216, .35);
  --r-lg: 14px;
}
body { background: var(--paper); }
.main { background:
  radial-gradient(900px 340px at 85% -140px, rgba(36, 92, 230, .10), transparent 70%),
  radial-gradient(700px 300px at 0% -160px, rgba(36, 92, 230, .06), transparent 70%), var(--paper); }

/* sidebar: deep navy with a quiet orbit mark */
.side { background: linear-gradient(180deg, #0C1E4A 0%, #091638 100%); overflow-x: hidden; }
@media (min-width: 861px) { .shell { background: var(--paper); } }
.side::after { content: ""; position: absolute; left: -90px; bottom: -110px; width: 280px; height: 280px; border-radius: 50%;
  border: 1px solid rgba(125, 162, 255, .12); box-shadow: 0 0 0 40px rgba(125, 162, 255, .03); pointer-events: none; }
.side > * { position: relative; z-index: 1; }
.nav a.active { background: linear-gradient(90deg, rgba(79, 130, 255, .30), rgba(79, 130, 255, .08)); color: #fff; box-shadow: inset 0 0 0 1px rgba(125, 162, 255, .18); }
.nav a.active svg { color: #9DBBFF; }
.nav a.active::before { background: linear-gradient(180deg, #8FB0FF, #4F82FF); }
.nav .count { background: #2F68F2; }

/* topbar */
.topbar { background: rgba(255, 255, 255, .82); border-bottom-color: rgba(227, 232, 241, .9); }
.search input { background: #F1F4FA; }

/* buttons */
.btn-primary { background: var(--btn-grad); border-color: #1F52D6; box-shadow: 0 1px 2px rgba(16, 33, 82, .12), 0 6px 14px -6px rgba(31, 82, 214, .55), inset 0 1px 0 rgba(255, 255, 255, .14); }
.btn-primary:hover { background: linear-gradient(180deg, #2A5FE6 0%, #1A47BF 100%); border-color: #1A47BF; }
.btn-success { background: linear-gradient(180deg, #0A8A55, #067647); box-shadow: 0 6px 14px -8px rgba(6, 118, 71, .6); }

/* hero: the gradient banner */
.hero { background: var(--brand-grad); color: #fff; border: 0; border-radius: 18px; padding: 28px 30px; position: relative; overflow: hidden;
  box-shadow: 0 18px 40px -22px rgba(18, 55, 166, .75), 0 2px 6px rgba(12, 31, 99, .18); }
.hero::before { content: ""; position: absolute; right: -120px; top: -160px; width: 420px; height: 420px; border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, .14); box-shadow: 0 0 0 56px rgba(255, 255, 255, .035), 0 0 0 120px rgba(255, 255, 255, .02); pointer-events: none; }
.hero::after { display: block; content: ""; position: absolute; left: 38%; top: -60%; width: 520px; height: 260px; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(120, 170, 255, .28), transparent); filter: blur(10px); pointer-events: none; }
.hero > * { position: relative; z-index: 1; }
.hero h1 { color: #fff; font-size: 28px; font-weight: 800; letter-spacing: -0.025em; }
.hero p { color: #CFE0FF; font-size: 15px; margin-top: 6px; }
.hero .hero-actions { margin-top: 20px; gap: 10px; }
.hero .btn { height: 40px; padding: 0 18px; font-size: 14px; border-radius: 10px; }
.hero .btn-light { background: #fff; color: var(--brand-3); border-color: #fff; box-shadow: 0 8px 20px -10px rgba(0, 0, 0, .45); }
.hero .btn-light:hover { background: #F2F6FF; color: var(--brand-3); }
.hero .btn-outline { background: rgba(255, 255, 255, .10); color: #fff; border: 1px solid rgba(255, 255, 255, .34); backdrop-filter: blur(4px); }
.hero .btn-outline:hover { background: rgba(255, 255, 255, .18); color: #fff; }
.hero .ring { width: 116px; height: 116px; background: conic-gradient(#8DB6FF calc(var(--pct) * 1%), rgba(255, 255, 255, .16) 0); box-shadow: 0 0 0 8px rgba(255, 255, 255, .05); }
.hero .ring::before { inset: 9px; background: linear-gradient(160deg, #163FB5, #0E2777); }
.hero .ring b { color: #fff; font-size: 26px; font-weight: 800; }
.hero .ring small { color: #BFD4FF; font-size: 11.5px; }

/* control centre banner */
.admin-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; background: var(--brand-grad); color: #fff; border-radius: 18px;
  padding: 22px 26px; margin-bottom: 16px; position: relative; overflow: hidden; box-shadow: 0 16px 36px -22px rgba(18, 55, 166, .75); }
.admin-head::before { content: ""; position: absolute; right: -90px; top: -150px; width: 340px; height: 340px; border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, .14); box-shadow: 0 0 0 46px rgba(255, 255, 255, .035); pointer-events: none; }
.admin-head > * { position: relative; z-index: 1; }
.admin-head h1 { color: #fff; font-size: 24px; font-weight: 800; letter-spacing: -0.02em; }
.admin-head p { color: #CFE0FF; margin-top: 4px; font-size: 13.5px; }
.eyebrow { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #A9C4FF; margin-bottom: 4px; }
.admin-head-ic { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .2); color: #fff; flex: none; }
.admin-head-ic svg { width: 24px; height: 24px; }
.admin-tabs { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 5px; gap: 2px; margin-bottom: 20px; box-shadow: var(--shadow); }
.admin-tabs a { border: 0; border-radius: 8px; padding: 8px 12px; color: var(--ink-2); }
.admin-tabs a:hover { background: #F1F4FA; }
.admin-tabs a.on { background: linear-gradient(180deg, #EAF0FF, #DFE8FF); color: var(--brand-2); box-shadow: inset 0 0 0 1px #C9D8FF; }

/* KPI cards: white, colourful chips, lift on hover */
.kpis { background: transparent; border: 0; box-shadow: none; gap: 14px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.kpi, .kpis.v2 .kpi { background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); position: relative; overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s; }
.kpi::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--btn-grad); opacity: 0; transition: opacity .18s; }
a.kpi:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); border-color: #CCD9F5; background: #fff; }
a.kpi:hover::after { opacity: 1; }
.kpi.alert::after { background: linear-gradient(90deg, #F04438, #C4320A); opacity: 1; }
.kpi.focus::after { opacity: 1; }
.kpi + .kpi { border-left: 1px solid var(--line); }
.kpi .n { font-size: 30px; font-weight: 800; letter-spacing: -0.03em; }
.kpi .ic { width: 44px; height: 44px; border-radius: 12px; flex: none; }
.kpi .ic svg { width: 20px; height: 20px; }
.ic-blue { background: linear-gradient(145deg, #E6EEFF, #D5E2FF); color: #1F52D6; }
.ic-red { background: linear-gradient(145deg, #FFEDEB, #FFDCD7); color: #D92D20; }
.ic-amber { background: linear-gradient(145deg, #FFF4DE, #FFE7B8); color: #B54708; }
.ic-green { background: linear-gradient(145deg, #E3FAEE, #C9F2DC); color: #067647; }
.ic-violet { background: linear-gradient(145deg, #F0EDFF, #E1DAFF); color: #5925DC; }
@media (max-width: 1080px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .kpi:nth-child(n+3) { border-top: 1px solid var(--line); } }

/* panels: soft depth, tinted icon chips */
.panel { border-radius: 14px; box-shadow: var(--shadow); border-color: var(--line); }
.panel-head { min-height: 56px; padding: 14px 20px; }
.panel-head h2 { font-size: 15px; font-weight: 700; }
.panel-head h2 .ico { width: 30px; height: 30px; border-radius: 9px; display: inline-grid; place-items: center; background: linear-gradient(145deg, #E6EEFF, #D5E2FF) !important; color: #1F52D6; }
.panel-head h2 .ico.ic-red { background: linear-gradient(145deg, #FFEDEB, #FFDCD7) !important; color: #D92D20; }
.panel-head h2 .ico.ic-amber { background: linear-gradient(145deg, #FFF4DE, #FFE7B8) !important; color: #B54708; }
.panel-head h2 .ico.ic-green { background: linear-gradient(145deg, #E3FAEE, #C9F2DC) !important; color: #067647; }
.panel-head h2 .ico.ic-violet { background: linear-gradient(145deg, #F0EDFF, #E1DAFF) !important; color: #5925DC; }
.panel-head h2 .ico svg { width: 15px; height: 15px; }
.list-plain > li, .flag { padding-left: 20px; padding-right: 20px; }
.list-plain > li:hover, .table tbody tr:hover { background: #F8FAFF; }
.sub-head { padding-left: 20px; }

/* tables */
.table th { background: #F7F9FD; color: #5B6B88; }

/* status badges get a dot */
.badge.st-todo, .badge.st-progress, .badge.st-review, .badge.st-reopened, .badge.st-done, .status-pill { display: inline-flex; align-items: center; gap: 6px; }
.badge.st-todo::before, .badge.st-progress::before, .badge.st-review::before, .badge.st-reopened::before, .badge.st-done::before, .status-pill::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .85; flex: none; }
.st-progress { background: #EAF0FF; color: #1F52D6; }

/* avatars: soft brand gradients */
.avatar.c0 { background: linear-gradient(145deg, #E3ECFF, #CFDDFF); color: #1F4BB8; }
.avatar.c1 { background: linear-gradient(145deg, #E2F7EE, #C6EEDB); color: #067647; }
.avatar.c2 { background: linear-gradient(145deg, #FFF0DC, #FFE0B3); color: #A04A06; }
.avatar.c3 { background: linear-gradient(145deg, #F1ECFF, #E0D6FF); color: #5925DC; }
.avatar.c4 { background: linear-gradient(145deg, #FFE9EC, #FFD3DA); color: #B42344; }
.avatar.c5 { background: linear-gradient(145deg, #E0F6FA, #C2ECF4); color: #0E7090; }

/* page titles */
.page-head h1 { font-size: 24px; font-weight: 800; letter-spacing: -0.025em; }

/* tabs and filters */
.tabs { background: #E9EEF7; }
.tabs a.on { color: var(--brand-2); box-shadow: 0 1px 2px rgba(16, 33, 82, .12), 0 0 0 1px rgba(31, 82, 214, .08); }

/* board & calendar */
.col { background: linear-gradient(180deg, #E9EEF8, #EEF2F9); }
.card:hover { transform: translateY(-1px); box-shadow: var(--shadow-hover); }
.card { transition: transform .15s, box-shadow .15s, border-color .15s; }

/* pager */
.pg.on { background: var(--btn-grad); color: #fff; box-shadow: 0 4px 10px -4px rgba(31, 82, 214, .6); }

/* forms */
.choices label.picked { background: linear-gradient(180deg, #F2F6FF, #E7EEFF); }
.compose-card { box-shadow: var(--shadow); }
.preview-card { background: var(--brand-grad); color: #fff; border: 0; box-shadow: 0 16px 36px -22px rgba(18, 55, 166, .75); }
.preview-card .lbl, .preview-card .row span:first-child { color: #BFD4FF; }
.preview-card .row { border-top-color: rgba(255, 255, 255, .12); }
.preview-card h3, .preview-card b, .preview-card .row span:last-child { color: #fff; }

/* demo banner */
.flash.info { background: linear-gradient(90deg, #EEF3FF, #F6F8FF); }

@media (max-width: 860px) {
  .hero { padding: 22px; border-radius: 16px; }
  .hero h1 { font-size: 23px; }
  .admin-head { padding: 18px 20px; border-radius: 16px; }
  .admin-head-ic { display: none; }
}
@media (max-width: 560px) {
  .kpis { gap: 10px; }
  .kpi .n { font-size: 24px; }
  .hero .btn { height: 38px; }
  .hero-actions .btn { flex: 1 1 auto; }
}
@media (max-width: 560px) {
  .list-plain > li > .grow { flex: 1 1 0; }
  .list-plain > li > .btn { margin-left: 0; }
  .list-plain > li > form { flex-basis: 100%; }
}
.task-table th, .task-table td { padding-left: 12px; padding-right: 12px; }
.people-table .col-person { max-width: 250px; }

/* =====================================================================
   v4.1 — compact task composer + soft brand page headers
   ===================================================================== */
/* 12-column compact grid used by the task form */
.cgrid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 14px 16px; align-items: start; }
.cgrid > * { min-width: 0; grid-column: span 12; margin: 0; }
.cgrid > .c3 { grid-column: span 3; } .cgrid > .c4 { grid-column: span 4; } .cgrid > .c5 { grid-column: span 5; }
.cgrid > .c6 { grid-column: span 6; } .cgrid > .c7 { grid-column: span 7; } .cgrid > .c12 { grid-column: span 12; }
.cgrid > .hidden { display: none !important; }
.cgrid .field { margin: 0; }
.cgrid > div > .field { margin: 0; }
@media (max-width: 900px) { .cgrid > .c3, .cgrid > .c4, .cgrid > .c5, .cgrid > .c6, .cgrid > .c7 { grid-column: span 6; } }
@media (max-width: 560px) { .cgrid > * { grid-column: span 12 !important; } }

/* composer sections: numbered brand chips, tighter rhythm */
.compose-card { counter-reset: sec; overflow: visible; }
.compose-sec { padding: 18px 24px; }
.compose-sec > h3, .compose-sec .sec-row h3 { display: flex; align-items: center; gap: 10px; font-size: 14.5px; font-weight: 700; margin: 0 0 14px; color: var(--ink); }
.compose-sec > h3::before, .compose-sec .sec-row h3::before { counter-increment: sec; content: counter(sec); width: 24px; height: 24px; border-radius: 8px;
  display: inline-grid; place-items: center; font-size: 12px; font-weight: 800; color: #fff; background: var(--btn-grad); box-shadow: 0 4px 10px -4px rgba(31, 82, 214, .6); flex: none; }
.sec-row { display: flex; align-items: baseline; gap: 6px 12px; flex-wrap: wrap; margin-bottom: 10px; }
.sec-row h3 { margin: 0 !important; }
.sec-row small { font-size: 12.5px; }
.compose-main { display: grid; gap: 12px; padding-top: 22px; background: linear-gradient(180deg, #F7F9FF, #fff); border-radius: var(--r-lg) var(--r-lg) 0 0; }
.compose-main .field { margin: 0; }
.title-input label, .brief-input label { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.title-input input { font-size: 18px !important; font-weight: 700 !important; padding: 11px 14px !important; }
.brief-input textarea { min-height: 96px; height: 110px; resize: vertical; }
.links-input textarea { min-height: 42px; height: 72px; }
.compose-sec .field .help { font-size: 12px; margin-top: 5px; line-height: 1.4; }
.compose-sec .field > label, .compose-sec .field > .label { margin-bottom: 6px; display: inline-flex; align-items: center; gap: 6px; }

/* quick date chips sit tight under the date */
.quick { gap: 5px; margin-top: 7px; }
.quick button { font-size: 11.5px; font-weight: 700; padding: 4px 9px; border-radius: 7px; border-color: var(--line); background: #F7F9FD; }
.quick button:hover { background: #EEF3FF; border-color: #BFD0FA; color: var(--brand-2); }

/* segmented choice controls (priority, type, creative options) */
.choices.seg > div { display: inline-flex !important; flex-wrap: wrap; gap: 0 !important; padding: 3px; background: #EEF2F9; border-radius: 10px; border: 1px solid var(--line); }
.choices.seg label { border: 0 !important; background: transparent; border-radius: 8px !important; padding: 7px 12px !important; font-size: 13px; font-weight: 600; color: var(--ink-2);
  box-shadow: none !important; display: inline-flex; align-items: center; gap: 6px; cursor: pointer; transition: background .12s, color .12s; min-height: 0; flex-direction: row !important; }
.choices.seg label input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.choices.seg label:hover { color: var(--ink); background: rgba(255, 255, 255, .6); }
.choices.seg label.picked, .choices.seg label:has(input:checked) { background: #fff; color: var(--brand-2); box-shadow: 0 1px 2px rgba(16, 33, 82, .14), 0 0 0 1px rgba(31, 82, 214, .12) !important; }
.choices.seg label:focus-within { outline: 2px solid rgba(31, 82, 214, .35); outline-offset: 1px; }
.choices.seg .tile-ic { display: inline-flex !important; margin: 0 !important; width: auto !important; height: auto !important; color: currentColor; }
.choices.seg .tile-ic svg { width: 15px !important; height: 15px !important; }
.choices.seg label.p-LOW.picked, .choices.seg label.p-LOW:has(input:checked) { color: #475467; }
.choices.seg label.p-HIGH.picked, .choices.seg label.p-HIGH:has(input:checked) { color: #B54708; }
.choices.seg label.p-URGENT.picked, .choices.seg label.p-URGENT:has(input:checked) { color: #C4320A; }
.type-seg label { padding: 8px 14px !important; }
.creative-box { background: linear-gradient(180deg, #F7F9FF, #F2F6FF); border: 1px solid #DCE5F8; border-radius: 12px; padding: 14px 16px; }
.creative-box .field { margin: 0; }

/* subtasks compact */
.sub-rows { gap: 6px; margin-bottom: 8px; }
.sub-rows:empty { display: none; }
.sub-row input, .sub-row select { padding: 8px 10px; }
.add-row { margin-top: 2px; }

/* footer: sticky so "Assign task" is always reachable */
.compose-foot { position: sticky; bottom: 0; z-index: 5; background: rgba(250, 251, 255, .94); backdrop-filter: blur(6px); padding: 14px 24px; }
.compose-foot .btn-primary { height: 40px; padding: 0 22px; font-size: 14px; }
.preview { top: 80px; }
.preview-card h4 { font-size: 17px; color: #fff; }

/* soft brand page headers on top-level pages */
.content > .page-head:first-child { position: relative; overflow: hidden; background: linear-gradient(115deg, #FFFFFF 0%, #F4F7FF 55%, #E8EFFF 100%);
  border: 1px solid #E1E8F6; border-radius: 16px; padding: 20px 24px; box-shadow: var(--shadow); align-items: center; }
.content > .page-head:first-child::after { content: ""; position: absolute; right: -70px; top: -120px; width: 260px; height: 260px; border-radius: 50%;
  border: 1.5px solid rgba(31, 82, 214, .12); box-shadow: 0 0 0 36px rgba(31, 82, 214, .035); pointer-events: none; }
.content > .page-head:first-child > * { position: relative; z-index: 1; }
.content > .page-head:first-child h1 { background: linear-gradient(90deg, #0C1F63, #1D54E0); -webkit-background-clip: text; background-clip: text; color: transparent; }
.content > .page-head:first-child .crumbs a { color: #5B6B88; }
.content > .flash:first-child + .page-head, .content > .flash + .page-head { margin-top: 0; }

/* empty states feel intentional */
.empty { color: var(--muted); }
.empty b { color: var(--ink); }

/* sidebar sits full height in tall pages */
@media (min-width: 861px) { .shell { background: linear-gradient(90deg, #0A1A42 0 var(--side-w), var(--paper) var(--side-w)); } }

@media (max-width: 560px) {
  .compose-sec { padding: 16px; }
  .compose-foot { padding: 12px 16px; }
  .compose-foot .btn-row, .compose-foot .btn-primary { width: 100%; }
  .choices.seg > div { display: flex !important; width: 100%; }
  .choices.seg label { flex: 1 1 auto; justify-content: center; }
  .content > .page-head:first-child { padding: 16px 18px; }
}
@media (max-width: 860px) { .compose-foot { position: static; } }
.links-input textarea { height: 60px; }
/* paired panels end at the same height */
.grid-halves { align-items: stretch; }
.grid-halves > .panel { display: flex; flex-direction: column; }
.grid-halves > .panel > .panel-foot { margin-top: auto; }
/* sign-in: same brand gradient as the dashboard banner */
.auth-art { background: var(--brand-grad); position: relative; overflow: hidden; }
.auth-art::after { content: ""; position: absolute; right: -140px; bottom: -160px; width: 420px; height: 420px; border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, .14); box-shadow: 0 0 0 56px rgba(255, 255, 255, .035), 0 0 0 120px rgba(255, 255, 255, .02); pointer-events: none; }
.auth-art > * { position: relative; z-index: 1; }
