/* VMH OS — agency operating system UI. No build step required. */
:root {
  --ink: #12141c;
  --ink-2: #1b1e29;
  --ink-3: #272b3a;
  --ink-text: #a9afc4;
  --bg: #f5f4f0;
  --surface: #ffffff;
  --surface-2: #fafaf8;
  --line: #e7e5df;
  --line-2: #efede8;
  --text: #191b23;
  --text-2: #5c6070;
  --text-3: #8b8f9e;
  --accent: #ff5a36;
  --accent-ink: #e5431f;
  --accent-soft: #fff0eb;
  --blue: #2f6fed; --blue-soft: #eaf1ff;
  --green: #12a46b; --green-soft: #e6f7ef;
  --amber: #c98200; --amber-soft: #fff5de;
  --red: #e0353b; --red-soft: #fdecec;
  --violet: #7c4ddb; --violet-soft: #f2ecfd;
  --slate: #64748b; --slate-soft: #eef0f4;
  --radius: 10px;
  --radius-sm: 7px;
  --shadow: 0 1px 2px rgba(18, 20, 28, .04), 0 2px 8px rgba(18, 20, 28, .04);
  --shadow-lg: 0 12px 40px rgba(18, 20, 28, .14);
  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --sidebar: 252px;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { font-family: var(--font); font-size: 14px; line-height: 1.5; color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
h1, h2, h3, h4 { margin: 0; font-weight: 700; letter-spacing: -.01em; }
h1 { font-size: 22px; } h2 { font-size: 17px; } h3 { font-size: 14.5px; } h4 { font-size: 13px; }
p { margin: 0 0 .6em; }
hr { border: 0; border-top: 1px solid var(--line); margin: 16px 0; }
code, .mono { font-family: var(--mono); font-size: 12px; }
.muted { color: var(--text-3); }
.small { font-size: 12px; }
.xs { font-size: 11px; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.center { text-align: center; }
.hidden { display: none !important; }
[x-cloak] { display: none !important; }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: var(--sidebar) 1fr; min-height: 100vh; }
.sidebar { background: var(--ink); color: var(--ink-text); position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; scrollbar-width: thin; scrollbar-color: var(--ink-3) transparent; }
.brand { display: flex; align-items: center; gap: 10px; padding: 18px 18px 14px; color: #fff; }
.brand-mark { width: 32px; height: 32px; border-radius: 9px; background: var(--accent); display: grid; place-items: center; font-weight: 800; font-size: 15px; color: #fff; letter-spacing: -.04em; }
.brand-name { font-weight: 700; font-size: 15px; line-height: 1.1; }
.brand-sub { font-size: 10.5px; color: var(--ink-text); opacity: .75; }
.nav { padding: 4px 10px 24px; flex: 1; }
.nav-group { margin-top: 14px; }
.nav-group-title { font-size: 10.5px; text-transform: uppercase; letter-spacing: .09em; color: #6b7189; padding: 6px 10px; display: flex; justify-content: space-between; align-items: center; cursor: pointer; user-select: none; }
.nav-group-title svg { width: 12px; height: 12px; transition: transform .15s; }
.nav-group.closed .nav-group-title svg { transform: rotate(-90deg); }
.nav-group.closed .nav-items { display: none; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 8px; color: var(--ink-text); font-size: 13.2px; font-weight: 500; }
.nav a svg { width: 16px; height: 16px; flex: none; opacity: .8; }
.nav a:hover { background: var(--ink-2); color: #fff; }
.nav a.active { background: var(--ink-3); color: #fff; }
.nav a.active svg { color: var(--accent); opacity: 1; }
.nav .count { margin-left: auto; background: var(--accent); color: #fff; font-size: 10.5px; font-weight: 700; padding: 1px 7px; border-radius: 20px; }
.sidebar-foot { padding: 12px 14px; border-top: 1px solid var(--ink-2); font-size: 11px; color: #6b7189; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 30; background: rgba(245, 244, 240, .88); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 12px; padding: 10px 24px; }
.menu-btn { display: none; }
.search-box { flex: 1; max-width: 520px; position: relative; }
.search-box input { width: 100%; padding: 9px 12px 9px 36px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); font: inherit; outline: none; }
.search-box input:focus { border-color: var(--text-3); }
.search-box svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--text-3); }
.search-results { position: absolute; top: calc(100% + 6px); left: 0; right: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lg); max-height: 70vh; overflow: auto; padding: 6px; }
.search-results .grp { font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--text-3); padding: 8px 10px 4px; }
.search-results a { display: block; padding: 7px 10px; border-radius: 7px; }
.search-results a:hover, .search-results a.on { background: var(--surface-2); }
.search-results a .s { font-size: 11.5px; color: var(--text-3); }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.icon-btn { position: relative; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 9px; border: 1px solid var(--line); background: var(--surface); color: var(--text-2); cursor: pointer; }
.icon-btn:hover { color: var(--text); border-color: var(--text-3); }
.icon-btn svg { width: 17px; height: 17px; }
.icon-btn .dot { position: absolute; top: -5px; right: -5px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--accent); color: #fff; font-size: 10.5px; font-weight: 700; display: grid; place-items: center; border: 2px solid var(--bg); }
.content { padding: 22px 24px 60px; max-width: 1560px; width: 100%; }

/* dropdown */
.dd { position: relative; }
.dd-menu { position: absolute; right: 0; top: calc(100% + 6px); min-width: 220px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 6px; z-index: 50; }
.dd-menu a, .dd-menu button { display: flex; width: 100%; gap: 8px; align-items: center; padding: 8px 10px; border-radius: 7px; border: 0; background: none; font: inherit; color: var(--text); cursor: pointer; text-align: left; }
.dd-menu a:hover, .dd-menu button:hover { background: var(--surface-2); }
.dd-menu .sep { height: 1px; background: var(--line); margin: 5px 0; }
.notif-list { width: 360px; max-height: 420px; overflow: auto; }
.notif-item { display: block; padding: 9px 10px; border-radius: 8px; }
.notif-item:hover { background: var(--surface-2); }
.notif-item .t { font-weight: 600; font-size: 13px; }
.notif-item .b { font-size: 12px; color: var(--text-2); }
.notif-item .a { font-size: 11px; color: var(--text-3); }

/* ---------- page head ---------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head .crumbs { font-size: 12px; color: var(--text-3); margin-bottom: 4px; }
.page-head .crumbs a:hover { color: var(--text); }
.page-head .sub { color: var(--text-2); font-size: 13px; margin-top: 3px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font: inherit; font-weight: 600; font-size: 13px; cursor: pointer; white-space: nowrap; line-height: 1.2; }
.btn:hover { border-color: var(--text-3); }
.btn svg { width: 15px; height: 15px; }
.btn-primary { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn-primary:hover { background: #000; border-color: #000; }
.btn-accent { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-ink); border-color: var(--accent-ink); }
.btn-green { background: var(--green); border-color: var(--green); color: #fff; }
.btn-danger { color: var(--red); }
.btn-danger:hover { border-color: var(--red); background: var(--red-soft); }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-ghost:hover { background: var(--surface); border-color: var(--line); }
.btn-sm { padding: 5px 10px; font-size: 12px; border-radius: 7px; }
.btn-xs { padding: 3px 8px; font-size: 11.5px; border-radius: 6px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.link { color: var(--blue); }
.link:hover { text-decoration: underline; }
.wa { font-size: 10px; font-weight: 700; color: #fff; background: #25d366; padding: 1px 5px; border-radius: 4px; margin-left: 4px; }

/* ---------- cards / grid ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 13px 16px; border-bottom: 1px solid var(--line-2); }
.card-head h3 { display: flex; align-items: center; gap: 8px; }
.card-head h3 svg { width: 16px; height: 16px; color: var(--text-3); }
.card-body { padding: 16px; }
.card-body.tight { 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)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.g-main { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.stack > * + * { margin-top: 16px; }
.row { display: flex; gap: 10px; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }

.kpi { padding: 14px 16px; position: relative; overflow: hidden; }
.kpi .l { font-size: 12px; color: var(--text-2); font-weight: 500; display: flex; align-items: center; gap: 6px; }
.kpi .l svg { width: 14px; height: 14px; }
.kpi .v { font-size: 26px; font-weight: 800; letter-spacing: -.03em; margin-top: 2px; }
.kpi .s { font-size: 11.5px; color: var(--text-3); }
.kpi.accent { border-color: var(--accent); }
.kpi.accent .v { color: var(--accent-ink); }
.kpi.red .v { color: var(--red); }
a.kpi:hover { border-color: var(--text-3); }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; font-size: 13px; }
table.t th { text-align: left; font-weight: 600; font-size: 11.5px; color: var(--text-2); text-transform: uppercase; letter-spacing: .04em; padding: 10px 12px; border-bottom: 1px solid var(--line); background: var(--surface-2); white-space: nowrap; position: sticky; top: 0; z-index: 1; }
table.t th a { display: inline-flex; gap: 4px; align-items: center; }
table.t td { padding: 9px 12px; border-bottom: 1px solid var(--line-2); vertical-align: top; }
table.t tr:last-child td { border-bottom: 0; }
table.t tbody tr:hover td { background: #fcfbf8; }
table.t td.num, table.t th.num { text-align: right; font-variant-numeric: tabular-nums; }
table.t tfoot td { font-weight: 700; background: var(--surface-2); border-top: 1px solid var(--line); }
table.t .title-cell a { font-weight: 600; }
table.t .title-cell a:hover { color: var(--accent-ink); }
table.t.compact td { padding: 6px 10px; }
.chk { width: 16px; height: 16px; accent-color: var(--ink); }
tr.overdue td:first-child { box-shadow: inset 3px 0 0 var(--red); }

/* ---------- badges / tags ---------- */
.badge { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 600; padding: 2px 9px; border-radius: 20px; white-space: nowrap; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .8; }
.badge-green { background: var(--green-soft); color: var(--green); }
.badge-blue { background: var(--blue-soft); color: var(--blue); }
.badge-amber { background: var(--amber-soft); color: var(--amber); }
.badge-red { background: var(--red-soft); color: var(--red); }
.badge-violet { background: var(--violet-soft); color: var(--violet); }
.badge-slate { background: var(--slate-soft); color: var(--slate); }
.pill { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 600; padding: 2px 9px; border-radius: 20px; color: #fff; }
.tag { display: inline-block; font-size: 11px; padding: 1px 7px; border-radius: 5px; background: var(--slate-soft); color: var(--text-2); margin: 1px 3px 1px 0; }
.prio { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 600; text-transform: capitalize; }
.prio::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: currentColor; }
.prio-low { color: #94a3b8; } .prio-medium { color: var(--blue); } .prio-high { color: var(--amber); } .prio-urgent { color: var(--red); }
.yes { color: var(--green); font-weight: 600; }
.date-red { color: var(--red); font-weight: 600; }
.date-amber { color: var(--amber); font-weight: 600; }
.swatch { display: inline-block; width: 16px; height: 16px; border-radius: 4px; border: 1px solid var(--line); vertical-align: middle; }
.code { font-family: var(--mono); font-size: 11.5px; color: var(--text-3); }

.avatar { width: 30px; height: 30px; border-radius: 50%; display: inline-grid; place-items: center; color: #fff; font-weight: 700; font-size: 11.5px; flex: none; }
.avatar.xs { width: 20px; height: 20px; font-size: 9px; }
.avatar.sm { width: 24px; height: 24px; font-size: 10px; }
.avatar.lg { width: 44px; height: 44px; font-size: 15px; }
.chip-user { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }

/* ---------- progress ---------- */
.bar { height: 7px; background: var(--line-2); border-radius: 10px; overflow: hidden; min-width: 60px; }
.bar > i { display: block; height: 100%; background: var(--green); border-radius: 10px; }
.bar.amber > i { background: var(--amber); }
.bar.red > i { background: var(--red); }
.bar.accent > i { background: var(--accent); }

/* ---------- forms ---------- */
.form-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 14px 16px; }
.fg { grid-column: span 6; min-width: 0; }
.fg.c3 { grid-column: span 3; } .fg.c4 { grid-column: span 4; } .fg.c12 { grid-column: span 12; } .fg.c8 { grid-column: span 8; }
label.l, .l { display: block; font-size: 12.5px; font-weight: 600; color: var(--text-2); margin-bottom: 5px; }
.req { color: var(--accent); }
.help { font-size: 11.5px; color: var(--text-3); margin-top: 4px; }
.err { font-size: 12px; color: var(--red); margin-top: 4px; }
input.i, select.i, textarea.i, .i { width: 100%; padding: 8px 11px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); font: inherit; color: var(--text); outline: none; transition: border-color .12s, box-shadow .12s; }
input.i:focus, select.i:focus, textarea.i:focus { border-color: var(--ink); box-shadow: 0 0 0 3px rgba(18, 20, 28, .06); }
textarea.i { min-height: 84px; resize: vertical; }
textarea.i.tall { min-height: 180px; }
select.i { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238b8f9e' stroke-width='2.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; padding-right: 30px; }
input.i-sm, select.i-sm { padding: 5px 9px; font-size: 12.5px; border-radius: 7px; }
select.i-sm { padding-right: 26px; background-position: right 7px center; }
.checkbox { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 500; }
.checkbox input { width: 16px; height: 16px; accent-color: var(--ink); }
.multi-checks { display: flex; flex-wrap: wrap; gap: 6px; }
.multi-checks label { display: inline-flex; gap: 6px; align-items: center; border: 1px solid var(--line); border-radius: 7px; padding: 4px 9px; font-size: 12.5px; cursor: pointer; background: var(--surface); }
.multi-checks label:has(input:checked) { border-color: var(--ink); background: var(--ink); color: #fff; }
.multi-checks input { display: none; }
.form-actions { display: flex; gap: 10px; justify-content: flex-end; padding: 14px 16px; border-top: 1px solid var(--line-2); background: var(--surface-2); border-radius: 0 0 var(--radius) var(--radius); position: sticky; bottom: 0; }
.secret-wrap { position: relative; }
.secret-wrap button { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); }
.ts-wrapper .ts-control { border-radius: 8px !important; border-color: var(--line) !important; padding: 7px 10px !important; font-size: 14px; min-height: 38px; }
.ts-wrapper.focus .ts-control { border-color: var(--ink) !important; box-shadow: 0 0 0 3px rgba(18, 20, 28, .06) !important; }
.ts-dropdown { border-radius: 8px; border-color: var(--line); box-shadow: var(--shadow-lg); font-size: 13.5px; }

/* filters bar */
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--line-2); }
.filters .i { width: auto; min-width: 140px; }
.filters .search { min-width: 220px; flex: 1; max-width: 340px; }
.status-chips { display: flex; gap: 6px; flex-wrap: wrap; padding: 10px 14px 0; }
.status-chips a { font-size: 12px; padding: 4px 10px; border-radius: 20px; border: 1px solid var(--line); background: var(--surface); color: var(--text-2); font-weight: 500; }
.status-chips a.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.status-chips a b { font-weight: 700; margin-left: 3px; }
.bulkbar { display: flex; gap: 8px; align-items: center; padding: 8px 14px; background: var(--accent-soft); border-bottom: 1px solid var(--line); font-size: 13px; }

/* tabs */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 16px; overflow-x: auto; scrollbar-width: none; }
.tabs a, .tabs button { padding: 9px 14px; font-weight: 600; font-size: 13px; color: var(--text-2); border: 0; background: none; border-bottom: 2px solid transparent; margin-bottom: -1px; cursor: pointer; white-space: nowrap; font-family: inherit; }
.tabs a:hover, .tabs button:hover { color: var(--text); }
.tabs a.on, .tabs button.on { color: var(--text); border-bottom-color: var(--accent); }
.tabs .n { font-size: 11px; background: var(--slate-soft); color: var(--text-2); padding: 0 6px; border-radius: 10px; margin-left: 4px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--surface); }
.seg a { padding: 6px 12px; font-size: 12.5px; font-weight: 600; color: var(--text-2); display: inline-flex; gap: 6px; align-items: center; }
.seg a svg { width: 14px; height: 14px; }
.seg a + a { border-left: 1px solid var(--line); }
.seg a.on { background: var(--ink); color: #fff; }

/* detail */
.dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; }
.dl > div { padding: 10px 16px; border-bottom: 1px solid var(--line-2); min-width: 0; }
.dl > div.wide { grid-column: span 2; }
.dl dt { font-size: 11.5px; color: var(--text-3); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; margin-bottom: 2px; }
.dl dd { margin: 0; word-break: break-word; }
.stat-strip { display: flex; flex-wrap: wrap; border-bottom: 1px solid var(--line-2); }
.stat-strip > div { padding: 12px 16px; border-right: 1px solid var(--line-2); min-width: 120px; }
.stat-strip .v { font-size: 18px; font-weight: 800; letter-spacing: -.02em; }
.stat-strip .l { font-size: 11.5px; color: var(--text-3); }

