:root {
  --bg: #0f1216;
  --bg2: #12161c;
  --panel: #161a21;
  --panel2: #1b2029;
  --panel3: #222835;
  --line: #262d39;
  --line2: #313a49;
  --text: #dde2ea;
  --text2: #b3bac6;
  --muted: #7f8898;
  --accent: #7fa7e8;
  --accent2: #5b8def;
  --accent-bg: rgba(127, 167, 232, .12);
  --ok: #7bc47f;
  --warn: #e5c04a;
  --danger: #e0524a;
  --orange: #e08a3c;
  --t1: #7bc47f;
  --t2: #7fa7e8;
  --t3: #e08a3c;
  --t4: #e0524a;
  --t5: #c58af0;
  --radius: 10px;
  --shadow: 0 10px 30px rgba(0, 0, 0, .35);
  --head: "Rajdhani", "Segoe UI", sans-serif;
  --body: "Inter", "Segoe UI", system-ui, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font: 14px/1.5 var(--body);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { font-family: var(--head); font-weight: 700; margin: 0; letter-spacing: .2px; }
h1 { font-size: 26px; }
h2 { font-size: 19px; }
h3 { font-size: 16px; }
::selection { background: rgba(127, 167, 232, .35); }
svg { width: 1.1em; height: 1.1em; vertical-align: -0.18em; flex: none; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #2a3140; border-radius: 10px; border: 2px solid var(--bg); }
::-webkit-scrollbar-track { background: transparent; }
.muted { color: var(--muted); }
.clamp3 { display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; white-space: normal; }
.small { font-size: 12px; }
.hidden { display: none !important; }
.row { display: flex; gap: 10px; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- boot ---------- */
.boot { height: 100vh; display: grid; place-items: center; }
.boot-mark { width: 38px; height: 38px; border-radius: 50%; border: 3px solid var(--line2); border-top-color: var(--accent); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- layout ---------- */
.shell { display: grid; grid-template-columns: 232px 1fr; min-height: 100vh; }
.side {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column;
  background: var(--bg2); border-right: 1px solid var(--line); padding: 18px 12px;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 18px; }
.brand img { width: 34px; height: 34px; }
.brand .t1 { font-family: var(--head); font-weight: 700; font-size: 18px; line-height: 1; letter-spacing: 1px; text-transform: uppercase; }
.brand .t2 { font-size: 11px; color: var(--muted); margin-top: 3px; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a {
  display: flex; align-items: center; gap: 11px; padding: 9px 10px; border-radius: 8px;
  color: var(--text2); font-weight: 500; text-decoration: none; position: relative;
}
.nav a svg { width: 18px; height: 18px; flex: none; opacity: .85; }
.nav a:hover { background: var(--panel); color: var(--text); }
.nav a.active { background: var(--accent-bg); color: #fff; }
.nav a.active::before { content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent); }
.nav .sep { height: 1px; background: var(--line); margin: 10px 6px; }
.nav .badge { margin-left: auto; }
.side-foot { margin-top: auto; }
.me-card { display: flex; gap: 10px; align-items: center; padding: 10px; border-radius: 10px; background: var(--panel); border: 1px solid var(--line); cursor: pointer; }
.me-card:hover { border-color: var(--line2); }
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px;
  padding: 14px 28px; background: rgba(15, 18, 22, .86); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar h1 { font-size: 22px; }
.topbar .sub { color: var(--muted); font-size: 13px; }
.page { padding: 24px 28px 60px; max-width: 1400px; width: 100%; }
.page.wide { max-width: none; }
.mobile-nav { display: none; }

/* ---------- buttons / inputs ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 36px; padding: 0 14px;
  border-radius: 8px; border: 1px solid var(--line2); background: var(--panel2); color: var(--text);
  cursor: pointer; font-weight: 500; white-space: nowrap; transition: background .12s, border-color .12s;
}
.btn:hover { background: var(--panel3); border-color: #3b4557; text-decoration: none; }
.btn:disabled { opacity: .5; cursor: default; }
.btn svg { width: 16px; height: 16px; }
.btn.primary { background: var(--accent2); border-color: var(--accent2); color: #fff; }
.btn.primary:hover { background: #6d9bf2; }
.btn.danger { color: #ff8a82; }
.btn.danger:hover { background: rgba(224, 82, 74, .14); border-color: rgba(224, 82, 74, .5); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--text2); }
.btn.ghost:hover { background: var(--panel2); color: var(--text); }
.btn.sm { height: 30px; padding: 0 10px; font-size: 13px; }
.btn.icon { width: 36px; padding: 0; }
.btn.sm.icon { width: 30px; }
.seg { display: inline-flex; background: var(--panel); border: 1px solid var(--line2); border-radius: 8px; padding: 2px; }
.seg button { border: 0; background: transparent; color: var(--text2); padding: 0 12px; height: 30px; border-radius: 6px; cursor: pointer; font-weight: 500; }
.seg button.on { background: var(--panel3); color: #fff; }
.input, select.input, textarea.input {
  width: 100%; height: 38px; padding: 0 11px; border-radius: 8px; border: 1px solid var(--line2);
  background: var(--bg2); color: var(--text); outline: none; transition: border-color .12s, box-shadow .12s;
}
textarea.input { height: auto; min-height: 90px; padding: 9px 11px; resize: vertical; line-height: 1.5; }
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(127, 167, 232, .16); }
.input::placeholder { color: #5f6878; }
select.input { padding-right: 28px; }
input[type="checkbox"] { accent-color: var(--accent2); width: 16px; height: 16px; }
input[type="color"] { width: 38px; height: 38px; border: 1px solid var(--line2); border-radius: 8px; background: var(--bg2); padding: 3px; }
label.field, div.field { display: block; font-size: 12px; color: var(--text2); font-weight: 500; }
.field > .input, .field > .row, .field > .days-pick, .field > input[type="color"], .field > select { display: block; margin-top: 6px; }
.field > .row, .field > .days-pick { display: flex; }
label.check { display: flex; gap: 8px; align-items: center; cursor: pointer; color: var(--text2); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }
.hint { font-size: 12px; color: var(--muted); }
.error-text { color: #ff8a82; font-size: 13px; }

/* ---------- cards ---------- */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; }
.card-h { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.card-h h2, .card-h h3 { font-size: 17px; }
.card-b { padding: 16px; }
.card-b.tight { padding: 6px; }
.grid { display: grid; gap: 18px; }
.dash-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 18px; }
.dash-grid > *, .grid > * { min-width: 0; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.stat { padding: 14px 16px; }
.stat .v { font-family: var(--head); font-size: 30px; font-weight: 700; line-height: 1.1; }
.stat .l { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .6px; }
.stat.warn .v { color: var(--warn); }
.hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.hero h1 { font-size: 30px; }
.empty { padding: 26px 16px; text-align: center; color: var(--muted); }
.empty svg { width: 30px; height: 30px; opacity: .45; display: block; margin: 0 auto 8px; }

/* ---------- badges / chips / avatars ---------- */
.badge { display: inline-flex; align-items: center; min-width: 18px; height: 18px; padding: 0 6px; border-radius: 9px; background: var(--danger); color: #fff; font-size: 11px; font-weight: 600; justify-content: center; }
.pill { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 11px; font-size: 12px; font-weight: 500; background: var(--panel3); color: var(--text2); white-space: nowrap; }
.pill .dot { width: 7px; height: 7px; border-radius: 50%; }
.tier { font-weight: 600; }
.tier-1 { color: var(--t1); } .tier-2 { color: var(--t2); } .tier-3 { color: var(--t3); } .tier-4 { color: var(--t4); } .tier-5 { color: var(--t5); }
.pill.tier-1 { background: rgba(123, 196, 127, .12); } .pill.tier-2 { background: rgba(127, 167, 232, .12); }
.pill.tier-3 { background: rgba(224, 138, 60, .13); } .pill.tier-4 { background: rgba(224, 82, 74, .13); } .pill.tier-5 { background: rgba(197, 138, 240, .13); }
.av { width: 30px; height: 30px; border-radius: 50%; display: inline-grid; place-items: center; font-weight: 600; font-size: 12px; color: #fff; flex: none; text-transform: uppercase; letter-spacing: .3px; }
.av.lg { width: 44px; height: 44px; font-size: 16px; }
.av.sm { width: 22px; height: 22px; font-size: 10px; }
.av-stack { display: inline-flex; }
.av-stack .av { border: 2px solid var(--panel); margin-left: -7px; }
.av-stack .av:first-child { margin-left: 0; }
.prio { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; }
.prio-0 { color: var(--muted); } .prio-1 { color: var(--text2); } .prio-2 { color: var(--orange); } .prio-3 { color: var(--danger); }
.label-chip { font-size: 11px; padding: 1px 7px; border-radius: 5px; background: rgba(127, 167, 232, .12); color: #a9c3ef; }
.kbd { font-size: 11px; padding: 1px 6px; border: 1px solid var(--line2); border-bottom-width: 2px; border-radius: 5px; color: var(--muted); }

/* ---------- lists ---------- */
.list { display: flex; flex-direction: column; }
.li { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 8px; cursor: pointer; }
.li:hover { background: var(--panel2); }
.li + .li { border-top: 1px solid rgba(38, 45, 57, .6); }
.li:hover + .li, .li:hover { border-top-color: transparent; }
.datebox { width: 46px; flex: none; text-align: center; border-radius: 8px; background: var(--panel2); border: 1px solid var(--line); padding: 4px 0; }
.datebox .m { font-size: 10px; text-transform: uppercase; color: var(--muted); letter-spacing: .6px; }
.datebox .d { font-family: var(--head); font-weight: 700; font-size: 20px; line-height: 1.05; }
.catbar { width: 4px; align-self: stretch; border-radius: 3px; flex: none; }
.countdown { font-size: 12px; color: var(--accent); font-weight: 500; }
.countdown.live { color: var(--ok); }
.activity-li { display: flex; gap: 10px; padding: 8px 4px; font-size: 13px; }
.activity-li + .activity-li { border-top: 1px solid rgba(38, 45, 57, .6); }
.rsvp-mini { display: flex; gap: 4px; }
.rsvp-mini button { height: 26px; padding: 0 8px; font-size: 12px; border-radius: 6px; border: 1px solid var(--line2); background: transparent; color: var(--text2); cursor: pointer; }
.rsvp-mini button:hover { background: var(--panel3); }
.rsvp-mini button.on-going { background: rgba(123, 196, 127, .16); border-color: rgba(123, 196, 127, .5); color: #a8e0ab; }
.rsvp-mini button.on-maybe { background: rgba(229, 192, 74, .14); border-color: rgba(229, 192, 74, .45); color: #f0d98c; }
.rsvp-mini button.on-no { background: rgba(224, 82, 74, .12); border-color: rgba(224, 82, 74, .4); color: #f2a19b; }

/* ---------- calendar ---------- */
.cal-toolbar { display: flex; gap: 10px; align-items: center; margin-bottom: 14px; flex-wrap: wrap; }
.cal-toolbar h2 { font-size: 22px; min-width: 200px; }
.month { display: grid; grid-template-columns: repeat(7, 1fr); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--line); gap: 1px; }
.month .dow { background: var(--panel); padding: 8px 10px; font-size: 11px; text-transform: uppercase; letter-spacing: .7px; color: var(--muted); font-weight: 600; }
.month .day { background: var(--panel); min-height: 118px; padding: 6px; display: flex; flex-direction: column; gap: 3px; cursor: pointer; min-width: 0; }
.month .day:hover { background: #181d25; }
.month .day.other { background: #13171d; }
.month .day.other .num { color: #4f5767; }
.month .day .num { font-size: 12px; font-weight: 600; color: var(--text2); width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; }
.month .day.today .num { background: var(--accent2); color: #fff; }
.chip {
  display: flex; align-items: center; gap: 5px; font-size: 12px; padding: 2px 6px; border-radius: 5px; line-height: 1.35;
  background: color-mix(in srgb, var(--c, #7fa7e8) 16%, transparent); color: var(--text); cursor: pointer; min-width: 0;
  border-left: 3px solid var(--c, #7fa7e8);
}
.chip:hover { background: color-mix(in srgb, var(--c, #7fa7e8) 26%, transparent); }
.chip .tm { color: var(--text2); font-size: 11px; flex: none; }
.chip .tt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip.task { border-left-style: dashed; background: rgba(255, 255, 255, .04); }
.chip.task.overdue { border-left-color: var(--danger); }
.chip.cancelled .tt { text-decoration: line-through; opacity: .6; }
.more { font-size: 11px; color: var(--muted); padding-left: 6px; }
.week { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--panel); }
.week-head { display: grid; grid-template-columns: 56px repeat(7, 1fr); border-bottom: 1px solid var(--line); }
.week-head .wd { padding: 8px; text-align: center; border-left: 1px solid var(--line); }
.week-head .wd .n { font-family: var(--head); font-size: 22px; font-weight: 700; line-height: 1; }
.week-head .wd .w { font-size: 11px; text-transform: uppercase; color: var(--muted); letter-spacing: .7px; }
.week-head .wd.today .n { color: var(--accent); }
.week-allday { display: grid; grid-template-columns: 56px repeat(7, 1fr); border-bottom: 1px solid var(--line); min-height: 28px; }
.week-allday > div { border-left: 1px solid var(--line); padding: 3px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.week-allday > div:first-child { border-left: 0; font-size: 10px; color: var(--muted); display: grid; place-items: center; }
.week-body { display: grid; grid-template-columns: 56px repeat(7, 1fr); position: relative; max-height: 68vh; overflow-y: auto; }
.week-hours { position: relative; }
.week-hours div { height: 48px; font-size: 10px; color: var(--muted); text-align: right; padding-right: 6px; transform: translateY(-7px); }
.week-col { position: relative; border-left: 1px solid var(--line); background-image: repeating-linear-gradient(to bottom, transparent 0, transparent 47px, rgba(38, 45, 57, .8) 47px, rgba(38, 45, 57, .8) 48px); cursor: pointer; }
.week-col.today { background-color: rgba(127, 167, 232, .03); }
.week-ev {
  position: absolute; left: 3px; right: 3px; border-radius: 6px; padding: 3px 6px; font-size: 12px; overflow: hidden; cursor: pointer;
  background: color-mix(in srgb, var(--c, #7fa7e8) 24%, #161a21); border-left: 3px solid var(--c, #7fa7e8); line-height: 1.3;
}
.week-ev:hover { filter: brightness(1.15); z-index: 3; }
.week-ev .tm { font-size: 11px; color: var(--text2); }
.now-line { position: absolute; left: 0; right: 0; height: 2px; background: var(--danger); z-index: 4; pointer-events: none; }
.now-line::before { content: ""; position: absolute; left: -4px; top: -3px; width: 8px; height: 8px; border-radius: 50%; background: var(--danger); }
.agenda-day { margin-bottom: 18px; }
.agenda-day h3 { font-size: 15px; color: var(--text2); margin: 0 0 6px 4px; }
.agenda-day h3.today { color: var(--accent); }
.legend { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }

/* ---------- tasks ---------- */
.task-toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.board { display: grid; grid-template-columns: repeat(3, minmax(260px, 1fr)); gap: 16px; align-items: start; }
.col { background: var(--bg2); border: 1px solid var(--line); border-radius: 12px; display: flex; flex-direction: column; min-height: 200px; }
.col-h { display: flex; align-items: center; gap: 8px; padding: 12px 14px; }
.col-h h3 { font-size: 15px; text-transform: uppercase; letter-spacing: .8px; }
.col-h .count { color: var(--muted); font-size: 13px; }
.col-h .dot { width: 9px; height: 9px; border-radius: 50%; }
.col-body { padding: 0 10px 10px; display: flex; flex-direction: column; gap: 8px; min-height: 60px; flex: 1; }
.col-body.drop { background: rgba(127, 167, 232, .06); border-radius: 8px; outline: 1px dashed rgba(127, 167, 232, .4); }
.tcard { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px; cursor: pointer; transition: border-color .12s, transform .12s; }
.tcard:hover { border-color: var(--line2); }
.tcard.dragging { opacity: .45; }
.tcard .tt { font-weight: 500; margin-bottom: 7px; overflow-wrap: anywhere; }
.tcard .meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.tcard .meta span { display: inline-flex; align-items: center; gap: 4px; }
.tcard .meta svg { width: 13px; height: 13px; }
.tcard .labels { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 7px; }
.due.overdue { color: #ff8a82; font-weight: 600; }
.due.soon { color: var(--warn); }
.tcard.done .tt { color: var(--muted); text-decoration: line-through; }
.add-inline { display: flex; gap: 6px; }
.task-table { width: 100%; border-collapse: collapse; }
.task-table th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.task-table td { padding: 9px 10px; border-bottom: 1px solid rgba(38, 45, 57, .6); }
.task-table tr { cursor: pointer; }
.task-table tbody tr:hover td { background: var(--panel2); }
.checkbox-round { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line2); display: grid; place-items: center; cursor: pointer; flex: none; background: transparent; padding: 0; }
.checkbox-round:hover { border-color: var(--ok); }
.checkbox-round.on { background: var(--ok); border-color: var(--ok); }
.checkbox-round.on::after { content: ""; width: 5px; height: 9px; border: solid #0f1216; border-width: 0 2px 2px 0; transform: rotate(45deg) translate(-1px, -1px); }
.progress { height: 5px; background: var(--panel3); border-radius: 3px; overflow: hidden; }
.progress > div { height: 100%; background: var(--ok); border-radius: 3px; }

/* ---------- modal ---------- */
.modal-back { position: fixed; inset: 0; background: rgba(5, 7, 10, .62); z-index: 100; display: flex; align-items: flex-start; justify-content: center; padding: 6vh 16px 16px; overflow-y: auto; animation: fade .12s ease-out; }
.modal { width: 100%; max-width: 620px; background: var(--panel); border: 1px solid var(--line2); border-radius: 14px; box-shadow: var(--shadow); animation: pop .14s ease-out; }
.modal.wide { max-width: 860px; }
.modal-h { display: flex; align-items: flex-start; gap: 12px; padding: 18px 20px 14px; border-bottom: 1px solid var(--line); }
.modal-h h2 { font-size: 21px; overflow-wrap: anywhere; }
.modal-b { padding: 18px 20px; }
.modal-f { display: flex; gap: 10px; justify-content: flex-end; padding: 14px 20px; border-top: 1px solid var(--line); flex-wrap: wrap; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.99); } }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) 250px; gap: 22px; }
.meta-list { display: flex; flex-direction: column; gap: 12px; }
.meta-list .k { font-size: 11px; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); font-weight: 600; margin-bottom: 3px; }
.desc { white-space: pre-wrap; overflow-wrap: anywhere; color: var(--text2); line-height: 1.6; }
.desc strong { color: var(--text); }
.section-t { font-family: var(--head); font-size: 15px; font-weight: 700; text-transform: uppercase; letter-spacing: .8px; color: var(--text2); margin: 18px 0 8px; }
.comments { display: flex; flex-direction: column; gap: 12px; }
.comment { display: flex; gap: 10px; }
.comment .b { background: var(--panel2); border: 1px solid var(--line); border-radius: 10px; padding: 8px 11px; flex: 1; min-width: 0; }
.comment .b .h { display: flex; gap: 8px; align-items: baseline; font-size: 12px; color: var(--muted); }
.comment .b .h strong { color: var(--text); font-size: 13px; }
.comment .b .t { white-space: pre-wrap; overflow-wrap: anywhere; margin-top: 2px; }
.mention { color: var(--accent); font-weight: 500; }
.check-item { display: flex; align-items: center; gap: 9px; padding: 5px 4px; border-radius: 6px; }
.check-item:hover { background: var(--panel2); }
.check-item .t { flex: 1; overflow-wrap: anywhere; }
.check-item.done .t { color: var(--muted); text-decoration: line-through; }
.check-item .x { opacity: 0; }
.check-item:hover .x { opacity: 1; }
.rsvp-big { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.rsvp-big button { height: 40px; border-radius: 9px; border: 1px solid var(--line2); background: var(--panel2); cursor: pointer; font-weight: 600; color: var(--text2); }
.rsvp-big button:hover { background: var(--panel3); }
.rsvp-big button.on-going { background: rgba(123, 196, 127, .16); border-color: rgba(123, 196, 127, .55); color: #a8e0ab; }
.rsvp-big button.on-maybe { background: rgba(229, 192, 74, .14); border-color: rgba(229, 192, 74, .5); color: #f0d98c; }
.rsvp-big button.on-no { background: rgba(224, 82, 74, .12); border-color: rgba(224, 82, 74, .45); color: #f2a19b; }
.people { display: flex; flex-direction: column; gap: 6px; }
.person { display: flex; gap: 9px; align-items: center; font-size: 13px; }
.picker { max-height: 280px; overflow-y: auto; border: 1px solid var(--line); border-radius: 9px; padding: 4px; }
.picker label { display: flex; gap: 9px; align-items: center; padding: 6px 8px; border-radius: 6px; cursor: pointer; }
.picker label:hover { background: var(--panel2); }
.days-pick { display: flex; gap: 5px; flex-wrap: wrap; }
.days-pick button { width: 38px; height: 32px; border-radius: 7px; border: 1px solid var(--line2); background: var(--bg2); color: var(--text2); cursor: pointer; font-size: 12px; font-weight: 600; }
.days-pick button.on { background: var(--accent2); border-color: var(--accent2); color: #fff; }
.banner { padding: 10px 12px; border-radius: 9px; font-size: 13px; margin-bottom: 14px; }
.banner.warn { background: rgba(229, 192, 74, .1); border: 1px solid rgba(229, 192, 74, .35); color: #f0d98c; }
.banner.danger { background: rgba(224, 82, 74, .1); border: 1px solid rgba(224, 82, 74, .4); color: #f2a19b; }
.banner.info { background: var(--accent-bg); border: 1px solid rgba(127, 167, 232, .35); color: #c3d5f3; }

/* ---------- popover / notifications / palette ---------- */
.pop { position: fixed; z-index: 90; background: var(--panel); border: 1px solid var(--line2); border-radius: 12px; box-shadow: var(--shadow); width: 360px; max-height: 70vh; display: flex; flex-direction: column; animation: pop .12s ease-out; }
.pop-h { display: flex; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.pop-b { overflow-y: auto; }
.notif { display: flex; gap: 10px; padding: 10px 14px; cursor: pointer; font-size: 13px; border-bottom: 1px solid rgba(38, 45, 57, .6); }
.notif:hover { background: var(--panel2); }
.notif.unread { background: rgba(127, 167, 232, .06); }
.notif.unread::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); flex: none; margin-top: 6px; }
.palette { max-width: 580px; }
.palette .input { height: 48px; font-size: 16px; border: 0; background: transparent; box-shadow: none; padding: 0 18px; }
.palette-res { border-top: 1px solid var(--line); max-height: 50vh; overflow-y: auto; padding: 6px; }
.palette-res .li.sel { background: var(--panel3); }

/* ---------- toasts ---------- */
#toasts { position: fixed; right: 20px; bottom: 20px; z-index: 200; display: flex; flex-direction: column; gap: 8px; }
.toast { background: var(--panel3); border: 1px solid var(--line2); border-radius: 10px; padding: 10px 14px; box-shadow: var(--shadow); min-width: 220px; max-width: 360px; animation: pop .15s ease-out; font-size: 13px; }
.toast.err { border-color: rgba(224, 82, 74, .6); }
.toast.ok { border-color: rgba(123, 196, 127, .55); }

/* ---------- auth ---------- */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 20px; background:
  radial-gradient(1000px 500px at 20% -10%, rgba(91, 141, 239, .13), transparent 60%),
  radial-gradient(800px 500px at 110% 110%, rgba(224, 82, 74, .06), transparent 60%), var(--bg); }
.auth-card { width: 100%; max-width: 400px; }
.auth-card .brand { justify-content: center; padding-bottom: 22px; }
.auth-card .brand img { width: 44px; height: 44px; }
.auth-card .brand .t1 { font-size: 24px; }
.auth-card .card-b { padding: 24px; }

/* ---------- members ---------- */
.members { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.mcard { padding: 14px; display: flex; gap: 12px; align-items: center; cursor: pointer; }
.mcard:hover { border-color: var(--line2); }
.tier-h { display: flex; align-items: center; gap: 10px; margin: 22px 0 10px; }
.tier-h h2 { font-size: 17px; text-transform: uppercase; letter-spacing: 1px; }
.tier-h .line { flex: 1; height: 1px; background: var(--line); }
.online-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); display: inline-block; }
.lb-row { display: grid; grid-template-columns: 28px 1fr auto; gap: 10px; align-items: center; padding: 7px 8px; border-radius: 7px; }
.lb-row:nth-child(-n+3) .rk { color: var(--warn); }
.lb-row .rk { font-family: var(--head); font-weight: 700; font-size: 16px; text-align: center; color: var(--muted); }
.lb-row .pts { font-family: var(--head); font-weight: 700; font-size: 17px; }

/* ---------- admin ---------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.tabs button { background: none; border: 0; padding: 10px 14px; color: var(--text2); cursor: pointer; font-weight: 500; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs button.on { color: #fff; border-bottom-color: var(--accent); }
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.table td { padding: 8px 10px; border-bottom: 1px solid rgba(38, 45, 57, .6); vertical-align: middle; }
.rank-row { display: grid; grid-template-columns: 26px 1fr 170px 70px 90px; gap: 8px; align-items: center; padding: 5px 0; }
.rank-row .handle { color: var(--muted); text-align: center; font-size: 12px; }
.code { font-family: ui-monospace, Consolas, monospace; font-size: 12px; background: var(--bg2); border: 1px solid var(--line); border-radius: 6px; padding: 6px 9px; overflow-wrap: anywhere; user-select: all; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .dash-grid { grid-template-columns: minmax(0, 1fr); }
  .stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .side { display: none; }
  .topbar { padding: 12px 16px; }
  .page { padding: 16px 16px 90px; }
  .mobile-nav {
    display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
    background: rgba(18, 22, 28, .96); backdrop-filter: blur(10px); border-top: 1px solid var(--line);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  }
  .mobile-nav a { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 10px; color: var(--muted); padding: 4px 0; position: relative; }
  .mobile-nav a svg { width: 20px; height: 20px; }
  .mobile-nav a.active { color: var(--accent); }
  .mobile-nav a .badge { position: absolute; top: 0; left: 55%; transform: scale(.85); }
  .board { grid-template-columns: 1fr; }
  .detail-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .month .day { min-height: 74px; padding: 3px; }
  .chip .tm { display: none; }
  .chip { font-size: 10.5px; padding: 1px 4px; border-left-width: 2px; }
  .month .dow { padding: 6px 4px; font-size: 10px; text-align: center; }
  .hide-m { display: none !important; }
  .cal-toolbar h2 { min-width: 0; font-size: 18px; order: -1; width: 100%; }
  .modal-back { padding: 0; }
  .modal { border-radius: 0; min-height: 100vh; border: 0; }
  .pop { left: 8px !important; right: 8px; width: auto; }
  .rank-row { grid-template-columns: 22px 1fr 120px 60px; }
  .rank-row .members-n { display: none; }
  .hero h1 { font-size: 24px; }
}
@media (max-width: 520px) {
  .stats { gap: 8px; }
  .stat { padding: 10px 12px; }
  .stat .v { font-size: 24px; }
  .week-body, .week-head, .week-allday { grid-template-columns: 34px repeat(7, minmax(40px, 1fr)); }
}

/* ---------- documents ---------- */
.docs-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 18px; align-items: start; }
.folder-list { padding: 8px; display: flex; flex-direction: column; gap: 2px; position: sticky; top: 80px; }
.folder-list .k { font-size: 11px; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); font-weight: 600; padding: 6px 8px; }
.folder-list button { display: flex; align-items: center; gap: 9px; border: 0; background: transparent; color: var(--text2); padding: 8px; border-radius: 7px; cursor: pointer; text-align: left; font-weight: 500; min-width: 0; }
.folder-list button:hover { background: var(--panel2); color: var(--text); }
.folder-list button.on { background: var(--accent-bg); color: #fff; }
.folder-list .n { margin-left: auto; font-size: 12px; color: var(--muted); }
.folder-mobile { display: none; }
.doc-list { display: flex; flex-direction: column; gap: 8px; }
.doc-card { display: flex; gap: 14px; align-items: center; padding: 12px 14px; cursor: pointer; transition: border-color .12s; }
.doc-card:hover { border-color: var(--line2); }
.doc-ic { width: 38px; height: 38px; border-radius: 9px; display: grid; place-items: center; background: var(--panel2); border: 1px solid var(--line); color: var(--accent); flex: none; }
.doc-ic svg { width: 19px; height: 19px; }
.doc-ic.sm { width: 28px; height: 28px; border-radius: 7px; }
.doc-ic.sm svg { width: 15px; height: 15px; }
.doc-ic.kind-file { color: var(--warn); }
.doc-snip { color: var(--text2); margin-top: 3px; display: -webkit-box; -webkit-line-clamp: 1; line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.doc-badges { display: flex; gap: 12px; color: var(--muted); font-size: 12px; flex: none; }
.doc-badges span { display: inline-flex; align-items: center; gap: 4px; }
.doc-page { width: 100%; }
.doc-head { margin-bottom: 18px; }
.doc-title { font-size: 32px; margin: 8px 0 4px; overflow-wrap: anywhere; }
.doc-grid { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 20px; align-items: start; }
.link-card { display: flex; gap: 12px; align-items: center; padding: 14px 16px; margin-bottom: 16px; color: var(--text); text-decoration: none; }
.link-card:hover { border-color: var(--accent); text-decoration: none; }
.md { padding: 22px 26px; line-height: 1.7; color: var(--text); overflow-wrap: anywhere; }
.md > :first-child { margin-top: 0; }
.md > :last-child { margin-bottom: 0; }
.md h2 { font-size: 24px; margin: 22px 0 8px; }
.md h3 { font-size: 19px; margin: 18px 0 6px; }
.md h4 { font-size: 16px; margin: 16px 0 4px; color: var(--accent); text-transform: uppercase; letter-spacing: .6px; }
.md p { margin: 0 0 12px; }
.md ul, .md ol { margin: 0 0 12px; padding-left: 22px; }
.md li { margin: 3px 0; }
.md ul.md-checks { list-style: none; padding-left: 2px; }
.md ul.md-checks li { display: flex; gap: 10px; align-items: flex-start; }
.md ul.md-checks li .checkbox-round { margin-top: 4px; }
.md ul.md-checks li.done > span { color: var(--muted); text-decoration: line-through; }
.md code { font-family: ui-monospace, Consolas, monospace; font-size: 12.5px; background: var(--bg2); border: 1px solid var(--line); border-radius: 5px; padding: 1px 5px; }
.md pre { background: var(--bg2); border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; overflow-x: auto; margin: 0 0 12px; }
.md pre code { border: 0; padding: 0; background: none; }
.md blockquote { margin: 0 0 12px; padding: 4px 14px; border-left: 3px solid var(--accent); color: var(--text2); background: rgba(127, 167, 232, .05); border-radius: 0 6px 6px 0; }
.md hr { border: 0; border-top: 1px solid var(--line2); margin: 18px 0; }
.md img { max-width: 100%; border-radius: 8px; border: 1px solid var(--line); display: block; margin: 6px 0; }
.md del { color: var(--muted); }
.img-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.img-tile { display: flex; flex-direction: column; gap: 4px; color: var(--text2); text-decoration: none; }
.img-tile img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); background: var(--bg2); }
.img-tile:hover img { border-color: var(--accent); }
.file-row { cursor: default; }
.file-row:hover { background: transparent; }
.dropzone { border: 1.5px dashed var(--line2); border-radius: 10px; padding: 22px; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; color: var(--text2); cursor: pointer; transition: border-color .12s, background .12s; }
.dropzone svg { width: 26px; height: 26px; color: var(--accent); }
.dropzone.sm { flex-direction: row; justify-content: center; padding: 10px; font-size: 13px; }
.dropzone.sm svg { width: 17px; height: 17px; }
.dropzone.over, .dropzone:hover { border-color: var(--accent); background: rgba(127, 167, 232, .05); }
.editor-bar { display: flex; gap: 12px; align-items: center; }
.title-input { font-family: var(--head); font-size: 24px; font-weight: 700; height: 48px; }
.md-toolbar { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; background: var(--panel); border: 1px solid var(--line); border-bottom: 0; border-radius: 10px 10px 0 0; padding: 6px; }
.md-toolbar > button { min-width: 32px; height: 30px; border: 1px solid transparent; background: transparent; color: var(--text2); border-radius: 6px; cursor: pointer; font-weight: 700; font-size: 13px; }
.md-toolbar > button:hover { background: var(--panel3); color: #fff; }
.editor-split { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border: 1px solid var(--line); border-radius: 0 0 10px 10px; overflow: hidden; }
.md-src { border: 0; border-radius: 0; min-height: 62vh; font-family: ui-monospace, Consolas, monospace; font-size: 13.5px; line-height: 1.65; resize: vertical; background: var(--bg2); }
.md-src:focus { box-shadow: none; }
.md-preview { border: 0; border-left: 1px solid var(--line); border-radius: 0; max-height: 75vh; overflow-y: auto; }
.show-m { display: none; }
.hist-grid { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 14px; }
.hist-grid .list { max-height: 55vh; overflow-y: auto; }
.li.sel { background: var(--panel3); }
/* home screen */
.hero-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
button.pill { border: 0; cursor: pointer; font: inherit; font-size: 12px; font-weight: 500; }
button.pill svg { width: 12px; height: 12px; }
.home-top { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 18px; margin-bottom: 18px; align-items: start; }
.attn { position: relative; display: flex; gap: 12px; align-items: center; padding: 10px 12px 10px 16px; border-radius: 8px; cursor: pointer; }
.attn + .attn { border-top: 1px solid rgba(38, 45, 57, .6); }
.attn:hover { background: var(--panel2); }
.attn::before { content: ""; position: absolute; left: 4px; top: 12px; bottom: 12px; width: 3px; border-radius: 2px; background: var(--accent); opacity: .7; }
.attn.lv-urgent::before { background: var(--danger); opacity: 1; }
.attn.lv-warn::before { background: var(--warn); opacity: 1; }
.attn-ic { width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; flex: none; background: var(--panel2); border: 1px solid var(--line); color: var(--accent); }
.attn-ic svg { width: 16px; height: 16px; }
.attn.lv-urgent .attn-ic { color: #f2a19b; background: rgba(224, 82, 74, .1); border-color: rgba(224, 82, 74, .35); }
.attn.lv-warn .attn-ic { color: #f0d98c; background: rgba(229, 192, 74, .08); border-color: rgba(229, 192, 74, .3); }
.attn-t { font-weight: 600; overflow-wrap: anywhere; }
.attn-acts { display: flex; gap: 6px; flex: none; }
.attn-go { color: var(--muted); flex: none; display: flex; }
.all-clear { display: flex; gap: 12px; align-items: center; padding: 18px 16px; }
.all-clear > svg { color: var(--ok); width: 28px; height: 28px; flex: none; }
.next-card[data-occ] { cursor: pointer; }
.next-card[data-occ]:hover { border-color: var(--line2); }
.next-t { font-weight: 700; font-size: 18px; display: flex; gap: 8px; align-items: center; min-width: 0; }
.next-t .dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.countdown-big { font-family: var(--head); font-size: 24px; font-weight: 700; color: var(--accent); margin: 2px 0 4px; line-height: 1.2; }
.countdown-big.live { color: var(--ok); }
.rsvp-mini.wide { display: grid; grid-template-columns: repeat(3, 1fr); }
.rsvp-mini.wide button { height: 32px; font-size: 13px; }
.cmd-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.cmd { display: block; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; color: inherit; text-decoration: none; min-width: 0; }
.cmd:hover { border-color: var(--line2); background: var(--panel2); text-decoration: none; }
.cmd .v { font-family: var(--head); font-size: 24px; font-weight: 700; line-height: 1.1; }
.cmd .l { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; }
.cmd.hot .v { color: var(--warn); }
.online-row { display: flex; flex-wrap: wrap; gap: 6px; }
.online-u { display: inline-flex; align-items: center; gap: 6px; max-width: 160px; padding: 3px 10px 3px 3px; border-radius: 16px; border: 1px solid var(--line); background: transparent; color: var(--text2); cursor: pointer; font: inherit; font-size: 12px; }
.online-u:hover { border-color: var(--line2); color: var(--text); }
@media (max-width: 1100px) { .home-top { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 520px) {
  .attn { flex-wrap: wrap; }
  .attn-acts { width: 100%; padding-left: 44px; }
  .hide-s { display: none; }
  .cmd-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* personnel: leave, records, quotas */
.pill.mini { height: 18px; font-size: 10px; padding: 0 6px; gap: 3px; }
.pill.mini svg { width: 11px; height: 11px; }
.pill.leave { background: rgba(79, 179, 181, .14); color: #8fd3d4; }
.mcard.away { border-style: dashed; }
.loa-banner { display: flex; gap: 12px; align-items: center; padding: 12px 14px; margin-bottom: 16px; border-radius: 10px;
  background: rgba(79, 179, 181, .1); border: 1px solid rgba(79, 179, 181, .4); line-height: 1.5; }
.loa-banner > svg { width: 22px; height: 22px; color: #8fd3d4; flex: none; }
.loa-banner strong { color: #8fd3d4; }
.loa-banner.soon { background: transparent; border-style: dashed; }
.grid > .loa-banner { margin-bottom: 0; }
.pill.lv-pending { background: rgba(229, 192, 74, .14); color: #f0d98c; }
.pill.lv-approved { background: rgba(123, 196, 127, .14); color: #a9dcac; }
.pill.lv-denied { background: rgba(224, 82, 74, .14); color: #f2a19b; }
.leave-row { cursor: default; align-items: flex-start; }
.leave-row:hover { background: transparent; }
.leave-row .pill, .leave-row .btn, .leave-row .row { margin-top: 2px; }
.rec { display: flex; gap: 10px; align-items: flex-start; padding: 9px 2px; }
.rec + .rec { border-top: 1px solid rgba(38, 45, 57, .6); }
.rec.inactive { opacity: .55; }
.rec.inactive strong { text-decoration: line-through; }
.rec-ic { width: 28px; height: 28px; border-radius: 7px; display: grid; place-items: center; flex: none; background: var(--panel2); border: 1px solid var(--line); }
.rec-ic svg { width: 15px; height: 15px; }
.rec-ok { color: var(--ok); } .rec-danger { color: var(--danger, #e0524a); } .rec-warn { color: var(--warn); }
.rec-accent { color: var(--accent); } .rec-muted { color: var(--muted); }
.rec-form { display: grid; grid-template-columns: auto auto minmax(0, 1fr) auto; gap: 8px; margin-bottom: 8px; }
.rec-form .input { width: auto; min-width: 0; }
.quota-row .quota-n { flex: none; min-width: 64px; text-align: right; font-family: var(--head); font-size: 18px; }
.quota-big { font-family: var(--head); font-size: 34px; font-weight: 700; line-height: 1; }
.seg.wrap-seg { flex-wrap: wrap; }
/* polls */
.poll-q { font-weight: 600; font-size: 16px; margin-bottom: 10px; overflow-wrap: anywhere; }
.poll.compact + .poll.compact { border-top: 1px solid var(--line); padding-top: 14px; }
.poll-opts { display: flex; flex-direction: column; gap: 6px; }
.poll-opt { display: flex; gap: 10px; align-items: center; padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; }
.poll-opt:hover { border-color: var(--line2); background: var(--panel2); }
.poll-opt span { overflow-wrap: anywhere; }
.poll-res { position: relative; display: flex; align-items: center; gap: 8px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; min-height: 38px; }
.poll-res .bar { position: absolute; inset: 0 auto 0 0; background: rgba(127, 167, 232, .12); transition: width .3s; }
.poll-res.lead .bar { background: rgba(127, 167, 232, .22); }
.poll-res.mine { border-color: rgba(127, 167, 232, .5); }
.poll-res .t { position: relative; flex: 1; display: flex; align-items: center; gap: 6px; overflow-wrap: anywhere; }
.poll-res .t svg { color: var(--accent); flex: none; }
.poll-res .av-stack, .poll-res .n { position: relative; flex: none; }
.poll-res .n { font-size: 12px; color: var(--text2); }
/* share links */
.share-row { cursor: default; }
.share-row:hover { background: transparent; }
.share-ic { width: 28px; height: 28px; border-radius: 7px; display: grid; place-items: center; flex: none; background: var(--panel2); border: 1px solid var(--line); }
.share-ic svg { width: 15px; height: 15px; }
.share-ic.view { color: var(--ok); }
.share-ic.edit { color: var(--warn); }
.share-sec { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }
.share-toggle { align-items: center; color: var(--text); }
.share-toggle strong { display: block; }
.share-opts { display: grid; gap: 10px; margin: 12px 0 2px 26px; }
.share-url { display: flex; gap: 8px; }
.share-url .input { flex: 1; min-width: 0; font-family: ui-monospace, Consolas, monospace; font-size: 12.5px; color: var(--text2); }
.share-name { grid-template-columns: minmax(0, 320px) !important; }
.share-shell { min-height: 100vh; }
.share-top { display: flex; align-items: center; gap: 10px; padding: 10px 20px; border-bottom: 1px solid var(--line); background: var(--panel); position: sticky; top: 0; z-index: 5; }
.share-top .brand { padding: 0; }
.share-page { max-width: 980px; margin: 0 auto; }
.share-foot { margin-top: 28px; text-align: center; }
@media (max-width: 1100px) {
  .doc-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 860px) {
  .docs-layout { grid-template-columns: minmax(0, 1fr); }
  .folder-list { display: none; }
  .folder-mobile { display: block; }
  .mobile-nav { grid-template-columns: repeat(6, 1fr); }
  .doc-title { font-size: 26px; }
  .doc-badges { display: none; }
  .md { padding: 16px; }
  .editor-bar { flex-direction: column; align-items: stretch; }
  .editor-split { grid-template-columns: 1fr; }
  .editor-split .md-preview { display: none; border-left: 0; }
  .editor-split[data-pane="preview"] .md-src { display: none; }
  .editor-split[data-pane="preview"] .md-preview { display: block; }
  .show-m { display: inline-flex; }
  .hist-grid { grid-template-columns: 1fr; }
  .doc-page .form-grid { grid-template-columns: 1fr 1fr !important; }
  .doc-page .form-grid.share-name { grid-template-columns: minmax(0, 1fr) !important; }
  .rec-form { grid-template-columns: 1fr 1fr; }
  .rec-form .input[name="text"] { grid-column: 1 / -1; }
  .rec-form .btn { grid-column: 1 / -1; }
  .share-top { padding: 10px 14px; }
  .share-top .brand .t2 { display: none; }
  .share-url { flex-wrap: wrap; }
  .share-opts { margin-left: 0; }
}

/* ---------- layout polish (UI audit 2026-09-27) ---------- */
/* form controls had inherited the 12px / 500 label style when they sat inside a .field */
.input, select.input, textarea.input { font-size: 14px; font-weight: 400; }
.title-input { font-size: 24px; font-weight: 700; }
.md-src { font-size: 13.5px; }
.share-url .input { font-size: 12.5px; }
.btn { font-size: 14px; }
.btn.sm { font-size: 13px; }
.seg button { font-size: 14px; }
/* due-date badges outside task cards had no gap between clock and text */
.due { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.due svg { width: 13px; height: 13px; flex: none; }
/* small avatar stacks overlapped so much the initials ran together */
.av-stack .av.sm:not(:first-child) { margin-left: -5px; }
/* board headers: the "+" button made two columns taller than "Done" */
.col-h .btn { margin: -7px -4px -7px 0; }
/* week view: reserve the scrollbar gutter in the header rows too, so day columns line up with the grid */
.week-head, .week-allday { overflow-y: hidden; scrollbar-gutter: stable; }
.week-body { scrollbar-gutter: stable; }
/* share modal options line up with the link title, not halfway to it */
.share-opts { margin-left: 60px; }
/* file rows: keep "10 KB · name · 3h ago" on one line */
.file-row .small.muted { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* service record form: the reason box takes the free space */
.rec-form { display: flex; flex-wrap: wrap; gap: 8px; }
.rec-form select.input { flex: 0 0 auto; width: auto; }
.rec-form .input[name="text"] { flex: 1 1 180px; width: auto; min-width: 0; }
.rec-form .btn { flex: none; }
/* announcements: title and actions share one row */
.ann-head { display: flex; gap: 10px; align-items: flex-start; }
.ann-head .ann-acts { display: flex; gap: 2px; flex: none; margin: -4px -6px 0 0; }
/* share page header lines up with the centred content column */
.share-top { padding: 10px 0; }
.share-top-in { display: flex; align-items: center; gap: 10px; max-width: 980px; margin: 0 auto; padding: 0 28px; }
.cmd-grid { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); }
@media (max-width: 860px) {
  /* 16px stops iPhones from zooming the whole page when a field is tapped */
  .input:not(.title-input):not([readonly]), select.input, textarea.input { font-size: 16px; }
  .share-top { padding: 10px 0; }
  .share-top-in { padding: 0 16px; }
}
@media (max-width: 520px) {
  .share-opts { margin-left: 0; }
  .rec-form select.input { flex: 1 1 140px; }
}
/* home: "Next up" sits in the right column on wide screens, right after "Needs your attention" when stacked */
.narrow-only { display: none; }
@media (max-width: 1100px) { .narrow-only { display: block; } .wide-only { display: none; } }
/* agenda: one time column for events and task deadlines, side column that never wraps */
.ag-time { width: 110px; flex: none; line-height: 1.45; }
.ag-side { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; white-space: nowrap; }
.ag-row .small svg { width: 11px; height: 11px; vertical-align: -1px; }
@media (max-width: 520px) { .ag-time { width: 46px; } .ag-row { gap: 10px; } }
@media (max-width: 520px) {
  .week-ev { padding: 2px 3px; font-size: 10px; border-left-width: 2px; }
  .week-ev .tm { font-size: 9px; }
}
/* home attention rows on phones: single buttons stay on the right, only the 3 RSVP buttons get their own line */
@media (max-width: 520px) {
  .attn { flex-wrap: nowrap; }
  .attn-acts { width: auto; padding-left: 0; }
  .attn:has(.rsvp-mini) { flex-wrap: wrap; }
  .attn:has(.rsvp-mini) .attn-acts { width: 100%; padding-left: 44px; }
}
/* share page: the header is a plain block so its inner row spans the content width */
.share-top { display: block; }
@media (max-width: 520px) {
  /* button groups scroll sideways instead of squashing or wrapping their labels */
  .seg { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
  .seg::-webkit-scrollbar { display: none; }
  .seg button { white-space: nowrap; flex: none; }
  .seg.wrap-seg { flex-wrap: nowrap; }
  .task-toolbar > .input { flex: 1 1 100%; max-width: none !important; }
  /* share modal: the link gets its own line, buttons below */
  .share-url .input { flex: 1 1 100%; }
  /* service record form: [type][expiry] / [reason][Add] */
  .rec-form select.input { flex: 1 1 130px; }
  .rec-form .input[name="text"] { flex: 1 1 calc(100% - 80px); }
}
