:root {
  --bg: #f5f6fa;
  --panel: #ffffff;
  --panel-2: #f8f9fc;
  --border: #e4e7ef;
  --text: #171a26;
  --muted: #646b80;
  --faint: #9aa0b2;
  --accent: #5a5f8f;
  --accent-soft: #eff0f5;
  --green: #3f7d5a;  --green-bg: #eef3f0;  --green-line: #6aa584;
  --red: #b0473f;    --red-bg: #f6eeed;    --red-line: #cf6b63;
  --amber: #96692a;  --amber-bg: #f6f1e8;  --amber-line: #c99a52;
  --blue: #4a648f;   --blue-bg: #eef1f6;   --blue-line: #8fa3c4;
  --gray-bg: #eef0f4;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 1px 3px rgba(16, 24, 40, .06);
  --shadow-lg: 0 20px 50px rgba(16, 24, 40, .18);
  --radius: 12px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1117; --panel: #171a23; --panel-2: #1c202b; --border: #2a2f3d;
    --text: #e8eaf1; --muted: #a0a7b8; --faint: #6b7286;
    --accent: #9aa3d9; --accent-soft: #22252f;
    --green: #8cc4a3; --green-bg: #1d2320; --green-line: #5f9b7a;
    --red: #e0938c; --red-bg: #261e1e; --red-line: #b8615a;
    --amber: #d9b77e; --amber-bg: #25221c; --amber-line: #a88550;
    --blue: #a3b4d4; --blue-bg: #1e2129; --blue-line: #6d7f9e; --gray-bg: #232731;
    --shadow: 0 1px 2px rgba(0,0,0,.3); --shadow-lg: 0 20px 50px rgba(0,0,0,.5);
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; letter-spacing: -.01em; }
h1 { font-size: 22px; } h2 { font-size: 16px; } h3 { font-size: 14px; }
.muted { color: var(--muted); } .faint { color: var(--faint); } .small { font-size: 12.5px; }
.nowrap { white-space: nowrap; }
.row { display: flex; align-items: center; gap: 10px; }
.spread { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.stack > * + * { margin-top: 12px; }
.hidden { display: none !important; }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: 236px 1fr; min-height: 100vh; }
.sidebar { background: var(--panel); border-right: 1px solid var(--border); padding: 18px 12px; display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0; height: 100vh; }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 10px 18px; font-weight: 700; font-size: 17px; }
.brand-mark { width: 30px; height: 30px; border-radius: 8px; background: var(--text); color: var(--panel) !important; display: grid; place-items: center; color: white; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; color: var(--muted); font-weight: 500; }
.nav a:hover { background: var(--panel-2); color: var(--text); }
.nav a.active { background: var(--gray-bg); color: var(--text); }
.nav a svg { width: 18px; height: 18px; flex: none; }
.nav .count { margin-left: auto; font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 99px; background: var(--gray-bg); color: var(--text); }
.sidebar .me { margin-top: auto; border-top: 1px solid var(--border); padding: 12px 6px 0; }
.main { min-width: 0; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px; padding: 14px 28px; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); }
.topbar h1 { flex: 1; }
.content { padding: 24px 28px 60px; max-width: 1320px; }
.icon-btn.menu-btn { display: none; }

