/* ═══════════════════════════════════════════════════════════════════════════
   Mosaic Dark — override layer for saas-dashboard
   Reference: design-ui.md v1.0 (approved 2026-10-08). Loaded AFTER the base
   <style> block in index.html; this file only overrides and extends it.

   Intentional extensions to the documented design system (see §"Extensions"
   in Project.md):
     --st-present / --st-half / --st-absent / --st-leave / --st-muted
       Attendance + leave status text colours, taken from the documented chart
       palette so they read on charcoal. Always paired with a text label.
     .mz-tiles / .mz-tile (+ .mz-olive / .mz-purple / .mz-brown / .mz-main)
       Generic form of the documented dashboard tile grid, for EMS summaries.
     .chip / .chip.on   Toggle chips (week-off picker).
     .st-pill           Status pills for leave requests.
     .m-overlay / .m-dialog  Shared dialog surface.
     .tk-* (Ticketing) and .pm-* (Project Management) blocks at the end of
       this file — module screens built from the same tokens and recipes.
   ═══════════════════════════════════════════════════════════════════════════ */

:root {
  color-scheme: dark;
  --bg: #1a1c20;
  --surface: #272b31;
  --surface-2: #222722;
  --surface-3: #222722;
  --t1: #f3f5f1;
  --t2: #e1e5df;
  --t3: #aeb8b0;
  --t4: #aeb8b0;
  --border: #3a403c;
  --border-strong: #526147;
  --accent: #f3f5f1;
  --accent-dk: #dfefca;
  --accent-dkr: #f3f5f1;
  --accent-lt: #dfefca;
  --accent-xl: #dfefca;
  --accent-muted: #35462c;
  --accent-ring: rgba(223,239,202,.22);
  --online: #5e986d;
  --offline: #aeb8b0;
  --danger: #f4a396;
  --danger-dk: #f4a396;
  --danger-bg: #492e2b;
  --danger-border: #6b3f39;
  --success: #a6bb8c;
  --success-bg: #35462c;
  --warning: #d3a27f;
  --warning-bg: #563c2b;
  --info: #b7aadf;
  --info-bg: #3a365b;

  --st-present: #a6bb8c;
  --st-half: #d3a27f;
  --st-absent: #f4a396;
  --st-leave: #b7aadf;
  --st-muted: #aeb8b0;

  --sb-bg: transparent;
  --sb-border: #3a403c;
  --sb-text: #e1e5df;
  --sb-act: #1a1c20;
  --sb-act-bg: #f3f5f1;
  --sb-hover: #272b31;

  --r-xs: 8px;
  --r-sm: 12px;
  --r-md: 12px;
  --r: 18px;
  --r-lg: 24px;
  --r-xl: 28px;
  --r-2xl: 28px;

  --shadow-xs: none;
  --shadow-sm: none;
  --shadow: none;
  --shadow-md: none;
  --shadow-lg: none;

  --ease: cubic-bezier(.4,0,.2,1);
  --dur: 140ms;
  --dur-md: 200ms;
}

