/* Denning Calendar & Task Tracker (DCT) — house style. See DESIGN.md.
   Indigo chrome, cool near-white workspace, one gold accent. Montserrat only. */
@font-face { font-family: 'Montserrat'; src: url('/assets/fonts/Montserrat.ttf') format('truetype'); font-weight: 100 900; font-display: swap; }

:root {
  /* brand */
  --indigo: #1A153C; --indigo-2: #241C52; --indigo-ink: #302478; --indigo-soft: #EEEBFA; --midnight: #120C26;
  --gold: #FEB803; --gold-deep: #D99A00; --gold-tint: #FFF6DC;
  --lavender: #C7BFE4; --lavender-2: #9F95C9;
  /* surfaces + ink */
  --bg: #F6F5FA; --surface: #FFFFFF; --surface-2: #FAF9FD; --surface-3: #F1EFF7;
  --text: #1B1830; --text-2: #4C4866; --muted: #6B6784; --faint: #A7A3BA;
  --border: #E6E3F0; --border-2: #D6D2E4;
  /* semantic */
  --danger: #B42318; --danger-bg: #FEF3F2; --danger-line: #FECDCA;
  --warn: #B54708; --warn-bg: #FFFAEB; --warn-line: #FEDF89;
  --success: #067647; --success-bg: #ECFDF3; --success-line: #ABEFC6;
  /* shape + depth */
  --radius: 12px; --radius-sm: 8px; --radius-xs: 6px;
  --shadow-1: 0 1px 2px rgba(27, 24, 48, .06);
  --shadow-2: 0 2px 6px -1px rgba(27, 24, 48, .10);
  --shadow-float: 0 12px 32px -12px rgba(18, 12, 38, .35), 0 2px 6px rgba(18, 12, 38, .08);
  /* motion */
  --ease: cubic-bezier(.25, 1, .5, 1); --dur: 180ms; --dur-fast: 120ms;
  /* layers */
  --z-topbar: 200; --z-drawer-backdrop: 290; --z-drawer: 300; --z-popover: 400; --z-sidebar: 500; --z-toast: 600;
  --sidebar-w: 248px;
  --font: 'Montserrat', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color-scheme: light;
}

