/* HCO-HR design system
   Palette: #4F2BD9 (violet) · #3B1FA8 (deep violet) · #0B0C14 (ink) · #E4E6EF (line) · #FFFFFF
   Type:    system UI fonts (Latin + Arabic), no web-font download */


:root {
  /* Brand palette */
  --hco-primary: #4F2BD9;
  --hco-primary-deep: #3B1FA8;
  --hco-ink: #0B0C14;
  --hco-line: #E4E6EF;
  --hco-white: #FFFFFF;

  /* Semantic tokens — light */
  --bg: #F5F6FB;
  --surface: #FFFFFF;
  --surface-2: #F9FAFD;
  --surface-sunken: #EEF0F7;
  --border: #E4E6EF;
  --border-strong: #CBCFDC;
  --text: #0B0C14;
  --text-2: #464A5C;
  --text-3: #6E7387;
  --accent: var(--hco-primary);
  --accent-strong: var(--hco-primary-deep);
  --accent-ink: #FFFFFF;             /* text on the accent */
  --accent-soft: rgba(79, 43, 217, .12);
  --accent-soft-2: rgba(79, 43, 217, .22);
  --inverse: #0B0C14;
  --inverse-ink: #FFFFFF;
  --success: #15803D;
  --success-soft: rgba(21, 128, 61, .12);
  --warning: #B45309;
  --warning-soft: rgba(245, 158, 11, .14);
  --danger: #C62828;
  --danger-soft: rgba(220, 38, 38, .10);
  --info: #1F4FD1;
  --info-soft: rgba(37, 99, 235, .10);
  --focus: 0 0 0 3px rgba(79, 43, 217, .45);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .05);
  --shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 4px 16px rgba(0, 0, 0, .06);
  --shadow-lg: 0 12px 48px rgba(0, 0, 0, .18);
  --radius-sm: 6px;
  --radius: 12px;
  --radius-lg: 18px;
  --pill: 999px;
  --sidebar-w: 256px;
  --topbar-h: 60px;
  --font: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', 'Noto Sans Arabic', 'Geeza Pro', Tahoma, Arial, sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0B0C14; --surface: #12131D; --surface-2: #171826; --surface-sunken: #0E0F18; --border: #262838; --border-strong: #363950;
    --hco-primary: #9B87FF; --hco-primary-deep: #B9AAFF; --accent-ink: #0B0C14;
    --text: #F3F4FA; --text-2: #BCC0D2; --text-3: #8A8FA6; --accent-soft: rgba(79, 43, 217, .14); --accent-soft-2: rgba(79, 43, 217, .26);
    --inverse: #FFFFFF; --inverse-ink: #0B0C14; --success: #34D399; --success-soft: rgba(52, 211, 153, .14);
    --warning: #F5B94A; --warning-soft: rgba(245, 158, 11, .16); --danger: #FF6B6B; --danger-soft: rgba(255, 107, 107, .12);
    --info: #7FA6FF; --info-soft: rgba(127, 166, 255, .12); --shadow: 0 1px 2px rgba(0,0,0,.5), 0 4px 16px rgba(0,0,0,.4); --shadow-lg: 0 12px 48px rgba(0,0,0,.6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0B0C14; --surface: #12131D; --surface-2: #171826; --surface-sunken: #0E0F18; --border: #262838; --border-strong: #363950;
    --hco-primary: #9B87FF; --hco-primary-deep: #B9AAFF; --accent-ink: #0B0C14;
  --text: #F3F4FA; --text-2: #BCC0D2; --text-3: #8A8FA6; --accent-soft: rgba(79, 43, 217, .14); --accent-soft-2: rgba(79, 43, 217, .26);
  --inverse: #FFFFFF; --inverse-ink: #0B0C14; --success: #34D399; --success-soft: rgba(52, 211, 153, .14);
  --warning: #F5B94A; --warning-soft: rgba(245, 158, 11, .16); --danger: #FF6B6B; --danger-soft: rgba(255, 107, 107, .12);
  --info: #7FA6FF; --info-soft: rgba(127, 166, 255, .12); --shadow: 0 1px 2px rgba(0,0,0,.5), 0 4px 16px rgba(0,0,0,.4); --shadow-lg: 0 12px 48px rgba(0,0,0,.6);
  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 14px; line-height: 1.5; color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; font-weight: 700; letter-spacing: -.01em; }
h1 { font-size: 24px; } h2 { font-size: 18px; } h3 { font-size: 15px; } h4 { font-size: 13px; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
a.link, .prose a { color: var(--text); text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a.link:hover { color: var(--accent-strong); }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: var(--radius-sm); }
.icon { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.icon-sm { width: 15px; height: 15px; } .icon-lg { width: 22px; height: 22px; }
[dir="rtl"] .flip-rtl { transform: scaleX(-1); }
.muted { color: var(--text-3); } .text-2 { color: var(--text-2); }
.small { font-size: 12px; } .tiny { font-size: 11px; }
.mono { font-variant-numeric: tabular-nums; }
.num { font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hidden { display: none !important; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.stack-sm { display: flex; flex-direction: column; gap: 8px; }
.stack-lg { display: flex; flex-direction: column; gap: 24px; }
.row { display: flex; align-items: center; gap: 12px; }
.row-sm { display: flex; align-items: center; gap: 6px; }
.between { justify-content: space-between; }
.wrap { flex-wrap: wrap; }
.grow { flex: 1 1 auto; min-width: 0; }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.span-2 { grid-column: span 2; }
@media (max-width: 1100px) { .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 720px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: minmax(0, 1fr); } .span-2 { grid-column: auto; } }
.align-start { align-items: start; }
.seo-page { border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 14px; }
.seo-page > summary { cursor: pointer; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.char-count { font-size: 11px; color: var(--text-2); }
.char-count.is-over { color: var(--danger, #c0392b); }
.dns-table td, .dns-table th { font-size: 12px; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 38px; padding: 0 16px; border-radius: var(--pill); border: 1px solid transparent; font-weight: 600; font-size: 13px; cursor: pointer; white-space: nowrap; transition: background .15s, border-color .15s, color .15s, box-shadow .15s; user-select: none; }
.btn .icon { width: 16px; height: 16px; }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-strong); color: #fff; }
.btn-dark { background: var(--inverse); color: var(--inverse-ink); }
.btn-dark:hover { opacity: .88; }
.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--border-strong); }
.btn-secondary:hover { border-color: var(--text-3); background: var(--surface-2); }
.btn-ghost { background: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--surface-sunken); color: var(--text); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { filter: brightness(.92); }
.btn-danger-ghost { background: transparent; color: var(--danger); border-color: transparent; }
.btn-danger-ghost:hover { background: var(--danger-soft); }
.btn-sm { height: 32px; padding: 0 12px; font-size: 12px; }
.btn-lg { height: 46px; padding: 0 22px; font-size: 14px; }
.btn-icon { width: 36px; padding: 0; border-radius: var(--radius-sm); }
.btn-block { width: 100%; }
.or-divider { display: flex; align-items: center; gap: 12px; margin: 18px 0 12px; color: var(--text-3, var(--text-2)); font-size: 12px; }
.or-divider::before, .or-divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.btn-google .brand-icon { width: 18px; height: 18px; }
.btn[disabled], .btn.is-disabled { opacity: .45; cursor: not-allowed; pointer-events: none; }

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.label { font-size: 12px; font-weight: 600; color: var(--text-2); }
.label .req { color: var(--danger); margin-inline-start: 2px; }
.input, .select, .textarea { width: 100%; height: 40px; padding: 0 12px; background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius-sm); font-size: 14px; transition: border-color .15s, box-shadow .15s; }
.textarea { height: auto; min-height: 96px; padding: 10px 12px; resize: vertical; }
.input::placeholder, .textarea::placeholder { color: var(--text-3); }
.input:hover, .select:hover, .textarea:hover { border-color: var(--text-3); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--accent); box-shadow: var(--focus); }
.select { appearance: none; padding-inline-end: 34px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23767676' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; }
[dir="rtl"] .select { background-position: left 10px center; }
.input.is-invalid, .select.is-invalid, .textarea.is-invalid { border-color: var(--danger); }
.field-error { font-size: 12px; color: var(--danger); }
.help { font-size: 12px; color: var(--text-3); }
.input-group { position: relative; }
.input-group .icon { position: absolute; inset-inline-start: 11px; top: 50%; transform: translateY(-50%); color: var(--text-3); pointer-events: none; }
.input-group .input { padding-inline-start: 36px; }
.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 13px; }
.check input { width: 16px; height: 16px; accent-color: var(--hco-primary-deep); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 20px; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 720px) { .form-grid { grid-template-columns: 1fr; } }
.form-actions { display: flex; gap: 10px; justify-content: flex-end; padding-top: 8px; }
.fieldset { border: 0; padding: 0; margin: 0; }
.fieldset-title { font-size: 13px; font-weight: 700; margin-bottom: 4px; }

/* ---------- Panels / cards ---------- */
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.panel-head h2, .panel-head h3 { font-size: 14px; }
.panel-sub { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.panel-body { padding: 20px; }
.panel-body.tight { padding: 12px 20px; }
.panel-foot { padding: 12px 20px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 8px; }
.panel.flush .panel-body { padding: 0; }

/* ---------- Badges ---------- */
.badge { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 9px; border-radius: var(--pill); font-size: 11px; font-weight: 600; background: var(--surface-sunken); color: var(--text-2); white-space: nowrap; border: 1px solid var(--border); }
.badge-dot::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-success { background: var(--success-soft); color: var(--success); border-color: transparent; }
.badge-warning { background: var(--warning-soft); color: var(--warning); border-color: transparent; }
.badge-danger { background: var(--danger-soft); color: var(--danger); border-color: transparent; }
.badge-info { background: var(--info-soft); color: var(--info); border-color: transparent; }
.badge-brand { background: var(--accent); color: #000; border-color: transparent; }
.badge-soon { background: transparent; color: var(--text-3); border: 1px dashed var(--border-strong); height: 18px; font-size: 10px; padding: 0 6px; }

/* ---------- Alerts ---------- */
.alert { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); font-size: 13px; }
.alert .icon { margin-top: 1px; }
.alert-title { font-weight: 700; }
.alert-success { background: var(--success-soft); border-color: transparent; }
.alert-success .icon { color: var(--success); }
.alert-warning { background: var(--warning-soft); border-color: transparent; }
.alert-warning .icon { color: var(--warning); }
.alert-error, .alert-danger { background: var(--danger-soft); border-color: transparent; }
.alert-error .icon, .alert-danger .icon { color: var(--danger); }
.alert-info { background: var(--info-soft); border-color: transparent; }
.alert-info .icon { color: var(--info); }
.alert .grow > * + * { margin-top: 4px; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
.table th { text-align: start; font-weight: 600; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-3); padding: 10px 16px; background: var(--surface-2); border-bottom: 1px solid var(--border); white-space: nowrap; }
[dir="rtl"] .table th { letter-spacing: 0; }
.table td { padding: 12px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: var(--surface-2); }
.table th a { display: inline-flex; align-items: center; gap: 4px; }
.table th a:hover { color: var(--text); }
.table .actions { text-align: end; white-space: nowrap; }
.table-toolbar { display: flex; gap: 10px; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.table-toolbar .input-group { flex: 1 1 240px; max-width: 360px; }
.table-toolbar .select { width: auto; min-width: 150px; height: 36px; font-size: 13px; }
.table-toolbar .input { height: 36px; font-size: 13px; }
.table-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-top: 1px solid var(--border); font-size: 12px; color: var(--text-3); flex-wrap: wrap; }
.person { display: flex; align-items: center; gap: 10px; min-width: 0; }
.person-name { font-weight: 600; color: var(--text); }
.person-sub { font-size: 12px; color: var(--text-3); }
.avatar { width: 32px; height: 32px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; background: var(--accent-soft-2); color: var(--text); flex: none; }
.avatar-lg { width: 56px; height: 56px; font-size: 18px; }
.col-toggle-hidden { display: none; }

/* ---------- Pagination ---------- */
.pagination { display: flex; gap: 4px; align-items: center; }
.pagination a, .pagination span { min-width: 32px; height: 32px; padding: 0 8px; display: inline-flex; align-items: center; justify-content: center; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--surface); color: var(--text-2); font-size: 12px; font-weight: 600; }
.pagination a:hover { border-color: var(--text-3); color: var(--text); }
.pagination .current { background: var(--inverse); color: var(--inverse-ink); border-color: var(--inverse); }
.pagination .disabled { opacity: .4; }

/* ---------- Tabs ---------- */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); overflow-x: auto; scrollbar-width: none; }
.tabs a { display: inline-flex; align-items: center; gap: 6px; padding: 10px 14px; font-size: 13px; font-weight: 600; color: var(--text-3); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs a:hover { color: var(--text); }
.tabs a.active { color: var(--text); border-bottom-color: var(--accent); }
.tabs a.soon { opacity: .6; }

/* ---------- Dropdown (details/summary) ---------- */
.dropdown { position: relative; }
.dropdown > summary { list-style: none; cursor: pointer; }
.dropdown > summary::-webkit-details-marker { display: none; }
.menu { position: absolute; z-index: 50; top: calc(100% + 6px); inset-inline-end: 0; min-width: 220px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 6px; }
.menu.start { inset-inline-end: auto; inset-inline-start: 0; }
.menu a, .menu button { display: flex; width: 100%; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--radius-sm); font-size: 13px; color: var(--text-2); background: none; border: 0; cursor: pointer; text-align: start; }
.menu a:hover, .menu button:hover { background: var(--surface-sunken); color: var(--text); }
.menu .sep { height: 1px; background: var(--border); margin: 6px 0; }
.menu .menu-label { padding: 6px 10px 4px; font-size: 11px; font-weight: 600; color: var(--text-3); text-transform: uppercase; letter-spacing: .04em; }
.menu .is-current { color: var(--text); font-weight: 600; }