/* ---------- elements ---------- */
.btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--border); background: var(--panel); padding: 7px 13px; border-radius: 9px; font-weight: 600; cursor: pointer; white-space: nowrap; box-shadow: var(--shadow); }
.btn:hover { background: var(--panel-2); }
.btn.primary { background: var(--text); border-color: var(--text); color: var(--panel); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.green { background: var(--text); border-color: var(--text); color: var(--panel); }
.btn.red { color: var(--red); }
.btn.ghost { background: transparent; border-color: transparent; box-shadow: none; }
.btn.sm { padding: 4px 9px; font-size: 12.5px; border-radius: 7px; }
.btn:disabled { opacity: .55; cursor: default; }
.icon-btn { position: relative; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; border: 1px solid var(--border); background: var(--panel); cursor: pointer; }
.icon-btn svg { width: 19px; height: 19px; }
.badge-dot { position: absolute; top: -5px; right: -5px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 99px; background: var(--red-line); color: white; font-size: 11px; font-weight: 700; display: grid; place-items: center; border: 2px solid var(--bg); }

.card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-h { padding: 14px 18px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.card-b { padding: 16px 18px; }
.card-b.flush { padding: 0; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.kpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.kpi { padding: 14px 16px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--border); box-shadow: var(--shadow); cursor: pointer; }
.kpi:hover { border-color: var(--faint); }
.kpi .v { font-size: 26px; font-weight: 700; line-height: 1.15; }
.kpi .l { color: var(--muted); font-size: 12.5px; font-weight: 500; }
.kpi .l::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 7px; background: var(--faint); vertical-align: 1px; }
.kpi.red .l::before { background: var(--red-line); } .kpi.green .l::before { background: var(--green-line); }
.kpi.amber .l::before { background: var(--amber-line); } .kpi.blue .l::before { background: var(--blue-line); }

.pill { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 99px; font-size: 12px; font-weight: 600; white-space: nowrap; background: var(--gray-bg); color: var(--muted); }
.pill.green::before, .pill.red::before, .pill.amber::before, .pill.blue::before { content: ""; width: 6px; height: 6px; border-radius: 50%; flex: none; }
.pill.green::before { background: var(--green-line); } .pill.red::before { background: var(--red-line); }
.pill.amber::before { background: var(--amber-line); } .pill.blue::before { background: var(--blue-line); }
.dot { width: 9px; height: 9px; border-radius: 50%; flex: none; display: inline-block; background: var(--faint); }
.dot.green { background: var(--green-line); } .dot.red { background: var(--red-line); } .dot.amber { background: var(--amber-line); } .dot.blue { background: var(--blue-line); }
.prio { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.prio.urgent { color: var(--red); } .prio.high { color: var(--muted); } .prio.medium { color: var(--muted); } .prio.low { color: var(--faint); }

.avatar { width: 30px; height: 30px; border-radius: 50%; display: inline-grid; place-items: center; color: var(--muted); background: var(--gray-bg); font-size: 12px; font-weight: 700; flex: none; }
.avatar.lg { width: 56px; height: 56px; font-size: 20px; }
.avatar.sm { width: 22px; height: 22px; font-size: 9.5px; }
.role { white-space: nowrap; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding: 1px 7px; border-radius: 5px; }
.role { background: var(--gray-bg); color: var(--muted); }

/* ---------- task rows ---------- */
.tlist { display: flex; flex-direction: column; }
.trow { display: grid; grid-template-columns: 3px minmax(0, 1fr) 170px 150px 140px; align-items: center; gap: 14px; padding: 11px 16px 11px 0; border-bottom: 1px solid var(--border); cursor: pointer; }
.trow:last-child { border-bottom: 0; }
.trow:hover { background: var(--panel-2); }
.trow .bar { align-self: stretch; border-radius: 0 3px 3px 0; background: var(--faint); }
.trow .bar.green { background: var(--green-line); } .trow .bar.red { background: var(--red-line); } .trow .bar.amber { background: var(--amber-line); } .trow .bar.blue { background: var(--blue-line); }
.trow .title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trow .sub { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trow.compact { grid-template-columns: 3px minmax(0, 1fr) 140px; }

.person { display: flex; align-items: center; gap: 8px; min-width: 0; }
.person span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.due { font-size: 12.5px; }
.due b { display: block; font-weight: 600; font-size: 13px; }
.due.red b { color: var(--red); }
.empty { padding: 28px; text-align: center; color: var(--muted); }
.empty .big { font-size: 22px; margin-bottom: 4px; filter: grayscale(1); opacity: .5; }

.progress { height: 6px; border-radius: 99px; background: var(--gray-bg); overflow: hidden; }
.progress > i { display: block; height: 100%; background: var(--faint); border-radius: 99px; }


/* ---------- filters / tabs ---------- */
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 14px; }
.input, select.input, textarea.input { border: 1px solid var(--border); background: var(--panel); border-radius: 9px; padding: 7px 11px; outline: none; min-width: 0; }
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
textarea.input { width: 100%; resize: vertical; min-height: 80px; }
.seg { display: inline-flex; background: var(--gray-bg); border-radius: 10px; padding: 3px; gap: 2px; }
.seg button { border: 0; background: transparent; padding: 5px 11px; border-radius: 7px; font-weight: 600; font-size: 13px; color: var(--muted); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.seg button.on { background: var(--panel); color: var(--text); box-shadow: var(--shadow); }
.field { display: flex; flex-direction: column; gap: 5px; }
.field label { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.field .input { width: 100%; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }
.error { color: var(--red); font-size: 13px; font-weight: 500; }
.hint { font-size: 12px; color: var(--faint); }

/* ---------- board ---------- */
.board { display: grid; grid-template-columns: repeat(5, minmax(220px, 1fr)); gap: 14px; overflow-x: auto; padding-bottom: 8px; }
.col { background: var(--panel-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px; min-height: 200px; }
.col h3 { display: flex; justify-content: space-between; padding: 2px 4px 10px; font-size: 13px; color: var(--muted); }
.bcard { background: var(--panel); border: 1px solid var(--border); border-left: 4px solid var(--faint); border-radius: 9px; padding: 10px 11px; margin-bottom: 8px; cursor: pointer; box-shadow: var(--shadow); }
.bcard:hover { border-color: var(--faint); }
.bcard.green { border-left-color: var(--green-line); } .bcard.red { border-left-color: var(--red-line); } .bcard.amber { border-left-color: var(--amber-line); } .bcard.blue { border-left-color: var(--blue-line); }
.bcard .t { font-weight: 600; margin-bottom: 6px; }

/* ---------- calendar ---------- */
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-top: 1px solid var(--border); border-left: 1px solid var(--border); }
.cal .dow { padding: 8px 10px; font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); background: var(--panel-2); }
.cal .day { min-height: 118px; padding: 6px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); background: var(--panel); display: flex; flex-direction: column; gap: 3px; cursor: pointer; min-width: 0; }
.cal .day:hover { background: var(--panel-2); }
.cal .day.out { background: var(--panel-2); } .cal .day.out .n { color: var(--faint); }
.cal .day.sel { box-shadow: inset 0 0 0 2px var(--accent); }
.cal .n { font-size: 12.5px; font-weight: 600; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; }
.cal .day.today .n { background: var(--accent); color: white; }
.chip { display: block; font-size: 11.5px; font-weight: 600; padding: 2px 6px; border-radius: 5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; background: var(--gray-bg); color: var(--muted); border-left: 3px solid var(--faint); }
.chip { color: var(--text); }
.chip.green { border-color: var(--green-line); } .chip.red { border-color: var(--red-line); }
.chip.amber { border-color: var(--amber-line); } .chip.blue { border-color: var(--blue-line); }
.chip.done { color: var(--muted); }
.chip.done { text-decoration: line-through; text-decoration-thickness: 1px; opacity: .85; }
.more { font-size: 11.5px; color: var(--muted); padding-left: 4px; }
.cal-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; align-items: start; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }

/* ---------- people / performance ---------- */
.pcard { padding: 14px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--panel); box-shadow: var(--shadow); cursor: pointer; display: flex; flex-direction: column; gap: 10px; }
.pcard:hover { border-color: var(--faint); }
.pcard .name { font-weight: 650; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.score { display: inline-grid; place-items: center; font-weight: 800; border-radius: 50%; flex: none; }
.ring { --p: 0; --c: var(--accent); width: 54px; height: 54px; border-radius: 50%; background: conic-gradient(var(--c) calc(var(--p) * 1%), var(--gray-bg) 0); display: grid; place-items: center; flex: none; }
.ring > span { width: 42px; height: 42px; border-radius: 50%; background: var(--panel); display: grid; place-items: center; font-weight: 800; font-size: 14px; }
.ring.lg { width: 92px; height: 92px; } .ring.lg > span { width: 74px; height: 74px; font-size: 24px; }
.ring { --c: var(--muted); } .ring.none { --c: var(--gray-bg); }
.org { display: flex; flex-direction: column; align-items: center; gap: 0; }
.org-level { display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; }
.org-branch { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 16px; border: 1px dashed var(--border); border-radius: 16px; background: color-mix(in srgb, var(--panel-2) 60%, transparent); }
.org-line { width: 2px; height: 26px; background: var(--border); }
.org .pcard { width: 230px; }
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; padding: 10px 14px; border-bottom: 1px solid var(--border); white-space: nowrap; cursor: pointer; user-select: none; }
.table td { padding: 10px 14px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr { cursor: pointer; } .table tbody tr:hover { background: var(--panel-2); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.hbar { display: flex; align-items: center; gap: 10px; }
.hbar .track { flex: 1; height: 6px; border-radius: 99px; background: var(--gray-bg); overflow: hidden; display: flex; }
.hbar .track i { display: block; height: 100%; }
.history { display: flex; gap: 4px; flex-wrap: wrap; }
.history i { width: 22px; height: 22px; border-radius: 5px; display: block; cursor: pointer; }
.history i.green { background: var(--green-line); } .history i.red { background: var(--red-line); } .history i.overdue { background: repeating-linear-gradient(45deg, var(--red-line) 0 4px, transparent 4px 8px); }

/* ---------- notifications ---------- */
.notif-panel { position: absolute; right: 0; top: 46px; width: 400px; max-height: 70vh; overflow: auto; z-index: 50; }
.notif { display: flex; gap: 11px; padding: 11px 16px; border-bottom: 1px solid var(--border); cursor: pointer; align-items: flex-start; }
.notif:hover { background: var(--panel-2); }
.notif.unread { background: var(--panel-2); }
.notif .dot { margin-top: 6px; }
.notif .msg { font-size: 13.5px; }
.notif .when { font-size: 12px; color: var(--faint); }
.notif.red .msg b, .notif.red .msg { }
.nbar { width: 4px; align-self: stretch; border-radius: 3px; flex: none; background: var(--faint); }
.nbar.green { background: var(--green-line); } .nbar.red { background: var(--red-line); } .nbar.amber { background: var(--amber-line); } .nbar.blue { background: var(--blue-line); }

#toasts { position: fixed; right: 20px; bottom: 20px; display: flex; flex-direction: column; gap: 10px; z-index: 200; }
.toast { width: 340px; background: var(--panel); border: 1px solid var(--border); border-left: 5px solid var(--blue-line); border-radius: 10px; padding: 11px 14px; box-shadow: var(--shadow-lg); font-size: 13.5px; cursor: pointer; animation: slidein .25s ease-out; }
.toast.green { border-left-color: var(--green-line); } .toast.red { border-left-color: var(--red-line); } .toast.amber { border-left-color: var(--amber-line); }
.toast.error { border-left-color: var(--red-line); color: var(--red); }
@keyframes slidein { from { transform: translateY(12px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- modal ---------- */
.overlay { position: fixed; inset: 0; background: rgba(15, 18, 30, .45); z-index: 100; display: flex; justify-content: center; align-items: flex-start; padding: 5vh 16px; overflow-y: auto; animation: fade .15s; }
@keyframes fade { from { opacity: 0; } }
.modal { width: 100%; max-width: 560px; background: var(--panel); border-radius: 16px; box-shadow: var(--shadow-lg); border: 1px solid var(--border); }
.modal.wide { max-width: 860px; }
.modal-h { padding: 18px 22px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.modal-b { padding: 20px 22px; }
.modal-f { padding: 14px 22px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 8px; }
.x { border: 0; background: transparent; font-size: 22px; line-height: 1; color: var(--muted); cursor: pointer; padding: 2px 6px; border-radius: 6px; }
.x:hover { background: var(--gray-bg); }
.task-banner { padding: 10px 22px; font-weight: 600; font-size: 13.5px; display: flex; align-items: center; gap: 8px; }
.task-banner { background: var(--panel-2); border-bottom: 1px solid var(--border); }
.task-banner.red { color: var(--red); }
.meta { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.meta .k { font-size: 11.5px; font-weight: 700; color: var(--faint); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 3px; }
.desc { white-space: pre-wrap; background: var(--panel-2); border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; }
.note { border-radius: 10px; padding: 10px 13px; font-size: 13.5px; }
.note { background: var(--panel-2); border-left: 3px solid var(--border); }
.note.green { border-left-color: var(--green-line); } .note.amber { border-left-color: var(--amber-line); }
.feed { display: flex; flex-direction: column; gap: 12px; }
.feed .item { display: flex; gap: 10px; }
.feed .bubble { background: var(--panel-2); border: 1px solid var(--border); border-radius: 4px 12px 12px 12px; padding: 8px 12px; }
.feed .bubble.update { border-left: 3px solid var(--blue-line); }
.feed .sys { font-size: 12.5px; color: var(--muted); display: flex; gap: 8px; align-items: baseline; padding-left: 40px; }
.feed .sys::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--faint); flex: none; transform: translateY(-1px); }
.section-title { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin: 22px 0 10px; }
input[type=range] { width: 100%; accent-color: var(--accent); }

/* ---------- login ---------- */
.login { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr; }
.login-art { background: #1b1e27; color: white; padding: 56px; display: flex; flex-direction: column; justify-content: space-between; }
.login-art h1 { font-size: 38px; line-height: 1.12; max-width: 460px; margin-top: 40px; }
.login-art p { opacity: .85; max-width: 440px; font-size: 15.5px; }
.legend-art { display: flex; flex-direction: column; gap: 10px; margin-top: 28px; }
.legend-art div { display: flex; gap: 10px; align-items: center; background: rgba(255,255,255,.1); padding: 10px 14px; border-radius: 10px; max-width: 400px; }
.login-form { padding: 56px; display: flex; flex-direction: column; justify-content: center; max-width: 560px; width: 100%; margin: 0 auto; }
.demo-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.demo { text-align: left; border: 1px solid var(--border); background: var(--panel); border-radius: 10px; padding: 9px 10px; cursor: pointer; display: flex; gap: 8px; align-items: center; min-width: 0; }
.demo:hover { border-color: var(--accent); }
.demo .nm { font-weight: 600; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- responsive ---------- */
@media (max-width: 1150px) {
  .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cal-layout { grid-template-columns: 1fr; }
  .trow { grid-template-columns: 4px minmax(0, 1fr) 150px 130px; } .trow .c-status { display: none; }
}
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; z-index: 90; left: 0; top: 0; width: 250px; transform: translateX(-105%); transition: transform .2s; box-shadow: var(--shadow-lg); }
  .sidebar.open { transform: none; }
  .icon-btn.menu-btn { display: grid; }
  .topbar, .content { padding-left: 16px; padding-right: 16px; }
  .g2, .g3 { grid-template-columns: 1fr; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .trow { grid-template-columns: 4px minmax(0, 1fr) 110px; } .trow .c-person { display: none; }
  .meta { grid-template-columns: 1fr 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .login { grid-template-columns: 1fr; } .login-art { display: none; } .login-form { padding: 32px 16px; }
  .demo-grid { grid-template-columns: 1fr 1fr; }
  .cal .day { min-height: 70px; } .cal .chip { font-size: 0; padding: 0; height: 6px; border-left: 0; }
  .notif-panel { position: fixed; left: 8px; right: 8px; top: 64px; width: auto; }
  .table-wrap { overflow-x: auto; }
  .topbar .new-label { display: none; }
}

/* ---------- language switch ---------- */
.lang-switch button { padding: 3px 10px; font-size: 12px; }
.login-art .brand-mark { background: rgba(255, 255, 255, .14); color: white !important; }

/* ---------- testing mode ---------- */
.view-as { gap: 8px; } .view-as select { max-width: 260px; }
@media (max-width: 860px) { .view-as .pill { display: none; } .view-as select { max-width: 150px; } }

/* ---------- daily tasks ---------- */
.check-btn { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--faint); background: transparent; flex: none; display: grid; place-items: center; font-size: 12px; font-weight: 800; color: var(--panel); cursor: pointer; padding: 0; }
button.check-btn:hover { border-color: var(--green-line); background: color-mix(in srgb, var(--green-line) 20%, transparent); }
.check-btn.on { background: var(--green-line); border-color: var(--green-line); cursor: default; }
span.check-btn { cursor: default; }
.team-day { padding: 12px 16px; border-bottom: 1px solid var(--border); }
.team-day:last-child { border-bottom: 0; }
.team-day .trow { padding-left: 0; }
.owner-group { padding: 14px 18px; border-bottom: 1px solid var(--border); }
.owner-group:last-child { border-bottom: 0; }
.routine { display: flex; gap: 14px; align-items: flex-start; padding: 10px 0 10px 12px; border-left: 2px solid var(--border); margin-left: 10px; }
.routine + .routine { border-top: 1px dashed var(--border); }
.routine.paused { opacity: .55; }
.routine select.input { padding: 4px 8px; }

/* ---------- manager accountability ---------- */
.acc-row { padding: 12px 18px; border-bottom: 1px solid var(--border); cursor: pointer; }
.acc-row:last-child { border-bottom: 0; }
.acc-row:hover { background: var(--panel-2); }
.acc-people { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 8px 0 0 66px; color: var(--muted); }
.acc-people b { color: var(--text); font-weight: 600; }

/* ---------- phase 1: tags, checklists, settings ---------- */
.pill.tag { background: transparent; border: 1px solid var(--border); color: var(--muted); font-weight: 600; margin-left: 6px; padding: 0 7px; }
.tag-choice { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--border); border-radius: 8px; padding: 4px 10px; font-size: 13px; cursor: pointer; }
.desc .check-item { display: flex; align-items: flex-start; gap: 9px; padding: 4px 0; cursor: pointer; }
.desc .check-item input { margin-top: 3px; width: 16px; height: 16px; accent-color: var(--green-line); }
.desc .check-item.done span { text-decoration: line-through; color: var(--muted); }
.desc .check-item input:disabled { cursor: default; }
.desc .gap { height: 8px; }
.check-btn.half { border-color: var(--green-line); color: var(--green-line); }
.outbox-row { border-bottom: 1px solid var(--border); padding: 12px 16px; }
.outbox-row:last-child { border-bottom: 0; }
.outbox-row summary { cursor: pointer; list-style: none; }
.outbox-row summary::-webkit-details-marker { display: none; }
.outbox-body { white-space: pre-wrap; font: inherit; font-size: 13px; background: var(--panel-2); border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; margin: 10px 0 0; }
.note:not(.green):not(.amber):not(.blue) { border-left: 3px solid var(--border); }

/* ---------- phase 2: feedback, my account ---------- */
.critique { border: 1px solid var(--border); border-left: 3px solid var(--amber-line); border-radius: 10px; padding: 12px 14px; }
.critique.wrong { border-left-color: var(--red-line); }
.critique.unread { background: var(--panel-2); }
.critique-body { white-space: pre-wrap; margin-top: 8px; }
.critique-reply { margin-top: 10px; padding: 8px 12px; border-radius: 8px; background: var(--panel-2); font-size: 13.5px; }
.kv { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--border); font-size: 13.5px; }
.kv:last-child { border-bottom: 0; }
.banner-link { display: block; color: inherit; border-left: 3px solid var(--red-line); }
.banner-link:hover { background: var(--panel-2); }

/* ---------- phase 3: bonuses & penalties ---------- */
.brow { border-bottom: 1px solid var(--border); }
.brow:last-child { border-bottom: 0; }
.brow-h { padding: 12px 16px; cursor: pointer; }
.brow-h:hover { background: var(--panel-2); }
.brow-b { display: none; padding: 4px 16px 14px 54px; }
.brow.open .brow-b { display: block; }
.bline { display: flex; gap: 12px; align-items: flex-start; padding: 6px 0; }
.bamt { min-width: 110px; font-weight: 700; font-variant-numeric: tabular-nums; }
.bamt.bonus { color: var(--green); } .bamt.penalty { color: var(--red); }
.values-grid { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 18px; font-size: 13px; margin-top: 8px; max-width: 520px; }

/* ---------- simpler navigation: bottom tab bar on phones ---------- */
.bottom-nav { display: none; }
@media (max-width: 860px) {
  .icon-btn.menu-btn { display: none; }
  .bottom-nav { display: flex; position: fixed; z-index: 80; left: 0; right: 0; bottom: 0; background: var(--panel); border-top: 1px solid var(--border); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
  .bottom-nav a, .bottom-nav button { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 4px 2px; color: var(--muted); font-size: 11px; font-weight: 600; background: none; border: 0; position: relative; min-width: 0; }
  .bottom-nav a span, .bottom-nav button span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .bottom-nav svg { width: 22px; height: 22px; }
  .bottom-nav a.active { color: var(--text); }
  .bottom-nav .count { position: absolute; top: 0; right: calc(50% - 22px); font-style: normal; font-size: 10px; padding: 0 5px; border-radius: 99px; background: var(--red-line); color: white; }
  .content { padding-bottom: 96px; }
  #toasts { bottom: 84px; left: 12px; right: 12px; } .toast { width: auto; }
}
.page-tabs { display: flex; gap: 22px; border-bottom: 1px solid var(--border); margin: -6px 0 16px; }
.page-tabs a { padding: 8px 2px; color: var(--muted); font-weight: 600; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.page-tabs a.on { color: var(--text); border-bottom-color: var(--text); }

/* ---------- simpler home pages ---------- */
.att-group { border-bottom: 1px solid var(--border); }
.att-group:last-child { border-bottom: 0; }
.att-h { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 16px 4px; font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.att-link { display: block; color: inherit; padding-bottom: 8px; }
.att-link:hover { background: var(--panel-2); }
.today-row { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-bottom: 1px solid var(--border); border-left: 3px solid var(--faint); cursor: pointer; }
.today-row:last-child { border-bottom: 0; }
.today-row:hover { background: var(--panel-2); }
.today-row.red { border-left-color: var(--red-line); } .today-row.amber { border-left-color: var(--amber-line); } .today-row.blue { border-left-color: var(--blue-line); }
.today-title { font-weight: 650; font-size: 15px; }
.done-btn { padding: 10px 22px; font-size: 15px; border-radius: 10px; flex: none; }
.today-count { text-align: right; font-size: 22px; }
.done-today summary { cursor: pointer; list-style: none; }
.done-today summary::-webkit-details-marker { display: none; }
@media (max-width: 860px) { .done-btn { padding: 12px 18px; } }