/* ------------------------------- base ------------------------------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 13.5px; line-height: 1.5; color: var(--text); background: var(--bg); min-height: 100vh; -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4 { margin: 0; font-weight: 700; letter-spacing: -0.01em; text-wrap: balance; }
h1 { font-size: 22px; } h2 { font-size: 16px; } h3 { font-size: 14px; }
p { margin: 0 0 10px; }
a { color: var(--indigo-ink); text-decoration: none; } a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--indigo-ink); outline-offset: 2px; }
.muted { color: var(--muted); } .small { font-size: 12.5px; } .strong { font-weight: 600; } .nowrap { white-space: nowrap; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }
.noscript { padding: 40px; text-align: center; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.icon { width: 18px; height: 18px; flex: none; }
.grow { flex: 1; min-width: 0; }
.dotted { display: inline-block; width: 9px; height: 9px; border-radius: 50%; flex: none; }

/* ------------------------------- shell ------------------------------ */
.shell { display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); min-height: 100vh; }
.sidebar { background: var(--indigo); color: #fff; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 18px 14px 16px; gap: 4px; }
.brand { display: flex; align-items: center; padding: 4px 8px 14px; }
.brand img { height: 34px; width: auto; display: block; }
.brand-sub { font-size: 11.5px; font-weight: 600; color: var(--lavender-2); margin: -8px 0 14px 8px; padding-bottom: 14px; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-section { font-size: 11.5px; font-weight: 600; color: var(--lavender-2); padding: 16px 12px 6px; }
.nav-item { display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 9px; color: var(--lavender); font-weight: 500; border: 0; background: none; width: 100%; text-align: left; transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease); }
.nav-item:hover { background: rgba(255, 255, 255, .07); color: #fff; text-decoration: none; }
.nav-item.active { background: rgba(255, 255, 255, .11); color: #fff; font-weight: 600; }
.nav-item.active .icon { color: var(--gold); }
.nav-item:focus-visible { outline-color: var(--gold); }
.sidebar-spacer { flex: 1; }
.sidebar-actions { display: grid; gap: 6px; padding: 0 2px 10px; }
.sidebar-foot { border-top: 1px solid rgba(255, 255, 255, .08); padding-top: 12px; display: flex; align-items: center; gap: 10px; }
.sidebar-foot .who { min-width: 0; flex: 1; }
.sidebar-foot .who .name { font-weight: 600; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-foot .who .role { font-size: 11.5px; color: var(--lavender-2); }
.sidebar .icon-btn { color: var(--lavender); } .sidebar .icon-btn:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.badge { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--gold); color: var(--indigo); font-size: 11px; font-weight: 700; }
#bell-btn { position: relative; } #bell-btn .badge { position: absolute; top: 2px; right: 0; }
.topbar { display: none; }
.main { min-width: 0; }
.page { padding: 26px 30px 60px; max-width: 1560px; margin: 0 auto; }
.page-header { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.page-header h1 { flex: none; }
.page-header .sub { color: var(--muted); font-size: 13px; margin-top: 2px; }
.page-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-left: auto; }

/* ------------------------------ controls ---------------------------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 36px; padding: 0 14px; border-radius: var(--radius-sm); border: 1px solid var(--border-2); background: var(--surface); color: var(--text); font-weight: 600; font-size: 13px; white-space: nowrap; position: relative;
  transition: background var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease), transform 80ms var(--ease); }
.btn:hover { background: var(--surface-2); border-color: #C4BFD8; text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--indigo); border-color: var(--indigo); color: #fff; } .btn-primary:hover { background: var(--indigo-2); border-color: var(--indigo-2); }
.btn-gold { background: var(--gold); border-color: var(--gold); color: var(--indigo); } .btn-gold:hover { background: #FFC733; border-color: #FFC733; }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; } .btn-danger:hover { background: #912018; border-color: #912018; }
.btn-danger-ghost { background: transparent; border-color: transparent; color: var(--danger); } .btn-danger-ghost:hover { background: var(--danger-bg); border-color: transparent; }
.btn-success { background: var(--success); border-color: var(--success); color: #fff; } .btn-success:hover { background: #05532F; border-color: #05532F; }
.btn-linklike { background: none; border: 0; padding: 0; height: auto; color: var(--indigo-ink); font-weight: 600; font-size: inherit; text-decoration: underline; text-underline-offset: 2px; }
.btn-linklike:hover { color: var(--indigo); }
.btn-ghost { background: transparent; border-color: transparent; } .btn-ghost:hover { background: rgba(27, 24, 48, .06); border-color: transparent; }
.btn-sm { height: 30px; padding: 0 10px; font-size: 12.5px; } .btn-sm .icon { width: 15px; height: 15px; }
.btn-block { width: 100%; }
.btn.loading { color: transparent; pointer-events: none; }
.btn.loading::after { content: ''; position: absolute; width: 16px; height: 16px; border: 2px solid rgba(26, 21, 60, .25); border-top-color: var(--indigo); border-radius: 50%; animation: spin .7s linear infinite; }
.btn-gold.loading::after { border-color: rgba(26, 21, 60, .25); border-top-color: var(--indigo); }
.btn-primary.loading::after, .btn-danger.loading::after { border-color: rgba(255, 255, 255, .35); border-top-color: #fff; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 8px; border: 0; background: transparent; color: var(--text-2); transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease); }
.icon-btn:hover { background: rgba(27, 24, 48, .07); color: var(--text); }
.icon-btn.sm { width: 28px; height: 28px; } .icon-btn.sm .icon { width: 15px; height: 15px; }
input[type=text], input[type=email], input[type=password], input[type=search], input[type=date], input[type=time], input[type=datetime-local], input[type=number], input[type=tel], select, textarea {
  height: 36px; padding: 0 11px; border-radius: var(--radius-sm); border: 1px solid var(--border-2); background: var(--surface); color: var(--text); width: 100%; min-width: 0; outline: none;
  transition: border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease); }
input::placeholder, textarea::placeholder { color: #7A7690; }
textarea { height: auto; min-height: 72px; padding: 9px 11px; resize: vertical; line-height: 1.45; }
select { appearance: none; -webkit-appearance: none; padding-right: 30px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234C4866' stroke-width='2' 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 9px center; background-size: 16px; }
input:hover:not(:disabled):not(:focus), select:hover:not(:disabled):not(:focus), textarea:hover:not(:disabled):not(:focus) { border-color: #C4BFD8; }
input:focus, select:focus, textarea:focus { border-color: var(--indigo-ink); box-shadow: 0 0 0 3px rgba(48, 36, 120, .14); outline: none; }
input:disabled, select:disabled, textarea:disabled { background: var(--surface-3); color: var(--muted); cursor: not-allowed; }
input[type=checkbox], input[type=radio] { width: 16px; height: 16px; accent-color: var(--indigo-ink); margin: 0; }
input[type=range] { height: 24px; padding: 0; border: 0; accent-color: var(--indigo-ink); background: transparent; }
.field { display: grid; gap: 5px; margin-bottom: 12px; }
.field > label { font-size: 12.5px; font-weight: 600; color: var(--text-2); }
.field .hint, .hint { font-size: 12px; color: var(--muted); }
.hint.warn { color: var(--danger); font-weight: 600; }
.field-inline { grid-template-columns: auto 1fr; align-items: center; gap: 10px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.check { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; cursor: pointer; }
.form-error { color: var(--danger); background: var(--danger-bg); border: 1px solid var(--danger-line); border-radius: var(--radius-sm); padding: 9px 12px; font-size: 13px; margin-bottom: 12px; }
.form-warn { color: var(--warn); background: var(--warn-bg); border: 1px solid var(--warn-line); border-radius: var(--radius-sm); padding: 9px 12px; font-size: 13px; margin-bottom: 12px; }
.search-box, .input-icon { position: relative; }
.search-box .icon, .input-icon .icon { position: absolute; left: 10px; top: 9px; color: var(--muted); width: 17px; height: 17px; }
.search-box input, .input-icon input { padding-left: 34px; }
.segmented { display: inline-flex; background: var(--surface-3); border-radius: 9px; padding: 3px; gap: 2px; }
.segmented button { border: 0; background: transparent; padding: 0 12px; height: 30px; border-radius: 7px; font-weight: 600; font-size: 13px; color: var(--text-2); display: inline-flex; align-items: center; gap: 6px; transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease); }
.segmented button:hover { color: var(--text); }
.segmented button.active { background: var(--surface); color: var(--indigo); box-shadow: var(--shadow-1); }
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar .search-box { width: 280px; max-width: 100%; }
.toolbar select { width: auto; }

/* -------------------------------- tags ------------------------------ */
.tag { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: var(--radius-xs); font-size: 11.5px; font-weight: 600; white-space: nowrap; background: var(--surface-3); color: var(--text-2); }
.tag-role { background: var(--indigo-soft); color: var(--indigo-ink); }
/* Role is the one place a tag deliberately earns colour outside the brand accent: it flags privilege,
   not a category, so a CEO or Administrator is spottable at a glance in a long list. */
.role-admin { background: var(--gold-tint); color: #93370D; } .role-ceo { background: var(--indigo); color: #fff; }
/* Priority: only "urgent" is a true alert and gets colour. High/medium/low are the same neutral chip,
   told apart by weight, the way Apple Reminders uses a mark rather than a colour wheel per priority. */
.prio-urgent { background: var(--danger-bg); color: var(--danger); }
.prio-high { background: var(--surface-3); color: var(--text); font-weight: 700; }
.prio-medium { background: var(--surface-3); color: var(--text-2); }
.prio-low { background: var(--surface-3); color: var(--muted); font-weight: 500; }
/* Status: neutral by default; colour appears only where it signals something actionable — blocked
   (needs attention) and done (finished) — plus one brand-toned state for "in motion right now". */
.status-todo { background: var(--surface-3); color: var(--text-2); }
.status-in_progress { background: var(--indigo-soft); color: var(--indigo-ink); }
.status-blocked { background: var(--warn-bg); color: var(--warn); }
.status-done { background: var(--success-bg); color: var(--success); }
.status-cancelled { background: var(--surface-3); color: var(--faint); text-decoration: line-through; }
/* Category never carries its own colour: colour on this calendar always means "person", and a second
   colour-coded axis on the same chip would fight the first. Every category renders as the same
   quiet neutral tag — .tag's default styling already gives us this, so no cat-* overrides remain. */

/* ------------------------------- avatar ----------------------------- */
.avatar { display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; color: #fff; font-weight: 700; flex: none; letter-spacing: .02em; }
.avatar-xs { width: 22px; height: 22px; font-size: 9.5px; } .avatar-sm { width: 28px; height: 28px; font-size: 11px; } .avatar-md { width: 36px; height: 36px; font-size: 13px; } .avatar-lg { width: 52px; height: 52px; font-size: 18px; } .avatar-xl { width: 72px; height: 72px; font-size: 24px; }
.person { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.person .pname { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.person .prole { font-size: 11.5px; color: var(--muted); }

/* -------------------------------- cards ----------------------------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); min-width: 0; }
.stack { display: grid; gap: 18px; } .stack > * { min-width: 0; }
.card-pad { padding: 18px 20px; }
.card-head { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; padding: 13px 18px; border-bottom: 1px solid var(--border); }
.card-head h2 { font-size: 15px; flex: 1 1 auto; white-space: nowrap; } .card-head .grow { flex: 0 0 0; }
.card-head > .icon { color: var(--muted); }
.card-body { padding: 14px 18px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; } .grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.grid-2 > *, .grid-3 > *, .dash-grid > *, .two-col > *, .day-layout > * { min-width: 0; }
/* summary strip: one container, hairline-separated metrics (label above value) */
.stats { display: flex; flex-wrap: wrap; gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; margin-bottom: 18px; }
.stat { flex: 1 1 150px; min-width: 132px; padding: 11px 16px 12px; background: var(--surface); display: flex; flex-direction: column-reverse; gap: 1px; transition: background var(--dur-fast) var(--ease); }
.stat.clickable { cursor: pointer; } .stat.clickable:hover { background: var(--surface-2); }
.stat .n { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; font-variant-numeric: tabular-nums; }
.stat .l { font-size: 12px; color: var(--muted); font-weight: 600; }
.stat.danger .n { color: var(--danger); } .stat.warn .n { color: var(--warn); } .stat.ok .n { color: var(--success); } .stat.indigo .n { color: var(--indigo-ink); }
.list { display: flex; flex-direction: column; }
.list-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); min-width: 0; }
.list-row:last-child { border-bottom: 0; }
.list-row .title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-row .meta { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-row.clickable { cursor: pointer; margin: 0 -8px; padding-left: 8px; padding-right: 8px; border-radius: 8px; transition: background var(--dur-fast) var(--ease); }
.list-row.clickable:hover { background: var(--surface-2); }
.empty { text-align: center; padding: 36px 20px; color: var(--muted); }
.empty .icon { width: 34px; height: 34px; color: var(--faint); margin-bottom: 8px; }
.empty h3 { color: var(--text-2); margin-bottom: 4px; } .empty p { font-size: 13px; margin-bottom: 14px; max-width: 46ch; margin-left: auto; margin-right: auto; }
.spinner { width: 22px; height: 22px; border: 2px solid var(--border-2); border-top-color: var(--indigo-ink); border-radius: 50%; animation: spin .7s linear infinite; margin: 24px auto; }
@keyframes spin { to { transform: rotate(360deg); } }
.skeleton { padding: 6px 0; display: grid; gap: 14px; }
.sk-line, .sk-dot { display: block; background: linear-gradient(90deg, #ECEAF3 0%, #F6F4FA 50%, #ECEAF3 100%); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; }
.sk-line { height: 12px; border-radius: 6px; } .sk-h { width: 32%; height: 16px; }
.sk-row { display: flex; align-items: center; gap: 10px; } .sk-dot { width: 26px; height: 26px; border-radius: 50%; flex: none; }
@keyframes shimmer { to { background-position: -200% 0; } }
.progress { height: 6px; background: var(--surface-3); border-radius: 3px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--indigo-ink); border-radius: 3px; transition: width var(--dur) var(--ease); }
.progress.done .progress-fill { background: var(--success); }

/* -------------------------------- table ----------------------------- */
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
table.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 600; padding: 10px 14px; border-bottom: 1px solid var(--border); background: var(--surface-2); white-space: nowrap; }
.table td { padding: 10px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tr.clickable { cursor: pointer; } .table tr.clickable:hover td { background: var(--surface-2); }
.table td.actions { white-space: nowrap; text-align: right; }
.table td.task-cell { min-width: 220px; }
.table td.due-cell { white-space: nowrap; }
.table .dim td { opacity: .6; }
.pager { display: flex; align-items: center; gap: 10px; justify-content: flex-end; padding: 12px 0; font-size: 13px; color: var(--muted); }

/* ------------------------------- dialogs ---------------------------- */
.dialog { border: 0; border-radius: 16px; padding: 0; background: var(--surface); color: var(--text); box-shadow: var(--shadow-float); width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 40px); }
.dialog-sm { width: min(420px, calc(100vw - 32px)); } .dialog-lg { width: min(760px, calc(100vw - 32px)); }
.dialog[open] { animation: dlg-in 200ms var(--ease); }
.dialog::backdrop { background: rgba(18, 12, 38, .5); animation: fade-in 200ms var(--ease); }
@keyframes dlg-in { from { opacity: 0; transform: translateY(6px) scale(.985); } }
@keyframes fade-in { from { opacity: 0; } }
.dialog-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px 0; }
.dialog-title { font-size: 17px; }
.dialog-body { padding: 14px 22px 22px; overflow: auto; max-height: calc(100vh - 120px); }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }
.dialog-actions .left { margin-right: auto; }
.popover { position: fixed; z-index: var(--z-popover); background: var(--surface); border-radius: 14px; box-shadow: var(--shadow-float); padding: 14px 16px; opacity: 0; transform: translateY(-4px); transition: opacity 140ms var(--ease), transform 140ms var(--ease); }
.popover.show { opacity: 1; transform: none; }
.pop-title { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 15px; margin: 8px 0 4px; }
.pop-row { display: flex; align-items: flex-start; gap: 9px; font-size: 13px; color: var(--text-2); margin: 6px 0; }
.pop-row .icon { width: 16px; height: 16px; margin-top: 2px; color: var(--muted); }
.pop-actions { display: flex; gap: 6px; margin-top: 12px; justify-content: flex-end; flex-wrap: wrap; }
.respond-actions { justify-content: flex-start; padding-top: 10px; margin-top: 10px; border-top: 1px solid var(--border); }
.tentative-note { color: var(--warn); font-weight: 600; }
.tentative-note .icon { color: var(--warn); }
.my-response { align-items: center; padding-top: 10px; margin-top: 4px; border-top: 1px solid var(--border); }
.my-response .icon { color: var(--muted); }
/* Guest list shown in the popover — every invited person and how they answered. */
.pop-attendees { display: flex; flex-direction: column; gap: 5px; margin: 2px 0 4px; }
.att-row { display: flex; align-items: center; gap: 8px; font-size: 12.5px; min-width: 0; }
.att-row .nm { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.att-reason { color: var(--muted); font-style: italic; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 140px; flex: none; }
.att-badge { flex: none; height: 20px; padding: 0 8px; border-radius: 10px; font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; background: var(--surface-3); color: var(--text-2); }
.att-badge.att-accepted { background: var(--success-bg); color: var(--success); }
.att-badge.att-declined { background: var(--danger-bg); color: var(--danger); }
.pop-list { max-height: 320px; overflow: auto; }
.toasts { position: fixed; right: 18px; bottom: 18px; display: flex; flex-direction: column; gap: 8px; z-index: var(--z-toast); pointer-events: none; }
.toast { display: flex; align-items: center; gap: 9px; background: var(--indigo); color: #fff; padding: 11px 14px; border-radius: 10px; box-shadow: var(--shadow-float); font-size: 13px; font-weight: 500; opacity: 0; transform: translateY(8px); transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease); max-width: 380px; pointer-events: auto; }
.toast.show { opacity: 1; transform: none; }
.toast-success .icon { color: #6CE9A6; } .toast-error { background: var(--danger); } .toast-info .icon { color: var(--gold); }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(560px, 100vw); background: var(--surface); box-shadow: var(--shadow-float); z-index: var(--z-drawer); display: flex; flex-direction: column; transform: translateX(100%); transition: transform 220ms var(--ease); }
.drawer.show { transform: none; }
.drawer-backdrop { position: fixed; inset: 0; background: rgba(18, 12, 38, .25); z-index: var(--z-drawer-backdrop); animation: fade-in 200ms var(--ease); }
.drawer-head { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.drawer-body { flex: 1; overflow: auto; padding: 18px 22px 30px; }
.drawer-title { width: 100%; border: 1px solid transparent; font-size: 19px; font-weight: 700; padding: 6px 8px; margin: -6px -8px 10px; border-radius: 8px; height: auto; background: transparent; letter-spacing: -0.01em; }
.drawer-title:hover:not(:read-only) { border-color: var(--border); } .drawer-title:focus { background: var(--surface); }
.drawer-title:read-only { pointer-events: none; }
.meta-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; margin: 12px 0 18px; }
.meta-grid .field { margin: 0; }
.section-h { font-size: 13px; font-weight: 700; color: var(--text-2); margin: 20px 0 8px; display: flex; align-items: center; gap: 8px; }
.section-h .grow { flex: 1; }
.checklist { display: flex; flex-direction: column; gap: 2px; }
.check-item { display: flex; align-items: center; gap: 10px; padding: 6px 6px; border-radius: 8px; transition: background var(--dur-fast) var(--ease); }
.check-item:hover { background: var(--surface-2); }
.check-item input[type=text] { border-color: transparent; background: transparent; height: 30px; padding: 0 6px; }
.check-item input[type=text]:hover { border-color: var(--border); }
.check-item.done input[type=text] { text-decoration: line-through; color: var(--muted); }
.check-item .icon-btn { opacity: 0; } .check-item:hover .icon-btn, .check-item .icon-btn:focus-visible { opacity: 1; }
.comment { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.comment:last-child { border: 0; }
.comment .body { white-space: pre-wrap; word-break: break-word; margin-top: 2px; }
.comment .meta { font-size: 12px; color: var(--muted); display: flex; gap: 8px; align-items: center; }
.composer { display: flex; gap: 8px; align-items: flex-start; margin-top: 10px; }
.composer textarea { min-height: 40px; height: 40px; }
.history { display: flex; flex-direction: column; gap: 8px; }
.history-row { font-size: 12.5px; color: var(--text-2); display: flex; gap: 8px; align-items: baseline; }
.history-row .t { color: var(--muted); white-space: nowrap; font-size: 11.5px; }
.diff { width: 100%; border-collapse: collapse; font-size: 12.5px; margin-top: 8px; }
.diff th { text-align: left; color: var(--muted); font-weight: 600; padding: 4px 8px; font-size: 12px; }
.diff td { padding: 5px 8px; border-top: 1px solid var(--border); vertical-align: top; word-break: break-word; }
.diff td.before { color: var(--danger); } .diff td.after { color: var(--success); }
.kbd { font-family: inherit; font-size: 11px; border: 1px solid var(--border-2); border-bottom-width: 2px; border-radius: 5px; padding: 1px 5px; color: var(--muted); }

/* --------------------------- schedule dialog ------------------------ */
.event-form .form-section { padding: 14px 0; border-top: 1px solid var(--border); }
.event-form .form-section:first-of-type { border-top: 0; padding-top: 2px; }
.event-form .form-section > h3 { font-size: 12.5px; font-weight: 700; color: var(--text-2); margin-bottom: 10px; }
.event-form .field:last-child { margin-bottom: 0; }
.seg-radio { display: flex; flex-wrap: wrap; gap: 3px; background: var(--surface-3); padding: 4px; border-radius: 10px; }
.seg-radio button { flex: 1 1 auto; height: 32px; padding: 0 12px; border: 0; background: transparent; border-radius: 7px; font-weight: 600; font-size: 13px; color: var(--text-2); transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease); }
.seg-radio button:hover { color: var(--text); }
.seg-radio button.on { background: var(--surface); color: var(--indigo); box-shadow: var(--shadow-1); }
.chip-radio { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-radio button { height: 30px; padding: 0 12px; border-radius: 15px; border: 1px solid var(--border-2); background: var(--surface); font-weight: 600; font-size: 12.5px; color: var(--text-2); transition: background var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease); }
.chip-radio button:hover { border-color: #C4BFD8; color: var(--text); }
.chip-radio button.on { background: var(--indigo); border-color: var(--indigo); color: #fff; }
.switch-row { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 12px; cursor: pointer; font-weight: 600; font-size: 13px; }
.switch { position: relative; width: 38px; height: 22px; display: inline-block; flex: none; }
.switch input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; margin: 0; cursor: pointer; }
.switch .knob { position: absolute; inset: 0; background: var(--border-2); border-radius: 11px; transition: background var(--dur-fast) var(--ease); pointer-events: none; }
.switch .knob::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .25); transition: transform var(--dur-fast) var(--ease); }
.switch input:checked + .knob { background: var(--indigo-ink); }
.switch input:checked + .knob::after { transform: translateX(16px); }
.switch input:focus-visible + .knob { outline: 2px solid var(--indigo-ink); outline-offset: 2px; }
.when-grid { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items: end; }
.when-col label { display: block; font-size: 12.5px; font-weight: 600; color: var(--text-2); margin-bottom: 5px; }
.dt-row { display: grid; grid-template-columns: minmax(0, 1fr) 120px; gap: 6px; }
.when-grid.all-day .dt-row { grid-template-columns: 1fr; }
.when-arrow { color: var(--faint); padding-bottom: 9px; }
.event-form .when-grid + .hint { margin-top: 6px; }
.rr-panel { margin-top: 12px; padding: 12px 14px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; display: grid; gap: 10px; }
.rr-line { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 13px; }
.rr-line > span:first-child { width: 42px; color: var(--muted); font-weight: 600; flex: none; }
.rr-line .interval { width: 72px; }
.rr-line .unit { color: var(--text-2); }
.day-pills { display: flex; gap: 4px; flex-wrap: wrap; }
.day-pills button { width: 38px; height: 32px; border-radius: 8px; border: 1px solid var(--border-2); background: var(--surface); font-weight: 700; font-size: 12px; color: var(--text-2); transition: background var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease); }
.day-pills button:hover { border-color: #C4BFD8; }
.day-pills button.on { background: var(--indigo); border-color: var(--indigo); color: #fff; }
.rr-ends input[type=date] { width: 160px; }
.rr-ends .check { font-size: 13px; }
.rr-summary { margin: 0; font-size: 12.5px; color: var(--indigo-ink); font-weight: 600; }
/* Invite picker: chips of who's invited, a search box beneath, and a floating suggestion list. */
.invite-picker { position: relative; }
.invite-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.invite-chip { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 6px 0 4px; border-radius: 15px; background: var(--surface-3); font-size: 12.5px; font-weight: 600; color: var(--text); }
.invite-chip .nm { max-width: 140px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.invite-chip button { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; border: 0; background: rgba(27, 24, 48, .08); border-radius: 50%; color: var(--text-2); flex: none; }
.invite-chip button:hover { background: rgba(27, 24, 48, .16); color: var(--text); }
.invite-chip button .icon { width: 11px; height: 11px; }
.invite-suggest { position: absolute; z-index: 5; top: 100%; left: 0; right: 0; margin-top: 4px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow-float); padding: 4px; max-height: 220px; overflow: auto; }
.invite-suggest-item { display: flex; align-items: center; gap: 8px; width: 100%; padding: 7px 8px; border: 0; background: none; border-radius: 7px; text-align: left; font-size: 13px; }
.invite-suggest-item:hover { background: var(--surface-2); }

/* -------------------------------- login ----------------------------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.auth-side { background: radial-gradient(1200px 600px at 20% 0%, #2B2160 0%, var(--indigo) 45%, var(--midnight) 100%); color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; }
.auth-side img { height: 44px; width: auto; }
.auth-side h1 { font-size: 32px; line-height: 1.15; font-weight: 700; max-width: 520px; margin-top: 34px; letter-spacing: -0.02em; }
.auth-side h1 em { font-style: normal; color: var(--gold); }
.auth-side p { color: var(--lavender); max-width: 460px; font-size: 15px; margin-top: 14px; line-height: 1.55; }
.auth-points { list-style: none; padding: 0; margin: 30px 0 0; display: grid; gap: 14px; max-width: 480px; }
.auth-points li { display: flex; gap: 12px; align-items: flex-start; color: var(--lavender); font-size: 13.5px; line-height: 1.5; }
.auth-points .icon { color: var(--gold); flex: none; margin-top: 2px; }
.auth-points b { color: #fff; font-weight: 600; }
.auth-side .foot { font-size: 12px; color: var(--lavender-2); font-weight: 600; }
.auth-form { display: flex; align-items: center; justify-content: center; padding: 40px 24px; background: var(--bg); }
.auth-card { width: min(420px, 100%); }
.auth-card h2 { font-size: 24px; letter-spacing: -0.02em; margin-bottom: 6px; }
.auth-card .lede { color: var(--muted); margin-bottom: 22px; }
.auth-card .btn { height: 42px; font-size: 14px; }
.auth-card input { height: 42px; }

/* ------------------------------ dashboard --------------------------- */
.greeting h1 { font-size: 26px; letter-spacing: -0.02em; }
.now-chip { display: inline-flex; align-items: center; gap: 7px; background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: 3px 12px 3px 8px; font-size: 12.5px; font-weight: 600; color: var(--text-2); vertical-align: middle; }
.now-chip .dotted { background: var(--success); box-shadow: 0 0 0 3px rgba(6, 118, 71, .15); width: 8px; height: 8px; }
.dash-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 18px; }
.ev-row { display: flex; gap: 12px; padding: 10px 8px; margin: 0 -8px; border-bottom: 1px solid var(--border); align-items: flex-start; border-radius: 8px; transition: background var(--dur-fast) var(--ease); }
.ev-row:last-child { border: 0; }
.ev-row:hover { background: var(--surface-2); }
.ev-row .time { width: 84px; flex: none; font-size: 12.5px; color: var(--text-2); font-weight: 600; padding-top: 2px; font-variant-numeric: tabular-nums; }
.ev-row .bar { width: 8px; height: 8px; border-radius: 50%; align-self: flex-start; margin-top: 7px; flex: none; }
.ev-row .what { min-width: 0; flex: 1; } .ev-row .what .t { font-weight: 600; } .ev-row .what .w { font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 5px; margin-top: 2px; }
.ev-row .what .w .icon { width: 13px; height: 13px; }

/* ------------------------------ calendar ---------------------------- */
.cal-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.cal-head h1 { font-size: 21px; min-width: 240px; }
.cal-nav { display: inline-flex; align-items: center; gap: 2px; }
.cal-head .jump { display: inline-flex; gap: 6px; align-items: center; }
.cal-head .jump input[type=date] { width: 150px; } .cal-head .jump input[type=number] { width: 84px; }
.cal-filters { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.cal-filters .search-box { width: 300px; max-width: 100%; }
.cal-filters select { width: auto; }
.legend { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px 0 8px; border-radius: 14px; border: 1px solid var(--border-2); background: var(--surface); font-size: 12.5px; font-weight: 600; color: var(--text-2); transition: border-color var(--dur-fast) var(--ease); }
.chip:hover { border-color: #C4BFD8; }
.chip.on { border-color: transparent; color: #fff; }
.chip .icon { width: 14px; height: 14px; }
.chip button { border: 0; background: none; padding: 0; display: inline-flex; color: inherit; opacity: .8; font: inherit; } .chip button:hover { opacity: 1; }
.people-menu { max-height: 340px; overflow: auto; margin: 0 -6px; }
.people-menu label { display: flex; align-items: center; gap: 9px; padding: 7px 8px; border-radius: 8px; cursor: pointer; }
.people-menu label:hover { background: var(--surface-2); }
.people-menu .quick { display: flex; gap: 6px; padding: 4px 6px 8px; border-bottom: 1px solid var(--border); margin-bottom: 6px; }
.cal-body { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; transition: opacity var(--dur) var(--ease); }
.cal-body > .skeleton { padding: 18px; }
.dow-row { display: grid; grid-template-columns: repeat(7, 1fr); border-bottom: 1px solid var(--border); background: var(--surface-2); }
.dow-row div { padding: 8px 10px; font-size: 12px; color: var(--muted); font-weight: 600; }
.dow-row div.weekend { color: var(--faint); }
.month-grid { display: grid; grid-template-columns: repeat(7, 1fr); grid-auto-rows: minmax(116px, auto); }
.mcell { border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 6px 6px 4px; min-width: 0; position: relative; cursor: pointer; transition: background var(--dur-fast) var(--ease); }
.mcell:nth-child(7n) { border-right: 0; } .month-grid .mcell:nth-last-child(-n+7) { border-bottom: 0; }
.mcell:hover { background: var(--surface-2); }
.mcell.other { background: #FAFAFC; } .mcell.other .dnum { color: var(--faint); }
.mcell.weekend { background: #FBFBFD; }
.mcell .dnum { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 50%; font-weight: 600; font-size: 13px; color: var(--text-2); margin-bottom: 3px; }
.mcell.today .dnum { background: var(--indigo); color: #fff; box-shadow: 0 0 0 2px var(--gold); }
.mcell .chips { display: flex; flex-direction: column; gap: 2px; }
.evchip { display: flex; align-items: center; gap: 5px; width: 100%; height: 22px; padding: 0 7px 0 6px; border: 0; border-radius: var(--radius-xs); font: inherit; font-size: 11.5px; font-weight: 600; color: var(--text); text-align: left; white-space: nowrap; overflow: hidden; cursor: pointer; line-height: 22px; transition: filter var(--dur-fast) var(--ease); }
.evchip:hover { filter: brightness(.96); }
.evchip .dotted { width: 7px; height: 7px; }
.evchip .tm { color: var(--text-2); font-weight: 500; flex: none; font-size: 11px; }
.evchip .who { flex: none; font-weight: 700; }
.evchip .ttl { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.evchip.allday { color: #fff; }
.evchip.allday .tm, .evchip.allday .who { color: rgba(255, 255, 255, .9); }
/* Not yet accepted: an outlined, dashed chip instead of a filled one, and a small clock — so an
   unconfirmed invite reads as provisional without adding a new colour to the palette. */
/* background is set inline by JS (var(--surface)) since it would otherwise win over this class anyway */
.evchip.tentative { border: 1.5px dashed var(--border-2); padding: 0 6px 0 5px; }
.evchip.tentative .ttl, .evchip.tentative .who { color: var(--text-2); font-style: italic; }
.tentative-icon { width: 11px; height: 11px; color: var(--warn); flex: none; margin-left: 1px; }
.more { font-size: 11.5px; color: var(--indigo-ink); font-weight: 600; padding: 1px 6px; cursor: pointer; border-radius: 5px; }
.more:hover { background: var(--indigo-soft); }
/* week / day */
.wk-head { display: grid; grid-template-columns: 58px repeat(var(--cols, 7), 1fr); border-bottom: 1px solid var(--border); background: var(--surface-2); }
.wk-head .dh { padding: 8px 6px 6px; text-align: center; border-left: 1px solid var(--border); cursor: pointer; }
.wk-head .dh .n { font-size: 11.5px; color: var(--muted); font-weight: 600; }
.wk-head .dh .d { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 50%; font-weight: 700; font-size: 15px; margin-top: 2px; }
.wk-head .dh.today .d { background: var(--indigo); color: #fff; box-shadow: 0 0 0 2px var(--gold); }
.allday-row { display: grid; grid-template-columns: 58px repeat(var(--cols, 7), 1fr); border-bottom: 1px solid var(--border); min-height: 30px; }
.allday-row .lbl { font-size: 10.5px; color: var(--muted); padding: 6px 6px; text-align: right; }
.allday-row .adc { border-left: 1px solid var(--border); padding: 3px 3px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tgrid { position: relative; display: grid; grid-template-columns: 58px repeat(var(--cols, 7), 1fr); height: 1440px; }
.tgrid-scroll { max-height: calc(100vh - 330px); min-height: 420px; overflow: auto; position: relative; }
.gutter { position: relative; }
.gutter .hr { position: absolute; left: 0; right: 6px; text-align: right; font-size: 10.5px; color: var(--muted); transform: translateY(-7px); }
.dcol { position: relative; border-left: 1px solid var(--border); cursor: crosshair; min-width: 0; }
.dcol.today { background: #FFFDF6; } .dcol.weekend { background: #FBFBFD; }
.hline { position: absolute; left: 0; right: 0; border-top: 1px solid var(--border); pointer-events: none; }
.hline.half { border-top-style: dashed; opacity: .55; }
.evblk { position: absolute; border-radius: var(--radius-xs); padding: 3px 7px; font-size: 11.5px; overflow: hidden; cursor: pointer; line-height: 1.3; min-height: 18px; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--pc, var(--indigo-ink)) 45%, transparent); transition: filter var(--dur-fast) var(--ease); }
.evblk:hover { filter: brightness(.97); }
.evblk .tt { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.evblk .tt .dotted { width: 7px; height: 7px; vertical-align: 1px; margin-right: 5px; }
.evblk .ww { color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.evblk .tm { color: var(--text-2); font-size: 10.5px; }
.evblk.tentative { box-shadow: none; border: 1.5px dashed var(--border-2); }
.evblk.tentative .tt, .evblk.tentative .ww { font-style: italic; }
.nowline { position: absolute; left: 0; right: 0; border-top: 2px solid var(--danger); z-index: 6; pointer-events: none; }
.nowline::before { content: ''; position: absolute; left: -5px; top: -5px; width: 8px; height: 8px; border-radius: 50%; background: var(--danger); }
.day-side { border-left: 1px solid var(--border); padding: 12px 14px; }
.day-layout { display: grid; grid-template-columns: 1fr 320px; }
/* year */
.year-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; padding: 16px; }
.mini h3 { font-size: 13px; margin-bottom: 6px; cursor: pointer; color: var(--indigo-ink); }
.mini .mg { display: grid; grid-template-columns: repeat(7, 1fr); gap: 1px; }
.mini .mg .dw { font-size: 9.5px; color: var(--faint); text-align: center; font-weight: 600; }
.mini .md { position: relative; height: 30px; display: flex; align-items: flex-start; justify-content: center; padding-top: 3px; font-size: 11px; border-radius: 6px; cursor: pointer; color: var(--text-2); transition: background var(--dur-fast) var(--ease); }
.mini .md:hover { background: var(--surface-2); }
.mini .md.other { color: transparent; pointer-events: none; }
.mini .md.today { font-weight: 800; color: var(--indigo); }
.mini .md.today::before { content: ''; position: absolute; inset: 1px 4px auto 4px; height: 20px; border-radius: 6px; border: 2px solid var(--gold); }
.mini .dots { position: absolute; bottom: 3px; left: 0; right: 0; display: flex; justify-content: center; gap: 2px; }
.mini .dots i { width: 5px; height: 5px; border-radius: 50%; display: block; }
.mini .dots .cnt { font-size: 8.5px; color: var(--muted); line-height: 5px; }
/* agenda */
.agenda { padding: 4px 0; }
.agenda-day { display: grid; grid-template-columns: 150px 1fr; border-bottom: 1px solid var(--border); }
.agenda-day:last-child { border: 0; }
.agenda-day .dl { padding: 14px 16px; font-weight: 700; color: var(--text-2); }
.agenda-day .dl.today { color: var(--indigo); } .agenda-day .dl small { display: block; font-weight: 500; color: var(--muted); font-size: 12px; }
.agenda-day .items { padding: 6px 12px 6px 0; }
.agenda-item { display: grid; grid-template-columns: 130px 1fr; gap: 10px; padding: 8px 8px; border-radius: 8px; cursor: pointer; align-items: start; transition: background var(--dur-fast) var(--ease); }
.agenda-item:hover { background: var(--surface-2); }
.agenda-item .tm { font-size: 12.5px; font-weight: 600; color: var(--text-2); padding-top: 3px; font-variant-numeric: tabular-nums; }
.agenda-item .ttl { font-weight: 600; } .agenda-item .sub { font-size: 12.5px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; margin-top: 2px; }
.agenda-item .sub .icon { width: 13px; height: 13px; }

/* ------------------------------- people ----------------------------- */
.people-grid { display: flex; flex-direction: column; gap: 8px; margin-bottom: 8px; }
.pcard { display: grid; grid-template-columns: minmax(220px, 300px) minmax(0, 1fr) minmax(200px, 320px); gap: 16px; align-items: center; padding: 12px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); cursor: pointer; transition: border-color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease); }
.pcard:hover { border-color: var(--border-2); background: var(--surface-2); }
.pcard .top { display: flex; gap: 12px; align-items: center; min-width: 0; }
.pcard .top .nm { font-weight: 700; font-size: 14px; } .pcard .top .ds { font-size: 12.5px; color: var(--muted); }
.status-line { display: flex; gap: 9px; align-items: flex-start; font-size: 13px; padding: 8px 11px; border-radius: 9px; background: var(--surface-3); }
.status-line .dotted { margin-top: 5px; }
.status-line.busy { background: var(--success-bg); } .status-line.busy .dotted { background: var(--success); }
.status-line.free .dotted { background: var(--faint); } .status-line.free { color: var(--muted); }
.status-line.leave { background: var(--danger-bg); } .status-line.leave .dotted { background: var(--danger); }
.status-line .k { font-weight: 700; } .status-line .v { color: var(--text-2); }
.status-line .v .sub { display: block; font-size: 12px; color: var(--muted); }
.next-line { font-size: 12.5px; color: var(--muted); display: flex; gap: 6px; align-items: center; min-width: 0; }
.next-line .icon { width: 14px; height: 14px; flex: none; }
.profile-head { display: flex; gap: 18px; align-items: center; margin-bottom: 18px; }
.profile-head .nm { font-size: 24px; font-weight: 700; letter-spacing: -0.02em; }
.profile-head .facts { display: flex; flex-wrap: wrap; gap: 6px 16px; color: var(--text-2); font-size: 13px; margin-top: 4px; }
.profile-head .facts span { display: inline-flex; gap: 5px; align-items: center; } .profile-head .facts .icon { width: 14px; height: 14px; color: var(--muted); }
.two-col { display: grid; grid-template-columns: 1fr 340px; gap: 18px; align-items: start; }

/* -------------------------------- tasks ----------------------------- */
.kanban { display: grid; grid-template-columns: repeat(4, minmax(240px, 1fr)); gap: 14px; align-items: start; overflow-x: auto; padding-bottom: 8px; }
.kcol { background: var(--surface-3); border-radius: var(--radius); padding: 10px; min-height: 200px; transition: background var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease); }
.kcol.over { background: var(--indigo-soft); box-shadow: inset 0 0 0 2px var(--lavender-2); }
.kcol-head { display: flex; align-items: center; gap: 8px; padding: 4px 6px 10px; font-weight: 700; font-size: 13px; }
.kcol-head .cnt { margin-left: auto; color: var(--muted); font-weight: 600; font-size: 12px; }
.kcol-head .dotted { width: 10px; height: 10px; }
.kcards { display: flex; flex-direction: column; gap: 8px; min-height: 40px; }
.tcard { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 11px 12px; cursor: pointer; display: flex; flex-direction: column; gap: 7px; transition: border-color var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease); }
.tcard:hover { border-color: var(--border-2); transform: translateY(-1px); }
.tcard.dragging { opacity: .5; }
.tcard .row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.tcard .ttl { font-weight: 600; line-height: 1.35; }
.tcard .due { font-size: 12px; color: var(--muted); display: inline-flex; align-items: center; gap: 4px; }
.tcard .due .icon { width: 13px; height: 13px; }
.tcard .due.overdue { color: var(--danger); font-weight: 600; } .tcard .due.today { color: var(--warn); font-weight: 600; }
.tcard .foot { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.tcard .foot .grow { flex: 1; }
.tcard .assigned { font-size: 11.5px; color: var(--indigo-ink); font-weight: 600; display: inline-flex; align-items: center; gap: 4px; }
.tcard .assigned .icon { width: 13px; height: 13px; }
.due-cell.overdue { color: var(--danger); font-weight: 600; } .due-cell.today { color: var(--warn); font-weight: 600; }
.inline-select { height: 28px; padding: 0 26px 0 8px; font-size: 12.5px; width: auto; background-position: right 6px center; }
.person-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; margin-bottom: 18px; }
.pc { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; cursor: pointer; transition: border-color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease); }
.pc:hover { border-color: var(--border-2); background: var(--surface-2); }
.pc.on { border-color: var(--indigo-ink); box-shadow: inset 0 0 0 1px var(--indigo-ink); }
.pc .top { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.pc .nums { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; text-align: center; }
.pc .nums .n { font-weight: 700; font-size: 16px; font-variant-numeric: tabular-nums; } .pc .nums .l { font-size: 11px; color: var(--muted); font-weight: 600; }
.pc .nums .danger .n { color: var(--danger); } .pc .nums .ok .n { color: var(--success); }

/* ------------------------------- activity --------------------------- */
.act-row td { cursor: pointer; }
.act-row .sum { font-weight: 500; overflow-wrap: anywhere; min-width: 200px; }
.act-row .when-cell { min-width: 120px; font-variant-numeric: tabular-nums; }
.act-detail td { background: var(--surface-2); padding: 12px 18px 16px; }
.act-detail .kv { display: flex; gap: 18px; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.action-tag { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; background: var(--surface-3); color: var(--text-2); padding: 2px 6px; border-radius: 5px; }
.action-tag.at-del { background: var(--danger-bg); color: var(--danger); } .action-tag.at-create { background: var(--success-bg); color: var(--success); }

/* -------------------------------- users ----------------------------- */
.temp-pass { display: flex; align-items: center; gap: 10px; background: var(--gold-tint); border: 1px solid var(--warn-line); border-radius: 10px; padding: 12px 14px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 18px; letter-spacing: .06em; font-weight: 600; color: var(--indigo); }
.notif-list { max-height: 420px; overflow: auto; margin: 0 -6px; }
.notif { display: flex; gap: 10px; padding: 9px 8px; border-radius: 8px; cursor: pointer; align-items: flex-start; transition: background var(--dur-fast) var(--ease); }
.notif:hover { background: var(--surface-2); }
.notif.unread { background: var(--indigo-soft); } .notif.unread:hover { background: #E6E1F7; }
.notif .txt { font-size: 13px; } .notif .txt b { font-weight: 700; } .notif .when { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.notif .dotted { margin-top: 6px; background: var(--indigo-ink); }
.menu { display: flex; flex-direction: column; margin: -6px -8px; }
.menu button { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border: 0; background: none; text-align: left; font-weight: 500; border-radius: 8px; color: var(--text); transition: background var(--dur-fast) var(--ease); }
.menu button:hover { background: var(--surface-2); }
.menu button.danger { color: var(--danger); }
.menu hr { border: 0; border-top: 1px solid var(--border); margin: 4px 0; }

/* ------------------------------ responsive -------------------------- */
@media (max-width: 1200px) { .year-grid { grid-template-columns: repeat(3, 1fr); } .kanban { grid-template-columns: repeat(4, minmax(220px, 1fr)); } .pcard { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .pcard .next-line { grid-column: 1 / -1; } }
@media (max-width: 1000px) {
  .dash-grid, .grid-2, .grid-3, .two-col { grid-template-columns: 1fr; }
  .day-layout { grid-template-columns: 1fr; } .day-side { border-left: 0; border-top: 1px solid var(--border); }
}
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; inset: 0 auto 0 0; width: min(300px, 86vw); z-index: var(--z-sidebar); transform: translateX(-100%); transition: transform 220ms var(--ease); box-shadow: var(--shadow-float); }
  .sidebar.open { transform: none; }
  .sidebar-backdrop { position: fixed; inset: 0; background: rgba(18, 12, 38, .45); z-index: calc(var(--z-sidebar) - 10); }
  .topbar { display: flex; align-items: center; gap: 10px; background: var(--indigo); color: #fff; padding: 10px 14px; position: sticky; top: 0; z-index: var(--z-topbar); padding-top: calc(10px + env(safe-area-inset-top, 0px)); }
  .topbar img { height: 28px; } .topbar .grow { flex: 1; } .topbar .icon-btn { color: #fff; }
  .page { padding: 16px 14px 90px; }
  .cal-head h1 { min-width: 0; font-size: 18px; }
  .month-grid { grid-auto-rows: minmax(72px, auto); }
  .mcell { padding: 3px 3px 2px; } .mcell .dnum { width: 22px; height: 22px; font-size: 12px; }
  .evchip { height: 18px; line-height: 18px; font-size: 10.5px; padding: 0 4px; gap: 3px; } .evchip .tm, .evchip .who { display: none; }
  .agenda-day { grid-template-columns: 1fr; } .agenda-day .dl { padding: 10px 12px 0; } .agenda-item { grid-template-columns: 1fr; gap: 2px; }
  .year-grid { grid-template-columns: repeat(2, 1fr); padding: 10px; }
  .kanban { grid-template-columns: repeat(4, 78vw); }
  .table th, .table td { padding: 9px 10px; }
  .meta-grid, .field-row { grid-template-columns: 1fr; }
  .when-grid { grid-template-columns: 1fr; } .when-arrow { display: none; }
  .pcard { grid-template-columns: 1fr; gap: 10px; } .pcard .next-line { grid-column: auto; }
  .auth { grid-template-columns: 1fr; } .auth-side { padding: 28px 24px; min-height: 0; } .auth-side h1 { font-size: 24px; margin-top: 18px; } .auth-side .foot, .auth-points { display: none; }
  .tgrid-scroll { max-height: calc(100vh - 300px); }
  .drawer { width: 100vw; }
  .toolbar .search-box { width: 100%; }
  .btn, .icon-btn, .seg-radio button, .chip-radio button, .day-pills button { min-height: 44px; }
  .btn-sm { min-height: 40px; }
}
@media (max-width: 560px) { .year-grid { grid-template-columns: 1fr; } .wk-head .dh .n { font-size: 10px; } .wk-head .dh .d { width: 26px; height: 26px; font-size: 13px; } .stat { flex-basis: 45%; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .sk-line, .sk-dot { animation: none; background: #ECEAF3; }
}
@media print { .sidebar, .topbar, .cal-filters, .page-actions, .toasts { display: none !important; } .shell { grid-template-columns: 1fr; } .page { padding: 0; } }