/* ---------- Dialog ---------- */
dialog.dialog { border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 0; width: min(520px, calc(100vw - 32px)); background: var(--surface); color: var(--text); box-shadow: var(--shadow-lg); }
dialog.dialog::backdrop { background: rgba(0, 0, 0, .45); backdrop-filter: blur(2px); }
.dialog-head { padding: 18px 20px 0; display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.dialog-body { padding: 14px 20px 20px; }
.dialog-foot { padding: 14px 20px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 8px; }

/* ---------- Stats ---------- */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.kpi { padding: 18px 20px; border-inline-end: 1px solid var(--border); min-width: 0; }
.kpi:last-child { border-inline-end: 0; }
.kpi-label { font-size: 12px; color: var(--text-3); font-weight: 600; display: flex; align-items: center; gap: 6px; }
.kpi-value { font-size: 28px; font-weight: 700; letter-spacing: -.02em; margin-top: 6px; font-variant-numeric: tabular-nums; }
.kpi-meta { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.kpi-meta .up { color: var(--success); font-weight: 600; }
@media (max-width: 1100px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .kpi:nth-child(2n) { border-inline-end: 0; } .kpi:nth-child(-n+2) { border-bottom: 1px solid var(--border); } }
@media (max-width: 480px) { .kpis { grid-template-columns: 1fr; } .kpi { border-inline-end: 0; border-bottom: 1px solid var(--border); } .kpi:last-child { border-bottom: 0; } }

/* Meter */
.meter { height: 6px; background: var(--surface-sunken); border-radius: var(--pill); overflow: hidden; }
.meter > span { display: block; height: 100%; background: var(--accent); border-radius: inherit; }
.meter.warn > span { background: #F59E0B; } .meter.full > span { background: var(--danger); }
.usage-row { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; align-items: center; }
.usage-row .meter { grid-column: 1 / -1; }

/* Bars chart (CSS) */
.bars { display: flex; flex-direction: column; gap: 10px; }
.bar-row { display: grid; grid-template-columns: minmax(90px, 160px) 1fr 40px; align-items: center; gap: 12px; font-size: 13px; }
.bar-track { height: 10px; background: var(--surface-sunken); border-radius: var(--pill); overflow: hidden; }
.bar-fill { height: 100%; background: var(--accent); border-radius: inherit; min-width: 2px; }
.bar-row .num { text-align: end; color: var(--text-2); font-weight: 600; }

/* Column chart (SVG) */
.chart { width: 100%; height: auto; display: block; overflow: visible; }
.chart .grid-line { stroke: var(--border); stroke-width: 1; }
.chart .col { fill: var(--accent); }
.chart .col.last { fill: var(--inverse); }
.chart .axis { fill: var(--text-3); font-size: 11px; font-family: var(--font); }
.chart .val { fill: var(--text-2); font-size: 11px; font-weight: 600; font-family: var(--font); }

/* Legend chips */
.split { display: flex; height: 10px; border-radius: var(--pill); overflow: hidden; background: var(--surface-sunken); }
.split > span { height: 100%; }
.legend { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 12px; color: var(--text-2); }
.legend i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-inline-end: 6px; }
.c1 { background: var(--hco-primary); } .c2 { background: var(--inverse); } .c3 { background: var(--border-strong); } .c4 { background: var(--hco-primary-deep); } .c5 { background: var(--text-3); }

/* ---------- Activity feed / timeline ---------- */
.feed { list-style: none; margin: 0; padding: 0; }
.feed li { display: flex; gap: 12px; padding: 12px 20px; border-bottom: 1px solid var(--border); }
.feed li:last-child { border-bottom: 0; }
.feed .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); margin-top: 6px; flex: none; }
.feed .what { font-size: 13px; color: var(--text); }
.feed .when { font-size: 12px; color: var(--text-3); }
.action-list { list-style: none; margin: 0; padding: 0; }
.action-list li a { display: flex; align-items: center; gap: 12px; padding: 12px 20px; border-bottom: 1px solid var(--border); }
.action-list li:last-child a { border-bottom: 0; }
.action-list li a:hover { background: var(--surface-2); }
.action-icon { width: 32px; height: 32px; border-radius: var(--radius-sm); display: inline-flex; align-items: center; justify-content: center; background: var(--surface-sunken); color: var(--text-2); flex: none; }
.action-icon.warning { background: var(--warning-soft); color: var(--warning); }
.action-icon.danger { background: var(--danger-soft); color: var(--danger); }
.action-icon.info { background: var(--info-soft); color: var(--info); }

/* ---------- Empty / skeleton ---------- */
.empty { padding: 48px 24px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.empty .empty-icon { width: 48px; height: 48px; border-radius: 12px; background: var(--accent-soft); color: var(--text); display: inline-flex; align-items: center; justify-content: center; }
.empty h3 { font-size: 15px; }
.empty p { color: var(--text-3); max-width: 420px; font-size: 13px; }
.skeleton { background: linear-gradient(90deg, var(--surface-sunken), var(--surface-2), var(--surface-sunken)); background-size: 200% 100%; animation: shimmer 1.2s infinite; border-radius: var(--radius-sm); }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- Definition list ---------- */
.dl { display: grid; grid-template-columns: minmax(120px, 200px) 1fr; gap: 12px 20px; font-size: 13px; margin: 0; }
.dl dt { color: var(--text-3); }
.dl dd { margin: 0; font-weight: 500; }
@media (max-width: 560px) { .dl { grid-template-columns: 1fr; gap: 2px; } .dl dd { margin-bottom: 10px; } }

/* ---------- App shell ---------- */
.shell { display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; background: var(--surface); border-inline-end: 1px solid var(--border); z-index: 40; }
.sidebar-brand { height: var(--topbar-h); display: flex; align-items: center; padding: 0 20px; border-bottom: 1px solid var(--border); }
.sidebar-brand img { height: 22px; width: auto; }
.logo-dark { display: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .logo-light { display: none; } :root:not([data-theme="light"]) .logo-dark { display: block; } }
:root[data-theme="dark"] .logo-light { display: none; }
:root[data-theme="dark"] .logo-dark { display: block; }
.org-switch { margin: 12px; }
.org-switch > summary { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-2); }
.org-switch > summary:hover { border-color: var(--border-strong); }
.org-mark { width: 30px; height: 30px; border-radius: 8px; background: var(--inverse); color: var(--inverse-ink); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; flex: none; }
.org-name { font-weight: 700; font-size: 13px; }
.org-plan { font-size: 11px; color: var(--text-3); }
.org-switch .menu { inset-inline-start: 0; inset-inline-end: 0; min-width: 0; }
.nav { flex: 1; overflow-y: auto; padding: 4px 12px 16px; }
.nav-group { margin-top: 14px; }
.nav-title { padding: 0 10px 6px; font-size: 11px; font-weight: 700; color: var(--text-3); text-transform: uppercase; letter-spacing: .06em; }
[dir="rtl"] .nav-title { letter-spacing: 0; }
.nav a { display: flex; align-items: center; gap: 10px; height: 36px; padding: 0 10px; border-radius: var(--radius-sm); color: var(--text-2); font-weight: 500; font-size: 13px; position: relative; }
.nav a:hover { background: var(--surface-sunken); color: var(--text); }
.nav a.active { background: var(--accent-soft); color: var(--text); font-weight: 600; }
.nav a.active::before { content: ''; position: absolute; inset-inline-start: -12px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent); }
[dir="rtl"] .nav a.active::before { border-radius: 3px 0 0 3px; }
.nav a .badge-soon { margin-inline-start: auto; }
.nav a.is-soon { color: var(--text-3); }
.sidebar-foot { padding: 12px; border-top: 1px solid var(--border); }
.plan-card { padding: 12px; border-radius: var(--radius); background: var(--surface-2); border: 1px solid var(--border); font-size: 12px; }
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 30; height: var(--topbar-h); display: flex; align-items: center; gap: 12px; padding: 0 24px; background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--border); }
.search-trigger { display: flex; align-items: center; gap: 10px; height: 36px; width: min(420px, 100%); padding: 0 12px; border: 1px solid var(--border); background: var(--surface); border-radius: var(--pill); color: var(--text-3); cursor: pointer; font-size: 13px; }
.search-trigger:hover { border-color: var(--border-strong); }
.kbd { margin-inline-start: auto; font-size: 11px; font-weight: 600; padding: 2px 6px; border: 1px solid var(--border); border-radius: 5px; color: var(--text-3); background: var(--surface-2); }
.topbar-actions { margin-inline-start: auto; display: flex; align-items: center; gap: 4px; }
.user-chip { display: flex; align-items: center; gap: 8px; padding: 4px 6px 4px 4px; border-radius: var(--pill); }
.user-chip:hover { background: var(--surface-sunken); }
.content { padding: 28px 32px 48px; max-width: 1400px; width: 100%; margin: 0 auto; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.page-head .eyebrow { font-size: 12px; color: var(--text-3); font-weight: 600; margin-bottom: 6px; display: flex; align-items: center; gap: 6px; }
.page-head .eyebrow a:hover { color: var(--text); }
.page-head p { color: var(--text-3); margin-top: 4px; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.banner { display: flex; align-items: center; gap: 12px; padding: 10px 24px; font-size: 13px; border-bottom: 1px solid var(--border); background: var(--surface); }
.banner.warning { background: var(--warning-soft); }
.banner.danger { background: var(--danger-soft); }
.banner .btn { margin-inline-start: auto; }
.mobile-only { display: none; }
.sidebar-backdrop { display: none; }
@media (max-width: 960px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; inset-block: 0; inset-inline-start: 0; width: 280px; transform: translateX(-100%); transition: transform .2s; box-shadow: var(--shadow-lg); }
  [dir="rtl"] .sidebar { transform: translateX(100%); }
  body.nav-open .sidebar { transform: none; }
  body.nav-open .sidebar-backdrop { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 35; }
  .mobile-only { display: inline-flex; }
  .topbar { padding: 0 12px; }
  .content { padding: 20px 16px 40px; }
  .search-trigger .kbd, .search-trigger .label-text { display: none; }
  .search-trigger { width: 36px; padding: 0; justify-content: center; border-radius: var(--radius-sm); }
  .user-chip .user-name { display: none; }
}

/* ---------- Command palette ---------- */
.cmdk { position: fixed; inset: 0; z-index: 100; display: none; align-items: flex-start; justify-content: center; padding-top: 12vh; background: rgba(0, 0, 0, .45); }
.cmdk.open { display: flex; }
.cmdk-box { width: min(620px, calc(100vw - 24px)); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); overflow: hidden; }
.cmdk-input { display: flex; align-items: center; gap: 10px; padding: 0 16px; border-bottom: 1px solid var(--border); }
.cmdk-input input { flex: 1; height: 54px; border: 0; background: transparent; font-size: 15px; outline: none; }
.cmdk-results { max-height: 50vh; overflow-y: auto; padding: 8px; }
.cmdk-group { padding: 8px 10px 4px; font-size: 11px; font-weight: 700; color: var(--text-3); text-transform: uppercase; letter-spacing: .05em; }
.cmdk-item { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: var(--radius-sm); font-size: 13px; }
.cmdk-item.active, .cmdk-item:hover { background: var(--accent-soft); }
.cmdk-item .sub { color: var(--text-3); font-size: 12px; margin-inline-start: auto; }
.cmdk-empty { padding: 24px; text-align: center; color: var(--text-3); font-size: 13px; }