html { background: var(--bg); }
body {
  font-family: 'Segoe UI', sans-serif;
  font-size: 14px;
  line-height: 1.55;
  color: var(--t1);
  background: var(--bg);
}
button, input, select, textarea { font-family: inherit; }
:focus-visible { outline: 3px solid #77709b; outline-offset: 3px; }
::selection { background: #3a365b; color: var(--t1); }
::-webkit-scrollbar-thumb { background: var(--border-strong); }
.muted { color: var(--t3); font-size: 12px; }
a { color: var(--t1); }
strong { font-weight: 600; }

/* ── Login ─────────────────────────────────────────────────────────────── */
#login { background: var(--bg); min-height: 100vh; display: flex; align-items: center; justify-content: center; }
.mz-login {
  width: 100%; max-width: 1180px; margin: auto;
  padding: 32px; display: grid; grid-template-columns: 1.12fr 1fr; gap: 22px;
}
.mz-login-brand { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: auto 1fr auto; gap: 22px; }
.mz-login-brand .mz-brandrow { grid-column: 1 / -1; }
.mz-login-msg {
  grid-column: 1 / -1; background: #35462c; color: var(--t1);
  border-radius: var(--r-xl); padding: 40px; display: flex; flex-direction: column; justify-content: flex-end; min-height: 320px;
}
.mz-login-msg .mz-eyebrow { color: #e3f1cc; }
.mz-login-msg h2 { font-size: clamp(34px,4.3vw,56px); line-height: 1.06; font-weight: 550; letter-spacing: -1.5px; margin: 12px 0 16px; }
.mz-login-msg p { color: #e3f1cc; font-size: 14px; max-width: 46ch; }
.mz-login-small { border-radius: var(--r-lg); padding: 24px; min-height: 130px; }
.mz-login-small p { margin-top: 8px; font-size: 13px; }
.mz-login-small.purple { background: #3a365b; }
.mz-login-small.purple .mz-eyebrow, .mz-login-small.purple p { color: #e5dffd; }
.mz-login-small.brown { background: #563c2b; }
.mz-login-small.brown .mz-eyebrow, .mz-login-small.brown p { color: #f7deca; }
.mz-login-form { background: var(--surface); border-radius: var(--r-xl); padding: 40px; display: flex; align-items: center; justify-content: center; }
.mz-login-form form { width: 100%; max-width: 360px; }
.mz-login-form h1 { font-size: 32px; font-weight: 550; letter-spacing: -1px; line-height: 1.2; }
.mz-login-form .mz-lead { color: var(--t3); font-size: 14px; margin: 6px 0 26px; }
.mz-login-form label { display: block; margin: 16px 0 6px; font-size: 12px; font-weight: 500; color: var(--t2); text-transform: none; letter-spacing: 0; }
.mz-login-form input { min-height: 48px; background: var(--surface-2) !important; }
.mz-login-form .login-btn { width: 100%; justify-content: center; margin-top: 26px; min-height: 48px; font-size: 14px; }
.mz-login-form .err:empty { display: none; }
.mz-login-form .err { background: var(--danger-bg); color: var(--danger); border-radius: var(--r-sm); padding: 10px 12px; margin-top: 14px; font-size: 13px; }

/* ── Brand ─────────────────────────────────────────────────────────────── */
.mz-brandrow, .brand { display: flex; align-items: center; gap: 12px; }
.mz-mark {
  width: 29px; height: 29px; flex: 0 0 29px; transform: rotate(-8deg);
  display: grid; grid-template-columns: 1fr 1fr; gap: 3px;
}
.mz-mark i { display: block; border-radius: 4px; }
.mz-mark i:nth-child(1) { background: var(--t1); }
.mz-mark i:nth-child(2) { background: var(--online); }
.mz-mark i:nth-child(3) { background: var(--t3); }
.mz-mark i:nth-child(4) { background: var(--t1); }
.mz-brandname, #brandName { font-size: 15px; font-weight: 650; color: var(--t1); white-space: nowrap; }
.mz-eyebrow { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--t3); }

/* ── Application shell: horizontal header ─────────────────────────────── */
.layout { flex-direction: column; max-width: 1600px; margin: 0 auto; min-height: 100vh; }
.sidebar {
  position: static; width: auto; height: auto; overflow: visible;
  flex-direction: row; align-items: center; flex-wrap: nowrap; gap: 24px;
  padding: 24px 3.5%; background: transparent;
  border-right: 0; border-bottom: 1px solid var(--border);
}
.brand { padding: 0; margin: 0; border: 0; font-size: 15px; flex: 0 0 auto; }
.brand-mark { display: none; }
.nav { flex: 1 1 auto; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 3px; padding: 0; min-width: 0; }
.nav-section { display: none !important; }
.nav a {
  padding: 9px 15px; border-radius: 50px; font-size: 12px; font-weight: 500;
  color: var(--t2); background: transparent; gap: 0; white-space: nowrap;
}
.nav a .ni { display: none; }
.nav a:hover { background: var(--surface); color: var(--t1); }
.nav a.active { background: var(--t1); color: var(--bg); font-weight: 500; }
.nav a.active::before { display: none; }
.sidebar-footer { padding: 0; margin: 0; border: 0; display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.sidebar-user { padding: 0; margin: 0; gap: 9px; }
.sidebar-user:hover { background: transparent; }
.sidebar-avatar { width: 32px; height: 32px; background: #3a365b; color: #e5dffd; font-size: 11px; font-weight: 600; }
.sidebar-user-name { color: var(--t1); font-size: 12px; font-weight: 500; max-width: 160px; }
.sidebar-user-role { color: var(--t3); font-size: 11px; }
#logout {
  padding: 9px 15px; border-radius: 50px; font-size: 12px; font-weight: 500; gap: 6px;
  color: var(--t1); background: var(--surface); border: 1px solid var(--border);
}
#logout:hover { background: var(--surface-2); color: var(--t1); border-color: var(--border-strong); }
#logout svg { width: 14px; height: 14px; }

.main { display: block; }
.topbar {
  position: static; height: auto; background: transparent; border: 0;
  padding: 30px 3.5% 6px; display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap;
}
.topbar-left { gap: 6px; min-width: 0; }
.topbar-left h1, .topbar-left h2, .topbar h2 { font-size: 34px; font-weight: 550; letter-spacing: -1.3px; line-height: 1.15; color: var(--t1); }
.topbar-sub { font-size: 13px; color: var(--t3); line-height: 1.4; }
.topbar-right { flex-wrap: wrap; justify-content: flex-end; }
.org-badge { background: #35462c; color: #e3f1cc; border: 0; border-radius: 50px; padding: 6px 12px; font-size: 12px; font-weight: 500; }
.user-pill { background: var(--surface); border: 1px solid var(--border); border-radius: 50px; padding: 4px 12px 4px 4px; }
.user-pill:hover { border-color: var(--border-strong); }
.user-avatar { background: #3a365b; border: 0; }
.user-avatar svg { color: #e5dffd; }
#who { color: var(--t2); font-size: 12px; overflow-wrap: anywhere; }
.content { padding: 8px 3.5% 40px; }

/* ── Surfaces ──────────────────────────────────────────────────────────── */
.card {
  background: var(--surface); border: 0; border-radius: var(--r-lg);
  padding: 26px; margin-bottom: 22px; overflow: visible;
}
.card:hover { box-shadow: none; }
.card h3 { font-size: 15px; font-weight: 600; letter-spacing: -.35px; margin-bottom: 16px; color: var(--t1); }
.card h4 { font-size: 13px; font-weight: 600; color: var(--t1); }
.divider { border-top-color: var(--border); }
.flash { border-left: 0 !important; background: #35462c !important; color: var(--t1); }
.flash-err { background: var(--danger-bg) !important; color: var(--danger); }

/* ── Metric tiles (documented .stat / .cards) ─────────────────────────── */
.cards { gap: 16px; margin-bottom: 22px; }
.stat, .stats-grid .stat { background: var(--surface); border: 0; border-radius: var(--r-lg); padding: 24px; }
.stat::before, .stat::after { display: none; }
.stat:hover, .stats-grid .stat:hover { transform: none; }
.stat .label, .stat-label { font-size: 12px; font-weight: 400; text-transform: none; letter-spacing: 0; color: var(--t3); margin-bottom: 8px; }
.stat .value, .stat-val { font-size: 31px; font-weight: 550; line-height: 1.2; letter-spacing: -1px; color: var(--t1); }
.stat .sub { font-size: 12px; font-weight: 400; color: var(--t3); }
.stat.alerting { background: #563c2b; border: 0; }
.stat.alerting .value { color: var(--t1); }
.stat.alerting .label, .stat.alerting .sub { color: #f7deca; }
.stat-icon { background: var(--surface-2); color: var(--t2); border-radius: var(--r-sm); }

/* ── Mosaic tile grid (extension, see header) ─────────────────────────── */
.mz-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 18px; margin-bottom: 22px; }
.mz-tiles.mz-asym { grid-template-columns: 1.35fr 1fr 1fr; }
.mz-tiles.mz-asym .mz-main { grid-row: span 2; min-height: 310px; }
.mz-tile {
  background: var(--surface); border-radius: var(--r-lg); padding: 24px;
  display: flex; flex-direction: column; gap: 6px; min-width: 0; min-height: 140px;
}
.mz-tile .mz-label { font-size: 12px; color: var(--t3); }
.mz-tile .mz-value { font-size: 31px; font-weight: 550; line-height: 1.2; letter-spacing: -1px; color: var(--t1); overflow-wrap: anywhere; }
.mz-tile .mz-value small { font-size: 15px; font-weight: 400; letter-spacing: 0; color: inherit; opacity: .8; margin-left: 4px; }
.mz-tile .mz-sub { font-size: 12px; color: var(--t3); margin-top: auto; }
.mz-tile.mz-main { justify-content: space-between; }
.mz-tile.mz-main .mz-value { font-size: 86px; font-weight: 500; letter-spacing: -5px; line-height: 1; }
.mz-tile.mz-main .mz-value small { font-size: 22px; letter-spacing: -.5px; }
.mz-tile.mz-olive { background: #35462c; }
.mz-tile.mz-olive .mz-label, .mz-tile.mz-olive .mz-value { color: var(--t1); }
.mz-tile.mz-olive .mz-sub { color: #e3f1cc; }
.mz-tile.mz-purple { background: #3a365b; }
.mz-tile.mz-purple .mz-label, .mz-tile.mz-purple .mz-value { color: var(--t1); }
.mz-tile.mz-purple .mz-sub { color: #c4bedb; }
.mz-tile.mz-brown { background: #563c2b; }
.mz-tile.mz-brown .mz-label, .mz-tile.mz-brown .mz-value { color: var(--t1); }
.mz-tile.mz-brown .mz-sub { color: #f7deca; }
.mz-tile .mz-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 14px; }
.mz-today-times { display: flex; gap: 32px; flex-wrap: wrap; margin-top: 8px; }

/* ── Buttons ───────────────────────────────────────────────────────────── */
.btn {
  background: var(--accent); color: var(--bg); border: 1px solid transparent;
  border-radius: 50px; padding: 11px 17px; font-size: 12px; font-weight: 500; letter-spacing: 0; gap: 6px;
  justify-content: center; min-height: 38px;
}
.btn:hover { background: var(--accent-dk); color: var(--bg); box-shadow: none; }
.btn:active { transform: none; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-secondary, .pp-prev, .pp-next { background: var(--surface); color: var(--t1); border: 1px solid var(--border); }
.btn-secondary:hover, .pp-prev:hover, .pp-next:hover { background: var(--surface-2); color: var(--t1); border-color: var(--border-strong); }
.card .btn-secondary, .mz-tile .btn-secondary { background: var(--surface-2); }
.btn-ghost { background: transparent; color: var(--t2); border: 1px solid transparent; }
.btn-ghost:hover { background: var(--surface-2); color: var(--t1); border-color: var(--border); }
.btn-danger, .btn-destructive { background: #b91c1c; color: #fff; border-color: #b91c1c; }
.btn-danger:hover, .btn-destructive:hover { background: #991b1b; color: #fff; }
.btn-outline-danger { background: transparent; color: var(--danger); border: 1px solid var(--danger); }
.btn-outline-danger:hover { background: var(--danger-bg); color: var(--danger); }
.btn-sm { padding: 6px 12px; min-height: 30px; font-size: 12px; border-radius: 50px; }
.btn-xs { padding: 4px 11px; min-height: 28px; font-size: 12px; }
.login-btn { border-radius: 50px; box-shadow: none; }
.login-btn:hover { box-shadow: none; }

/* ── Forms ─────────────────────────────────────────────────────────────── */
label { font-size: 12px; font-weight: 500; color: var(--t2); text-transform: none; letter-spacing: 0; margin: 14px 0 6px; }
.lbl { font-size: 12px; font-weight: 500; color: var(--t2); }
input:not([type="checkbox"]):not([type="color"]):not([type="radio"]), textarea, select, .inp {
  background: var(--surface-2); color: var(--t1);
  border: 1px solid var(--border); border-radius: var(--r-sm); min-height: 40px;
}
textarea { min-height: 80px; }
input:focus, textarea:focus, select:focus, .inp:focus {
  border-color: var(--border-strong); box-shadow: 0 0 0 3px var(--accent-ring); background: var(--surface-2);
}
input::placeholder, textarea::placeholder, .inp::placeholder { color: #8b958d; }
input[type="date"], input[type="month"], input[type="time"] { color-scheme: dark; }
input[type="checkbox"], input[type="radio"] { accent-color: #a6bb8c; width: 16px; height: 16px; }
select option { background: var(--surface); color: var(--t1); }
.filter-form label { font-size: 12px; font-weight: 500; text-transform: none; letter-spacing: 0; color: var(--t2); }
.err { color: var(--danger); font-size: 12px; font-weight: 400; }

/* ── Records toolbar / table ──────────────────────────────────────────── */
.pp-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.pp-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.pp-pager { display: flex; justify-content: flex-end; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.pp-q {
  background: var(--surface-2) !important; border: 1px solid var(--border) !important;
  border-radius: 50px !important; padding: 9px 16px !important; font-size: 12px !important;
  max-width: 280px !important; width: 100% !important; min-height: 38px;
}
.pp-q:focus { border-color: var(--border-strong) !important; box-shadow: 0 0 0 3px var(--accent-ring) !important; }
.pp-q::placeholder { color: #8b958d !important; }
.pp-tbl { border: 1px solid var(--border); border-radius: var(--r); overflow-x: auto; max-width: 100%; }
table { font-size: 13px; color: var(--t2); }
thead tr { background: var(--surface-2); border-bottom: 1px solid var(--border); }
th { font-size: 12px; font-weight: 500; text-transform: none; letter-spacing: 0; color: var(--t3); padding: 12px 14px; }
td { color: var(--t2); border-bottom: 1px solid var(--border); padding: 12px 14px; }
tbody tr:hover { background: var(--surface-2); }
a.rowlink { color: var(--t1); font-weight: 500; text-decoration: underline; text-decoration-color: var(--border-strong); text-underline-offset: 3px; }
a.rowlink:hover { color: var(--accent-dk); }
.url { color: var(--t3); }

/* ── Tags, status, pills ───────────────────────────────────────────────── */
.tag { background: var(--surface-2); color: #dfefca; border-radius: 50px; padding: 3px 10px; font-size: 12px; font-weight: 500; }
.badge-off { background: var(--danger-bg); color: var(--danger); border-radius: 50px; padding: 3px 10px; font-size: 12px; font-weight: 500; }
.badge-warning { background: #563c2b; color: #f7deca; border-radius: 50px; font-size: 12px; font-weight: 500; }
.badge-info { background: #3a365b; color: #e5dffd; border-radius: 50px; font-size: 12px; font-weight: 500; }
.online { background: var(--online); box-shadow: none; }
.offline { background: var(--offline); }
.st-pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 50px; font-size: 12px; font-weight: 500; white-space: nowrap; background: var(--surface-2); }
.st-pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.st-text { font-weight: 500; }
.st-present, .st-approved, .st-active { color: var(--st-present); }
.st-half_day, .st-pending, .st-inactive { color: var(--st-half); }
.st-absent, .st-rejected, .st-terminated { color: var(--st-absent); }
.st-on_leave { color: var(--st-leave); }
.st-cancelled, .st-none { color: var(--st-muted); }
.chip {
  display: inline-flex; align-items: center; gap: 8px; margin: 0; cursor: pointer;
  padding: 9px 15px; border-radius: 50px; border: 1px solid var(--border);
  background: var(--surface-2); color: var(--t2); font-size: 12px; font-weight: 500; min-height: 38px;
}
.chip.on { background: var(--t1); color: var(--bg); border-color: transparent; }
.chip input { accent-color: #1a1c20; }
.avatar { width: 32px; height: 32px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 600; margin-right: 10px; vertical-align: middle; flex: 0 0 32px; }
.av-0 { background: #35462c; color: #e3f1cc; }
.av-1 { background: #3a365b; color: #e5dffd; }
.av-2 { background: #563c2b; color: #f7deca; }

/* ── Tabs ─────────────────────────────────────────────────────────────── */
.tabs { background: var(--surface); border: 0; border-radius: 50px; padding: 5px; gap: 3px; display: inline-flex; flex-wrap: wrap; margin-bottom: 22px; }
.tabs button { background: transparent; color: var(--t2); border-radius: 50px; padding: 9px 16px; font-size: 12px; font-weight: 500; }
.tabs button:hover { background: var(--surface-2); color: var(--t1); }
.tabs button.active { background: var(--t1); color: var(--bg); box-shadow: none; font-weight: 500; }

/* ── Collection cards (customers) ─────────────────────────────────────── */
.client-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(235px, 1fr)); gap: 16px; }
.client-tile {
  background: var(--surface-2); border: 1px solid transparent; border-radius: 22px; padding: 23px;
  display: flex; flex-direction: column; gap: 12px; min-width: 0;
}
.client-tile:hover { border-color: var(--border-strong); }
.client-tile .ct-name { font-size: 19px; font-weight: 550; letter-spacing: -.5px; line-height: 1.25; color: var(--t1); overflow-wrap: break-word; }
.client-tile .tag { background: var(--surface); }
.client-tile .ct-admin { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.client-tile .ct-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 14px; }
.client-tile .ct-meta div { min-width: 0; }
.client-tile .ct-k { font-size: 11px; color: var(--t3); }
.client-tile .ct-v { font-size: 13px; color: var(--t1); overflow-wrap: break-word; }
.client-tile .ct-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.client-tile .ct-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: auto; padding-top: 4px; }

/* ── Dialogs (extension) ──────────────────────────────────────────────── */
.m-overlay { position: fixed; inset: 0; z-index: 1000; background: rgba(10,11,13,.72); display: none; align-items: center; justify-content: center; padding: 16px; }
.m-dialog {
  background: var(--surface); color: var(--t1); border: 1px solid var(--border);
  border-radius: var(--r-xl); padding: 26px; width: min(560px, 100%); max-height: 88vh; overflow-y: auto;
}
.m-dialog h3 { font-size: 22px; font-weight: 550; letter-spacing: -.6px; margin: 0; }
.m-tabs { display: inline-flex; gap: 3px; padding: 5px; background: var(--surface-2); border-radius: 50px; margin: 6px 0 18px; flex-wrap: wrap; }
.m-tabs button { background: transparent; color: var(--t2); border-radius: 50px; padding: 8px 15px; font-size: 12px; font-weight: 500; }
.m-tabs button:hover { color: var(--t1); }
.m-tabs button.active { background: var(--t1); color: var(--bg); }
.mod-row {
  display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; margin: 0;
  border: 1px solid var(--border); border-radius: var(--r-sm); background: var(--surface-2);
  font-size: 13px; font-weight: 400; color: var(--t2); cursor: pointer;
}
.mod-row.is-off { opacity: .55; cursor: not-allowed; }
.mod-row strong { color: var(--t1); font-size: 14px; font-weight: 600; }

.two-column { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.two-column > .card { min-width: 0; }
.att-ci, .att-co { width: 118px !important; }

/* ── Charts, heatmap, media ───────────────────────────────────────────── */
.chart-wrap { height: 260px; }
.chart-wrap canvas, .card canvas { max-width: 100%; }
.hm-c { background: var(--surface-2); }
.shot { background: var(--surface-2); border: 0; border-radius: 20px; padding: 10px; width: 260px; max-width: 100%; }
.shot:hover { transform: none; }
.shot-btn img { border-radius: 12px; }
.lb { background: rgba(14,15,17,.94); backdrop-filter: none; }
.lb-act { border-radius: 50px; font-size: 12px; font-weight: 500; }
.empty-state { color: var(--t3); }
.checkin-card { background: #35462c; box-shadow: none; }

.linkbtn { background: none; border: 0; padding: 4px 2px; color: var(--t1); font: inherit; text-decoration: underline; text-decoration-color: var(--border-strong); text-underline-offset: 3px; cursor: pointer; }
.linkbtn:hover { color: var(--accent-dk); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.card .tabs { background: var(--surface-2); }
.mz-tile .mz-k { font-size: 12px; color: var(--t3); }
.mz-tile.mz-olive .mz-k { color: #e3f1cc; }
.mz-tile .mz-today-times .mz-value { font-size: 44px; font-weight: 550; letter-spacing: -1.5px; line-height: 1.1; }
.mz-tile.mz-main .mz-label strong { color: var(--t1); }

/* Remove the light-theme gradients the base layer used on login */
.login-brand-panel, .login-layout { display: none; }

/* ── Responsive ────────────────────────────────────────────────────────── */
@media (min-width: 1500px) {
  .ws-metrics { grid-template-columns: repeat(4, minmax(0,1fr)); }
}
@media (max-width: 1150px) {
  .sidebar { flex-wrap: wrap; row-gap: 16px; }
  .nav { order: 3; flex: 1 1 100%; }
  .sidebar-footer { margin-left: auto; }
}
@media (max-width: 850px) {
  .mz-tiles.mz-asym { grid-template-columns: 1fr 1fr; }
  .mz-tiles.mz-asym .mz-main { grid-column: 1 / -1; grid-row: auto; min-height: 250px; }
  .mz-tile.mz-main .mz-value { font-size: 74px; }
  .two-column { grid-template-columns: 1fr; }
  .mz-login { grid-template-columns: 1fr; max-width: 640px; }
  .mz-login-msg { min-height: 0; }
}
@media (max-width: 620px) {
  .sidebar { padding: 18px 16px; gap: 14px; }
  .sidebar-user > div:last-child { display: none; }
  .content { padding: 8px 16px 30px; }
  .topbar { padding: 22px 16px 4px; }
  .topbar-left h1, .topbar-left h2, .topbar h2 { font-size: 30px; }
  .topbar-sub { display: block; }
  .card { padding: 20px; border-radius: 20px; }
  .mz-tiles, .mz-tiles.mz-asym { gap: 12px; grid-template-columns: 1fr 1fr; }
  .mz-tile { padding: 18px; border-radius: 20px; min-height: 0; }
  .mz-tile .mz-value { font-size: 26px; }
  .mz-tile.mz-main .mz-value { font-size: 64px; letter-spacing: -3px; }
  .mz-tile .mz-today-times .mz-value { font-size: 32px; }
  .client-tiles { grid-template-columns: 1fr; }
  .mz-login { padding: 16px; gap: 14px; }
  .mz-login-brand .mz-login-small { display: none; }
  .mz-login-msg { padding: 26px; }
  .mz-login-msg h2 { font-size: 38px; }
  .mz-login-form { padding: 28px 22px; }
  .mz-login-form h1 { font-size: 28px; }
  input, select, textarea, .inp, .pp-q { font-size: 16px !important; }
  .pp-q { max-width: none !important; }
  .m-dialog { padding: 20px; border-radius: 22px; }
}
@media (max-width: 380px) {
  .mz-tiles, .mz-tiles.mz-asym { grid-template-columns: 1fr; }
  .client-tile .ct-meta { grid-template-columns: 1fr; }
}
@media (pointer: coarse) {
  .btn, .nav a, .tabs button, .m-tabs button, #logout, .chip { min-height: 44px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   Ticketing (extension) — queue, ticket workspace, composer, bell.
   Follows the documented collection + entity-workspace recipes: purple
   255px profile panel, neutral workspace, pill controls, status in words.
   ═══════════════════════════════════════════════════════════════════════════ */
.tk-st-new { color: #b7aadf; }
.tk-st-open { color: #91baba; }
.tk-st-in_progress { color: #a6bb8c; }
.tk-st-waiting { color: #d3a27f; }
.tk-st-resolved { color: #b8c699; }
.tk-st-closed, .tk-st-cancelled { color: var(--t3); }
.tk-pr-low { color: var(--t3); }
.tk-pr-medium { color: #a4b6d1; }
.tk-pr-high { color: #d3a27f; }
.tk-pr-urgent { color: var(--danger); background: var(--danger-bg); }
.sla { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; white-space: nowrap; }
.sla::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: 0 0 7px; }
.sla-ok { color: #a6bb8c; }
.sla-warn { color: #d3a27f; }
.sla-bad { color: var(--danger); font-weight: 500; }
.sla-none { color: var(--t3); }
.sla-none::before { display: none; }

.tk-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.tk-toolbar .tabs { background: var(--surface-2); }
.tk-count { display: inline-block; min-width: 18px; padding: 0 6px; margin-left: 4px; border-radius: 50px; background: rgba(255,255,255,.08); font-size: 11px; line-height: 18px; text-align: center; }
.tabs button.active .tk-count { background: rgba(26,28,32,.12); }
.tk-filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.tk-filters select { width: auto; max-width: 200px; }
.tk-filters .pp-q { flex: 1 1 220px; }
.tk-filters .btn { margin-left: auto; }
.tk-bulk { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; padding: 12px 14px; margin-bottom: 14px; border-radius: var(--r-sm); background: #3a365b; }
.tk-bulk[hidden] { display: none; }
.tk-bulk select { width: auto; }
.tk-subj { color: var(--t1); margin-top: 2px; overflow-wrap: break-word; white-space: normal; }
td .tk-subj { max-width: 340px; }
.tk-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.tk-tags .linkbtn { padding: 0 0 0 4px; text-decoration: none; color: var(--t3); }

.tk-layout { display: grid; grid-template-columns: 255px minmax(0, 1fr); gap: 24px; align-items: start; }
.tk-profile { background: #3a365b; border-radius: var(--r-lg); padding: 24px; color: var(--t1); position: sticky; top: 16px; }
.tk-ref { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: #c4bedb; }
.tk-title { font-size: 22px; font-weight: 550; letter-spacing: -.6px; line-height: 1.25; margin: 6px 0 12px; overflow-wrap: break-word; }
.tk-pills { display: flex; gap: 6px; flex-wrap: wrap; }
.tk-profile .st-pill { background: rgba(26,28,32,.35); }
.tk-profile dl { margin: 18px 0 0; padding-top: 14px; border-top: 1px solid #514b70; display: grid; gap: 4px; }
.tk-profile dt { font-size: 11px; color: #c4bedb; margin-top: 8px; }
.tk-profile dd { margin: 0; font-size: 13px; overflow-wrap: anywhere; }
.tk-quote { color: #c4bedb; font-size: 12px; margin-top: 4px; }
.tk-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 18px; padding-top: 16px; border-top: 1px solid #514b70; }
.tk-actions .btn { width: 100%; }
.tk-actions .btn-secondary { background: rgba(26,28,32,.35); border-color: #514b70; }
.tk-work { min-width: 0; }
.tk-grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0 14px; }
.tk-grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 0 14px; }

.tk-msg { background: var(--surface-2); border-radius: var(--r); padding: 16px 18px; margin-bottom: 12px; border-left: 3px solid transparent; }
.tk-msg header { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
.tk-msg header .avatar { margin-right: 0; width: 28px; height: 28px; flex-basis: 28px; font-size: 10px; }
.tk-msg header strong { color: var(--t1); font-weight: 600; }
.tk-msg.tk-req { border-left-color: #b7aadf; }
.tk-msg.tk-internal { background: #3a2f27; border-left-color: #d3a27f; }
.tk-msg.tk-first { border-left-color: #a6bb8c; }
.tk-body { white-space: pre-wrap; overflow-wrap: anywhere; color: var(--t2); font-size: 14px; }
.tk-event { font-size: 12px; color: var(--t3); padding: 4px 0 12px 21px; position: relative; }
.tk-event::before { content: ""; position: absolute; left: 6px; top: 9px; width: 7px; height: 7px; border-radius: 50%; background: var(--border-strong); }
.tk-event strong { color: var(--t2); font-weight: 500; }
.tk-files { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.tk-file { display: inline-flex; align-items: center; gap: 8px; max-width: 100%; padding: 7px 12px; border-radius: 50px; background: var(--surface); border: 1px solid var(--border); color: var(--t1); font-size: 12px; cursor: pointer; }
.tk-file span:first-of-type { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 220px; }
.tk-file:hover { border-color: var(--border-strong); }
.tk-compose { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--border); }
.tk-compose select { width: auto; margin-bottom: 10px; display: block; }
.tk-compose.is-note textarea { border-color: #d3a27f; background: #2c2622; }
.tk-compose-foot { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 10px; }
.tk-compose-foot input[type=file] { flex: 1 1 200px; min-height: 0; padding: 8px; font-size: 12px; }
.tk-compose-foot select { margin: 0; }
.tk-subrow td:first-child { padding-left: 34px; }
.tk-reply { padding: 14px 0; border-top: 1px solid var(--border); display: grid; gap: 8px; }
.tk-reply:first-of-type { border-top: 0; }
.tk-stars { display: flex; gap: 6px; }
.tk-stars button { background: var(--surface-2); color: var(--t3); border: 1px solid var(--border); width: 44px; height: 44px; border-radius: 50%; font-size: 20px; line-height: 1; }
.tk-stars button.on { background: #563c2b; color: #f7deca; border-color: #563c2b; }

.bell-wrap { position: relative; }
.bell-btn { position: relative; width: 38px; height: 38px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--surface); border: 1px solid var(--border); color: var(--t1); }
.bell-btn:hover { border-color: var(--border-strong); }
.bell-count { position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 50px; background: #d3a27f; color: var(--bg); font-size: 11px; font-weight: 600; line-height: 18px; text-align: center; }
.bell-count[hidden] { display: none; }
.bell-panel { position: absolute; right: 0; top: 46px; z-index: 900; width: min(380px, calc(100vw - 32px)); max-height: 70vh; overflow-y: auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: 6px; }
.bell-panel[hidden] { display: none; }
.bell-head { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px; }
.bell-item { display: grid; gap: 2px; width: 100%; text-align: left; background: transparent; border: 0; border-radius: var(--r-sm); padding: 10px 12px 10px 22px; color: var(--t2); position: relative; cursor: pointer; }
.bell-item:hover { background: var(--surface-2); }
.bell-item.unread::before { content: ""; position: absolute; left: 9px; top: 16px; width: 7px; height: 7px; border-radius: 50%; background: #d3a27f; }
.bell-title { color: var(--t1); font-size: 13px; font-weight: 500; }
.bell-body { font-size: 12px; color: var(--t3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bell-time { font-size: 11px; color: var(--t3); }

@media (max-width: 850px) {
  .tk-layout { grid-template-columns: 210px minmax(0, 1fr); }
}
@media (max-width: 620px) {
  .tk-layout { grid-template-columns: 1fr; }
  .tk-profile { position: static; }
  .tk-filters select { max-width: none; flex: 1 1 140px; }
  .tk-filters .btn { margin-left: 0; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   Project Management (extension) — project cards, workspace header, board,
   timeline, task workspace, timesheet grid, approvals.
   Same recipes as Ticketing: tiles on top, neutral cards, pill controls,
   status always in words with a colour dot. The project colour (--pc) is a
   thin accent only, never a text colour.
   ═══════════════════════════════════════════════════════════════════════════ */
.pm-dhead { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.pm-ps-planning { color: #b7aadf; }
.pm-ps-active { color: #a6bb8c; }
.pm-ps-on_hold { color: #d3a27f; }
.pm-ps-completed { color: #91baba; }
.pm-ps-cancelled { color: var(--t3); }
.pm-code, .pm-key { font-size: 11px; font-weight: 600; letter-spacing: .06em; color: var(--t3); white-space: nowrap; }
.pm-progress { height: 6px; border-radius: 50px; background: rgba(255,255,255,.08); overflow: hidden; }
.pm-progress span { display: block; height: 100%; border-radius: 50px; background: #a6bb8c; }
.pm-due { font-size: 12px; color: var(--t3); white-space: nowrap; }
.pm-due-warn { color: #d3a27f; }
.pm-due-bad { color: var(--danger); font-weight: 500; }
.pm-label { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 50px; font-size: 11px; font-weight: 500; color: var(--t2); background: var(--surface-2); border: 1px solid var(--border); }
.pm-label::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--lc, #aeb8b0); }
.pm-labels { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.pm-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; flex: 0 0 9px; }
.pm-actions { white-space: nowrap; }
.pm-actions .btn { margin: 2px 4px 2px 0; }
.pm-person { display: flex; align-items: center; gap: 2px; min-width: 0; }
.pm-person strong { color: var(--t1); font-weight: 500; }
.pm-inline-form { display: flex; gap: 0 14px; flex-wrap: wrap; align-items: flex-end; }
.pm-inline-form > div { flex: 1 1 180px; min-width: 0; }
.pm-inline-form select, .pm-inline-form input:not([type="checkbox"]) { width: 100%; max-width: 100%; }
.pm-inline-form .pm-inline-btn { flex: 0 0 auto; padding-bottom: 1px; }
.pm-hint { font-size: 12px; margin: 10px 2px 0; }

/* project cards */
.pm-pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.pm-pcard { display: flex; flex-direction: column; gap: 10px; min-width: 0; padding: 20px 22px; border-radius: 22px; background: var(--surface-2); border: 1px solid transparent; border-top: 4px solid var(--pc); color: var(--t2); text-decoration: none; }
.pm-pcard:hover, .pm-pcard:focus-visible { border-color: var(--border-strong); border-top-color: var(--pc); }
.pm-pcard-top, .pm-pmeta { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12px; }
.pm-pname { font-size: 18px; font-weight: 550; letter-spacing: -.4px; color: var(--t1); overflow-wrap: anywhere; }
.pm-pdesc { font-size: 13px; color: var(--t3); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pm-swatches { display: flex; gap: 10px; flex-wrap: wrap; }
.pm-swatch { width: 34px; height: 34px; min-height: 34px; padding: 0; border-radius: 50%; border: 3px solid transparent; cursor: pointer; }
.pm-swatch.on { border-color: var(--t1); }

/* project header */
.pm-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 20px; background: #3a365b; border-radius: var(--r-lg); padding: 24px 26px; margin-bottom: 18px; border-left: 6px solid var(--pc); }
.pm-head-top { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.pm-head .pm-code { color: #c4bedb; }
.pm-head .st-pill, .pm-head .tag { background: rgba(26,28,32,.35); }
.pm-title { font-size: 26px; font-weight: 550; letter-spacing: -.8px; margin: 8px 0 6px; color: var(--t1); overflow-wrap: anywhere; }
.pm-desc { color: #c4bedb; margin: 0 0 12px; font-size: 13px; max-width: 760px; }
.pm-head-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px 22px; margin-top: 10px; }
.pm-head-facts > div { display: grid; gap: 3px; min-width: 0; }
.pm-head-facts span { font-size: 11px; color: #c4bedb; }
.pm-head-facts strong { font-size: 14px; font-weight: 500; color: var(--t1); overflow-wrap: anywhere; }
.pm-head-facts em { font-style: normal; font-size: 12px; }
.pm-head-facts .pm-progress { background: rgba(26,28,32,.35); margin-top: 4px; }
.pm-head-actions { display: flex; flex-direction: column; gap: 8px; min-width: 170px; }
.pm-head-actions .btn-secondary { background: rgba(26,28,32,.35); border-color: #514b70; }
.pm-tabs { margin-bottom: 18px; }

/* board */
.pm-filters select { max-width: 180px; }
.pm-filters .chip { min-height: 40px; }
.pm-board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(250px, 1fr); gap: 14px; overflow-x: auto; padding-bottom: 8px; align-items: start; }
.pm-col { background: var(--surface); border-radius: var(--r); padding: 12px; min-width: 0; display: flex; flex-direction: column; }
.pm-col header { display: flex; align-items: center; gap: 8px; padding: 4px 4px 10px; font-size: 13px; font-weight: 600; color: var(--t1); }
.pm-col-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pm-col-body { display: flex; flex-direction: column; gap: 8px; min-height: 60px; border-radius: var(--r-sm); transition: background var(--dur) var(--ease); }
.pm-col-body.over { background: rgba(166,187,140,.08); outline: 1px dashed var(--border-strong); }
.pm-card { background: var(--surface-2); border: 1px solid var(--border); border-radius: 14px; padding: 12px; cursor: pointer; display: grid; gap: 4px; min-width: 0; }
.pm-card:hover, .pm-card:focus-visible { border-color: var(--border-strong); outline: none; }
.pm-card[draggable="true"] { cursor: grab; }
.pm-card.dragging { opacity: .45; }
.pm-card-top { display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.pm-card-top .st-pill { font-size: 11px; padding: 1px 8px; }
.pm-parent { font-size: 11px; color: var(--t3); }
.pm-card-title { color: var(--t1); font-size: 13px; font-weight: 500; line-height: 1.35; overflow-wrap: anywhere; }
.pm-card-foot { display: flex; justify-content: space-between; align-items: center; gap: 6px; margin-top: 6px; font-size: 12px; }
.pm-who { display: inline-flex; align-items: center; gap: 0; min-width: 0; color: var(--t2); }
.pm-who .avatar { width: 22px; height: 22px; flex-basis: 22px; font-size: 9px; margin-right: 6px; }
.pm-who span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pm-card-meta { display: inline-flex; gap: 8px; align-items: center; color: var(--t3); white-space: nowrap; }
.pm-quick { margin-top: 8px; }
.pm-add { width: 100%; background: transparent; border: 1px dashed var(--border); color: var(--t3); border-radius: 12px; padding: 8px; font-size: 12px; min-height: 38px; cursor: pointer; }
.pm-add:hover { color: var(--t1); border-color: var(--border-strong); }
.pm-quick-in { width: 100%; }
.pm-open { font-weight: 600; color: var(--t1); padding: 0; }

/* timeline */
.pm-tl { --tl-label: 240px; overflow-x: auto; border: 1px solid var(--border); border-radius: var(--r-sm); background: var(--surface-2); }
.pm-tl-inner { position: relative; }
.pm-tl-row { display: flex; min-height: 34px; border-bottom: 1px solid rgba(255,255,255,.04); }
.pm-tl-label { position: sticky; left: 0; z-index: 2; flex: 0 0 var(--tl-label); width: var(--tl-label); background: var(--surface-2); padding: 7px 12px; font-size: 12px; color: var(--t2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; border-right: 1px solid var(--border); }
.pm-tl-label.sub { padding-left: 26px; color: var(--t3); }
.pm-tl-label .linkbtn { padding: 0; font-weight: 600; color: var(--t1); }
.pm-tl-track { position: relative; flex: 0 0 auto; }
.pm-tl-head { min-height: 44px; position: sticky; top: 0; z-index: 3; background: var(--surface); }
.pm-tl-head .pm-tl-label { background: var(--surface); font-weight: 600; color: var(--t3); padding-top: 14px; }
.pm-tl-month { position: absolute; top: 4px; height: 18px; font-size: 11px; color: var(--t2); padding-left: 6px; border-left: 1px solid var(--border-strong); white-space: nowrap; overflow: hidden; }
.pm-tl-week { position: absolute; top: 24px; font-size: 10px; color: var(--t3); padding-left: 3px; border-left: 1px solid var(--border); height: 18px; }
.pm-tl-bar { position: absolute; top: 7px; height: 20px; min-height: 20px; padding: 0 6px; border-radius: 50px; background: var(--bc); border: 1px solid transparent; color: var(--bg); font-size: 10px; font-weight: 600; text-align: left; overflow: hidden; white-space: nowrap; cursor: pointer; }
.pm-tl-bar.done { opacity: .55; }
.pm-tl-bar.late { border-color: var(--danger); box-shadow: 0 0 0 1px var(--danger); }
.pm-tl-bar:focus-visible { outline: 2px solid var(--t1); outline-offset: 1px; }
.pm-tl-ms { background: rgba(58,54,91,.35); }
.pm-tl-diamond { position: absolute; top: 11px; width: 12px; height: 12px; margin-left: -6px; background: #b7aadf; transform: rotate(45deg); border-radius: 2px; }
.pm-tl-diamond.done { background: #a6bb8c; }
.pm-tl-mslabel { position: absolute; top: 8px; font-size: 11px; color: var(--t2); white-space: nowrap; }
.pm-tl-today { position: absolute; top: 0; bottom: 0; width: 2px; background: #d3a27f; z-index: 1; pointer-events: none; }
.pm-tl-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 12px; font-size: 12px; }
.pm-tl-legend span { display: inline-flex; align-items: center; gap: 6px; }
.pm-tl-key { display: inline-block; width: 22px; height: 10px; border-radius: 50px; background: #a6bb8c; }
.pm-tl-key.late { background: #a6bb8c; box-shadow: 0 0 0 2px var(--danger); }
.pm-tl-diamond-key { display: inline-block; width: 9px; height: 9px; background: #b7aadf; transform: rotate(45deg); }
.pm-tl-today-key { display: inline-block; width: 2px; height: 12px; background: #d3a27f; }

/* task workspace */
.pm-task { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 24px; margin-top: 10px; }
.pm-task-main { min-width: 0; }
.pm-title-in { width: 100%; font-size: 18px; font-weight: 550; }
.pm-task-side { background: var(--surface-2); border-radius: var(--r); padding: 6px 16px 16px; align-self: start; }
.pm-task-side select, .pm-task-side input:not([type="checkbox"]) { width: 100%; }
.pm-2col { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 10px; }
.pm-task-side input[type="date"] { min-width: 0; }
.pm-task-main input:not([type="checkbox"]), .pm-task-main textarea, .pm-task-main select { width: 100%; max-width: 100%; min-width: 0; }
.pm-labelpick { border: 0; padding: 0; margin: 14px 0 0; display: flex; flex-wrap: wrap; gap: 6px; }
.pm-labelpick legend { font-size: 12px; font-weight: 500; color: var(--t2); margin-bottom: 6px; padding: 0; }
.pm-label-pick { margin: 0; cursor: pointer; padding: 5px 10px; min-height: 32px; }
.pm-label-pick input { width: 14px; height: 14px; }
.pm-label-pick::before { display: none; }
.pm-label-pick:has(input:checked) { border-color: var(--lc); background: rgba(255,255,255,.06); color: var(--t1); }
.pm-side-actions { display: flex; gap: 10px; align-items: center; margin-top: 16px; }
.pm-meta { margin: 16px 0 0; padding-top: 12px; border-top: 1px solid var(--border); display: grid; gap: 2px; }
.pm-meta dt { font-size: 11px; color: var(--t3); margin-top: 8px; }
.pm-meta dd { margin: 0; font-size: 13px; color: var(--t2); overflow-wrap: anywhere; }
.pm-sec { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--border); }
.pm-sec h4 { margin: 0 0 10px; display: flex; align-items: center; gap: 6px; }
.pm-sec summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--t1); margin-bottom: 8px; }
.pm-subrow { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px solid rgba(255,255,255,.04); font-size: 13px; flex-wrap: wrap; }
.pm-subrow .linkbtn { padding: 0; font-weight: 600; color: var(--t1); }
.pm-subtitle { flex: 1 1 160px; min-width: 0; color: var(--t2); overflow-wrap: anywhere; }
.pm-subtitle.done { text-decoration: line-through; color: var(--t3); }
.pm-filewrap { display: inline-flex; align-items: center; gap: 2px; max-width: 100%; }
.pm-filerm { color: var(--t3); padding: 4px 6px; }
.pm-act-day { font-size: 12px; font-weight: 600; color: var(--t2); margin: 14px 0 6px; }
.pm-act-day:first-of-type { margin-top: 0; }
.pm-tpl-list { margin: 8px 0 0; padding-left: 18px; font-size: 12px; color: var(--t2); }
.pm-tpl-list li.sub { margin-left: 16px; list-style: circle; }
.pm-switch { display: flex; gap: 12px; align-items: flex-start; margin: 14px 0; font-weight: 400; cursor: pointer; }
.pm-switch input { margin-top: 3px; flex: 0 0 auto; }

/* approvals */
.pm-appr { border-left: 5px solid var(--pc); }
.pm-appr-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.pm-appr-total { font-size: 26px; font-weight: 550; letter-spacing: -.8px; color: var(--t1); }
.pm-appr-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 14px; }
.pm-appr-actions input { flex: 1 1 220px; }
.pm-ts-mini td, .pm-ts-mini th { text-align: center; }
.pm-ts-mini td:first-child, .pm-ts-mini th:first-child { text-align: left; }

/* my tasks */
.pm-mylist { display: grid; gap: 8px; }
.pm-myrow { display: grid; grid-template-columns: minmax(0, 1fr) auto 170px; gap: 12px; align-items: center; padding: 10px 12px 10px 14px; background: var(--surface-2); border-radius: 14px; border-left: 4px solid var(--pc); }
.pm-myopen { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; min-width: 0; background: transparent; border: 0; padding: 0; text-align: left; color: var(--t1); cursor: pointer; }
.pm-mytitle { font-weight: 500; overflow-wrap: anywhere; }
.pm-myproj { font-size: 12px; }
.pm-mymeta { display: inline-flex; gap: 8px; align-items: center; white-space: nowrap; }
.pm-myopen:hover .pm-mytitle { text-decoration: underline; text-underline-offset: 3px; }

/* timesheet */
.pm-ts-nav { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.pm-ts-note { padding: 12px 14px; border-radius: var(--r-sm); margin-bottom: 14px; font-size: 13px; }
.pm-ts-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--r-sm); }
.pm-ts-grid { width: 100%; border-collapse: collapse; min-width: 860px; }
.pm-ts-grid th, .pm-ts-grid td { padding: 8px 6px; text-align: center; border-bottom: 1px solid var(--border); }
.pm-ts-grid th:first-child, .pm-ts-grid td:first-child { text-align: left; padding-left: 12px; }
.pm-ts-grid th.today { color: var(--t1); background: rgba(166,187,140,.08); }
.pm-ts-grid input[type="number"] { width: 74px; min-height: 36px; padding: 4px 4px; text-align: center; font-size: 14px; }
.pm-ts-grid td.rej input[type="number"] { border-color: var(--danger); background: var(--danger-bg); }
.pm-ts-grid td.ok input[type="number"] { border-color: #526147; color: #a6bb8c; }
.pm-ts-grid input[data-note] { min-width: 160px; width: 100%; min-height: 36px; }
.pm-ts-label { max-width: 260px; font-size: 13px; color: var(--t2); overflow-wrap: anywhere; }
.pm-ts-tot { font-weight: 600; color: var(--t1); }
.pm-ts-grid tfoot th { color: var(--t1); }
.pm-ts-att td { color: var(--t3); font-size: 12px; }
.pm-ts-add { margin-top: 14px; }
.pm-ts-foot { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 16px; }

@media (max-width: 900px) {
  .pm-head { grid-template-columns: 1fr; }
  .pm-head-actions { flex-direction: row; flex-wrap: wrap; min-width: 0; }
  .pm-task { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 620px) {
  .pm-head { padding: 20px; }
  .pm-title { font-size: 22px; }
  .pm-board { grid-auto-columns: minmax(78vw, 1fr); }
  .pm-tl { --tl-label: 130px; }
  .pm-myrow { grid-template-columns: 1fr; }
  .pm-myrow select { width: 100%; }
  .pm-filters select { max-width: none; flex: 1 1 140px; }
  .pm-pgrid { grid-template-columns: 1fr; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   Document Manager (extension) — folder tree + file list, document dialog
   with preview, sharing, requests. Same tokens and recipes as above.
   ═══════════════════════════════════════════════════════════════════════════ */
label.btn { margin: 0; cursor: pointer; display: inline-flex; align-items: center; }
.dm-ico { display: inline-flex; align-items: center; justify-content: center; min-width: 34px; height: 22px; padding: 0 5px; border-radius: 6px; font-size: 9px; font-weight: 700; letter-spacing: .04em; color: var(--bg); background: #aeb8b0; flex: 0 0 auto; }
.dm-ico-pdf { background: #da968b; } .dm-ico-doc { background: #a4b6d1; } .dm-ico-xls { background: #a6bb8c; }
.dm-ico-ppt { background: #d3a27f; } .dm-ico-img { background: #b7aadf; } .dm-ico-zip { background: #cbb782; } .dm-ico-txt { background: #91baba; }
.dm-layout { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 22px; align-items: start; }
.dm-tree { padding: 16px 12px; position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow: auto; }
.dm-tree-head { display: flex; justify-content: space-between; align-items: center; padding: 0 8px 10px; }
.dm-tree ul { list-style: none; margin: 0; padding: 0; }
.dm-node { display: flex; align-items: center; gap: 8px; padding: 7px 10px 7px calc(10px + var(--d, 0) * 16px); border-radius: 12px; color: var(--t2); text-decoration: none; font-size: 13px; min-width: 0; }
.dm-node span:nth-child(2) { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dm-node:hover { background: var(--surface-2); color: var(--t1); }
.dm-node.active { background: var(--t1); color: var(--bg); }
.dm-n { font-size: 11px; color: var(--t3); }
.dm-node.active .dm-n { color: var(--bg); opacity: .7; }
.dm-main { min-width: 0; }
.dm-crumbs { font-size: 12px; color: var(--t3); margin-bottom: 8px; overflow-wrap: anywhere; }
.dm-crumbs a { color: var(--t2); text-decoration: none; }
.dm-crumbs a:hover { color: var(--t1); text-decoration: underline; }
.dm-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; flex-wrap: wrap; margin-bottom: 14px; }
.dm-head h3 { overflow-wrap: anywhere; }
.dm-badges { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.dm-actions, .dm-actions-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.dm-subs { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; margin-bottom: 14px; }
.dm-sub { display: flex; gap: 10px; align-items: center; padding: 12px 14px; border-radius: 14px; background: var(--surface-2); color: var(--t1); text-decoration: none; font-size: 13px; font-weight: 500; min-width: 0; border: 1px solid transparent; }
.dm-sub span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dm-sub:hover { border-color: var(--border-strong); }
.dm-drop { border: 1px dashed var(--border); border-radius: 14px; padding: 12px; text-align: center; color: var(--t3); font-size: 12px; margin-bottom: 14px; transition: background var(--dur) var(--ease); }
.dm-drop.on { background: rgba(166,187,140,.1); border-color: #a6bb8c; color: var(--t1); }
.dm-open { display: inline-flex; gap: 10px; align-items: center; max-width: 100%; background: transparent; border: 0; padding: 0; color: var(--t1); cursor: pointer; text-align: left; }
.dm-name { font-weight: 500; overflow-wrap: anywhere; }
.dm-open:hover .dm-name { text-decoration: underline; text-underline-offset: 3px; }
.dm-doc { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 22px; margin-top: 12px; }
.dm-preview { background: var(--surface-2); border-radius: var(--r); min-height: 360px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.dm-preview iframe { width: 100%; height: 68vh; border: 0; background: #fff; }
.dm-preview img { max-width: 100%; max-height: 68vh; object-fit: contain; }
.dm-noprev { text-align: center; color: var(--t3); display: grid; gap: 10px; justify-items: center; }
.dm-noprev .dm-ico { min-width: 60px; height: 40px; font-size: 13px; }
.dm-side { min-width: 0; }
.dm-side input:not([type="checkbox"]), .dm-side select, .dm-side textarea { width: 100%; }
.dm-h4 { margin: 20px 0 6px; padding-top: 14px; border-top: 1px solid var(--border); display: flex; gap: 6px; align-items: center; }
.dm-vers { display: grid; gap: 8px; }
.dm-ver { display: flex; justify-content: space-between; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); font-size: 13px; }
.dm-ver.cur { border: 1px solid var(--border-strong); }
.dm-ver-act { display: flex; flex-direction: column; gap: 4px; align-items: flex-end; }
.dm-indent { margin-left: 0; }
.dm-grants { display: grid; gap: 6px; }
.dm-grant { display: flex; align-items: center; gap: 10px; padding: 8px 10px; background: var(--surface-2); border-radius: 12px; }
.dm-grant span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.dm-grant select { width: auto; min-height: 34px; }
.dm-req { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.dm-req:last-child { border-bottom: 0; }
.dm-reqnote { padding: 8px 10px; border-radius: 10px; margin-top: 6px; font-size: 12px; }
.om-storage input { width: auto; }

@media (max-width: 900px) {
  .dm-layout { grid-template-columns: 1fr; }
  .dm-tree { position: static; max-height: 260px; }
  .dm-doc { grid-template-columns: minmax(0, 1fr); }
  .dm-preview iframe { height: 55vh; }
}
@media (max-width: 620px) {
  .dm-req { flex-direction: column; align-items: flex-start; }
}
input.sr-only { position: absolute !important; width: 1px !important; height: 1px !important; min-height: 0 !important; padding: 0 !important; margin: -1px !important; border: 0 !important; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- Payroll ---------- */
td.num, th.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.pay-ca { background: #3d3626 !important; color: #e8d9b5; border-left: 4px solid #cbb782 !important; }
.pay-ca a { color: #f1e3bd; }
.pay-warn { color: #d3a27f; font-size: 12px; }
.pay-row { cursor: pointer; }
.pay-row:hover td, .pay-row:focus-visible td { background: var(--surface-2); }
.pay-row:focus-visible { outline: none; }
.pay-files { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 8px; }
.pay-files li { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.pay-slip { background: #f7f6f2; color: #1b1d1f; border-radius: var(--r); padding: 22px; overflow-x: auto; font-size: 13px; }
.pay-slip h1 { font-size: 18px; margin: 0; color: #1b1d1f; }
.pay-slip h2 { font-size: 15px; margin: 16px 0 4px; color: #1b1d1f; }
.pay-slip .sub { color: #555; margin: 2px 0; }
.pay-slip .head { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; border-bottom: 2px solid #1b1d1f; padding-bottom: 8px; }
.pay-slip .grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 4px 24px; margin: 10px 0; }
.pay-slip table { width: 100%; border-collapse: collapse; margin-top: 8px; min-width: 460px; }
.pay-slip th, .pay-slip td { border: 1px solid #c9c6bd; padding: 6px 8px; text-align: left; color: #1b1d1f; background: transparent; }
.pay-slip th { background: #ebe8df; font-weight: 600; }
.pay-slip td.n, .pay-slip th.n { text-align: right; font-variant-numeric: tabular-nums; }
.pay-slip .tot td { font-weight: 700; }
.pay-slip .note { color: #666; font-size: 11px; margin-top: 12px; }
a.chip { text-decoration: none; }

/* ---------- CMDB ---------- */
.cm-timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.cm-timeline li { display: grid; grid-template-columns: 104px minmax(0, 1fr); gap: 12px; align-items: start; }
.cm-timeline strong { color: var(--t1); font-weight: 500; overflow-wrap: anywhere; }
.cm-kind { display: inline-block; text-align: center; padding: 3px 8px; border-radius: 50px; font-size: 11px; font-weight: 600; background: var(--surface-2); color: var(--t2); }
.cm-k-assigned, .cm-k-acknowledged { background: #35462c; color: #e3f1cc; }
.cm-k-returned, .cm-k-audit { background: #2f4545; color: #cfe6e6; }
.cm-k-repair, .cm-k-maintenance { background: #563c2b; color: #f7deca; }
.cm-k-status, .cm-k-ticket { background: #3a365b; color: #ddd8f3; }
.cm-mine { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.cm-mycard { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; border-radius: 18px; background: var(--surface-2); min-width: 0; }
.cm-mycard strong { color: var(--t1); font-weight: 550; overflow-wrap: anywhere; }
.tabs a.tab { color: var(--t2); border-radius: 50px; padding: 9px 16px; font-size: 12px; font-weight: 500; }
.tabs a.tab:hover { background: var(--surface-2); color: var(--t1); }
.tabs a.tab.active { background: var(--t1); color: var(--bg); }
@media (max-width: 520px) { .cm-timeline li { grid-template-columns: 1fr; gap: 4px; } .cm-kind { justify-self: start; } }

/* ---------- Performance ---------- */
.pf-steps { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; }
.pf-steps li { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px 6px 6px; border-radius: 50px; background: var(--surface-2); color: var(--t3); font-size: 12px; }
.pf-steps li span { width: 22px; height: 22px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--surface); font-weight: 600; font-size: 11px; }
.pf-steps li.done { color: var(--t2); }
.pf-steps li.done span { background: var(--success-bg); color: #e3f1cc; }
.pf-steps li.now { background: var(--t1); color: var(--bg); font-weight: 600; }
.pf-steps li.now span { background: var(--bg); color: var(--t1); }
.pf-rate { display: inline-grid; place-items: center; min-width: 26px; height: 26px; padding: 0 6px; border-radius: 50px; font-weight: 700; font-size: 13px; background: var(--surface-2); color: var(--t1); }
.pf-r1 { background: var(--danger-bg); color: #f7c9c0; } .pf-r2 { background: var(--warning-bg); color: #f7deca; } .pf-r3 { background: #2f4545; color: #cfe6e6; }
.pf-r4 { background: var(--success-bg); color: #e3f1cc; } .pf-r5 { background: #a6bb8c; color: #1a1c20; }
.pf-big .pf-rate { min-width: 40px; height: 40px; font-size: 20px; }
.pf-goals { display: grid; gap: 12px; }
.pf-goal { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; border-radius: 16px; background: var(--surface-2); min-width: 0; }
.pf-goal.dropped { opacity: .55; }
.pf-goal-top { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.pf-goal-top strong { color: var(--t1); font-weight: 550; overflow-wrap: anywhere; }
.pf-w { flex: 0 0 auto; font-weight: 700; color: var(--accent-dk); font-variant-numeric: tabular-nums; }
.pf-goal-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pf-goal-bar .pm-progress { flex: 1 1 140px; min-width: 100px; }
.pf-hist summary { cursor: pointer; font-size: 13px; overflow-wrap: anywhere; }
.pf-hist ul { margin: 6px 0 0 18px; padding: 0; font-size: 13px; display: grid; gap: 4px; }
.pf-q { margin-bottom: 10px; }
.pf-q p { margin: 4px 0 0; overflow-wrap: anywhere; }
.pf-feed { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.pf-feed li { padding: 12px 16px; border-radius: 16px; background: var(--surface-2); display: flex; flex-direction: column; gap: 6px; align-items: flex-start; min-width: 0; }
.pf-feed li.kudos { background: linear-gradient(135deg, #35462c, var(--surface-2) 70%); }
.pf-feed p { margin: 0; overflow-wrap: anywhere; }
.pf-feed-top { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
.pf-kudo { display: inline-block; padding: 3px 10px; border-radius: 50px; font-size: 11px; font-weight: 700; background: #a6bb8c; color: #1a1c20; }
.pf-dist { display: grid; gap: 10px; }
.pf-dist-row { display: grid; grid-template-columns: minmax(120px, 210px) minmax(0, 1fr) 44px; gap: 12px; align-items: center; }
.pf-dist-l { font-size: 13px; color: var(--t2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pf-dist-bars { display: grid; gap: 3px; }
.pf-bar { height: 12px; min-width: 2px; border-radius: 50px; position: relative; }
.pf-bar span { position: absolute; left: calc(100% + 6px); top: -2px; font-size: 11px; color: var(--t3); }
.pf-bar.m { background: #6c7a8a; } .pf-bar.f { background: #a6bb8c; }
.pf-legend { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 12px; font-size: 12px; color: var(--t3); }
.pf-legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 6px; vertical-align: -2px; }
.pf-legend i.m { background: #6c7a8a; } .pf-legend i.f { background: #a6bb8c; }
.pf-1on1 { border-radius: 16px; background: var(--surface-2); padding: 12px 16px; margin-top: 10px; }
.pf-1on1 summary { cursor: pointer; }
.pf-1on1-body { margin-top: 10px; }
.pf-1on1-body p { overflow-wrap: anywhere; }
.pf-actions { list-style: none; margin: 4px 0 8px; padding: 0; display: grid; gap: 6px; }
.pf-actions li { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.pf-actions label { display: inline-flex; gap: 8px; align-items: center; margin: 0; overflow-wrap: anywhere; }
.pf-done { text-decoration: line-through; color: var(--t3); }
.pf-private { padding: 8px 12px; border-radius: 12px; border: 1px dashed var(--border-strong); }
a.pf-teamcard { text-decoration: none; color: inherit; }
a.pf-teamcard:hover, a.pf-teamcard:focus-visible { outline: 1px solid var(--border-strong); }
@media (max-width: 520px) { .pf-dist-row { grid-template-columns: 1fr 36px; } .pf-dist-l { grid-column: 1 / -1; } }
#content select { max-width: 100%; }
.dm-head > div { min-width: 0; }
.dm-head .pm-who span:last-child, a.pf-teamcard .pm-who span:last-child { white-space: normal; overflow-wrap: anywhere; }
.pf-grt td.pf-gr { width: 260px; }
@media (max-width: 620px) { .pf-grt tr { display: grid; } .pf-grt td, .pf-grt td.pf-gr { display: block; width: auto; } .pf-grt td.pf-gr { padding-top: 0; } }