/* timeline / comments */
.feed { list-style: none; margin: 0; padding: 0; }
.feed li { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line-2); }
.feed li:last-child { border-bottom: 0; }
.feed .meta { font-size: 11.5px; color: var(--text-3); }
.feed .body { white-space: pre-wrap; word-break: break-word; }
.timeline { list-style: none; margin: 0; padding: 0 0 0 14px; border-left: 2px solid var(--line); }
.timeline li { position: relative; padding: 4px 0 10px 12px; font-size: 12.5px; color: var(--text-2); }
.timeline li::before { content: ""; position: absolute; left: -20px; top: 9px; width: 10px; height: 10px; border-radius: 50%; background: var(--surface); border: 2px solid var(--text-3); }
.timeline li b { color: var(--text); font-weight: 600; }

/* attachments */
.files { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.file-card { border: 1px solid var(--line); border-radius: 9px; overflow: hidden; background: var(--surface-2); position: relative; }
.file-card .thumb { height: 104px; display: grid; place-items: center; background: #f1efea; overflow: hidden; }
.file-card .thumb img, .file-card .thumb video { width: 100%; height: 100%; object-fit: cover; }
.file-card .thumb svg { width: 30px; height: 30px; color: var(--text-3); }
.file-card .nm { padding: 6px 8px; font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-card .del { position: absolute; top: 4px; right: 4px; }
.dropzone { border: 2px dashed var(--line); border-radius: 10px; padding: 14px; text-align: center; color: var(--text-3); font-size: 12.5px; }

/* gallery */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; padding: 14px; }
.gcard { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--surface); }
.gcard .thumb { aspect-ratio: 4/3; background: #f1efea; display: grid; place-items: center; overflow: hidden; }
.gcard .thumb img { width: 100%; height: 100%; object-fit: cover; }
.gcard .thumb svg { width: 36px; height: 36px; color: var(--text-3); }
.gcard .meta { padding: 9px 11px; }
.gcard .meta .t { font-weight: 600; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.month-head { grid-column: 1 / -1; font-weight: 700; font-size: 13px; color: var(--text-2); padding-top: 6px; border-bottom: 1px solid var(--line); padding-bottom: 6px; }

/* kanban */
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(270px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 10px; align-items: start; }
.col { background: #eeece6; border-radius: 11px; display: flex; flex-direction: column; max-height: calc(100vh - 210px); }
.col-head { display: flex; align-items: center; gap: 8px; padding: 11px 12px 8px; font-weight: 700; font-size: 12.5px; }
.col-head .dotc { width: 9px; height: 9px; border-radius: 50%; }
.col-head .n { margin-left: auto; font-size: 11.5px; color: var(--text-3); font-weight: 600; }
.col-body { padding: 4px 8px 10px; overflow-y: auto; flex: 1; min-height: 60px; }
.col.drag-over { outline: 2px dashed var(--accent); outline-offset: -3px; }
.kcard { background: var(--surface); border: 1px solid var(--line); border-radius: 9px; padding: 10px 11px; margin-bottom: 8px; cursor: grab; box-shadow: var(--shadow); }
.kcard:active { cursor: grabbing; }
.kcard.dragging { opacity: .4; }
.kcard .t { font-weight: 600; font-size: 13px; line-height: 1.35; display: block; }
.kcard .t:hover { color: var(--accent-ink); }
.kcard .m { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 7px; font-size: 11.5px; color: var(--text-3); }
.kcard.od { border-left: 3px solid var(--red); }

/* chat */
.chat { display: grid; grid-template-columns: 270px 1fr; height: calc(100vh - 140px); min-height: 480px; overflow: hidden; }
.chat-side { border-right: 1px solid var(--line); overflow-y: auto; background: var(--surface-2); }
.chat-side .sec { font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--text-3); padding: 14px 14px 6px; display: flex; justify-content: space-between; align-items: center; }
.chat-side a.ch { display: flex; align-items: center; gap: 8px; padding: 7px 14px; font-size: 13px; color: var(--text-2); }
.chat-side a.ch:hover { background: var(--line-2); }
.chat-side a.ch.on { background: var(--ink); color: #fff; }
.chat-side a.ch .u { margin-left: auto; background: var(--accent); color: #fff; font-size: 10.5px; font-weight: 700; padding: 0 6px; border-radius: 10px; }
.chat-main { display: flex; flex-direction: column; min-width: 0; }
.chat-head { padding: 12px 18px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 10px; }
.msgs { flex: 1; overflow-y: auto; padding: 16px 18px; background: var(--surface); }
.msg { display: flex; gap: 10px; margin-bottom: 14px; max-width: 760px; }
.msg .bub { background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 4px 12px 12px 12px; padding: 8px 12px; word-break: break-word; }
.msg.mine { margin-left: auto; flex-direction: row-reverse; }
.msg.mine .bub { background: var(--ink); color: #f2f2f5; border-color: var(--ink); border-radius: 12px 4px 12px 12px; }
.msg.mine .bub a { color: #ffb4a3; }
.msg .who { font-size: 11.5px; color: var(--text-3); margin-bottom: 3px; }
.msg.mine .who { text-align: right; }
.msg img.att { max-width: 280px; border-radius: 8px; margin-top: 6px; display: block; }
.composer { border-top: 1px solid var(--line); padding: 10px 14px; display: flex; gap: 8px; align-items: flex-end; background: var(--surface); }
.composer textarea { flex: 1; min-height: 42px; max-height: 160px; resize: none; }

/* calendar */
.fc { font-size: 12.5px; }
.fc .fc-toolbar-title { font-size: 17px !important; font-weight: 700; }
.fc .fc-button { background: var(--surface) !important; color: var(--text) !important; border: 1px solid var(--line) !important; font-weight: 600 !important; text-transform: capitalize; box-shadow: none !important; padding: 5px 11px !important; font-size: 12.5px !important; }
.fc .fc-button-active { background: var(--ink) !important; color: #fff !important; border-color: var(--ink) !important; }
.fc .fc-daygrid-event { border-radius: 4px; padding: 1px 4px; }
.fc .fc-day-today { background: var(--accent-soft) !important; }
.src-list label { display: flex; align-items: center; gap: 8px; padding: 5px 0; font-size: 13px; cursor: pointer; }
.src-list .sw { width: 11px; height: 11px; border-radius: 3px; }

.cal-layout { grid-template-columns: 220px minmax(0, 1fr); }
@media (max-width: 900px) { .cal-layout { grid-template-columns: 1fr; } }

/* attendance grid */
.att-grid { border-collapse: collapse; font-size: 11.5px; }
.att-grid th, .att-grid td { border: 1px solid var(--line-2); padding: 4px; text-align: center; min-width: 30px; }
.att-grid th { background: var(--surface-2); font-weight: 600; position: sticky; top: 0; }
.att-grid td.nm { text-align: left; white-space: nowrap; padding: 4px 10px; font-weight: 600; position: sticky; left: 0; background: var(--surface); min-width: 150px; }
.att-grid .wk { background: #f6f5f1; }
.c-P { color: var(--green); font-weight: 700; } .c-L { color: var(--amber); font-weight: 700; } .c-A { color: var(--red); font-weight: 700; background: var(--red-soft); }
.c-HD { color: #f97316; font-weight: 700; } .c-LV { color: var(--violet); font-weight: 700; } .c-WFH { color: var(--blue); font-weight: 700; } .c-H, .c-WO { color: var(--text-3); }
.cal-month { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal-month .dh { font-size: 11px; color: var(--text-3); text-align: center; font-weight: 600; text-transform: uppercase; }
.cal-month .d { border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; min-height: 70px; background: var(--surface); font-size: 11.5px; }
.cal-month .d .n { font-weight: 700; font-size: 12.5px; }
.cal-month .d.today { border-color: var(--accent); }
.cal-month .d.off { background: #f6f5f1; }

/* checkin widget */
.checkin { display: flex; align-items: center; gap: 8px; }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 0 rgba(18, 164, 107, .6); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 7px rgba(18, 164, 107, 0); } 100% { box-shadow: 0 0 0 0 rgba(18, 164, 107, 0); } }

/* list rows (dashboard) */
.lrow { display: flex; align-items: center; gap: 10px; padding: 9px 16px; border-bottom: 1px solid var(--line-2); }
.lrow:last-child { border-bottom: 0; }
.lrow:hover { background: #fcfbf8; }
.lrow .t { font-weight: 600; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lrow .s { font-size: 11.5px; color: var(--text-3); }
.empty { padding: 28px 16px; text-align: center; color: var(--text-3); font-size: 13px; }
.empty svg { width: 30px; height: 30px; display: block; margin: 0 auto 8px; opacity: .6; }

/* flash */
.flash { display: flex; gap: 10px; align-items: flex-start; padding: 11px 14px; border-radius: 9px; margin-bottom: 16px; font-weight: 500; border: 1px solid; }
.flash.ok { background: var(--green-soft); border-color: #bfe8d4; color: #0b6b46; }
.flash.error { background: var(--red-soft); border-color: #f6c7c8; color: #a3171c; }
.flash svg { width: 18px; height: 18px; flex: none; margin-top: 1px; }

/* modal */
.modal-bg { position: fixed; inset: 0; background: rgba(18, 20, 28, .45); z-index: 80; display: grid; place-items: center; padding: 20px; }
.modal { background: var(--surface); border-radius: 12px; width: 100%; max-width: 560px; box-shadow: var(--shadow-lg); max-height: 90vh; overflow: auto; }
.modal-head { padding: 14px 18px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; }
.modal-body { padding: 18px; }

/* auth */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.auth-art { background: var(--ink); color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.auth-art::after { content: ""; position: absolute; width: 520px; height: 520px; right: -160px; bottom: -160px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 90, 54, .55), rgba(255, 90, 54, 0) 70%); }
.auth-art h1 { font-size: 40px; line-height: 1.08; letter-spacing: -.03em; max-width: 460px; }
.auth-art ul { list-style: none; padding: 0; margin: 24px 0 0; color: var(--ink-text); position: relative; z-index: 1; }
.auth-art li { padding: 5px 0; }
.auth-art li::before { content: "→ "; color: var(--accent); }
.auth-form { display: grid; place-items: center; padding: 40px; }
.auth-form form { width: 100%; max-width: 360px; }

/* planner */
.planner-hint { font-size: 12px; color: var(--text-2); background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; line-height: 1.7; }
.planner-hint code { background: var(--surface); border: 1px solid var(--line); padding: 0 5px; border-radius: 4px; }

/* responsive */
@media (max-width: 1200px) {
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .g-main { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: 270px; z-index: 90; transform: translateX(-100%); transition: transform .2s; }
  body.nav-open .sidebar { transform: none; box-shadow: var(--shadow-lg); }
  body.nav-open::after { content: ""; position: fixed; inset: 0; background: rgba(0, 0, 0, .35); z-index: 85; }
  .menu-btn { display: grid; }
  .topbar { padding: 10px 14px; }
  .content { padding: 16px 14px 60px; }
  .g2, .g3 { grid-template-columns: 1fr; }
  .fg, .fg.c3, .fg.c4, .fg.c8 { grid-column: span 12; }
  .dl { grid-template-columns: 1fr; }
  .dl > div.wide { grid-column: span 1; }
  .chat { grid-template-columns: 1fr; height: auto; }
  .chat-side { max-height: 200px; border-right: 0; border-bottom: 1px solid var(--line); }
  .msgs { height: 55vh; }
  .auth { grid-template-columns: 1fr; }
  .auth-art { display: none; }
  .hide-sm { display: none !important; }
  .notif-list { width: 300px; }
}
@media (max-width: 560px) {
  .g4, .g6 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi .v { font-size: 21px; }
  .search-box { max-width: none; }
}
@media print {
  .sidebar, .topbar, .actions, .filters, .form-actions { display: none !important; }
  .shell { display: block; }
  .card { box-shadow: none; }
}