/* ---------- Auth & onboarding ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.auth-side { background: var(--hco-primary); color: var(--accent-ink); padding: 48px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.auth-side img { height: 28px; width: auto; }
.auth-side h2 { font-size: 40px; font-weight: 800; line-height: 1.05; letter-spacing: -.03em; text-transform: uppercase; }
[dir="rtl"] .auth-side h2 { letter-spacing: 0; text-transform: none; }
.auth-side p { font-size: 15px; max-width: 420px; margin-top: 16px; font-weight: 500; }
.auth-points { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 10px; font-weight: 600; }
.auth-points li { display: flex; gap: 10px; align-items: center; }
.auth-main { display: flex; align-items: center; justify-content: center; padding: 40px 24px; background: var(--surface); }
.auth-card { width: 100%; max-width: 420px; }
.auth-card.wide { max-width: 640px; }
.auth-card h1 { font-size: 26px; }
.auth-card .lead { color: var(--text-3); margin-top: 6px; }
.auth-top { position: absolute; top: 20px; inset-inline-end: 24px; display: flex; gap: 6px; z-index: 5; }
.auth-mobile-logo { display: none; margin-bottom: 28px; }
.auth-mobile-logo img { height: 24px; width: auto; }
@media (max-width: 900px) { .auth { grid-template-columns: 1fr; } .auth-side { display: none; } .auth-mobile-logo { display: block; } }
.steps { display: flex; gap: 6px; margin-bottom: 24px; }
.steps .step { flex: 1; }
.steps .bar { height: 4px; border-radius: var(--pill); background: var(--border); }
.steps .step.done .bar, .steps .step.current .bar { background: var(--accent); }
.steps .step-label { font-size: 11px; font-weight: 600; color: var(--text-3); margin-top: 6px; }
.steps .step.current .step-label { color: var(--text); }
.plan-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 560px) { .plan-options { grid-template-columns: 1fr; } }
.plan-option { position: relative; display: block; cursor: pointer; }
.plan-option input { position: absolute; opacity: 0; }
.plan-option .box { display: block; padding: 14px; border: 1px solid var(--border-strong); border-radius: var(--radius); transition: border-color .15s, box-shadow .15s; height: 100%; }
.plan-option input:checked + .box { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); background: var(--accent-soft); }
.plan-option input:focus-visible + .box { box-shadow: var(--focus); }
.plan-option input:disabled + .box { opacity: .5; cursor: not-allowed; }
.plan-option .name { font-weight: 700; }
.plan-option .price { font-size: 13px; color: var(--text-2); margin-top: 2px; }
.plan-option .meta { font-size: 12px; color: var(--text-3); margin-top: 6px; }
.onb-shell { min-height: 100vh; background: var(--bg); }
.onb-top { height: 64px; display: flex; align-items: center; justify-content: space-between; padding: 0 28px; border-bottom: 1px solid var(--border); background: var(--surface); }
.onb-top img { height: 22px; width: auto; }
.onb-body { max-width: 760px; margin: 0 auto; padding: 36px 20px 64px; }
.list-inline { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.list-inline .item { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.list-inline .item:last-child { border-bottom: 0; }
.integration { display: flex; gap: 14px; align-items: flex-start; padding: 16px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.integration .logo-box { width: 40px; height: 40px; border-radius: 10px; background: var(--surface-sunken); display: inline-flex; align-items: center; justify-content: center; flex: none; }

/* ---------- Public site ---------- */
.site-nav { position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--surface) 90%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.site-nav .inner, .container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.site-nav .inner { height: 68px; display: flex; align-items: center; gap: 28px; }
.site-nav img { height: 24px; width: auto; }
.site-links { display: flex; gap: 22px; font-size: 13px; font-weight: 600; color: var(--text-2); }
.site-links a:hover { color: var(--text); }
.site-nav .right { margin-inline-start: auto; display: flex; gap: 8px; align-items: center; }
@media (max-width: 860px) { .site-links { display: none; } .site-nav .right .hide-sm { display: none; } }
.hero { padding: 72px 0 56px; }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center; }
@media (max-width: 960px) { .hero-grid { grid-template-columns: 1fr; } }
.eyebrow-tag { display: inline-flex; align-items: center; gap: 8px; height: 30px; padding: 0 12px; border-radius: var(--pill); background: var(--accent-soft); font-size: 12px; font-weight: 700; }
.hero h1 { font-size: clamp(36px, 5.2vw, 64px); font-weight: 800; letter-spacing: -.035em; line-height: 1.02; margin-top: 18px; }
[dir="rtl"] .hero h1 { letter-spacing: 0; line-height: 1.2; }
.hero h1 .accent { color: var(--hco-primary); }
.hero p.lead { font-size: 18px; color: var(--text-2); margin-top: 18px; max-width: 540px; }
.hero .cta { display: flex; gap: 10px; margin-top: 28px; flex-wrap: wrap; }
.hero-panel { background: var(--hco-primary); border-radius: 24px; padding: 28px; color: var(--accent-ink); }
.hero-panel .mock { background: var(--surface); color: var(--text); border-radius: 14px; box-shadow: var(--shadow-lg); overflow: hidden; }
.mock-head { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--border); font-size: 12px; font-weight: 700; }
.mock-body { padding: 14px; display: grid; gap: 10px; }
.mock-line { display: grid; grid-template-columns: 1fr auto; font-size: 12px; gap: 6px; }
.section { padding: 72px 0; border-top: 1px solid var(--border); }
.section-head { max-width: 640px; margin-bottom: 36px; }
.section-head h2 { font-size: clamp(26px, 3vw, 36px); font-weight: 800; letter-spacing: -.02em; }
[dir="rtl"] .section-head h2 { letter-spacing: 0; }
.section-head p { color: var(--text-2); margin-top: 10px; font-size: 16px; }
.module-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
@media (max-width: 900px) { .module-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .module-grid { grid-template-columns: 1fr; } }
.module { background: var(--surface); padding: 24px; }
.module h3 { margin-top: 14px; font-size: 16px; }
.module p { color: var(--text-2); margin-top: 6px; font-size: 13px; }
.module .icon-wrap { width: 40px; height: 40px; border-radius: 10px; background: var(--accent-soft); display: inline-flex; align-items: center; justify-content: center; }
.lifecycle { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.lifecycle span { padding: 8px 14px; border-radius: var(--pill); border: 1px solid var(--border-strong); font-weight: 600; font-size: 13px; background: var(--surface); }
.lifecycle span.on { background: var(--inverse); color: var(--inverse-ink); border-color: var(--inverse); }
.pricing-toggle { display: inline-flex; padding: 4px; border: 1px solid var(--border); border-radius: var(--pill); background: var(--surface); margin-bottom: 24px; }
.pricing-toggle a { padding: 6px 14px; border-radius: var(--pill); font-size: 13px; font-weight: 600; color: var(--text-2); }
.pricing-toggle a.active { background: var(--inverse); color: var(--inverse-ink); }
.pricing { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 1100px) { .pricing { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .pricing { grid-template-columns: 1fr; } }
.price-card { border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); padding: 24px; display: flex; flex-direction: column; gap: 16px; }
.price-card.featured { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.price-card .amount { font-size: 34px; font-weight: 800; letter-spacing: -.02em; }
.price-card .per { font-size: 13px; color: var(--text-3); font-weight: 500; }
.price-card ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; font-size: 13px; }
.price-card li { display: flex; gap: 8px; align-items: flex-start; }
.price-card li .icon { color: var(--hco-primary-deep); margin-top: 1px; width: 16px; height: 16px; }
.price-card li.soon { color: var(--text-3); }
.price-card li.soon .icon { color: var(--text-3); }
.faq details { border-bottom: 1px solid var(--border); padding: 18px 0; }
.faq summary { cursor: pointer; font-weight: 700; font-size: 15px; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq details p { color: var(--text-2); margin-top: 10px; }
.cta-band { background: #000; color: #fff; border-radius: 24px; padding: 48px; display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.cta-band h2 { font-size: clamp(26px, 3.4vw, 40px); font-weight: 800; text-transform: uppercase; letter-spacing: -.02em; }
[dir="rtl"] .cta-band h2 { text-transform: none; letter-spacing: 0; }
.cta-band h2 span { color: var(--hco-primary); }
.footer { padding: 40px 0; border-top: 1px solid var(--border); font-size: 13px; color: var(--text-3); }
.footer .inner { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.footer img { height: 20px; width: auto; }

/* Utilities */
.mt-1 { margin-top: 4px; } .mt-2 { margin-top: 8px; } .mt-3 { margin-top: 12px; } .mt-4 { margin-top: 16px; } .mt-6 { margin-top: 24px; } .mt-8 { margin-top: 32px; }
.mb-2 { margin-bottom: 8px; } .mb-4 { margin-bottom: 16px; } .mb-6 { margin-bottom: 24px; }
.w-full { width: 100%; }
.text-end { text-align: end; } .text-center { text-align: center; }
.divider { height: 1px; background: var(--border); border: 0; margin: 16px 0; }
.code-box { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; padding: 10px 12px; background: var(--surface-sunken); border: 1px solid var(--border); border-radius: var(--radius-sm); word-break: break-all; }
.perm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px 16px; }
.matrix th, .matrix td { text-align: center; }
.matrix th:first-child, .matrix td:first-child { text-align: start; }
.matrix .yes { color: var(--hco-primary-deep); }
.matrix .no { color: var(--border-strong); }
body.site { background: var(--surface); }

/* ---------- Phase 2 components ---------- */
.bell { position: relative; }
.bell-count { position: absolute; top: 2px; inset-inline-end: 2px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: var(--pill); background: var(--danger); color: #fff; font-size: 10px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }

/* Clock-in widget */
.clock-card { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.clock-time { font-size: 30px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.clock-steps { display: flex; gap: 18px; flex-wrap: wrap; font-size: 12px; color: var(--text-3); }
.clock-steps strong { display: block; font-size: 14px; color: var(--text); font-variant-numeric: tabular-nums; }

/* Status chips for attendance / leave */
.st { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 9px; border-radius: var(--pill); font-size: 11px; font-weight: 600; white-space: nowrap; }
.st::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.st-present, .st-approved, .st-done { background: var(--success-soft); color: var(--success); }
.st-late, .st-pending, .st-review { background: var(--warning-soft); color: var(--warning); }
.st-absent, .st-rejected, .st-expired { background: var(--danger-soft); color: var(--danger); }
.st-on_leave, .st-in_progress, .st-expiring { background: var(--info-soft); color: var(--info); }
.st-off, .st-not_yet, .st-cancelled, .st-todo, .st-none, .st-valid { background: var(--surface-sunken); color: var(--text-3); }
.st-valid { color: var(--success); }

/* Summary strip */
.summary-strip { display: flex; flex-wrap: wrap; gap: 8px; }
.summary-strip .chip { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); font-size: 12px; color: var(--text-2); }
.summary-strip .chip strong { font-size: 18px; color: var(--text); font-variant-numeric: tabular-nums; }

/* Leave balances */
.balances { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.balance { border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; background: var(--surface); }
.balance .swatch { width: 8px; height: 8px; border-radius: 2px; display: inline-block; margin-inline-end: 6px; }
.balance .big { font-size: 26px; font-weight: 800; font-variant-numeric: tabular-nums; margin-top: 6px; }

/* Leave calendar (month grid of people × days) */
.cal-wrap { overflow-x: auto; }
.cal { border-collapse: separate; border-spacing: 0; font-size: 11px; }
.cal th, .cal td { border-bottom: 1px solid var(--border); padding: 0; height: 30px; min-width: 26px; text-align: center; }
.cal th:first-child, .cal td:first-child { position: sticky; inset-inline-start: 0; background: var(--surface); text-align: start; padding: 0 12px; min-width: 170px; font-size: 12px; z-index: 1; }
.cal th { color: var(--text-3); font-weight: 600; }
.cal .wk { background: var(--surface-2); }
.cal .today { box-shadow: inset 0 0 0 1px var(--accent); }
.cal .bar { display: block; height: 18px; margin: 0 1px; border-radius: 4px; opacity: .9; }
.cal .bar.pending { opacity: .45; background-image: repeating-linear-gradient(45deg, transparent 0 4px, rgba(255,255,255,.5) 4px 8px); }

/* Task board */
.board { display: grid; grid-template-columns: repeat(4, minmax(240px, 1fr)); gap: 12px; overflow-x: auto; padding-bottom: 8px; }
.board-col { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); display: flex; flex-direction: column; min-height: 240px; }
.board-col.drop { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.board-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; font-weight: 700; font-size: 13px; }
.board-list { display: flex; flex-direction: column; gap: 8px; padding: 0 10px 12px; flex: 1; }
.task-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; box-shadow: var(--shadow-sm); cursor: grab; }
.task-card:hover { border-color: var(--border-strong); }
.task-card.dragging { opacity: .5; }
.task-card .t { font-weight: 600; font-size: 13px; }
.task-card .meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 8px; font-size: 11px; color: var(--text-3); }
.prio { display: inline-flex; align-items: center; height: 18px; padding: 0 6px; border-radius: 4px; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; }
.prio-urgent { background: var(--danger); color: #fff; }
.prio-high { background: var(--danger-soft); color: var(--danger); }
.prio-medium { background: var(--warning-soft); color: var(--warning); }
.prio-low { background: var(--surface-sunken); color: var(--text-3); }
.overdue { color: var(--danger); font-weight: 600; }
@media (max-width: 960px) { .board { grid-template-columns: repeat(4, minmax(260px, 80vw)); } }

/* Comments */
.comments { list-style: none; margin: 0; padding: 0; }
.comments li { display: flex; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.comments li:last-child { border-bottom: 0; }
.comments .body { white-space: pre-wrap; font-size: 13px; margin-top: 2px; }

/* File drop */
.file-input { display: block; width: 100%; padding: 18px; border: 1.5px dashed var(--border-strong); border-radius: var(--radius); background: var(--surface-2); font-size: 13px; }
.file-input:hover { border-color: var(--accent); }

/* Notification list */
.notif { display: flex; gap: 12px; padding: 14px 20px; border-bottom: 1px solid var(--border); }
.notif:last-child { border-bottom: 0; }
.notif.unread { background: var(--accent-soft); }
.notif .dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 6px; background: var(--border-strong); flex: none; }
.notif.unread .dot { background: var(--accent); }

/* Import mapping */
.map-grid { display: grid; grid-template-columns: minmax(160px, 220px) 1fr; gap: 10px 16px; align-items: center; }
@media (max-width: 560px) { .map-grid { grid-template-columns: 1fr; } }
tr.row-error td { background: var(--danger-soft); }

@media print { .sidebar, .topbar, .page-actions, .banner { display: none !important; } .shell { display: block; } .content { padding: 0; } }

/* ---------- Recruitment ---------- */
.st-applied, .st-draft { background: var(--surface-sunken); color: var(--text-2); }
.st-screening, .st-shortlisted, .st-scheduled { background: var(--info-soft); color: var(--info); }
.st-interview, .st-assessment, .st-offer { background: var(--warning-soft); color: var(--warning); }
.st-hired, .st-open, .st-completed, .st-active { background: var(--success-soft); color: var(--success); }
.st-closed { background: var(--surface-sunken); color: var(--text-3); }
.board-pipeline { grid-template-columns: repeat(8, minmax(210px, 1fr)); }
@media (max-width: 960px) { .board-pipeline { grid-template-columns: repeat(8, minmax(230px, 80vw)); } }
.board-col.is-end { background: var(--surface-sunken); }
.stars { display: inline-flex; gap: 1px; color: var(--warning); font-size: 12px; letter-spacing: 1px; }
.stars .off { color: var(--border-strong); }
.rate-form { display: inline-flex; gap: 2px; }
.rate-form button { background: none; border: 0; padding: 2px; font-size: 18px; line-height: 1; cursor: pointer; color: var(--border-strong); }
.rate-form button.on { color: var(--warning); }
.rate-form button:hover, .rate-form button:focus-visible { color: var(--warning); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: var(--pill); background: var(--surface-sunken); border: 1px solid var(--border); font-size: 12px; color: var(--text-2); }
.funnel { display: flex; gap: 2px; height: 8px; border-radius: var(--pill); overflow: hidden; background: var(--surface-sunken); min-width: 120px; }
.funnel span { display: block; height: 100%; }
.job-row { display: flex; gap: 16px; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.job-row:last-child { border-bottom: 0; }
.job-row .job-title { font-weight: 700; font-size: 15px; }
.prose { white-space: pre-wrap; line-height: 1.75; color: var(--text-2); }
.progress { height: 8px; border-radius: var(--pill); background: var(--surface-sunken); overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--accent); border-radius: var(--pill); }
.checklist { list-style: none; margin: 0; padding: 0; }
.checklist li { display: flex; gap: 12px; align-items: flex-start; padding: 12px 20px; border-bottom: 1px solid var(--border); }
.checklist li:last-child { border-bottom: 0; }
.checklist li.done .ttl { text-decoration: line-through; color: var(--text-3); }
.tick { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--border-strong); background: var(--surface); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; color: transparent; flex: none; }
.tick:hover { border-color: var(--accent); }
.tick.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.tick:disabled { cursor: default; opacity: .6; }
.tpl-row { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 1.4fr) minmax(0, 1.2fr) 90px 36px; gap: 8px; align-items: center; }
@media (max-width: 720px) { .tpl-row { grid-template-columns: 1fr 1fr; } .tpl-row > :first-child { grid-column: 1 / -1; } }

/* ---------- Public careers page ---------- */
.careers-head { padding: 56px 0 32px; }
.careers-head .org-mark { width: 56px; height: 56px; font-size: 20px; border-radius: 14px; }
.careers-list { display: grid; gap: 12px; }
.careers-job { display: flex; gap: 16px; align-items: center; justify-content: space-between; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px 24px; box-shadow: var(--shadow-sm); transition: border-color .15s; }
.careers-job:hover { border-color: var(--accent); }
.careers-job h3 { margin: 0 0 6px; font-size: 17px; }
.careers-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 24px; align-items: start; padding-bottom: 72px; }
@media (max-width: 900px) { .careers-grid { grid-template-columns: 1fr; } }
.hp-field { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; opacity: 0; pointer-events: none; }

/* ---------- Payroll ---------- */
.st-review { background: var(--warning-soft); color: var(--warning); }
.st-paid, .st-approved { background: var(--success-soft); color: var(--success); }
.workflow { list-style: none; margin: 0 0 24px; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.workflow li { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); font-size: 13px; }
.workflow .n { width: 24px; height: 24px; border-radius: 50%; background: var(--surface-sunken); color: var(--text-3); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 12px; flex: none; }
.workflow li.done .n { background: var(--accent); color: var(--accent-ink); }
.workflow li.current { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.workflow li.current .n { background: var(--inverse); color: var(--inverse-ink); }
@media (max-width: 720px) { .workflow { grid-template-columns: 1fr 1fr; } }
.table tfoot th { border-top: 2px solid var(--border-strong); font-weight: 700; }
.payslip { max-width: 860px; }
.payslip-head { display: flex; gap: 14px; align-items: center; padding: 20px; border-bottom: 1px solid var(--border); }
.payslip-meta { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 20px; margin: 0 0 20px; }
.payslip-meta dt { font-size: 11px; color: var(--text-3); text-transform: uppercase; letter-spacing: .04em; }
.payslip-meta dd { margin: 2px 0 0; font-weight: 600; font-size: 13px; }
.payslip-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.payslip-table { border: 1px solid var(--border); border-radius: var(--radius); }
.payslip-net { display: flex; justify-content: space-between; align-items: center; margin-top: 16px; padding: 16px 20px; border-radius: var(--radius); background: var(--accent-soft); font-weight: 700; }
.payslip-net strong { font-size: 22px; }
@media (max-width: 720px) { .payslip-cols, .payslip-meta { grid-template-columns: 1fr 1fr; } .payslip-cols { grid-template-columns: 1fr; } }
.print-page { background: #fff; }
.print-sheet { max-width: 900px; margin: 0 auto; padding: 32px 24px; }
.print-actions { display: flex; justify-content: flex-end; margin-bottom: 16px; }
.print-sheet .payslip { max-width: none; box-shadow: none; }
@media print {
  .no-print { display: none !important; }
  .print-sheet { padding: 0; }
  .payslip-net { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  @page { margin: 14mm; }
}

/* ---------- Performance ---------- */
.st-on_track { background: var(--success-soft); color: var(--success); }
.st-at_risk { background: var(--warning-soft); color: var(--warning); }
.st-off_track { background: var(--danger-soft); color: var(--danger); }
.goal-row { display: flex; gap: 14px; align-items: center; padding: 14px 20px; border-bottom: 1px solid var(--border); color: inherit; }
.goal-row:last-child { border-bottom: 0; }
.goal-row:hover { background: var(--surface-2); }
.goal-title { font-weight: 600; font-size: 14px; display: block; }
.goal-scope { width: 32px; height: 32px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; flex: none; background: var(--surface-sunken); color: var(--text-2); }
.goal-scope-company { background: var(--inverse); color: var(--inverse-ink); }
.goal-scope-department { background: var(--info-soft); color: var(--info); }
.goal-scope-individual { background: var(--accent-soft); color: var(--text); }
.goal-progress { display: flex; align-items: center; gap: 8px; width: 170px; flex: none; }
.goal-progress .progress { flex: 1; }
@media (max-width: 640px) { .goal-progress { width: 90px; } }
.kr-row { display: grid; grid-template-columns: minmax(0, 3fr) 90px 90px 70px 36px; gap: 8px; align-items: center; }
.kr-row > input[type=hidden] { display: none; }
.kr-row.tiny { grid-template-columns: 0 minmax(0, 3fr) 90px 90px 70px 36px; }
@media (max-width: 720px) { .kr-row { grid-template-columns: 1fr 1fr 1fr 36px; } .kr-row > input[name=kr_title] { grid-column: 1 / -1; } }
.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 6px 16px; }
.review-table td { vertical-align: top; }
.dist { display: flex; align-items: flex-end; gap: 10px; height: 140px; }
.dist-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 4px; height: 100%; }
.dist-bar { width: 100%; max-width: 36px; min-height: 2px; background: var(--accent); border-radius: 6px 6px 0 0; }

/* ---------- Learning ---------- */
.st-published { background: var(--success-soft); color: var(--success); }
.st-archived { background: var(--surface-sunken); color: var(--text-3); }
.course-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.course-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; color: inherit; box-shadow: var(--shadow-sm); transition: border-color .15s, transform .15s; }
.course-card:hover { border-color: var(--accent); transform: translateY(-1px); }
.course-cover { position: relative; height: 96px; display: flex; align-items: center; justify-content: center; color: #fff; }
.course-cover .icon { width: 34px; height: 34px; opacity: .9; }
.course-cover-1 { background: linear-gradient(135deg, #3B1FA8, #7C5CFF); }
.course-cover-2 { background: linear-gradient(135deg, #111, #3a3a3a); }
.course-cover-3 { background: linear-gradient(135deg, #1F4FD1, #5B7FE0); }
.course-cover-4 { background: linear-gradient(135deg, #B45309, #E0A43B); }
.course-cover-5 { background: linear-gradient(135deg, #0f766e, #14b8a6); }
.course-flag { position: absolute; top: 10px; inset-inline-end: 10px; }
.course-body { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px 16px; }
.course-title { font-size: 15px; line-height: 1.35; }
.path-card { color: inherit; display: block; }
.path-card:hover { border-color: var(--accent); }
.lesson-list { list-style: none; margin: 0; padding: 0; }
.lesson-list li { display: flex; gap: 12px; align-items: center; padding: 12px 20px; border-bottom: 1px solid var(--border); }
.lesson-list li:last-child { border-bottom: 0; }
.lesson-list a { color: inherit; }
.lesson-list.compact li { padding: 10px 16px; }
.lesson-list li.current { background: var(--accent-soft); }
.lesson-n { width: 26px; height: 26px; border-radius: 50%; background: var(--surface-sunken); color: var(--text-2); display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; flex: none; }
.lesson-list li.done .lesson-n { background: var(--accent); color: var(--accent-ink); }
.lesson-layout { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 20px; align-items: start; }
@media (max-width: 960px) { .lesson-layout { grid-template-columns: 1fr; } .lesson-outline { order: 2; } }
.lesson-nav { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.video-frame { position: relative; padding-top: 56.25%; background: #000; border-radius: var(--radius-lg) var(--radius-lg) 0 0; overflow: hidden; }
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.rich { line-height: 1.8; color: var(--text); }
.rich h3, .rich h4 { margin: 18px 0 8px; }
.rich p { margin: 0 0 12px; }
.rich ul, .rich ol { margin: 0 0 12px; padding-inline-start: 22px; }
.quiz-q { border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; margin: 0; }
.quiz-q legend { font-weight: 600; padding: 0 6px; }
.quiz-q.ok { border-color: var(--success); }
.quiz-q.bad { border-color: var(--danger); }
.quiz-opt { display: flex; padding: 6px 4px; }
.quiz-opt.right { color: var(--success); font-weight: 600; }
.quiz-opt.wrong { color: var(--danger); }
.quiz-edit .panel-body { padding: 14px; }
.check-list { max-height: 240px; overflow: auto; border: 1px solid var(--border); border-radius: var(--radius); padding: 8px 12px; display: grid; gap: 4px; }
.span-full { grid-column: 1 / -1; }
.certificate { max-width: 900px; margin: 0 auto; background: #fff; color: #0A0A0A; border-radius: var(--radius-lg); padding: 14px; box-shadow: var(--shadow); }
.cert-inner { border: 2px solid #4F2BD9; border-radius: 12px; padding: 48px 40px; text-align: center; background: radial-gradient(circle at top, rgba(79, 43, 217, .08), transparent 60%); }
.cert-brand { display: flex; justify-content: center; margin-bottom: 28px; }
.cert-brand img, .cert-brand svg { height: 30px; width: auto; }
.cert-kicker { letter-spacing: .18em; text-transform: uppercase; font-size: 12px; color: #3B1FA8; font-weight: 700; }
.cert-name { font-size: clamp(26px, 4vw, 40px); font-weight: 800; margin: 18px 0 8px; }
.cert-text { color: #4A4A4A; }
.cert-course { font-size: clamp(18px, 2.4vw, 24px); font-weight: 700; margin: 10px 0 28px; }
.cert-meta { display: flex; justify-content: center; gap: 36px; flex-wrap: wrap; }
.cert-meta span { display: block; font-size: 11px; color: #767676; text-transform: uppercase; letter-spacing: .06em; }
.cert-org { margin-top: 32px; font-weight: 700; }
.cert-code { margin-top: 8px; font-size: 11px; color: #767676; }
@media print { .certificate { box-shadow: none; padding: 0; } .cert-inner { -webkit-print-color-adjust: exact; print-color-adjust: exact; } }
.certificate .logo-light { display: inline-block !important; }
.certificate .logo-dark { display: none !important; }

/* ---------- Integrations ---------- */
.section-title { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-3); margin: 0 0 10px; }
.integration-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.integration-card { display: flex; gap: 14px; align-items: center; padding: 16px 18px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); color: inherit; box-shadow: var(--shadow-sm); }
a.integration-card:hover { border-color: var(--accent); }
.integration-card.is-locked { opacity: .6; }
.integration-logo { width: 44px; height: 44px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; flex: none; color: var(--text); }
.event-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.event-group { border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 12px; margin: 0; display: grid; gap: 4px; }
.event-group legend { font-weight: 700; font-size: 12px; padding: 0 4px; }
.provider-choice { border: 1px solid var(--border); border-radius: var(--radius); padding: 8px 14px; }

/* The hidden attribute always wins over component display rules. */
[hidden] { display: none !important; }

/* ---------- AI (Phase 8): drafts and insights, always marked as AI output ---------- */
.btn-ai { background: var(--inverse); color: var(--inverse-ink); }
.btn-ai .icon { color: var(--hco-primary); }
.btn-ai:hover { background: var(--inverse); opacity: .9; }
.btn-ai.is-busy { opacity: .75; cursor: progress; }
.btn-ai.is-busy .icon { animation: ai-pulse 1s ease-in-out infinite; }
@keyframes ai-pulse { 50% { opacity: .3; } }
@media (prefers-reduced-motion: reduce) { .btn-ai.is-busy .icon { animation: none; } }
.ai-panel { border-color: color-mix(in srgb, var(--hco-primary) 45%, var(--border)); }
.ai-panel .panel-head h2 .icon { color: var(--hco-primary-deep); }
.ai-panel[aria-busy="true"] [data-ai-output] { opacity: .55; }
.ai-note { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-3); }
.ai-note .icon { color: var(--hco-primary-deep); flex: none; }
.ai-item { border: 1px solid var(--border); border-radius: var(--radius-sm, 10px); padding: 12px 14px; display: grid; gap: 8px; }
.ai-text { white-space: pre-wrap; margin: 0; max-height: 260px; overflow: auto; }
.ai-list { margin: 4px 0 0; padding-inline-start: 20px; display: grid; gap: 4px; font-size: 13px; }
.ai-options { list-style: none; margin: 6px 0 4px; padding: 0; display: grid; gap: 2px; font-size: 12px; color: var(--text-2); }
.ai-options li::before { content: '○ '; color: var(--text-3); }
.ai-options li.ok { color: var(--success); font-weight: 600; }
.ai-options li.ok::before { content: '● '; color: var(--success); }
.ai-filled { box-shadow: 0 0 0 3px color-mix(in srgb, var(--hco-primary) 35%, transparent) !important; transition: box-shadow .3s; }
.btn.is-done { color: var(--success); }
.st-ai-met { background: var(--success-soft); color: var(--success); }
.st-ai-partial { background: var(--warning-soft); color: var(--warning); }
.st-ai-not_evident { background: var(--surface-sunken); color: var(--text-3); }
.table-compact td, .table-compact th { padding-top: 8px; padding-bottom: 8px; vertical-align: top; }
.ai-master { align-items: flex-start; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm, 10px); }
.ai-master input { margin-top: 3px; }
.ai-areas { display: grid; gap: 8px; }
.ai-area { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm, 10px); cursor: pointer; font-size: 13px; }
.ai-area input { width: 16px; height: 16px; accent-color: var(--hco-primary-deep); flex: none; }
.ai-area.is-locked { opacity: .6; cursor: not-allowed; }
.ai-area-icon { width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; background: var(--surface-sunken); flex: none; }
.chip-btn { border: 1px solid var(--border); background: var(--surface); color: var(--text-2); border-radius: var(--pill); padding: 5px 12px; font: inherit; font-size: 12px; cursor: pointer; }
.chip-btn:hover { border-color: var(--hco-primary-deep); color: var(--text); }
.ai-history summary, .ai-metrics summary { cursor: pointer; font-size: 13px; }
.ai-history { border-bottom: 1px solid var(--border); padding-bottom: 8px; }
.ai-metrics pre { margin: 8px 0 0; max-height: 240px; overflow: auto; white-space: pre-wrap; word-break: break-word; }
.input-sm, .select-sm { height: 32px; font-size: 13px; }

/* ---------- Approval workflows (Phase 9) ---------- */
.wf-steps { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 11px; color: var(--text-3); }
.wf-steps li { display: inline-flex; align-items: center; gap: 4px; }
.wf-steps .n { width: 16px; height: 16px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 10px; font-weight: 700; background: var(--surface-sunken); border: 1px solid var(--border); }
.wf-steps .wf-approved .n { background: var(--success-soft); color: var(--success); border-color: transparent; }
.wf-steps .wf-pending { color: var(--text); font-weight: 600; }
.wf-steps .wf-pending .n { background: var(--hco-primary); color: var(--accent-ink); border-color: transparent; }
.wf-steps .wf-rejected .n { background: var(--danger-soft); color: var(--danger); border-color: transparent; }
.wf-steps .wf-skipped, .wf-steps .wf-cancelled { text-decoration: line-through; }
.wf-step-row { display: grid; grid-template-columns: 28px 1fr 1fr auto; gap: 8px; align-items: center; }
@media (max-width: 640px) { .wf-step-row { grid-template-columns: 28px 1fr auto; } .wf-step-row .wf-ref { grid-column: 2 / 3; } }

/* ---------- Reports (Phase 9) ---------- */
.form-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 900px) { .form-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .form-grid-4 { grid-template-columns: 1fr; } }
.report-card { display: block; color: inherit; text-decoration: none; transition: border-color .15s; }
.report-card:hover { border-color: var(--hco-primary-deep); }

/* ---------- Support tickets (Phase 9) ---------- */
.thread { gap: 14px; }
.msg { border: 1px solid var(--border); border-radius: var(--radius-sm, 10px); padding: 12px 14px; }
.msg-staff { border-color: color-mix(in srgb, var(--hco-primary) 45%, var(--border)); background: color-mix(in srgb, var(--hco-primary) 5%, var(--surface)); }
.msg-internal { border-style: dashed; background: var(--warning-soft); }
.msg-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; margin-bottom: 8px; }
.msg-body { white-space: pre-wrap; font-size: 14px; line-height: 1.7; }
.avatar-sm { width: 26px; height: 26px; font-size: 10px; }
.st-prio-low { background: var(--surface-sunken); color: var(--text-3); }
.st-prio-normal { background: var(--info-soft); color: var(--info); }
.st-prio-high { background: var(--warning-soft); color: var(--warning); }
.st-prio-urgent { background: var(--danger-soft); color: var(--danger); }
.st-t-open { background: var(--info-soft); color: var(--info); }
.st-t-in_progress { background: var(--warning-soft); color: var(--warning); }
.st-t-waiting_customer { background: var(--surface-sunken); color: var(--text-2); }
.st-t-resolved, .st-t-closed { background: var(--success-soft); color: var(--success); }

/* Fieldsets used as plain form groups (checkbox lists, whole form bodies) have no box of their own. */
fieldset.field, fieldset.panel-body { border: 0; margin: 0; min-width: 0; }
fieldset.field { padding: 0; }
fieldset.field > legend { padding: 0; margin-bottom: 6px; }

/* ---------- Charts (Advanced Analytics) — accent #4F2BD9 validated for light and dark surfaces ---------- */
:root { --chart-accent: #6A4CF0; --chart-hover: rgba(0, 0, 0, .04); }
:root[data-theme="dark"] { --chart-hover: rgba(255, 255, 255, .05); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --chart-hover: rgba(255, 255, 255, .05); } }
.chart { position: relative; }
.ch { width: 100%; height: auto; display: block; overflow: visible; }
.ch-grid { stroke: var(--border); stroke-width: 1; vector-effect: non-scaling-stroke; }
.ch { --ch-scale: 1; }
.ch-tick { fill: var(--text-3); font-size: calc(12px * var(--ch-scale)); font-variant-numeric: tabular-nums; }
.ch-label { fill: var(--text-2); font-size: calc(12px * var(--ch-scale)); font-weight: 600; }
@media (max-width: 600px) { .ch-xl-alt { display: none; } }
.kpis-auto { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.kpis-auto .kpi { border-bottom: 1px solid var(--border); margin-bottom: -1px; }
.ch-line { fill: none; stroke: var(--chart-accent); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.ch-area { fill: var(--chart-accent); opacity: .1; }
.ch-dot { fill: var(--chart-accent); stroke: var(--surface); stroke-width: 2; }
.ch-bar { fill: var(--chart-accent); }
.ch-cross { stroke: var(--text-3); stroke-width: 1; vector-effect: non-scaling-stroke; }
.ch-hit { fill: transparent; cursor: crosshair; outline: none; }
.ch-hit.is-on { fill: var(--chart-hover); }
.chart-tip { position: absolute; top: 4px; pointer-events: none; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); border-radius: 8px; padding: 6px 10px; font-size: 12px; display: grid; gap: 2px; white-space: nowrap; z-index: 2; }
.chart-tip[hidden] { display: none; }
.chart-tip strong { font-size: 14px; }
.chart-tip span { color: var(--text-3); }
.hbars { display: grid; gap: 10px; }
.hbar { display: grid; grid-template-columns: minmax(90px, 32%) 1fr minmax(52px, auto); gap: 10px; align-items: center; font-size: 13px; }
.hbar-label { color: var(--text-2); overflow-wrap: anywhere; }
.hbar-track { height: 16px; display: block; }
.hbar-fill { display: block; height: 100%; min-width: 2px; background: var(--chart-accent); border-start-end-radius: 4px; border-end-end-radius: 4px; }
.hbar-value { color: var(--text); font-weight: 600; text-align: end; }
.chart-table summary { cursor: pointer; font-size: 12px; color: var(--text-3); margin-top: 10px; }
.chart-table table { margin-top: 8px; }
.an-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 900px) { .an-grid { grid-template-columns: 1fr; } }
.an-card .panel-body { padding-top: 12px; }
.an-wide { grid-column: 1 / -1; }
.an-note { font-size: 12px; color: var(--text-3); margin-top: 8px; }
.kpi-value { font-variant-numeric: normal; }

/* ---------- Compliance ---------- */
.cmp-hero { font-size: 56px; font-weight: 700; letter-spacing: -.03em; line-height: 1.1; margin: 6px 0 8px; }
.cmp-hero span { font-size: 28px; color: var(--text-3); margin-inline-start: 2px; }
.cmp-checks { display: grid; }
.cmp-check { border-top: 1px solid var(--border); }
.cmp-check:first-child { border-top: 0; }
.cmp-check > summary { display: flex; align-items: center; gap: 12px; padding: 14px 20px; cursor: pointer; list-style: none; }
.cmp-check > summary::-webkit-details-marker { display: none; }
.cmp-check > summary:hover { background: var(--surface-2); }
.cmp-check[open] > summary { background: var(--surface-2); }
.cmp-desc { display: block; margin-top: 2px; }
.cmp-body { padding: 4px 20px 16px; }
.cmp-items { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; max-height: 360px; overflow: auto; }
.cmp-items li { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; font-size: 13px; padding: 6px 0; border-bottom: 1px solid var(--border); }
@media (max-width: 640px) { .cmp-check > summary { flex-wrap: wrap; } .cmp-check > summary .grow { flex-basis: 100%; order: 3; } }

/* ---------- Automation ---------- */
.auto-step { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--inverse); color: var(--inverse-ink); font-size: 12px; margin-inline-end: 8px; vertical-align: 1px; }
.auto-action { background: var(--surface-2); }
.auto-action .select { width: auto; max-width: 100%; }
.auto-preview { border-inline-start: 3px solid var(--hco-primary-deep); padding: 6px 12px; }
.st-button { border: 0; cursor: pointer; font: inherit; font-size: 11px; font-weight: 600; }
.invoice-logo img { height: 34px; width: auto; }
.brand-thumb { max-height: 40px; max-width: 180px; width: auto; display: block; }
/* Company branding */
.brand-logo { height: 30px; width: auto; max-width: 200px; object-fit: contain; }
.brand-wordmark { font-weight: 800; font-size: 20px; letter-spacing: -.01em; color: var(--text); }
.org-mark-logo { background: var(--surface); border: 1px solid var(--border); padding: 2px; overflow: hidden; }
.org-mark-logo img { width: 100%; height: 100%; object-fit: contain; }
.print-logo { max-height: 48px; max-width: 200px; width: auto; object-fit: contain; display: block; }
.print-letterhead { display: flex; align-items: center; gap: 16px; padding-bottom: 14px; margin-bottom: 18px; border-bottom: 1px solid var(--border); }
.print-footer { margin-top: 24px; text-align: center; }
.careers-logo { max-height: 36px; max-width: 180px; width: auto; object-fit: contain; }
.auth-brand-logo { max-height: 48px; max-width: 240px; width: auto; object-fit: contain; }
.auth-side .brand-wordmark { color: inherit; }
.logo-preview { display: flex; align-items: center; justify-content: center; min-height: 88px; border: 1px dashed var(--border-strong); border-radius: var(--radius); padding: 12px; }
.logo-preview.on-dark { background: #121212; }
.logo-preview img { max-height: 64px; max-width: 100%; object-fit: contain; }
.swatch { width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--border); flex: none; }
.sidebar-brand .brand-logo { height: 32px; }
.print-page .page-actions, .print-page form, .print-page dialog, .print-page .an-tabs, .print-page .ai-panel { display: none !important; }
tr.row-link { cursor: pointer; } tr.row-link:hover td { background: var(--surface-2); }
.price-card li.plus-head { color: var(--text); padding-top: 2px; } .price-card li.plus-head .icon { color: var(--text-3); }
.compare summary { cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: space-between; } .compare summary::-webkit-details-marker { display: none; } .compare[open] summary .icon { transform: rotate(180deg); }
/* Talent & jobs marketplace */
.h-display { font-size: clamp(28px, 3.4vw, 40px); font-weight: 800; letter-spacing: -.02em; }
[dir="rtl"] .h-display { letter-spacing: 0; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.job-card, .person-card { display: flex; flex-direction: column; gap: 12px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 18px; color: inherit; text-decoration: none; transition: border-color .15s, box-shadow .15s; height: 100%; }
.job-card:hover, .person-card:hover { border-color: var(--border-strong); box-shadow: var(--shadow); }
.job-title { display: block; font-size: 15px; }
.job-logo { width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--border); background: #fff; display: inline-flex; align-items: center; justify-content: center; overflow: hidden; flex: none; }
.job-logo img { max-width: 100%; max-height: 100%; object-fit: contain; }
.job-logo-lg { width: 56px; height: 56px; border-radius: 14px; }
.job-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; padding: 3px 9px; border-radius: var(--pill); background: var(--surface-sunken); color: var(--text-2); }
.tag .icon { width: 13px; height: 13px; }
.tag-open { background: var(--accent-soft); color: var(--accent-strong); font-weight: 600; }
.skill-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font-size: 12px; padding: 3px 10px; border-radius: var(--pill); border: 1px solid var(--border); color: var(--text); }
.chip-match { border-color: var(--accent-strong); background: var(--accent-soft); font-weight: 600; }
.chip-gap { border-style: dashed; color: var(--text-2); }
.match-pill { flex: none; font-weight: 800; font-size: 13px; padding: 4px 10px; border-radius: var(--pill); background: var(--accent); color: var(--accent-ink); font-variant-numeric: tabular-nums; }
.t-avatar { border-radius: 50%; object-fit: cover; flex: none; display: inline-flex; align-items: center; justify-content: center; }
.t-avatar-initials { background: var(--inverse); color: var(--inverse-ink); font-weight: 700; }
.line-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.carousel { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(280px, 320px); gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; scrollbar-width: thin; }
.carousel-item { scroll-snap-align: start; }
.carousel:focus-visible { outline: none; box-shadow: var(--focus); border-radius: var(--radius); }
.filter-bar { display: flex; flex-wrap: wrap; gap: 8px; }
.filter-bar .input, .filter-bar .select { flex: 1 1 160px; width: auto; }
.filter-bar input[type=search] { flex: 2 1 240px; }
.pager { display: flex; align-items: center; justify-content: center; gap: 12px; }
.sticky-aside { position: sticky; top: 88px; }
.prose { white-space: pre-line; line-height: 1.75; color: var(--text); }
.profile-head { display: flex; gap: 20px; align-items: flex-start; flex-wrap: wrap; }
.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; border-inline-start: 2px solid var(--border); padding-inline-start: 16px; }
.plain-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.talent-mini-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.talent-mini { display: flex; align-items: center; gap: 10px; padding: 10px; border: 1px solid var(--border); border-radius: var(--radius); color: inherit; text-decoration: none; }
.talent-mini:hover { border-color: var(--border-strong); }
@media (max-width: 900px) { .sticky-aside { position: static; } }
.meter-lg { height: 10px; }
.invite-row { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border: 1px solid var(--border); border-radius: var(--radius); flex-wrap: wrap; }
.rec-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.rec-row .job-card { border: 0; padding: 0; box-shadow: none; }
@media (max-width: 760px) { .rec-row { grid-template-columns: 1fr; } }
.repeat-row { border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; display: grid; gap: 10px; }
.repeat-row [data-remove-row] { justify-self: end; }
.match-big { display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 64px; padding: 6px 10px; border-radius: 12px; background: var(--accent-soft); color: var(--accent-strong); flex: none; }
.match-big span { font-size: 22px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; } .match-big small { font-size: 11px; }
.talent-actions form { display: inline; }
/* Internal CRM */
.crm-stage { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: var(--pill); background: color-mix(in srgb, var(--stage) 14%, transparent); color: var(--text); white-space: nowrap; }
.crm-stage .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--stage); }
.field-inline { display: inline-flex; align-items: center; gap: 6px; }
.field-inline .label { margin: 0; white-space: nowrap; }
.insight-box { border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; }
.ai-note { color: var(--text-2); margin-top: 2px; }
.text-danger { color: var(--danger) !important; }
.kpi { color: inherit; text-decoration: none; }
.crm-timeline { list-style: none; margin: 0; padding: 8px 20px 20px; display: grid; gap: 14px; }
.crm-timeline li { display: flex; gap: 12px; align-items: flex-start; }
.tl-icon { width: 30px; height: 30px; border-radius: 50%; background: var(--surface-sunken); display: inline-flex; align-items: center; justify-content: center; flex: none; color: var(--text-2); }
.crm-timeline li.is-in .tl-icon { background: var(--info-soft); color: var(--info); }
.crm-timeline li.is-out .tl-icon { background: var(--accent-soft); color: var(--accent-strong); }
.fu-row { display: flex; gap: 8px; align-items: flex-start; padding: 8px 10px; border: 1px solid var(--border); border-radius: var(--radius); }
.fu-row.is-done { opacity: .6; }
.suggest-box { border: 1px dashed var(--border-strong); border-radius: var(--radius); padding: 10px; }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.board.crm-board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(230px, 250px); grid-template-columns: none; overflow-x: auto; padding-bottom: 8px; }

/* ---------- Account security (2FA) ---------- */
form.inline { display: inline; }
.twofa-qr { width: 200px; max-width: 100%; padding: 10px; background: #fff; border-radius: var(--radius); border: 1px solid var(--border); }
.twofa-qr svg { display: block; width: 100%; height: auto; }
.recovery-codes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 18px; padding: 14px 16px; margin: 0; background: var(--surface-sunken); border: 1px solid var(--border); border-radius: var(--radius); font: 600 14px/1.6 ui-monospace, SFMono-Regular, Menlo, monospace; white-space: pre-line; user-select: all; }
.steps-list { margin: 0; padding-inline-start: 20px; display: grid; gap: 6px; }
.select-all { user-select: all; }
.restore-box { display: inline-block; position: relative; }
.restore-box > summary { list-style: none; }
.restore-box > summary::-webkit-details-marker { display: none; }
.restore-box[open] > form { position: absolute; inset-inline-end: 0; z-index: 20; width: 300px; padding: 14px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-lg, 0 10px 30px rgba(0,0,0,.15)); text-align: start; }
.error-row { border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 12px; }
.error-row > summary { display: flex; gap: 10px; align-items: center; cursor: pointer; list-style: none; }
.error-row > summary::-webkit-details-marker { display: none; }
.error-stack { margin: 8px 0 0; padding: 10px; max-height: 320px; overflow: auto; background: var(--surface-sunken); border-radius: var(--radius); font-size: 11px; line-height: 1.5; white-space: pre-wrap; word-break: break-word; }

/* ---------- Legal pages, cookie note ---------- */
.legal-page { max-width: 820px; padding-top: 40px; padding-bottom: 64px; }
.legal-page h1 { font-size: 32px; margin: 18px 0 4px; }
.legal-tabs { display: flex; gap: 6px; }
.legal-tabs a { padding: 6px 12px; border-radius: var(--pill); border: 1px solid var(--border); font-size: 13px; font-weight: 600; color: var(--text-2); }
.legal-tabs a.active { background: var(--text); color: var(--bg); border-color: var(--text); }
.legal-body { margin-top: 24px; line-height: 1.85; font-size: 15px; color: var(--text); }
.legal-body h2 { font-size: 19px; margin: 28px 0 8px; }
.legal-body p { margin: 0 0 12px; }
.legal-body ul { margin: 0 0 12px; padding-inline-start: 22px; display: grid; gap: 4px; }
.footer-links { gap: 16px; }
.footer-links a { color: var(--text-2); }
.footer-links a:hover { color: var(--text); }
.footer-social { gap: 8px; }
.footer-social a { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 999px; border: 1px solid var(--border); color: var(--text-2); }
.footer-social a:hover { color: var(--text); border-color: var(--text-2); }
.cookie-note { position: fixed; inset-inline: 16px; bottom: 16px; z-index: 60; max-width: 560px; margin-inline: auto; display: flex; align-items: center; gap: 12px; justify-content: space-between; padding: 12px 14px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg, 12px); box-shadow: var(--shadow-lg, 0 10px 30px rgba(0,0,0,.15)); font-size: 13px; }
@media (max-width: 520px) { .cookie-note { flex-direction: column; align-items: stretch; } }
.panel-danger { border-color: color-mix(in srgb, var(--danger) 35%, var(--border)); }
.panel-danger details > summary { list-style: none; display: inline-flex; }
.panel-danger details > summary::-webkit-details-marker { display: none; }
.legal-editor { min-height: 420px; font-size: 13px; line-height: 1.7; }
.check-rows { list-style: none; margin: 0; padding: 0; }
.check-row { display: flex; gap: 12px; align-items: flex-start; padding: 12px 18px; border-top: 1px solid var(--border); }
.check-row:first-child { border-top: 0; }
.check-title { font-weight: 600; font-size: 14px; }
.check-icon { margin-top: 1px; }
.check-row.is-ok .check-icon { color: var(--success); }
.check-row.is-warn .check-icon { color: var(--warning); }
.check-row.is-fail .check-icon { color: var(--danger); }
.verify-banner { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 10px 16px; margin: 0 0 16px; background: var(--warning-soft); border-radius: var(--radius); font-size: 13px; }
.verify-banner .icon { color: var(--warning); }

/* ---------- Company portal (your-domain.com/<link>) ---------- */
.portal-head { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; }
.portal-head h1 { margin: 0; font-size: 24px; line-height: 1.3; }
.portal-logo { max-height: 56px; max-width: 160px; object-fit: contain; }
.portal-mark { width: 56px; height: 56px; border-radius: 14px; display: grid; place-items: center; background: var(--text); color: var(--bg); font-weight: 800; font-size: 20px; flex: none; }
.portal-choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.portal-choice { display: flex; align-items: center; gap: 10px; padding: 14px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); font-weight: 600; font-size: 14px; color: var(--text); transition: border-color .15s, background .15s; }
.portal-choice:hover { border-color: var(--hco-primary, #4F2BD9); background: var(--surface-2); }
.portal-choice .icon { color: var(--hco-primary-deep, #3B1FA8); }
@media (max-width: 420px) { .portal-choices { grid-template-columns: 1fr; } }
.input-prefix { display: flex; align-items: stretch; border: 1px solid var(--border-strong); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.input-prefix > span { display: flex; align-items: center; padding: 0 10px; background: var(--surface-sunken); color: var(--text-2); font-size: 13px; white-space: nowrap; border-inline-end: 1px solid var(--border); }
.input-prefix > .input { border: 0; border-radius: 0; flex: 1; min-width: 0; }

/* ---------- QR attendance: office screen + scan page ---------- */
.kiosk-body { background: #fff; color: #0A0A0A; margin: 0; }
.kiosk { min-height: 100vh; display: flex; flex-direction: column; padding: 24px 32px; box-sizing: border-box; }
.kiosk-head { display: flex; align-items: center; justify-content: space-between; }
.kiosk-logo { max-height: 56px; max-width: 220px; object-fit: contain; }
.kiosk-org { font-size: 24px; }
.kiosk-clock { font-size: 40px; font-weight: 800; font-variant-numeric: tabular-nums; }
.kiosk-main { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 10px; }
.kiosk-main h1 { font-size: clamp(26px, 4vw, 44px); margin: 0; }
.kiosk-sub { font-size: clamp(15px, 2vw, 20px); color: #5F6368; margin: 0 0 8px; }
.kiosk-qr { width: min(62vh, 80vw); aspect-ratio: 1; padding: 14px; border-radius: 20px; border: 2px solid #E6E6E6; background: #fff; transition: opacity .25s; }
.kiosk-qr svg { width: 100%; height: 100%; display: block; }
.kiosk-qr.is-changing { opacity: .25; }
.kiosk-timer { font-size: 18px; color: #3C4043; }
.kiosk-timer strong { font-size: 24px; color: #0A0A0A; }
.kiosk-bar { width: min(62vh, 80vw); height: 6px; background: #EEE; border-radius: 99px; overflow: hidden; }
.kiosk-bar span { display: block; height: 100%; width: 100%; background: #4F2BD9; transform-origin: left; transition: width 1s linear; }
[dir="rtl"] .kiosk-bar span { margin-inline-start: auto; }
.kiosk-name { color: #5F6368; font-size: 15px; display: flex; align-items: center; gap: 6px; }
.kiosk-offline { color: #B3261E; font-weight: 700; }
.kiosk-foot { display: flex; justify-content: center; opacity: .8; }
.scan-done { display: flex; align-items: center; gap: 14px; margin-top: 24px; padding: 18px; border-radius: var(--radius-lg, 12px); background: var(--success-soft); }
.scan-done .icon { width: 34px; height: 34px; color: var(--success); }
.kiosk-card { border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; }
.qr-tag { display: inline-block; font-size: 10px; font-weight: 700; padding: 1px 5px; border-radius: 4px; background: var(--success-soft); color: var(--success); vertical-align: middle; }
.qr-hint { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: var(--radius); background: var(--surface-sunken); font-size: 13px; font-weight: 600; }
.qr-tag.off { background: var(--warning-soft); color: var(--warning); }
button.portal-choice { cursor: pointer; font-family: inherit; text-align: start; }

/* ---------- Editable landing page blocks ---------- */
.site-text p { margin: 0 0 14px; line-height: 1.9; font-size: 16px; color: var(--text-2); white-space: pre-line; }
.site-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; }
.site-stat { padding: 22px; border: 1px solid var(--border); border-radius: var(--radius-lg, 12px); background: var(--surface); display: flex; flex-direction: column; gap: 6px; text-align: center; }
.site-stat strong { font-size: 34px; font-weight: 800; letter-spacing: -.02em; }
.site-stat span { color: var(--text-2); font-size: 14px; }
.site-block { padding: 14px 16px; }
.site-block.is-hidden { opacity: .6; border-style: dashed; }
.site-sections { display: grid; gap: 10px; }
.site-order { width: 28px; height: 28px; border-radius: 8px; display: inline-grid; place-items: center; background: var(--surface-sunken); font-weight: 700; font-size: 13px; }
.site-actions form { display: inline; }
.site-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 18px; }
.site-fields .full, .site-item-grid .full { grid-column: 1 / -1; }
.bi-lang { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.site-item { border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 12px; background: var(--surface-2); }
.site-item-bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.site-item-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 14px; }
.icon-pick { display: flex; align-items: center; gap: 8px; }
.icon-preview { width: 32px; height: 32px; display: inline-grid; place-items: center; border-radius: 8px; background: var(--surface); border: 1px solid var(--border); flex: none; }
@media (max-width: 760px) { .site-fields, .bi-lang, .site-item-grid { grid-template-columns: 1fr; } }
.site-item-sum { display: flex; align-items: center; gap: 8px; cursor: pointer; list-style: none; padding: 2px 0; }
.site-item-sum::-webkit-details-marker { display: none; }
.site-item[open] > .site-item-sum { margin-bottom: 8px; padding-bottom: 8px; border-bottom: 1px solid var(--border); }

/* ---------- Website sections: alignment and media ---------- */
.al-t-start h1, .al-t-start h2, .al-t-start h3, .al-t-start .section-head { text-align: start; }
.al-t-center h1, .al-t-center h2, .al-t-center h3, .al-t-center .section-head { text-align: center; }
.al-t-end h1, .al-t-end h2, .al-t-end h3, .al-t-end .section-head { text-align: end; }
.al-t-center .section-head { margin-inline: auto; }
.al-t-end .section-head { margin-inline-start: auto; }
.al-t-center .eyebrow-tag { margin-inline: auto; }
.al-x-start p, .al-x-start .lead, .al-x-start .muted, .al-x-start summary, .al-x-start .site-stat { text-align: start; }
.al-x-center p, .al-x-center .lead, .al-x-center .muted, .al-x-center summary, .al-x-center .site-stat { text-align: center; }
.al-x-end p, .al-x-end .lead, .al-x-end .muted, .al-x-end summary, .al-x-end .site-stat { text-align: end; }
.al-x-justify p, .al-x-justify .lead { text-align: justify; }
.al-x-center .cta, .al-x-center .panel-body > div:last-child, .al-x-center .cta-band .row { justify-content: center; }
.al-x-center .icon-wrap { margin-inline: auto; }
.al-x-end .cta, .al-x-end .cta-band .row { justify-content: flex-end; }
.sec-media { margin-inline: auto; border-radius: var(--radius-lg, 14px); overflow: hidden; }
.sec-media.sz-small { max-width: 420px; }
.sec-media.sz-medium { max-width: 760px; }
.sec-media.sz-large { max-width: 1040px; }
.sec-media.sz-full { max-width: none; }
.site-img, .site-video { display: block; width: 100%; height: auto; border-radius: var(--radius-lg, 14px); }
.site-embed { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius-lg, 14px); overflow: hidden; background: #000; }
.site-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.sec-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; align-items: center; }
.sec-split.media-end .sec-media { order: 2; }
.sec-split .sec-media { max-width: none; margin: 0; }
@media (max-width: 860px) { .sec-split { grid-template-columns: 1fr; } .sec-split.media-end .sec-media { order: 0; } }
.has-bg { position: relative; isolation: isolate; color: #fff; }
.has-bg .sec-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background-size: cover; background-position: center; z-index: -2; }
.has-bg::after { content: ''; position: absolute; inset: 0; background: rgba(0, 0, 0, .55); z-index: -1; }
.has-bg h1, .has-bg h2, .has-bg h3, .has-bg p, .has-bg .lead, .has-bg .muted, .has-bg .section-head p { color: #fff; }
.hero-panel-media { padding: 0; overflow: hidden; display: flex; align-items: stretch; }
.hero-panel-media .site-img, .hero-panel-media .site-video { height: 100%; object-fit: cover; border-radius: 0; }
.hero-panel-media .site-embed { width: 100%; align-self: center; border-radius: 0; }
.card-media { margin: -4px -4px 6px; border-radius: var(--radius); overflow: hidden; }
.card-media .site-img, .card-media .site-video { border-radius: var(--radius); aspect-ratio: 16 / 10; object-fit: cover; }
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; padding: 14px 16px; }
.media-tile { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; background: var(--surface); }
.media-thumb { position: relative; aspect-ratio: 16 / 10; background: var(--surface-sunken); display: grid; place-items: center; }
.media-thumb img, .media-thumb video { width: 100%; height: 100%; object-fit: cover; }
.media-kind { position: absolute; inset-inline-end: 8px; bottom: 8px; background: rgba(0,0,0,.6); color: #fff; border-radius: 99px; padding: 4px; display: inline-flex; }
.media-kind.big { position: static; background: none; color: var(--text-3); }
.media-kind.big .icon { width: 40px; height: 40px; }
.media-meta { padding: 8px 10px 4px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.media-tile form { padding: 0 6px 8px; }
.brand-icon { width: 18px; height: 18px; display: inline-block; flex: none; fill: currentColor; }
.temp-password { font-size: 18px; letter-spacing: .04em; padding: 4px 10px; background: var(--surface-2, #f3f4f6); border-radius: 8px; user-select: all; }
.scanner-view { position: relative; width: 100%; max-width: 460px; margin-inline: auto; aspect-ratio: 1 / 1; border-radius: 16px; overflow: hidden; background: #0b0f0d; display: grid; place-items: center; }
.scanner-view video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.scanner-frame { position: absolute; inset: 14%; border: 3px solid rgba(255,255,255,.85); border-radius: 18px; box-shadow: 0 0 0 999px rgba(0,0,0,.35); pointer-events: none; opacity: 0; }
.scanner.is-live .scanner-frame { opacity: 1; }
.scanner.is-live .scanner-start { display: none; }
.scanner-start { position: relative; z-index: 1; }
.clock-card form .btn { white-space: normal; text-align: center; }
.dot-warn { display: inline-block; width: 8px; height: 8px; border-radius: 99px; background: var(--warning, #f59e0b); vertical-align: middle; }
.panel.is-highlight { box-shadow: 0 0 0 2px var(--hco-primary, #4F2BD9); }
.smtp-detail { white-space: pre-wrap; word-break: break-word; background: var(--surface-2, #f4f4f5); padding: 8px 10px; border-radius: 8px; margin-top: 6px; font-size: 12px; }
.smtp-test-row { border-top: 1px dashed var(--border); padding-top: 12px; max-width: 420px; }

/* Message texts: previews */
.mail-preview { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: #f7f7f7; color: #0a0a0a; max-height: 560px; overflow-y: auto; }
.mail-preview > div { margin: 12px !important; }
.wa-preview { background: #e7ded3; border-radius: var(--radius); padding: 16px; }
.wa-bubble { background: #d9fdd3; color: #111b21; border-radius: 10px; padding: 8px 12px; white-space: pre-wrap; word-break: break-word; font-size: 14px; line-height: 1.6; max-width: 92%; box-shadow: 0 1px 1px rgba(0,0,0,.08); }

/* Sales documents: quotation / invoice for the customer, send panel */
.doc-page { background: var(--surface-2, #f7f7f7); }
.doc-sheet { max-width: 900px; margin: 0 auto; padding: 24px 16px 48px; }
.doc-actions { display: flex; justify-content: flex-end; gap: 8px; margin-bottom: 16px; }
.doc { background: #fff; color: #0a0a0a; border: 1px solid var(--border); border-radius: var(--radius-lg, 14px); padding: 32px; display: flex; flex-direction: column; gap: 24px; }
.panel .doc { border: 0; padding: 0; }
.doc-head { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; align-items: flex-start; }
.doc-seller .invoice-logo img { max-height: 34px; width: auto; }
.doc-meta { text-align: end; }
.doc-title { font-size: 26px; font-weight: 800; margin: 0 0 4px; letter-spacing: -.01em; }
.doc-dl { display: grid; grid-template-columns: auto auto; gap: 2px 12px; justify-content: end; margin: 0; }
.doc-dl dt { color: var(--text-3); } .doc-dl dd { margin: 0; }
.doc-to { border-top: 1px solid var(--border); padding-top: 16px; }
.doc-table td.doc-desc { white-space: pre-wrap; }
.doc-totals { margin-inline-start: auto; max-width: 340px; width: 100%; grid-template-columns: 1fr auto; }
.doc-total-label { font-weight: 700; color: var(--text) !important; }
.doc-total { font-weight: 800; font-size: 18px; }
.doc-block { border-top: 1px solid var(--border); padding-top: 14px; }
.doc-text { white-space: pre-wrap; line-height: 1.7; }
.doc-respond { margin-top: 20px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg, 14px); padding: 24px; }
.doc .invoice-logo .logo-dark { display: none; }
.doc .invoice-logo .logo-light { display: inline; }
@media (max-width: 640px) { .doc { padding: 20px 16px; } .doc-meta { text-align: start; } .doc-dl { justify-content: start; } }
@media print {
  .doc-page { background: #fff; }
  .doc-sheet { padding: 0; max-width: none; }
  .doc { border: 0; padding: 0; }
}
.copy-row { display: flex; align-items: center; gap: 8px; border: 1px solid var(--border); border-radius: var(--radius); padding: 6px 6px 6px 12px; background: var(--surface-2); min-width: 0; }
.copy-row code { font-size: 12px; min-width: 0; }
.send-box { border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.send-box-head { display: flex; align-items: center; gap: 8px; }
.wa-dot, .mail-dot { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 999px; color: #fff; }
.wa-dot { background: #25d366; } .mail-dot { background: var(--text); }
.btn-wa { background: #25d366; color: #fff; border-color: #25d366; }
.btn-wa:hover { background: #1ebe5b; border-color: #1ebe5b; color: #fff; }
.row-end { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.timeline-list { list-style: none; margin: 0; padding: 0; }
.timeline-list li { padding: 12px 16px; border-top: 1px solid var(--border); }
.timeline-list li:first-child { border-top: 0; }
.items-table td { vertical-align: top; }
.items-table .textarea { min-height: 40px; resize: vertical; }
.items-table td[data-line-amount] { padding-top: 18px; white-space: nowrap; }
@media (max-width: 640px) {
  .doc-table th, .doc-table td { padding: 8px 5px; font-size: 12.5px; }
  .doc-table thead th { font-size: 10.5px; letter-spacing: 0; }
  .doc-table tr > :first-child:not(.doc-desc) { display: none; }
  .doc-table td.num { white-space: nowrap; }
}
.text-success { color: var(--success, #16a34a) !important; }
.service-picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; }
.service-pick { display: flex; align-items: center; gap: 10px; border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 12px; cursor: pointer; }
.service-pick:has(input:checked) { border-color: var(--hco-primary-deep, #3B1FA8); background: color-mix(in srgb, var(--accent, #4F2BD9) 8%, transparent); }
form.inline { display: inline; }
.pw-wrap { position: relative; display: block; }
.pw-wrap > input { width: 100%; padding-inline-end: 44px; }
.pw-eye { position: absolute; inset-inline-end: 4px; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; display: grid; place-items: center; border: 0; background: transparent; color: var(--text-3); border-radius: var(--radius); cursor: pointer; }
.pw-eye:hover { color: var(--text); background: var(--surface-2); }
/* Signed acceptance and negotiation */
.sign-pad { position: relative; border: 1.5px dashed var(--border-strong, #bbb); border-radius: var(--radius); background: #fff; touch-action: none; }
.sign-pad canvas { display: block; width: 100%; height: 160px; cursor: crosshair; touch-action: none; }
.sign-hint { position: absolute; inset: 0; display: grid; place-items: center; color: #9aa0a6; pointer-events: none; font-size: 14px; }
.sign-alt summary { cursor: pointer; color: var(--text-2); }
.doc-accept-grid { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-end; justify-content: space-between; }
.doc-sign { margin: 0; text-align: center; }
.doc-sign img { max-height: 110px; max-width: 220px; display: block; margin: 0 auto 4px; }
.convo { display: flex; flex-direction: column; gap: 10px; }
.convo-msg { max-width: 85%; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--border); }
.convo-msg.is-customer { align-self: flex-start; background: var(--surface-2); }
.convo-msg.is-team { align-self: flex-end; background: color-mix(in srgb, var(--accent, #4F2BD9) 10%, #fff); }
.convo-text { white-space: pre-wrap; margin-top: 2px; }
.doc-body { line-height: 1.8; font-size: 15px; }
.doc-body h1 { font-size: 24px; } .doc-body h2 { font-size: 20px; } .doc-body h3 { font-size: 17px; }
.doc-body h1, .doc-body h2, .doc-body h3 { margin: 18px 0 8px; }
.doc-body p, .doc-body div { margin: 0 0 8px; }
.doc-body ul, .doc-body ol { padding-inline-start: 24px; margin: 0 0 10px; }
.doc-body table { border-collapse: collapse; width: 100%; margin: 10px 0; }
.doc-body td, .doc-body th { border: 1px solid var(--border); padding: 6px 10px; }
.doc-body blockquote { border-inline-start: 3px solid var(--border); padding-inline-start: 12px; color: var(--text-2); margin: 10px 0; }
/* Document editor */
.rte { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.rte-bar { display: flex; flex-wrap: wrap; gap: 2px; padding: 6px; border-bottom: 1px solid var(--border); background: var(--surface-2); border-radius: var(--radius) var(--radius) 0 0; position: sticky; top: 60px; z-index: 2; }
.rte-btn { min-width: 34px; height: 32px; border: 0; background: transparent; border-radius: 6px; cursor: pointer; color: var(--text); font: inherit; font-size: 14px; }
.rte-btn:hover { background: var(--surface); }
.rte-sep { width: 1px; background: var(--border); margin: 4px 4px; }
.rte-area { min-height: 360px; padding: 20px 24px; outline: none; background: #fff; color: #0a0a0a; }
.rte-area:focus { box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--accent, #4F2BD9) 40%, transparent); }
.rte-ph { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 8px; border-top: 1px solid var(--border); }
.tpl-preview { max-height: 420px; overflow: auto; font-size: 13px; }
