:root {
  --font: 'IBM Plex Sans Arabic', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --display: 'Readex Pro', 'IBM Plex Sans Arabic', system-ui, sans-serif;
  --radius: 18px; --radius-sm: 12px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --sidebar: 268px;
}
[data-theme='dark'] {
  --bg: #060b18; --bg2: #0a1226; --surface: #0e1830; --surface2: #13203d; --glass: rgba(14, 24, 48, .74);
  --card: #111d38;
  --line: rgba(148, 163, 184, .13); --line2: rgba(148, 163, 184, .22);
  --text: #e8edf7; --muted: #8d99b5; --faint: #5d6886;
  --accent: #dcb468; --accent-ink: #1d1406; --accent-soft: rgba(220, 180, 104, .14);
  --gold: #f0c674; --gold-soft: rgba(240, 198, 116, .14);
  --navy: #6f9bff; --teal: #2dd4bf; --teal-soft: rgba(45, 212, 191, .13);
  --danger: #fb7185; --danger-soft: rgba(251, 113, 133, .13);
  --warn: #fbbf24; --warn-soft: rgba(251, 191, 36, .13);
  --info: #60a5fa; --info-soft: rgba(96, 165, 250, .13);
  --violet: #a78bfa; --violet-soft: rgba(167, 139, 250, .14);
  --shadow: 0 20px 50px -20px rgba(0, 0, 0, .7);
  --pattern-op: .05;
  color-scheme: dark;
}
[data-theme='light'] {
  --bg: #f5f2eb; --bg2: #ece7dc; --surface: #ffffff; --surface2: #f8f6f1; --glass: rgba(255, 255, 255, .78);
  --card: #ffffff;
  --line: #e6e1d4; --line2: #d9d3c3;
  --text: #121829; --muted: #5d6781; --faint: #98a0b3;
  --accent: #9a6f1f; --accent-ink: #ffffff; --accent-soft: rgba(154, 111, 31, .1);
  --gold: #a87414; --gold-soft: rgba(168, 116, 20, .1);
  --navy: #1b3a7a; --teal: #0f766e; --teal-soft: rgba(15, 118, 110, .09);
  --danger: #e11d48; --danger-soft: rgba(225, 29, 72, .08);
  --warn: #c2410c; --warn-soft: rgba(194, 65, 12, .08);
  --info: #2563eb; --info-soft: rgba(37, 99, 235, .08);
  --violet: #7c3aed; --violet-soft: rgba(124, 58, 237, .08);
  --shadow: 0 18px 40px -22px rgba(30, 41, 59, .35);
  --pattern-op: .07;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--font); background: var(--bg); color: var(--text); font-size: 14.5px; line-height: 1.55;
  -webkit-font-smoothing: antialiased; transition: background .35s var(--ease), color .35s var(--ease);
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent); text-decoration: none; }
h1, h2, h3, h4 { font-family: var(--display); margin: 0; letter-spacing: -.01em; }
.num { font-variant-numeric: tabular-nums; }
::selection { background: var(--accent); color: var(--accent-ink); }
.hidden { display: none !important; }

/* ---------- geometric backdrop ---------- */
.backdrop { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.backdrop::before {
  content: ''; position: absolute; inset: -50%; opacity: var(--pattern-op);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80' viewBox='0 0 80 80'%3E%3Cg fill='none' stroke='%2394a3b8' stroke-width='1'%3E%3Cpath d='M40 10 L48 32 L70 40 L48 48 L40 70 L32 48 L10 40 L32 32 Z'/%3E%3Crect x='25' y='25' width='30' height='30' transform='rotate(45 40 40)'/%3E%3C/g%3E%3C/svg%3E");
  animation: drift 120s linear infinite;
}
.backdrop .orb { position: absolute; border-radius: 50%; filter: blur(80px); opacity: .5; }
.backdrop .orb.a { width: 520px; height: 520px; background: radial-gradient(circle, var(--accent-soft), transparent 70%); top: -160px; inset-inline-end: -120px; }
.backdrop .orb.b { width: 460px; height: 460px; background: radial-gradient(circle, var(--gold-soft), transparent 70%); bottom: -180px; inset-inline-start: 10%; }
@keyframes drift { to { transform: translate(80px, 80px); } }

/* ---------- login ---------- */
.login { position: relative; z-index: 1; min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.login-hero { position: relative; padding: 56px; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; }
.login-hero h1 { font-size: clamp(34px, 4.4vw, 60px); line-height: 1.12; font-weight: 700; margin-top: 18px; }
.login-hero h1 .grad { background: linear-gradient(100deg, var(--accent), var(--gold)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.login-hero p { color: var(--muted); max-width: 440px; font-size: 16px; margin-top: 18px; }
.hero-star { position: absolute; width: 520px; height: 520px; inset-inline-end: -140px; bottom: -120px; opacity: .9; animation: spin 60s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.hero-chips { display: flex; gap: 10px; flex-wrap: wrap; position: relative; }
.hero-chips span { padding: 8px 14px; border-radius: 999px; background: var(--glass); border: 1px solid var(--line); font-size: 13px; color: var(--muted); backdrop-filter: blur(10px); }
.login-panel { display: grid; place-items: center; padding: 32px; }
.login-card {
  width: min(420px, 100%); background: var(--glass); border: 1px solid var(--line); border-radius: 26px; padding: 36px;
  backdrop-filter: blur(24px); box-shadow: var(--shadow); animation: rise .7s var(--ease) both;
}
.login-card h2 { font-size: 26px; }
.forgot-row { display: flex; justify-content: flex-end; margin: -6px 0 16px; }
.forgot-row.center { justify-content: center; margin: 14px 0 0; }
.link-btn { background: none; border: 0; padding: 2px 0; font: inherit; font-size: 13px; font-weight: 600; color: var(--accent); cursor: pointer; }
.link-btn:hover { text-decoration: underline; }
.login-card .sub { color: var(--muted); margin: 6px 0 26px; }
.login-tools { position: absolute; top: 20px; inset-inline-end: 20px; display: flex; gap: 8px; z-index: 3; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } }

/* ---------- brand ---------- */
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark { width: 40px; height: 40px; flex: none; }
.brand-name { font-family: var(--display); font-weight: 700; font-size: 20px; line-height: 1.1; }
.brand-sub { font-size: 12px; color: var(--muted); }

/* ---------- shell ---------- */
.shell { position: relative; z-index: 1; display: grid; grid-template-columns: var(--sidebar) 1fr; min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; padding: 22px 16px; display: flex; flex-direction: column; gap: 22px;
  background: var(--glass); border-inline-end: 1px solid var(--line); backdrop-filter: blur(20px); z-index: 20;
}
.nav-group { margin: 0 0 4px; }
/* section buttons: large & prominent */
.nav-sec { width: 100%; display: flex; align-items: center; gap: 13px; border: 0; background: transparent; color: var(--text); font: inherit; font-size: 16px; font-weight: 700; text-align: start; padding: 13px 14px; margin: 0; border-radius: 14px; cursor: pointer; transition: all .2s var(--ease); }
.nav-sec > svg:first-child { width: 22px; height: 22px; flex: none; color: var(--muted); transition: color .2s var(--ease); }
.nav-sec:hover { background: var(--surface2); }
.nav-sec:hover > svg:first-child { color: var(--text); }
.nav-sec-label { flex: 1; }
.nav-chevron { display: flex; transition: transform .2s var(--ease); color: var(--faint); }
.nav-chevron svg { width: 16px; height: 16px; }
.nav-group.open .nav-chevron { transform: rotate(180deg); color: var(--accent); }
.nav-group.open > .nav-sec { background: var(--accent-soft); color: var(--accent); }
.nav-group.open > .nav-sec > svg:first-child { color: var(--accent); }
/* inner items: small & compact */
.nav-group-items { overflow: hidden; animation: fadeIn .16s ease; margin: 4px 0 6px; padding-inline-start: 22px; }
.nav-group-items[hidden] { display: none; }
.nav .nav-group-items a { gap: 8px; padding: 6px 10px; font-size: 12.5px; font-weight: 500; border-radius: 9px; margin-bottom: 1px; }
.nav .nav-group-items a svg { width: 14px; height: 14px; }
.nav .nav-group-items a.on::before { top: 6px; bottom: 6px; }
.nav a {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; color: var(--muted); font-weight: 500;
  transition: all .2s var(--ease); position: relative; margin-bottom: 2px;
}
.nav a svg { width: 19px; height: 19px; flex: none; }
.nav a:hover { background: var(--surface2); color: var(--text); }
.nav a.on { background: var(--accent-soft); color: var(--accent); }
.nav a.on::before { content: ''; position: absolute; inset-inline-start: -16px; top: 9px; bottom: 9px; width: 3px; border-radius: 3px; background: var(--accent); }
.nav .badge { margin-inline-start: auto; background: var(--gold-soft); color: var(--gold); font-size: 11.5px; font-weight: 700; padding: 1px 8px; border-radius: 99px; }
.side-foot { margin-top: auto; }
.me { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 14px; background: var(--surface2); border: 1px solid var(--line); }
.me .who { flex: 1; min-width: 0; }
.me .who b { display: block; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me .who small { color: var(--muted); font-size: 12px; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 15; display: flex; align-items: center; gap: 12px; padding: 14px 28px;
  background: color-mix(in srgb, var(--bg) 78%, transparent); backdrop-filter: blur(16px); border-bottom: 1px solid var(--line);
}
.topbar h1 { font-size: 20px; font-weight: 600; }
.back-btn { flex: none; padding: 8px 12px; }
.back-btn svg { width: 16px; height: 16px; }
.topbar .spacer { flex: 1; }
.search { position: relative; width: min(320px, 40vw); }
.search input { width: 100%; padding: 10px 40px 10px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); outline: none; transition: border .2s; }
[dir='rtl'] .search input { padding: 10px 14px 10px 40px; }
.search input:focus { border-color: var(--accent); }
.search svg { position: absolute; inset-inline-end: 12px; top: 50%; transform: translateY(-50%); width: 17px; color: var(--faint); }
.search-pop { position: absolute; top: calc(100% + 6px); inset-inline: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); padding: 6px; max-height: 340px; overflow: auto; }
.search-pop button { display: flex; width: 100%; gap: 10px; align-items: center; padding: 8px; border: 0; background: none; border-radius: 10px; cursor: pointer; text-align: start; }
.search-pop button:hover, .search-pop button.hl { background: var(--surface2); }
.search-pop .gs-h { font-size: 11px; font-weight: 700; color: var(--faint); padding: 8px 8px 4px; letter-spacing: .02em; }
.search-pop .gs-ic { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: var(--surface2); color: var(--accent); flex: none; }
.search-pop .gs-ic svg { position: static; transform: none; width: 16px; color: inherit; }
.search-pop small { color: var(--muted); }
.search-pop .gs-empty { padding: 14px; color: var(--muted); font-size: 13px; }
.icon-btn.gs-btn { display: none; }
.p360 { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; margin: 4px 0 6px; }
.p360 button { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); cursor: pointer; text-align: start; color: inherit; transition: border .2s, background .2s; }
.p360 button:hover { border-color: var(--accent); background: var(--surface2); }
.p360 small { color: var(--muted); font-size: 12px; }
.p360 b { font-size: 17px; }
.sec-link { margin-inline-start: auto; font-size: 12px; font-weight: 600; color: var(--accent); background: none; border: 0; cursor: pointer; padding: 4px 6px; border-radius: 8px; }
.sec-link:hover { background: var(--surface2); }
.content { padding: 26px 28px 60px; animation: fade .4s var(--ease) both; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } }
.icon-btn.menu-btn { display: none; }

/* ---------- controls ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 16px; border-radius: 12px; border: 1px solid transparent;
  background: var(--accent); color: var(--accent-ink); font-weight: 600; cursor: pointer; transition: transform .15s var(--ease), filter .2s, background .2s; white-space: nowrap;
}
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn svg { width: 17px; height: 17px; }
.btn.ghost { background: var(--surface); color: var(--text); border-color: var(--line); }
.btn.ghost:hover { border-color: var(--line2); background: var(--surface2); filter: none; }
.btn.danger { background: var(--danger); color: #fff; }
.btn.soft-danger { background: var(--danger-soft); color: var(--danger); }
.btn.sm { padding: 6px 11px; font-size: 13px; border-radius: 10px; }
.btn.block { width: 100%; padding: 13px; }
.icon-btn {
  width: 40px; height: 40px; display: inline-grid; place-items: center; border-radius: 12px; border: 1px solid var(--line); background: var(--surface);
  cursor: pointer; color: var(--muted); transition: all .2s var(--ease); flex: none;
}
.icon-btn:hover { color: var(--text); border-color: var(--line2); }
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn.sm { width: 32px; height: 32px; border-radius: 9px; }
.icon-btn.sm svg { width: 15px; height: 15px; }
.lang-btn { width: auto; padding: 0 12px; font-weight: 700; font-size: 13px; font-family: var(--display); }

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 13px; font-weight: 500; color: var(--muted); }
.field label .req { color: var(--danger); }
.field small { color: var(--faint); font-size: 12px; }
.input, .field input, .field select, .field textarea {
  width: 100%; padding: 11px 13px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface2); outline: none;
  transition: border .2s, box-shadow .2s;
}
.field textarea { min-height: 84px; resize: vertical; }
.input:focus, .field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
select.input, .field select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238d99b5' stroke-width='2.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 34px; }
[dir='rtl'] select.input, [dir='rtl'] .field select { background-position: left 12px center; padding-right: 13px; padding-left: 34px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 13.5px; }
.check input { width: 17px; height: 17px; accent-color: var(--accent); }
.switch { position: relative; width: 42px; height: 24px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; background: var(--line2); border-radius: 99px; cursor: pointer; transition: .25s; }
.switch span::after { content: ''; position: absolute; width: 18px; height: 18px; top: 3px; inset-inline-start: 3px; background: #fff; border-radius: 50%; transition: .25s var(--ease); }
.switch input:checked + span { background: var(--accent); }
.switch input:checked + span::after { inset-inline-start: 21px; }
.seg { display: inline-flex; background: var(--surface2); border: 1px solid var(--line); border-radius: 12px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.seg button { text-transform: capitalize; border: 0; background: none; padding: 6px 12px; border-radius: 9px; cursor: pointer; color: var(--muted); font-weight: 500; font-size: 13px; transition: .2s; }
.seg button.on { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(0, 0, 0, .15); }
[data-theme='dark'] .seg button.on { background: var(--accent-soft); color: var(--accent); }

/* ---------- cards ---------- */
.card { background: var(--glass); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; backdrop-filter: blur(14px); }
.card-h { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.card-h h3 { font-size: 16px; font-weight: 600; }
.card-h .sub { color: var(--muted); font-size: 12.5px; }
.card-h .spacer { flex: 1; }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 18px; }
.kpi { position: relative; overflow: hidden; padding: 18px 18px 16px; animation: rise .6s var(--ease) both; }
.kpi .ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 14px; }
.kpi .ic svg { width: 20px; height: 20px; }
.kpi .v { font-family: var(--display); font-size: 28px; font-weight: 700; line-height: 1; }
.kpi .l { color: var(--muted); font-size: 13px; margin-top: 6px; }
.kpi::after { content: ''; position: absolute; width: 120px; height: 120px; border-radius: 50%; inset-inline-end: -40px; top: -40px; background: currentColor; opacity: .05; }
.tone-accent { color: var(--accent); } .tone-accent .ic { background: var(--accent-soft); }
.tone-gold { color: var(--gold); } .tone-gold .ic { background: var(--gold-soft); }
.tone-info { color: var(--info); } .tone-info .ic { background: var(--info-soft); }
.tone-violet { color: var(--violet); } .tone-violet .ic { background: var(--violet-soft); }
.tone-danger { color: var(--danger); } .tone-danger .ic { background: var(--danger-soft); }
.kpi .v, .kpi .l { color: var(--text); } .kpi .l { color: var(--muted); }
/* dashboard cards: one colour per section — icon, figure and section caption share it */
.kpi[class*='tone-'] .v { color: currentColor; }
.kpi[class*='tone-'] .l { color: color-mix(in srgb, currentColor 35%, var(--text)); }
.kpi-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; margin-bottom: 14px; }
.kpi-top .ic { margin-bottom: 0; }
.kpi-sec { font-size: 11px; font-weight: 600; padding: 3px 9px; border-radius: 99px; background: color-mix(in srgb, currentColor 12%, transparent); white-space: nowrap; }
.kpi[class*='tone-'] { border-top: 3px solid color-mix(in srgb, currentColor 55%, transparent); }
.kpi-block { margin-bottom: 4px; }
.kpi-block-h { font-size: 13px; font-weight: 600; color: var(--muted); margin: 0 4px 10px; }
.dash-grid { display: grid; grid-template-columns: 1fr; gap: 18px; }
.dash-side { display: flex; flex-direction: column; gap: 18px; }

/* 3D chart */
.chart-card { padding: 0; overflow: hidden; }
.chart-card .card-h { padding: 18px 20px 0; }
.chart-wrap { position: relative; height: 440px; cursor: grab; touch-action: none; }
.chart-wrap:active { cursor: grabbing; }
.chart-wrap canvas { display: block; }
.chart-labels { position: absolute; inset: 0; pointer-events: none; direction: ltr; }
/* three.js places each label from the left edge; in RTL pages they would otherwise start from the right and land off the chart */
.chart-labels > * { left: 0; top: 0; }
.c3-lbl, .c3-val, .gauge-read { unicode-bidi: plaintext; }
.c3-val { font-family: var(--display); font-weight: 700; font-size: 13px; color: var(--text); background: var(--glass); border: 1px solid var(--line); padding: 2px 8px; border-radius: 8px; backdrop-filter: blur(6px); white-space: nowrap; }
.gauge-read { display: flex; flex-direction: column; align-items: center; gap: 2px; pointer-events: none; text-align: center; }
.gauge-read b { font-family: var(--display); font-size: 34px; line-height: 1; text-shadow: 0 2px 14px rgba(0,0,0,.35); }
.gauge-read span { font-weight: 700; font-size: 13px; }
.gauge-read small { color: var(--muted); font-size: 11.5px; }
.gauge-num { font-weight: 600; color: var(--text); }
.c3-lbl { font-size: 11.5px; color: var(--muted); white-space: nowrap; max-width: 110px; overflow: hidden; text-overflow: ellipsis; text-align: center; }
.chart-tip { position: absolute; pointer-events: none; background: var(--surface); border: 1px solid var(--line2); border-radius: 12px; padding: 10px 12px; box-shadow: var(--shadow); font-size: 13px; min-width: 140px; transform: translate(-50%, -115%); transition: opacity .15s; z-index: 3; }
.chart-tip b { display: block; font-family: var(--display); font-size: 18px; }
.chart-tip .sw { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-inline-end: 6px; }
.chart-foot { display: flex; align-items: center; gap: 12px; padding: 12px 20px 16px; border-top: 1px solid var(--line); flex-wrap: wrap; }

.chart-settings { margin: 8px 20px 12px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface2); display: flex; flex-direction: column; gap: 12px; animation: rise .22s var(--ease); }
.chart-settings.hidden { display: none !important; }
.chart-settings-options { display: flex; flex-wrap: wrap; gap: 10px 18px; }
.chart-settings-options label { display: inline-flex; align-items: center; gap: 7px; cursor: pointer; color: var(--muted); font-size: 13px; }
.chart-settings-options input { accent-color: var(--accent); }
.legend-item { display: inline-flex; align-items: center; gap: 6px; padding: 3px 5px; border: 0; border-radius: 7px; background: transparent; color: var(--muted); cursor: pointer; font-size: 12.5px; transition: background .18s, color .18s; }
.legend-item:hover, .legend-item:focus-visible { background: var(--accent-soft); color: var(--text); outline: none; }
.chart-wrap canvas { cursor: grab; }
.chart-wrap canvas:active { cursor: grabbing; }
@media (prefers-reduced-motion: reduce) { .chart-settings { animation: none; } .legend-item { transition: none; } }

.legend { display: flex; gap: 6px 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); flex: 1; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.chart-fallback { display: flex; align-items: flex-end; gap: 10px; height: 100%; padding: 30px; }
.chart-fallback div { flex: 1; border-radius: 8px 8px 0 0; min-height: 4px; }
/* ---- light 2D chart (devices without graphics acceleration): compact, drawn once ---- */
.chart-card.flat .chart-wrap { height: auto; cursor: default; touch-action: auto; }
.chart-card.flat [data-act=autoRotate], .chart-card.flat [data-act=resetView], .chart-card.flat .chart-foot { display: none; }
.chart-2d { padding: 14px 20px 20px; animation: fadeIn .25s ease; }
.c2-donut, .c2-gauge { display: flex; align-items: center; gap: 28px; }
.c2-svg { width: 200px; height: 200px; flex: none; overflow: visible; }
.c2-big { font-size: 24px; font-weight: 800; fill: var(--text); font-family: inherit; }
.c2-small { font-size: 11.5px; fill: var(--muted); font-family: inherit; }
.c2-slice { cursor: pointer; transition: transform .18s ease, opacity .18s; transform-origin: 100px 100px; stroke: var(--surface); stroke-width: 1.5; }
.c2-donut:has(.hot) .c2-slice:not(.hot) { opacity: .45; }
.c2-slice.hot { transform: scale(1.04); }
.c2-list { flex: 1; min-width: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 250px)); justify-content: start; gap: 2px 30px; align-content: center; max-height: 236px; overflow-y: auto; }
.c2-row, .c2-bar { display: flex; align-items: center; gap: 9px; width: 100%; border: 0; background: transparent; color: var(--text); font: inherit; font-size: 13px; text-align: start; padding: 6px 8px; border-radius: 9px; cursor: pointer; transition: background .15s; }
.c2-row:hover, .c2-row.hot, .c2-bar:hover, .c2-bar.hot { background: var(--surface2); }
.c2-row i { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.c2-lbl { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.c2-row b { font-weight: 700; } .c2-row small { color: var(--muted); min-width: 42px; text-align: end; }
.c2-bars { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 2px 26px; }
.c2-bar .c2-lbl { flex: 0 0 132px; color: var(--muted); }
.c2-track { flex: 1; height: 10px; border-radius: 99px; background: var(--surface2); overflow: hidden; }
.c2-track span { display: block; height: 100%; border-radius: 99px; }
.c2-val { min-width: 34px; text-align: end; font-weight: 700; }
.c2-gauge-t { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); }
.c2-gauge-t b { color: var(--text); font-size: 15px; margin-bottom: 4px; }
.c2-gauge-t span { display: inline-flex; align-items: center; gap: 8px; } .c2-gauge-t i { width: 10px; height: 10px; border-radius: 3px; }
.c2-empty { padding: 40px; text-align: center; color: var(--muted); }
@media (max-width: 680px) {
  .c2-donut, .c2-gauge { flex-direction: column; gap: 14px; }
  .c2-svg { width: 170px; height: 170px; }
  .c2-list { width: 100%; max-height: none; grid-template-columns: 1fr; }
  .c2-bars { grid-template-columns: 1fr; } .c2-bar .c2-lbl { flex-basis: 108px; }
}

.list-item { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.list-item:last-child { border-bottom: 0; }
.list-item .meta { flex: 1; min-width: 0; }
.list-item .meta b { display: block; font-weight: 600; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-item .meta small { color: var(--muted); font-size: 12px; }
.dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.empty { text-align: center; color: var(--faint); padding: 34px 10px; }
.empty svg { width: 42px; height: 42px; opacity: .5; margin-bottom: 8px; }

/* avatar & chips */
.av { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; font-weight: 700; font-size: 13px; color: #fff; flex: none; font-family: var(--display); }
.av.lg { width: 64px; height: 64px; border-radius: 18px; font-size: 22px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 99px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.chip::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.chip.c-accent { background: var(--teal-soft); color: var(--teal); }
.chip.c-gold { background: var(--gold-soft); color: var(--gold); }
.chip.c-info { background: var(--info-soft); color: var(--info); }
.chip.c-danger { background: var(--danger-soft); color: var(--danger); }
.chip.c-violet { background: var(--violet-soft); color: var(--violet); }
.chip.c-muted { background: var(--surface2); color: var(--muted); }
.tag { display: inline-block; padding: 2px 8px; border-radius: 7px; background: var(--surface2); border: 1px solid var(--line); font-size: 12px; color: var(--muted); }

/* toolbar & table */
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.toolbar .input { width: auto; min-width: 160px; padding: 9px 12px; }
.toolbar .grow { flex: 1; min-width: 200px; }
.toolbar .spacer { flex: 1; }
.table-card { padding: 0; overflow: hidden; }
.table-scroll { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.t th { text-align: start; font-weight: 600; font-size: 12px; color: var(--muted); padding: 12px 14px; background: var(--surface2); border-bottom: 1px solid var(--line); white-space: nowrap; cursor: pointer; user-select: none; }
.t th.nosort { cursor: default; }
.t th .ar { opacity: .5; font-size: 10px; margin-inline-start: 4px; }
.t td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.t tr:last-child td { border-bottom: 0; }
.t tbody tr { transition: background .15s; }
.t tbody tr:hover { background: var(--accent-soft); }
.t tbody tr.sel { background: var(--gold-soft); }
.t .person { display: flex; align-items: center; gap: 11px; cursor: pointer; }
.t .person b { display: block; font-weight: 600; }
.t .person small { color: var(--muted); font-size: 12px; }
/* the title of a column of people sits exactly above the names, not above the avatar (cell padding + avatar 36px + gap 11px) */
.t th.th-person { padding-inline-start: 61px; }
/* a full name reads on one or two lines instead of four narrow ones (wide screens; phones show cards) */
@media (min-width: 861px) { .emp-list .t td.main-cell .person > div { min-width: 190px; } }
.t .acts { display: flex; gap: 6px; justify-content: flex-end; }
.t td.chk, .t th.chk { width: 40px; }
.t tfoot .tot-row td { background: var(--surface2); border-top: 2px solid var(--line); border-bottom: 0; font-weight: 700; white-space: nowrap; }
.pager { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.pager .spacer { flex: 1; }
/* a contract that ends within 90 days: the button next to the employee's name, and the decision window */
.ct-due { display: flex; width: fit-content; align-items: center; gap: 5px; margin-top: 6px; padding: 3px 10px; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--gold) 55%, transparent); background: var(--gold-soft); color: var(--gold); font: inherit; font-size: 11.5px; font-weight: 700; line-height: 1.5; cursor: pointer; white-space: nowrap; }
.ct-due svg { width: 12px; height: 12px; flex: none; }
.ct-due.soon, .ct-due.late { border-color: color-mix(in srgb, var(--danger) 55%, transparent); background: color-mix(in srgb, var(--danger) 13%, transparent); color: var(--danger); }
.ct-due:hover { filter: brightness(1.15); }
.tl-b.tl-ct { border-color: color-mix(in srgb, var(--gold) 55%, transparent); color: var(--gold); }
.tl-b.tl-ct svg { width: 14px; height: 14px; }
.ctd-who { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.ctd-who b { display: block; font-size: 16px; } .ctd-who small { color: var(--muted); }
.ctd-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.ctd-grid > div { background: var(--surface2); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.ctd-grid small { display: block; color: var(--muted); font-size: 12px; margin-bottom: 2px; } .ctd-grid b { font-size: 15px; }
.ctd-grid .soon b, .ctd-grid .late b { color: var(--danger); }
.ctd-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 14px; }
.ctd-opt { display: flex; flex-direction: column; gap: 5px; text-align: start; padding: 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font: inherit; cursor: pointer; transition: border-color .15s, background .15s; }
.ctd-opt b { display: flex; align-items: center; gap: 8px; font-size: 15px; } .ctd-opt b svg { width: 18px; height: 18px; flex: none; }
.ctd-opt small { color: var(--muted); font-size: 12.5px; line-height: 1.55; }
.ctd-opt.ok b svg { color: #34d399; } .ctd-opt.no b svg { color: var(--danger); }
.ctd-opt.ok:hover { border-color: #34d399; background: color-mix(in srgb, #34d399 8%, var(--surface)); }
.ctd-opt.no:hover { border-color: var(--danger); background: color-mix(in srgb, var(--danger) 8%, var(--surface)); }
.ctd-opt:disabled { opacity: .5; cursor: not-allowed; }
.ctd-end { margin-top: 14px; } .ctd-hint { color: var(--muted); font-size: 13px; line-height: 1.6; margin: 8px 0 12px; }
@media (max-width: 560px) { .ctd-opts { grid-template-columns: 1fr; } .ctd-grid { grid-template-columns: 1fr 1fr; } .ctd-grid > div:last-child { grid-column: 1 / -1; } }
/* employees: total + one pill per status under the list; a tap filters the list */
.emp-tally { flex-wrap: wrap; gap: 8px; }
.tl-b { display: inline-flex; align-items: center; gap: 8px; padding: 7px 13px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--muted); font: inherit; font-size: 13px; line-height: 1.3; cursor: pointer; white-space: nowrap; transition: border-color .15s, background .15s; }
.tl-b b { color: var(--text); font-weight: 700; font-size: 14px; }
.tl-b i { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); flex: none; }
.tl-b.tl-active i { background: #34d399; } .tl-b.tl-on_leave i { background: var(--gold); } .tl-b.tl-probation i { background: var(--info); }
.tl-b.tl-all { color: var(--text); font-weight: 600; }
.tl-b:hover { border-color: var(--line2, var(--accent)); }
.tl-b.on { border-color: var(--accent); background: var(--accent-soft); color: var(--text); }
@media (max-width: 560px) { .emp-tally { gap: 6px; padding: 10px 12px; } .tl-b { padding: 6px 10px; font-size: 12.5px; } }
.bulkbar { display: flex; align-items: center; gap: 12px; padding: 10px 14px; margin-bottom: 12px; border-radius: 14px; background: var(--gold-soft); color: var(--gold); font-weight: 600; animation: rise .3s var(--ease); }
.dropdown { position: relative; }
.dropdown-menu { position: absolute; top: calc(100% + 6px); inset-inline-end: 0; min-width: min(220px, calc(100vw - 16px)); max-width: calc(100vw - 16px); background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); padding: 6px; z-index: 30; animation: rise .2s var(--ease); max-height: 360px; overflow: auto; }
.dropdown-menu button, .dropdown-menu label { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border: 0; background: none; border-radius: 9px; cursor: pointer; text-align: start; font-size: 13.5px; }
.dropdown-menu button:hover, .dropdown-menu label:hover { background: var(--surface2); }
.dropdown-menu svg { width: 16px; height: 16px; color: var(--muted); }
.dropdown-menu hr { border: 0; border-top: 1px solid var(--line); margin: 5px 0; }
/* type-to-find box on top of a long tick-list (list-fit.js) */
.dropdown-menu .dd-search { position: sticky; top: 0; z-index: 1; width: 100%; margin: 0 0 6px; padding: 10px 12px; border: 1px solid var(--line2, var(--line)); border-radius: 10px; background: var(--surface2); color: var(--text); font: inherit; font-size: 14px; outline: 0; }
.dropdown-menu .dd-search:focus { border-color: var(--accent); }
.dropdown-menu .dd-none { padding: 10px; color: var(--muted); font-size: 13px; text-align: center; }
.dropdown-menu .cols-saved { display: flex; align-items: center; gap: 6px; padding: 4px 10px; font-size: 12px; color: var(--muted); }
.dropdown-menu .cols-saved svg { width: 13px; height: 13px; color: var(--ok, #16a34a); }
.dropdown-menu [data-act=colsReset] { justify-content: center; color: var(--accent); font-weight: 600; }

/* modal & drawer */
.overlay { position: fixed; inset: 0; background: rgba(5, 8, 18, .55); backdrop-filter: blur(4px); z-index: 50; display: grid; place-items: center; padding: 20px; animation: fadeIn .2s; }
@keyframes fadeIn { from { opacity: 0; } }
.modal { width: min(640px, 100%); max-height: calc(100vh - 40px); display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow); animation: pop .3s var(--ease); }
.modal.wide { width: min(860px, 100%); }
.modal.sm { width: min(420px, 100%); }
@keyframes pop { from { opacity: 0; transform: translateY(14px) scale(.98); } }
.modal-h { display: flex; align-items: center; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.modal-h h3 { font-size: 17px; flex: 1; }
.modal-b { padding: 20px 22px; overflow: auto; }
.modal-f { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; padding: 14px 22px; border-top: 1px solid var(--line); }
.form-sec { font-family: var(--display); font-size: 13px; font-weight: 600; color: var(--accent); margin: 4px 0 12px; display: flex; align-items: center; gap: 8px; }
.form-sec::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.drawer-ov { place-items: stretch; justify-items: end; padding: 0; }
.drawer { width: min(460px, 100%); height: 100%; background: var(--surface); border-inline-start: 1px solid var(--line); display: flex; flex-direction: column; animation: slideIn .35s var(--ease); }
[dir='rtl'] .drawer-ov { justify-items: start; }
@keyframes slideIn { from { transform: translateX(40px); opacity: 0; } }
[dir='rtl'] .drawer { animation-name: slideInR; }
@keyframes slideInR { from { transform: translateX(-40px); opacity: 0; } }
.profile-head { padding: 26px 22px; display: flex; gap: 16px; align-items: center; background: linear-gradient(135deg, var(--accent-soft), var(--gold-soft)); border-bottom: 1px solid var(--line); }
.profile-head h3 { font-size: 20px; }
.kv { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.kv div { background: var(--surface2); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; min-width: 0; }
.kv small { display: block; color: var(--faint); font-size: 11.5px; }
.kv b { font-weight: 600; font-size: 13.5px; overflow-wrap: anywhere; }

/* toast */
.toasts { position: fixed; bottom: 22px; inset-inline-start: 50%; transform: translateX(-50%); z-index: 80; display: flex; flex-direction: column; gap: 8px; align-items: center; }
[dir='rtl'] .toasts { transform: translateX(50%); }
.toast { display: flex; align-items: center; gap: 10px; padding: 11px 16px; border-radius: 14px; background: var(--text); color: var(--bg); font-weight: 500; box-shadow: var(--shadow); animation: rise .3s var(--ease); max-width: 90vw; }
.toast.err { background: var(--danger); color: #fff; }
.toast svg { width: 18px; height: 18px; flex: none; }

/* settings */
.set-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.dropzone { border: 2px dashed var(--line2); border-radius: 16px; padding: 30px 18px; text-align: center; cursor: pointer; transition: .2s; color: var(--muted); }
.dropzone:hover, .dropzone.over { border-color: var(--accent); background: var(--accent-soft); color: var(--text); }
.dropzone svg { width: 36px; height: 36px; color: var(--accent); margin-bottom: 8px; }
.sync-state { display: flex; gap: 14px; align-items: center; padding: 14px; border-radius: 14px; margin-bottom: 14px; }
.sync-state.on { background: var(--accent-soft); }
.sync-state.off { background: var(--warn-soft); }
.pulse { width: 12px; height: 12px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 var(--accent); animation: pulse 2s infinite; flex: none; }
.sync-state.off .pulse { background: var(--warn); animation: none; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px transparent; } }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; }
.weekdays { display: flex; gap: 6px; flex-wrap: wrap; }
.weekdays label { padding: 6px 12px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; font-size: 13px; }
.weekdays input { display: none; }
.weekdays label:has(input:checked) { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.field-card { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface2); margin-bottom: 8px; }
.field-card .ic { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); flex: none; }
.field-card .ic svg { width: 18px; height: 18px; }
.field-card .meta { flex: 1; min-width: 0; }
.field-card .meta small { color: var(--muted); }
.timeline .list-item .ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: none; }
.timeline .list-item .ic svg { width: 16px; height: 16px; }
.banner { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 14px; margin-bottom: 18px; background: var(--warn-soft); color: var(--warn); font-weight: 500; }
.banner svg { width: 20px; flex: none; }
.banner .spacer { flex: 1; }
.demo-ribbon { position: relative; z-index: 2; text-align: center; font-size: 12.5px; padding: 6px; background: linear-gradient(90deg, var(--accent), var(--gold)); color: #04131a; font-weight: 600; }
.map-table td { padding: 8px 10px; }
.map-table select { padding: 7px 10px; font-size: 13px; }
.preview-scroll { overflow: auto; max-height: 180px; border: 1px solid var(--line); border-radius: 12px; margin-top: 12px; }
.preview-scroll table { font-size: 12px; }
.preview-scroll td, .preview-scroll th { padding: 6px 10px; white-space: nowrap; }
.spinner { width: 18px; height: 18px; border: 2.5px solid currentColor; border-inline-end-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
.loading-screen { position: fixed; inset: 0; display: grid; place-items: center; z-index: 5; }
.loading-screen svg { width: 64px; animation: spin 3s linear infinite; }

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  .dash-grid { grid-template-columns: 1fr; }
  .dash-side { display: grid; grid-template-columns: 1fr 1fr; }
}
@media (max-width: 960px) {
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .set-grid { grid-template-columns: 1fr; }
  .login { grid-template-columns: 1fr; }
  .login-hero { padding: 32px 26px 0; min-height: auto; }
  .login-hero h1 { font-size: 34px; }
  .hero-star { width: 320px; height: 320px; top: -60px; bottom: auto; inset-inline-end: -110px; opacity: .55; }
  .hero-chips { margin-top: 20px; }
  .login-panel { padding: 24px 18px 40px; }
}
.nav-close { display: none; }
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .nav-close { display: inline-grid; margin-inline-start: auto; flex: none; }
  .sidebar { position: fixed; inset-block: 0; inset-inline-start: 0; width: 282px; transform: translateX(-105%); transition: transform .35s var(--ease); box-shadow: var(--shadow); background: var(--surface); }
  [dir='rtl'] .sidebar { transform: translateX(105%); }
  .shell.nav-open .sidebar { transform: none; }
  .shell.nav-open::after { content: ''; position: fixed; inset: 0; background: rgba(0, 0, 0, .45); z-index: 19; }
  .icon-btn.menu-btn { display: inline-grid; }
  .toolbar .grow { flex: 1 1 100%; }
  .toolbar select.input { flex: 1 1 40%; }
  .toolbar .seg { width: 100%; }
  .toolbar .seg button { flex: 1; }
  .topbar { padding: 12px 16px; gap: 8px; }
  .topbar h1 { font-size: 17px; }
  .search { display: none; }
  .icon-btn.gs-btn { display: inline-grid; }
  .topbar .back-btn span { display: none; }
  .topbar .back-btn { padding: 8px 10px; }
  .topbar h1 { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .search.open { display: block; position: fixed; top: 60px; inset-inline: 12px; width: auto; z-index: 60; }
  .search.open input { box-shadow: var(--shadow); }
  .search.open .search-pop { max-height: 70vh; }
  .content { padding: 18px 14px 80px; }
  .dash-side { grid-template-columns: 1fr; }
  .chart-wrap { height: 360px; }
  .grid2 { grid-template-columns: 1fr; }
  .toolbar .input { flex: 1; min-width: 0; }
  .hide-m { display: none !important; }
  /* table -> cards */
  .t.cards thead { display: none; }
  .t.cards, .t.cards tbody, .t.cards tr, .t.cards td { display: block; width: 100%; }
  .t.cards tr { padding: 12px 14px; border-bottom: 1px solid var(--line); position: relative; }
  .t.cards td { border: 0; padding: 4px 0; display: flex; justify-content: space-between; gap: 12px; }
  .t.cards td[data-l]::before { content: attr(data-l); color: var(--faint); font-size: 12px; }
  .t.cards td.chk { position: absolute; top: 14px; inset-inline-end: 12px; width: auto; }
  .t.cards td.main-cell { padding-bottom: 8px; }
  .t.cards td.main-cell::before { display: none; }
  .t.cards .acts { justify-content: flex-start; padding-top: 6px; }
  .t.cards tfoot { display: block; }
  .t.cards tfoot .tot-row td:empty { display: none; }
  .modal { border-radius: 22px 22px 0 0; max-height: 92vh; align-self: end; }
  .overlay { padding: 0; place-items: end stretch; }
  .drawer-ov { place-items: stretch; }
  .drawer { width: 100%; }
  .modal-f { padding-bottom: max(14px, env(safe-area-inset-bottom)); }
}
@media (max-width: 480px) {
  .topbar { gap: 5px; padding: 10px 10px; }
  .topbar .icon-btn, .topbar .back-btn { width: 36px; height: 36px; padding: 0; }
  .kpi .v { font-size: 23px; }
  .kpis { gap: 10px; }
  .kpi { padding: 14px; }
  .kv { grid-template-columns: 1fr; }
  .lang-btn { padding: 0 9px; }
  /* phones: undo / redo only show when there is something to undo, so the theme and language buttons always fit */
  .topbar .un-wrap button[disabled] { display: none; }
  .topbar .un-wrap:not(:has(button:not([disabled]))) { display: none; }
}
@media (max-width: 400px) {
  .topbar { gap: 4px; padding: 10px 8px; }
  .topbar .icon-btn, .topbar .back-btn { width: 34px; height: 34px; }
  .topbar .lang-btn { padding: 0 7px; height: 34px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before { animation: none !important; transition: none !important; } }

/* ================= v2 additions ================= */
.logo-img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; flex: none; box-shadow: 0 6px 18px -8px rgba(0,0,0,.6); }
.logo-img.lg { width: 92px; height: 92px; }
.logo-img.xl { width: 150px; height: 150px; }
.brand-name { letter-spacing: .02em; }
.brand-name b { color: var(--accent); }
.login-hero .hero-logo { display: flex; align-items: center; gap: 18px; }
.login-card .co { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.login-card .co b { font-family: var(--display); }
.login-card .co-brand { justify-content: center; padding: 4px 0 18px; }
.login-card .co-logo { display: block; width: min(100%, 300px); height: auto; }
.login-card .co-logo.lt { display: none; }
[data-theme='dark'] .login-card .co-logo.dk { display: none; }
[data-theme='dark'] .login-card .co-logo.lt { display: block; }
.login-card .co small { display: block; color: var(--muted); font-size: 12px; }
.demo-accts { margin-top: 18px; padding-top: 14px; border-top: 1px dashed var(--line); }
.demo-accts small { color: var(--muted); display: block; margin-bottom: 8px; }
.demo-accts .btn-row button { font-size: 12px; }
.nav { overflow-y: auto; flex: 1; margin-inline: -6px; padding-inline: 6px; scrollbar-width: thin; }
.sidebar { gap: 16px; }
.nav a { padding: 8px 12px; }
.chip.c-custom { background: color-mix(in srgb, var(--c) 16%, transparent); color: var(--c); }
.chip.c-teal { background: var(--teal-soft); color: var(--teal); }
/* bell */
.bell { position: relative; }
.bell .dotc { position: absolute; top: -4px; inset-inline-end: -4px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: var(--danger); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; border: 2px solid var(--bg); }
.notif-panel { position: absolute; top: calc(100% + 8px); inset-inline-end: 0; width: min(380px, 92vw); max-height: 70vh; overflow: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); z-index: 40; animation: rise .2s var(--ease); }
.notif-panel .hd { display: flex; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--surface); }
.notif-panel .hd b { flex: 1; font-family: var(--display); }
.notif { display: flex; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); cursor: pointer; text-align: start; width: 100%; background: none; border-inline: 0; border-top: 0; }
.notif:hover { background: var(--surface2); }
.notif.unread { background: var(--accent-soft); }
.notif .ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: none; }
.notif .ic svg { width: 16px; height: 16px; }
.notif small { color: var(--muted); font-size: 11.5px; }
.notif.alert .ic { background: var(--warn-soft); color: var(--warn); }
/* welcome */
.welcome { display: flex; align-items: center; gap: 18px; margin-bottom: 18px; padding: 18px 22px; background: linear-gradient(120deg, var(--accent-soft), transparent 60%), var(--glass); }
.welcome h2 { font-size: 22px; }
.welcome .dates { color: var(--muted); font-size: 13px; margin-top: 4px; }
.welcome .tagline { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
.welcome .tagline .tg-ar { font-family: 'Readex Pro', 'IBM Plex Sans Arabic', sans-serif; font-size: 26px; font-weight: 700; line-height: 1.3; }
.welcome .tagline .tg-en { font-family: 'Readex Pro', sans-serif; font-size: 12.5px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.welcome .tagline .tg-en::before { content: ''; display: inline-block; width: 22px; height: 2px; margin-inline-end: 8px; vertical-align: middle; background: var(--accent); border-radius: 2px; }
.welcome .spacer { flex: 1; }
/* the quick buttons stay in one tidy row on a wide screen */
/* logo and greeting on one side, the quick buttons on the other, all on one middle line; a narrower screen lets the buttons drop under */
.welcome .quick { justify-content: flex-end; }
@media (min-width: 1100px) {
  .welcome { flex-wrap: wrap; }
  .welcome > div:not(.quick):not(.spacer) { flex: none; }
  .welcome h2, .welcome .dates { white-space: nowrap; }
  .welcome .quick { flex: 0 0 auto; flex-wrap: nowrap; margin-inline-start: auto; align-self: center; }
  .welcome .quick { gap: 6px; }
  .welcome .quick .btn { white-space: nowrap; padding-inline: 9px; height: 36px; font-size: 12.8px; gap: 5px; }
  .welcome { gap: 14px; }
  .welcome .quick .btn svg { width: 15px; height: 15px; }
}
.quick { display: flex; gap: 8px; flex-wrap: wrap; }
/* tabs */
.tabs { display: flex; gap: 4px; overflow-x: auto; margin-bottom: 18px; border-bottom: 1px solid var(--line); scrollbar-width: none; }
.tabs button { border: 0; background: none; padding: 10px 14px; color: var(--muted); font-weight: 600; cursor: pointer; white-space: nowrap; border-bottom: 2px solid transparent; margin-bottom: -1px; display: inline-flex; gap: 8px; align-items: center; }
.tabs button svg { width: 16px; height: 16px; }
.tabs button.on { color: var(--accent); border-bottom-color: var(--accent); }
/* one page made of several (app.js TAB_GROUPS): the tabs are links, styled like the buttons above */
.tabs a { padding: 10px 14px; color: var(--muted); font-weight: 600; white-space: nowrap; border-bottom: 2px solid transparent; margin-bottom: -1px; display: inline-flex; gap: 8px; align-items: center; text-decoration: none; }
.tabs a svg { width: 16px; height: 16px; }
.tabs a:hover { color: var(--text); }
.tabs a.on { color: var(--accent); border-bottom-color: var(--accent); }
/* permission matrix */
.perm-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.perm-table th, .perm-table td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: center; }
.perm-table th:first-child, .perm-table td:first-child { text-align: start; }
.perm-table td input { width: 17px; height: 17px; accent-color: var(--accent); }
.perm-table td.na { color: var(--faint); }
.role-card { display: flex; gap: 12px; align-items: center; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface2); margin-bottom: 8px; cursor: pointer; }
.role-card:hover { border-color: var(--accent); }
.role-card .meta { flex: 1; min-width: 0; }
.role-card small { color: var(--muted); }
.role-card input[type=radio], .field .role-card input[type=radio] { width: 18px; height: 18px; min-width: 18px; flex: 0 0 18px; padding: 0; margin: 0; border: 0; box-shadow: none; background: none; accent-color: var(--accent); }
.role-card:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
/* steps */
.steps { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 12px; }
.steps .st { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 99px; background: var(--surface2); border: 1px solid var(--line); color: var(--muted); }
.steps .st.done { background: var(--teal-soft); color: var(--teal); border-color: transparent; }
.steps .st.cur { background: var(--gold-soft); color: var(--gold); border-color: transparent; font-weight: 700; }
.steps .st.bad { background: var(--danger-soft); color: var(--danger); border-color: transparent; }
.steps .arrow { color: var(--faint); }
[dir='rtl'] .steps .arrow { transform: scaleX(-1); display: inline-block; }
.req-card { padding: 16px 18px; margin-bottom: 12px; }
.req-card .top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.req-card .top .ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); flex: none; }
.req-card .top .ic svg { width: 20px; height: 20px; }
.req-card .data { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; color: var(--muted); margin: 8px 0; }
.req-card .data b { color: var(--text); font-weight: 600; }
.type-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.type-grid button { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 18px 10px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface2); cursor: pointer; font-weight: 600; transition: .2s; }
.type-grid button:hover { border-color: var(--accent); transform: translateY(-2px); }
.type-grid button svg { width: 26px; height: 26px; color: var(--accent); }
/* builder rows */
.builder-row { display: grid; grid-template-columns: 1fr 1fr 130px auto auto; gap: 8px; align-items: center; margin-bottom: 8px; }
.builder-row input, .builder-row select { padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface2); width: 100%; }
.step-pill { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); font-weight: 600; font-size: 13px; }
.step-pill button { border: 0; background: none; color: inherit; cursor: pointer; padding: 0; display: grid; }
.step-pill svg { width: 14px; height: 14px; }
/* org chart */
.org-root { display: flex; flex-direction: column; align-items: center; gap: 6px; margin-bottom: 22px; text-align: center; }
.tree, .tree ul { list-style: none; margin: 0; padding: 0; }
.tree ul { padding-inline-start: 30px; border-inline-start: 2px solid var(--line2); margin-inline-start: 22px; }
.tree li { position: relative; padding: 6px 0; }
.tree ul > li::before { content: ''; position: absolute; inset-inline-start: -30px; top: 34px; width: 26px; border-top: 2px solid var(--line2); }
.org-node { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px; background: var(--glass); border: 1px solid var(--line); border-inline-start: 4px solid var(--c, var(--accent)); max-width: 560px; }
.org-node .meta { flex: 1; min-width: 0; }
.org-node .meta b { font-family: var(--display); font-size: 15px; }
.org-node .meta small { display: block; color: var(--muted); font-size: 12.5px; }
.org-node .count { font-family: var(--display); font-weight: 700; color: var(--c, var(--accent)); text-align: center; line-height: 1.1; }
.org-node .count small { display: block; font-size: 11px; color: var(--muted); font-weight: 500; }
.org-emps { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 0 4px; max-width: 560px; }
.org-emps button { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 4px; border-radius: 99px; border: 1px solid var(--line); background: var(--surface2); cursor: pointer; font-size: 12.5px; }
[dir='rtl'] .org-emps button { padding: 4px 4px 4px 10px; }
.org-emps .av { width: 24px; height: 24px; border-radius: 50%; font-size: 10px; }
/* sums */
.sumbar { display: flex; gap: 18px; flex-wrap: wrap; padding: 12px 16px; border-top: 1px solid var(--line); background: var(--surface2); font-size: 13px; }
.sumbar b { font-family: var(--display); color: var(--accent); }
.calc-box { padding: 14px; border-radius: 14px; background: var(--accent-soft); margin-top: 6px; }
.calc-box .row { display: flex; justify-content: space-between; padding: 4px 0; font-size: 13.5px; }
.calc-box .row.total { border-top: 1px dashed var(--accent); margin-top: 6px; padding-top: 8px; font-weight: 700; font-size: 15px; }
.stars { display: inline-flex; gap: 2px; color: var(--gold); }
.stars svg { width: 14px; height: 14px; }
.days-left { font-weight: 700; }
.att-row { display: grid; grid-template-columns: 1fr 120px 100px 100px; gap: 8px; align-items: center; padding: 6px 0; border-bottom: 1px dashed var(--line); }
.att-row select, .att-row input { padding: 6px 8px; border-radius: 9px; border: 1px solid var(--line); background: var(--surface2); width: 100%; font-size: 13px; }
/* payslip / print */
.payslip { background: #fff; color: #111; border-radius: 14px; padding: 26px; font-size: 13.5px; }
.payslip .ph { display: flex; align-items: center; gap: 14px; border-bottom: 2px solid #b8913e; padding-bottom: 14px; margin-bottom: 14px; }
.payslip table { width: 100%; border-collapse: collapse; }
.payslip td { padding: 7px 4px; border-bottom: 1px solid #eee; }
.payslip .net td { font-weight: 800; font-size: 16px; border-top: 2px solid #b8913e; color: #0e1830; }
@media print {
  body * { visibility: hidden !important; }
  .print-area, .print-area * { visibility: visible !important; }
  .print-area { position: fixed; inset: 0; padding: 20px; }
}
@media (max-width: 860px) {
  .builder-row { grid-template-columns: 1fr 1fr; }
  .att-row { grid-template-columns: 1fr 1fr; }
  .welcome { flex-wrap: wrap; padding: 16px; }
  .welcome .logo-img.lg { width: 60px; height: 60px; }
  .tree ul { padding-inline-start: 14px; margin-inline-start: 10px; }
  .tree ul > li::before { inset-inline-start: -14px; width: 12px; }
}
@media (max-width: 860px) {
  .notif-panel { position: fixed; top: 64px; inset-inline: 8px; width: auto; max-height: 75vh; }
}
.login-hero img.hero-star { opacity: .09 !important; width: 560px; height: 560px; bottom: -160px; }

/* ---------- Qiwa / GOSI ---------- */
.nit-hero { padding: 22px 22px 18px; margin-bottom: 18px; }
.nit-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.nit-l { color: var(--muted); font-size: 13px; }
.nit-v { font-family: var(--display); font-size: 44px; font-weight: 700; line-height: 1.1; }
.nit-bar { position: relative; height: 14px; border-radius: 99px; background: var(--surface2); margin: 22px 0 46px; }
.nit-fill { position: absolute; inset-block: 0; inset-inline-start: 0; border-radius: 99px; transition: width .6s var(--ease); }
.nit-mark { position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--text); opacity: .55; }
.nit-mark span { position: absolute; top: 24px; transform: translateX(50%); white-space: nowrap; font-size: 11px; color: var(--muted); text-align: center; line-height: 1.3; }
[dir='ltr'] .nit-mark span { transform: translateX(-50%); }
.nit-advice { display: flex; flex-wrap: wrap; gap: 10px 22px; font-size: 14px; font-weight: 500; }
.nit-advice span { display: inline-flex; align-items: center; gap: 8px; }
.nit-advice svg { width: 18px; color: var(--accent); }
.nit-note { color: var(--faint); font-size: 12px; margin-top: 12px; }
.gov-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 18px; }
.gov-sec { padding: 18px; margin-bottom: 18px; }
.gov-grid .gov-sec { margin-bottom: 0; }
.gov-hd { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.gov-hd h3 { margin: 0; font-size: 15px; display: flex; align-items: center; gap: 8px; }
.gov-hd h3 svg { width: 18px; color: var(--accent); }
.mini-bar { display: inline-block; width: 70px; height: 6px; border-radius: 9px; background: var(--surface2); margin-inline-end: 8px; vertical-align: middle; overflow: hidden; }
.mini-bar i { display: block; height: 100%; background: var(--accent); border-radius: 9px; }
@media (max-width: 900px) { .gov-grid { grid-template-columns: 1fr; } .nit-v { font-size: 36px; } }
@media (max-width: 600px) { .nit-mark span { font-size: 9.5px; } }
/* ---------- Letters ---------- */
.lt-grid { display: grid; grid-template-columns: minmax(320px, 420px) 1fr; gap: 18px; align-items: start; margin-bottom: 18px; }
.lt-form { padding: 18px; }
.lt-lbl { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin: 12px 0 8px; }
.lt-types { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.lt-types button { display: flex; align-items: center; gap: 8px; padding: 10px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface2); color: var(--text); cursor: pointer; font: inherit; font-size: 13px; text-align: start; transition: .2s; }
.lt-types button svg { width: 17px; flex: none; color: var(--muted); }
.lt-types button.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.lt-types button.on svg { color: var(--accent); }
.lt-types button:disabled { opacity: .4; cursor: not-allowed; }
.lt-emp { border: 1px solid var(--line); border-radius: 14px; padding: 12px; background: var(--surface2); margin-bottom: 4px; }
.lt-emp.empty-emp { display: flex; align-items: center; gap: 10px; color: var(--faint); font-size: 13px; }
.lt-emp.empty-emp svg { width: 20px; }
.lt-emp .kvs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; }
.lt-emp .kvs small { display: block; color: var(--faint); font-size: 11px; }
.lt-emp .kvs b { font-size: 13px; font-weight: 600; word-break: break-word; }
.lt-warn { display: flex; gap: 6px; align-items: center; margin-top: 10px; color: var(--gold); font-size: 12px; }
.lt-warn svg { width: 15px; flex: none; }
.lt-actions { display: flex; gap: 8px; margin: 6px 0 8px; }
.lt-actions .btn { flex: 1; justify-content: center; }
.lt-preview { padding: 12px; position: sticky; top: 84px; background: #e9e4da; }
[data-theme='dark'] .lt-preview { background: #2a2620; }
.lt-scale { position: relative; overflow: hidden; }
.lt-scale iframe { width: 794px; height: 1123px; border: 0; background: #fff; transform-origin: top left; position: absolute; top: 0; left: 0; box-shadow: 0 6px 24px rgba(0,0,0,.18); }
@media (max-width: 1000px) { .lt-grid { grid-template-columns: 1fr; } .lt-preview { position: static; } }
/* ---------- performance & hiring ---------- */
.chk-grid { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 4px; }
.chk { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface2); cursor: pointer; font-size: 13px; }
.chk input { accent-color: var(--accent); }
.pbar { height: 8px; border-radius: 9px; background: var(--surface2); overflow: hidden; }
.pbar i { display: block; height: 100%; border-radius: 9px; transition: width .5s var(--ease); }
.cy-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.cy-card { padding: 16px; cursor: pointer; display: flex; flex-direction: column; gap: 10px; transition: .2s; }
.cy-card:hover { transform: translateY(-2px); border-color: var(--accent); }
.cy-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.cy-top b { font-size: 15px; }
.cy-meta { color: var(--muted); font-size: 13px; }
.cy-foot { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--muted); align-items: center; }
.cy-foot svg { width: 14px; vertical-align: -2px; }
.cy-deps { display: flex; flex-wrap: wrap; gap: 4px; }
.cy-actions { display: flex; gap: 6px; border-top: 1px solid var(--line); padding-top: 10px; }
.sv-list { display: flex; flex-direction: column; gap: 8px; }
.sv-item { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface2); }
.sv-item small { display: flex; align-items: center; gap: 4px; color: var(--faint); font-size: 12px; margin-top: 2px; }
.sv-item small svg { width: 12px; }
.sv-q { display: grid; grid-template-columns: 26px 150px 1fr 1fr auto auto; gap: 8px; align-items: center; margin-bottom: 8px; }
.sv-q .sv-opts { grid-column: 3 / 5; }
.sv-n { color: var(--faint); text-align: center; }
.sv-ask { margin-bottom: 18px; }
.sv-qt { font-weight: 600; margin-bottom: 10px; }
.sv-scale { display: flex; flex-wrap: wrap; gap: 6px; }
.sv-scale button { flex: 1; min-width: 44px; padding: 10px 6px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface2); color: var(--text); cursor: pointer; font: inherit; font-weight: 600; display: flex; flex-direction: column; align-items: center; gap: 2px; transition: .15s; }
.sv-scale button small { font-weight: 400; font-size: 10.5px; color: var(--faint); }
.sv-scale button.on { background: var(--accent); border-color: var(--accent); color: #1a1408; }
.sv-scale button.on small { color: inherit; }
.sv-scale.nps button { min-width: 30px; padding: 9px 2px; }
.sv-scale.ch button, .sv-scale.yn button { flex: 0 1 auto; padding: 9px 18px; }
.sv-scale.small button { flex: 0 1 auto; padding: 6px 10px; font-size: 12.5px; }
.sv-nps-l { display: flex; justify-content: space-between; font-size: 11px; color: var(--faint); margin-top: 4px; }
.sv-res { padding: 16px; margin-bottom: 12px; }
.sv-avg { display: flex; align-items: baseline; gap: 8px; margin-bottom: 10px; }
.sv-avg b { font-family: var(--display); font-size: 30px; }
.sv-avg span { color: var(--muted); }
.sv-avg small { color: var(--faint); margin-inline-start: auto; }
.dist { display: grid; grid-template-columns: 130px 1fr 34px 40px; gap: 8px; align-items: center; font-size: 12.5px; margin-bottom: 6px; }
.dist small { color: var(--faint); }
.sv-texts { display: flex; flex-direction: column; gap: 6px; max-height: 260px; overflow: auto; }
.sv-texts div { background: var(--surface2); border-radius: 10px; padding: 8px 12px; font-size: 13px; }
.kanban { display: grid; grid-template-columns: repeat(6, minmax(168px, 1fr)); gap: 12px; overflow-x: auto; padding-bottom: 8px; }
.kb-col { background: var(--surface2); border: 1px solid var(--line); border-radius: 16px; padding: 10px; min-height: 320px; transition: .15s; }
.kb-col.over { border-color: var(--accent); background: var(--accent-soft); }
.kb-hd { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; padding: 0 4px; color: var(--muted); font-size: 13px; }
.kb-body { display: flex; flex-direction: column; gap: 8px; }
.kb-card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px; cursor: pointer; transition: .15s; }
.kb-card:hover { border-color: var(--accent); }
.kb-card.drag { opacity: .4; }
.kb-name { display: flex; gap: 8px; align-items: center; }
.kb-name .av { width: 30px; height: 30px; font-size: 11px; }
.kb-name b { display: block; font-size: 13px; }
.kb-name small { color: var(--faint); font-size: 11.5px; }
.kb-meta { display: flex; flex-wrap: wrap; gap: 4px 8px; margin-top: 8px; font-size: 11px; color: var(--muted); align-items: center; }
.kb-meta svg { width: 12px; vertical-align: -2px; }
.kb-meta .stars span { font-size: 11px; }
.kb-empty { color: var(--faint); text-align: center; padding: 20px 0; }
.stars span { color: var(--line); } .stars span.on { color: var(--gold); }
.iv-row { display: grid; grid-template-columns: 140px 1fr 140px 1.4fr auto; gap: 6px; margin-bottom: 6px; }
.cand-hd { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; font-size: 13px; }
.btn.ghost.danger { color: var(--danger); background: transparent; border-color: color-mix(in srgb, var(--danger) 35%, transparent); }
@media (max-width: 760px) {
  .sv-q { grid-template-columns: 26px 1fr auto; } .sv-q select { grid-column: 2 / 4; } .sv-q input[data-k^=text] { grid-column: 1 / -1; } .sv-q .sv-opts { grid-column: 1 / -1; }
  .iv-row { grid-template-columns: 1fr 1fr; } .dist { grid-template-columns: 90px 1fr 30px 36px; }
}
/* ---------- GPS check-in ---------- */
.ci-wrap { max-width: 520px; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; }
.ci-card { padding: 24px 20px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.ci-card > svg { width: 40px; color: var(--muted); }
.ci-date { color: var(--muted); font-size: 14px; }
.ci-clock { font-family: var(--display); font-size: 54px; font-weight: 700; line-height: 1.05; letter-spacing: 1px; direction: ltr; }
.ci-shift { color: var(--faint); font-size: 12.5px; }
.ci-top { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.ci-now { display: flex; align-items: center; gap: 10px; text-align: start; }
.ci-now span { display: flex; flex-direction: column; line-height: 1.2; }
.ci-now small { color: var(--muted); font-size: 11px; }
.ci-now b { font-size: 16px; font-weight: 700; }
.ci-analog { width: 58px; height: 58px; flex: none; }
.ci-analog .face { fill: color-mix(in srgb, var(--text) 5%, transparent); stroke: color-mix(in srgb, var(--accent) 55%, var(--line)); stroke-width: 2.5; }
.ci-analog .tick { stroke: var(--muted); stroke-width: 1.4; stroke-linecap: round; }
.ci-analog .tick.big { stroke: var(--text); stroke-width: 2.6; }
.ci-analog .hh { stroke: var(--text); stroke-width: 4.5; stroke-linecap: round; }
.ci-analog .mh { stroke: var(--text); stroke-width: 3; stroke-linecap: round; }
.ci-analog .sh { stroke: var(--accent); stroke-width: 1.5; stroke-linecap: round; }
.ci-analog .pin { fill: var(--accent); }
.ci-dur-l { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 13px; font-weight: 600; margin-top: 4px; }
.ci-pulse { width: 9px; height: 9px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 0 rgba(34,197,94,.6); animation: ciPulse 1.6s infinite; }
@keyframes ciPulse { 70% { box-shadow: 0 0 0 9px rgba(34,197,94,0); } 100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); } }
.ci-clock.on { color: #22c55e; text-shadow: 0 0 24px rgba(34,197,94,.35); }
.ci-clock.none { opacity: .35; }
.ci-prog { width: min(280px, 90%); height: 7px; border-radius: 99px; background: color-mix(in srgb, var(--text) 9%, transparent); overflow: hidden; }
.ci-prog span { display: block; height: 100%; width: 0; border-radius: 99px; background: linear-gradient(90deg, var(--accent), #22c55e); transition: width .6s ease; }
.ci-prog span.full { background: #22c55e; }
.ci-prog-l { color: var(--faint); font-size: 11.5px; margin-bottom: 4px; }
@media (prefers-reduced-motion: reduce) { .ci-pulse { animation: none; } }
.ci-live { min-height: 62px; display: flex; flex-direction: column; align-items: center; gap: 4px; margin: 10px 0 6px; }
.ci-live small { color: var(--faint); font-size: 12px; }
.ci-state { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 99px; font-weight: 600; font-size: 13.5px; }
.ci-state svg { width: 17px; }
.ci-state.good { background: var(--accent-soft); color: var(--teal, var(--accent)); }
.ci-state.bad { background: var(--danger-soft, rgba(251,113,133,.14)); color: var(--danger); }
.ci-state.warn { background: var(--warn-soft); color: var(--warn); }
.ci-state.wait { color: var(--muted); }
.ci-btn { width: 190px; height: 190px; border-radius: 50%; border: 0; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; font: inherit; font-family: var(--display); font-size: 18px; font-weight: 700; color: #1a1408; transition: .2s; margin: 6px 0; }
.ci-btn svg { width: 54px; height: 54px; }
.ci-btn.in { background: radial-gradient(circle at 30% 30%, #f0d08a, var(--accent)); box-shadow: 0 0 0 10px var(--accent-soft), 0 14px 40px rgba(220,180,104,.35); }
.ci-btn.out { background: radial-gradient(circle at 30% 30%, #9fb7ff, #6f9bff); color: #0b1430; box-shadow: 0 0 0 10px rgba(111,155,255,.15), 0 14px 40px rgba(111,155,255,.3); }
.ci-btn:active:not(:disabled) { transform: scale(.96); }
.ci-btn:disabled { filter: grayscale(1); opacity: .45; cursor: not-allowed; box-shadow: none; }
.ci-today { padding: 16px 18px; }
.ci-list { display: flex; flex-direction: column; gap: 8px; }
.ci-list > div { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.ci-list small { color: var(--faint); margin-inline-start: auto; font-size: 12px; }
.ci-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); }
.ci-dot.out { background: #6f9bff; }
.ci-note { display: flex; gap: 8px; align-items: flex-start; color: var(--faint); font-size: 12px; padding: 0 6px; }
.ci-note svg { width: 14px; flex: none; margin-top: 2px; }
.gps-site { display: grid; grid-template-columns: 1.3fr 1fr 1fr 110px auto auto auto; gap: 6px; margin-bottom: 8px; align-items: center; }
.gps-r { display: flex; align-items: center; gap: 4px; } .gps-r span { color: var(--faint); font-size: 12px; }
@media (max-width: 760px) { .gps-site { grid-template-columns: 1fr 1fr; } .gps-site input[data-k=name] { grid-column: 1 / -1; } }
.login.force { justify-content: center; }
.fc-ic { width: 54px; height: 54px; border-radius: 16px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; margin: 4px 0 10px; }
.fc-ic svg { width: 26px; }
.fc-rules { color: var(--muted); font-size: 12.5px; margin: 0 0 14px; padding-inline-start: 18px; }
/* ---------- accounting ---------- */
.acc-bars { display: flex; align-items: flex-end; gap: 12px; height: 190px; padding-top: 10px; }
.acc-bar { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; }
.acc-bar .b { flex: 1; width: 100%; display: flex; align-items: flex-end; justify-content: center; gap: 4px; }
.acc-bar .b i { width: 40%; max-width: 26px; border-radius: 6px 6px 2px 2px; min-height: 2px; transition: height .6s var(--ease); }
.acc-bar small { color: var(--faint); font-size: 11px; }
.acc-leg { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.acc-leg i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.acc-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; font-size: 13px; color: var(--muted); margin-bottom: 10px; }
.jv-lines td { padding: 4px; vertical-align: middle; }
.jv-lines .input { padding: 7px 9px; }
tr.jv-tot td { font-weight: 700; background: var(--surface2); }
tr.grp td { font-weight: 600; background: color-mix(in srgb, var(--surface2) 60%, transparent); }
.inv-tot { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; margin: 12px 0; }
.inv-tot div { display: flex; gap: 18px; min-width: 260px; justify-content: space-between; font-size: 13.5px; }
.inv-tot div.g { font-size: 16px; border-top: 1px solid var(--line); padding-top: 6px; }
.row-inline { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.row-inline .input { flex: 1; }
.acc-big { font-family: var(--display); font-size: 24px; font-weight: 700; }
.cy-card.sel { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.acc-net.pos td { color: var(--teal); } .acc-net.neg td { color: var(--danger); }
.acc-ok, .acc-bad { margin-top: 10px; font-weight: 600; font-size: 13px; } .acc-ok { color: var(--teal); } .acc-bad { color: var(--danger); }
.coa-ic { width: 14px; height: 14px; color: var(--faint); vertical-align: -2px; margin-inline-end: 4px; }
td.num, th.n { text-align: end; }

/* idle lock screen — sits over the page so unsaved work underneath is kept */
.lock-screen { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 20px; background: color-mix(in srgb, var(--bg) 70%, transparent); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); animation: fadeIn .2s; }
.lock-screen .co { display: flex; align-items: center; gap: 10px; }
.lock-screen .co small { display: block; color: var(--muted); }
/* accounting phase 2 */
.badge-n { display: inline-block; min-width: 18px; padding: 0 5px; border-radius: 9px; background: var(--danger); color: #fff; font-size: 11px; line-height: 18px; text-align: center; margin-inline-start: 4px; }
.ex-img { max-width: 100%; max-height: 320px; border-radius: 10px; border: 1px solid var(--border); display: block; margin: 6px 0; object-fit: contain; background: var(--surface2); }
.ex-hist { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); border-inline-start: 2px solid var(--border); padding-inline-start: 10px; margin-bottom: 12px; }
.ex-post { padding: 12px; margin-top: 10px; background: var(--surface2); box-shadow: none; }
.fa-runs { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 13px; color: var(--muted); margin: 4px 0 12px; }
.fa-runs a { text-decoration: none; }
.bd-grid td, .bd-grid th { padding: 4px 5px; }
.bd-grid .bd-name { min-width: 190px; font-size: 12.5px; white-space: nowrap; position: sticky; inset-inline-start: 0; background: var(--surface); z-index: 1; }
.bd-in { width: 82px; padding: 5px 6px; font-size: 12.5px; text-align: end; }
.bd-tot { font-weight: 700; white-space: nowrap; }
.bd-pct { display: flex; align-items: center; gap: 8px; min-width: 130px; }
.bd-pct .pbar { flex: 1; }
.einv-qr { display: flex; align-items: center; gap: 14px; margin-top: 12px; padding: 12px; border: 1px dashed var(--line); border-radius: 14px; }
.einv-qr .qr { width: 120px; height: 120px; flex: 0 0 120px; display: grid; place-items: center; background: #fff; border-radius: 10px; }
.einv-qr .qr svg { width: 100%; height: 100%; }
.vr-form .vr-in { width: 120px; padding: 6px 8px; text-align: end; }
.vr-form td:first-child { width: 36px; color: var(--muted); }
/* ZATCA e-invoicing page */
.zhead { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; border-inline-start: 4px solid var(--faint); }
.zhead.test { border-inline-start-color: var(--gold); } .zhead.live { border-inline-start-color: var(--teal); }
.zhead-ic { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); flex: 0 0 46px; }
.zcounts { display: flex; gap: 18px; } .zcounts span { display: grid; text-align: center; font-size: 12px; color: var(--muted); } .zcounts b { font-size: 20px; color: var(--text); }
.zsteps { display: grid; gap: 12px; }
.zst { padding: 16px 18px; } .zst.done { opacity: .92; }
.zst-h { display: flex; align-items: center; gap: 10px; } .zst-h h3 { margin: 0; font-size: 15.5px; flex: 1; }
.zst-n { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; background: var(--accent); color: #fff; flex: 0 0 30px; }
.zst.done .zst-n { background: var(--teal); } .zst-n svg { width: 16px; height: 16px; }
.zst-b { margin-top: 12px; padding-inline-start: 40px; }
.zp { color: var(--muted); font-size: 13px; margin: 0 0 10px; line-height: 1.7; }
.zsub { margin: 14px 0 8px; font-size: 14px; }
.zchks { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.zchk { font-size: 12px; padding: 3px 9px; border-radius: 99px; background: color-mix(in srgb, var(--danger) 12%, transparent); color: var(--danger); }
.zchk.ok { background: color-mix(in srgb, var(--teal) 14%, transparent); color: var(--teal); }
.zol { margin: 0 0 12px; padding-inline-start: 20px; font-size: 13.5px; line-height: 1.9; }
.zotp .input { max-width: 200px; letter-spacing: 3px; text-align: center; font-size: 16px; }
.zdemo { margin-top: 14px; font-size: 13px; } .zdemo summary { cursor: pointer; color: var(--accent); }
.zres { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; } .zres li { padding: 8px 10px; border-radius: 10px; background: var(--surface2); font-size: 13px; }
.zres li.ok { color: var(--teal); } .zres li.bad { color: var(--danger); } .zres small { color: var(--muted); }
@media (max-width: 760px) { .zst-b { padding-inline-start: 0; } .zst .grid2 { grid-template-columns: 1fr !important; } .zcounts { width: 100%; justify-content: space-around; } }
/* dd/mm/yyyy date fields (datefield.js) */
.df-wrap { position: relative; display: inline-flex; align-items: center; min-width: 150px; vertical-align: middle; }
.field .df-wrap, .grid2 .df-wrap { display: flex; width: 100%; }
.df-wrap .df-text { width: 100%; padding-inline-end: 38px; text-align: left; font-variant-numeric: tabular-nums; letter-spacing: .02em; }
[dir='rtl'] .df-wrap .df-text { text-align: right; }
.df-wrap .df-text.df-bad { border-color: var(--danger) !important; }
.df-btn { position: absolute; inset-inline-end: 6px; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; display: grid; place-items: center; border: 0; background: none; color: var(--muted); cursor: pointer; border-radius: 8px; }
.df-btn:hover { color: var(--accent); background: var(--accent-soft); }
.df-wrap .df-native { position: absolute !important; inset: 0; width: 100% !important; height: 100% !important; opacity: 0; pointer-events: none; padding: 0 !important; border: 0 !important; }
.toolbar .df-wrap, .row-inline .df-wrap { flex: 0 0 auto; width: 165px; min-width: 0; }
/* clickable dashboard cards */
a.kpi-link { display: block; color: inherit; text-decoration: none; cursor: pointer; transition: box-shadow .2s, border-color .2s; }
a.kpi-link:hover { border-color: var(--accent); box-shadow: 0 10px 28px -14px var(--accent); }
a.kpi-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
/* a.kpi-link resets colour to inherit, which outranked the tone classes; restore one colour per section */
a.kpi-link.tone-accent { color: var(--accent); } a.kpi-link.tone-gold { color: var(--gold); } a.kpi-link.tone-info { color: var(--info); }
a.kpi-link.tone-violet { color: var(--violet); } a.kpi-link.tone-danger { color: var(--danger); }
.tone-teal .ic { background: color-mix(in srgb, var(--teal, #2dd4bf) 15%, transparent); } a.kpi-link.tone-teal { color: var(--teal, #2dd4bf); }
a.kpi-link[class*='tone-']:hover { border-color: currentColor; box-shadow: 0 10px 28px -14px currentColor; }

/* KPI evaluations */
.kv-lines .input { padding: 7px 9px; }
.kv-lines td.ach { font-weight: 700; white-space: nowrap; }
.kv-hist { margin-top: 10px; font-size: 13px; } .kv-hist summary { cursor: pointer; color: var(--accent); }
.kv-hist ul { margin: 8px 0 0; padding-inline-start: 18px; line-height: 1.8; } .kv-hist small { color: var(--muted); }
.kv-lines select.input { min-width: 128px; }
.kv-lines td:first-child .input { min-width: 200px; }
.modal.wide:has(.kv-lines) { width: min(1100px, 100%); }

.jt-other { margin-top: 6px; }
.kpis-spn { margin-top: -4px; }
.kpis-spn .v { font-size: 26px; }
/* each card group fills its own row(s) evenly — no half-empty last row */
.kpis.kpis-spn { grid-template-columns: repeat(var(--n, 4), minmax(0, 1fr)); }
@media (max-width: 1100px) { .kpis.kpis-spn { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); } }
/* the side panel (employee file) scrolls on its own; the page behind any open window stays still */
.drawer { overflow-y: auto; overscroll-behavior: contain; }
.modal-b { overscroll-behavior: contain; }
html:has(.overlay), body:has(.overlay) { overflow: hidden; }
/* phones: wide tables scroll inside their card instead of widening the page */
.zsteps { grid-template-columns: minmax(0, 1fr); }
.zst-b { overflow-x: auto; }
.gov-grid > *, .set-grid > *, .dash-grid > * { min-width: 0; }
.gov-sec { overflow-x: auto; }
@media (max-width: 760px) { .grid2[style*="repeat(3"] { grid-template-columns: 1fr 1fr !important; } }
@media (max-width: 480px) { .grid2[style*="repeat(3"] { grid-template-columns: 1fr !important; } }
/* windows never grow past the screen: wide tables (invoice / journal / KPI lines) scroll inside them */
.overlay > .modal, .overlay > .drawer { min-width: 0; max-width: 100%; }
.modal-b { min-width: 0; }
.modal-b .table-scroll { max-width: 100%; }
.modal.wide:has(.jv-lines) { width: min(1100px, 100%); }

/* Saudi labor-market news strip */

/* AXIS HR LEGAL workspace */
.legal-head { align-items: end; gap: 12px; }
.legal-head .grow { min-width: 220px; display: grid; gap: 6px; }
.legal-entity-summary { margin-bottom: 14px; border-color: color-mix(in srgb, var(--accent) 24%, var(--line)); }
.legal-entity-summary > .row { display: flex; align-items: center; gap: 14px; }
.legal-entity-summary .meta { flex: 1; min-width: 0; display: grid; gap: 3px; }
.legal-entity-summary .meta b { font-size: 16px; font-weight: 700; }
.legal-entity-summary .meta small { color: var(--muted); font-size: 12.5px; }
.legal-entity-summary .tag:empty { display: none; }
.legal-entity-summary .ic, .list-item > .ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; flex: none; background: var(--surface2); }
.legal-entity-summary .ic { width: 46px; height: 46px; border-radius: 14px; }
.legal-entity-summary .ic svg { width: 22px; height: 22px; }
.list-item > .ic svg { width: 18px; height: 18px; }
.list-item > .ic.tone-info { background: var(--info-soft); }
.list-item > .ic.tone-violet { background: var(--violet-soft); }
.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 18px; }
.kpi-grid .kpi { display: grid; gap: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow-sm, none); color: var(--accent); }
.kpi-grid .kpi .ic { background: var(--accent-soft); margin-bottom: 8px; }
.kpi-grid .kpi small { order: 2; color: var(--muted); font-size: 13px; }
.kpi-grid .kpi b { order: 1; font-family: var(--display); font-size: 28px; font-weight: 700; line-height: 1.1; color: var(--text); }
.kpi-grid .kpi:nth-child(2) { color: var(--info); } .kpi-grid .kpi:nth-child(2) .ic { background: var(--info-soft); }
.kpi-grid .kpi:nth-child(3) { color: var(--gold); } .kpi-grid .kpi:nth-child(3) .ic { background: var(--gold-soft); }
.kpi-grid .kpi:nth-child(4) { color: var(--danger); } .kpi-grid .kpi:nth-child(4) .ic { background: var(--danger-soft); }
.legal-detail .row { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px dashed var(--line); }
.legal-tabs { flex-wrap: wrap; margin: 12px 0; }
/* the sidebar's Legal Affairs section lists these sections on desktop; keep the in-page tabs for mobile */
@media (min-width: 961px) { .legal-tabs { display: none; } }
@media (max-width: 1100px) { .kpi-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 680px) { .kpi-grid { gap: 10px; } .legal-tabs { flex-wrap: nowrap; overflow-x: auto; } }
.legal-tabs button { white-space: nowrap; }
.legal-item { border-bottom: 1px solid var(--line); padding: 12px 0; }
.legal-item:last-child { border-bottom: 0; }
.legal-detail { display: grid; gap: 12px; }
.legal-detail .grid2 > div { display: grid; gap: 5px; padding: 10px; border-radius: 10px; background: var(--surface2); }
.legal-detail small { color: var(--muted); }
@media (max-width: 680px) {
  .legal-head { align-items: stretch; flex-wrap: wrap; }
  .legal-head .grow { flex-basis: 100%; }
  .legal-item { align-items: flex-start; }
}


/* ---------- government sections: reliable mobile viewport ---------- */
@media (max-width: 860px) {
  html, body, #app {
    width: 100%;
    max-width: 100%;
    overflow-x: clip;
  }
  .shell {
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: clip;
  }
  .main {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: clip;
  }
  .content {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: clip;
  }
  /* Keep the drawer fully outside the viewport when closed. It is anchored to
     the inline-start edge (right in Arabic, left in English) and slides out that way. */
  .sidebar {
    position: fixed;
    inset-block: 0;
    inset-inline-start: 0;
    inset-inline-end: auto;
    width: min(300px, calc(100vw - 48px));
    max-width: calc(100vw - 24px);
    height: 100dvh;
    max-height: 100dvh;
    min-width: 0;
    overflow: hidden;
    transform: translate3d(110%, 0, 0);
    transition: transform .28s ease;
    z-index: 30;
  }
  [dir='ltr'] .sidebar {
    inset-inline-start: 0;
    inset-inline-end: auto;
    transform: translate3d(-110%, 0, 0);
  }
  .shell.nav-open .sidebar {
    transform: translate3d(0, 0, 0);
  }
  .nav {
    min-width: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  .nav-group, .nav-sec, .nav-group-items {
    min-width: 0;
    max-width: 100%;
  }
  .nav-sec-label, .nav a span {
    min-width: 0;
    overflow-wrap: anywhere;
  }
  .gov-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .gov-grid > *, .gov-sec, .kpi-grid > * {
    min-width: 0;
    max-width: 100%;
  }
  .gov-sec {
    overflow-x: auto;
    overscroll-behavior-x: contain;
  }
  .kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ---------- AXIS HR Fleet (Tamm) ---------- */
.fleet-issues { display: flex; flex-direction: column; }
.fleet-issue { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.fleet-issue:last-child { border-bottom: 0; }
.fleet-issue .ic { flex: 0 0 34px; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: color-mix(in srgb, currentColor 14%, transparent); }
.fleet-issue .ic svg { width: 18px; height: 18px; }
.fleet-issue .meta { flex: 1; min-width: 0; color: var(--text); line-height: 1.7; }
.fleet-issue .meta .chip { margin-inline-end: 6px; }
.fleet-issue .acts { flex: 0 0 auto; }
.fleet-tabs { flex-wrap: wrap; }
.fleet-tabs button, .fleet-filter button { white-space: nowrap; }
.fleet-payroll { margin-bottom: 14px; }
.fleet-payroll .row > svg { width: 18px; height: 18px; color: var(--accent); }
@media (max-width: 680px) {
  .fleet-issue { flex-wrap: wrap; align-items: flex-start; }
  .fleet-issue .acts { flex-basis: 100%; display: flex; justify-content: flex-end; }
  .fleet-tabs, .fleet-filter { flex-wrap: nowrap; overflow-x: auto; width: 100%; scrollbar-width: none; }
  .fleet-tabs button, .fleet-filter button { flex: 0 0 auto; }
}


/* Centered, top-down organisation chart */
.org-chart-card { overflow: hidden; }
.org-chart { width: 100%; overflow-x: auto; overflow-y: visible; padding: 30px 24px 42px; }
.org-chart .org-root { position: relative; width: max-content; min-width: 220px; margin: 0 auto 46px; padding: 18px 28px; border: 1px solid var(--line2); border-radius: 18px; background: var(--surface); box-shadow: var(--shadow-sm); }
.org-chart .org-root::after { content: ''; position: absolute; left: 50%; bottom: -47px; height: 46px; border-left: 2px solid var(--line2); }
.org-chart .tree, .org-chart .tree ul { display: flex; justify-content: center; align-items: flex-start; width: max-content; min-width: 100%; list-style: none; margin: 0; padding: 0; }
.org-chart .tree { padding-top: 0; }
.org-chart .tree li { position: relative; display: flex; flex-direction: column; align-items: center; flex: 0 0 auto; padding: 28px 16px 0; }
.org-chart .tree > li::before, .org-chart .tree ul > li::before { content: ''; position: absolute; top: 0; left: 50%; height: 28px; border-left: 2px solid var(--line2); }
.org-chart .tree > li::after, .org-chart .tree ul > li::after { content: ''; position: absolute; top: 0; left: 0; right: 0; border-top: 2px solid var(--line2); }
.org-chart .tree > li:first-child::after, .org-chart .tree ul > li:first-child::after { left: 50%; }
.org-chart .tree > li:last-child::after, .org-chart .tree ul > li:last-child::after { right: 50%; }
.org-chart .tree > li:only-child::after, .org-chart .tree ul > li:only-child::after { display: none; }
.org-chart .tree li > ul { position: relative; margin: 0; padding-top: 28px; }
.org-chart .tree li > ul::before { content: ''; position: absolute; top: 0; left: 50%; height: 28px; border-left: 2px solid var(--line2); }
.org-chart .org-node { position: relative; z-index: 1; display: flex; align-items: center; gap: 10px; width: 258px; max-width: 258px; min-height: 94px; padding: 14px; border: 1px solid var(--line2); border-inline-start: 4px solid var(--c, var(--accent)); border-radius: 16px; background: var(--surface); box-shadow: 0 5px 18px rgba(0,0,0,.055); }
.org-chart .org-node .meta { text-align: start; }
.org-chart .org-node .meta b { font-size: 14px; }
.org-chart .org-emps { justify-content: center; max-width: 270px; padding: 10px 0 0; }
.org-chart .org-emps button { background: var(--surface); }
@media (max-width: 760px) {
  .org-chart { padding: 22px 12px 32px; }
  .org-chart .tree li { padding-inline: 9px; }
  .org-chart .org-node { width: 224px; max-width: 224px; }
  .org-chart .org-emps { max-width: 230px; }
}

/* ---------- phones: any wide table that isn't in a .table-scroll / card layout
   scrolls sideways inside its own box instead of being clipped by the page ---------- */
@media (max-width: 860px) {
  div:has(> table.t:not(.cards)) { overflow-x: auto; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; }
  .card:has(> table.t:not(.cards)) { max-width: 100%; }
  /* columns keep a readable width (no word-per-line names); long text still wraps */
  table.t:not(.cards, .jv-lines, .kv-lines, .map-table) { width: max-content; min-width: 100%; }
  table.t:not(.cards) td small, table.t:not(.cards) td p { display: inline-block; max-width: 240px; white-space: normal; }
  /* card-layout rows: long values wrap instead of pushing the row wider than the screen */
  .t.cards td { min-width: 0; overflow-wrap: anywhere; }
  .t.cards td > * { min-width: 0; }
  .t.cards td[data-l]::before { flex: 0 0 auto; }
}

/* ---------- full-screen tablet mode (waiter, kitchen, delivery, till) ---------- */
body.kiosk .sidebar, body.kiosk .topbar { display: none !important; }
body.kiosk .shell { display: block; }
body.kiosk .content { padding: 12px 14px 74px; max-width: none; }
#kioskExit { position: fixed; bottom: max(12px, env(safe-area-inset-bottom)); inset-inline-start: 12px; z-index: 55; box-shadow: var(--shadow); background: var(--surface); }
#kioskExit[hidden] { display: none; }

/* employee data review (v-review.js) */
.rv-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.rv-between { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.rv-muted { color: var(--muted); }
.rv-small { font-size: 12.5px; }
.rv-pad { padding: 18px; margin-bottom: 16px; }
.rv-req { padding: 14px; margin-top: 12px; border: 1px solid var(--line); border-radius: 12px; }
.rv-req .t td, .rv-req .t th { padding: 8px 10px; }
.rv-pad h3 { margin: 0 0 10px; }
@media (max-width: 860px) { .rv-pad .input, .table-card .t.cards .input { width: 100%; min-width: 0 !important; } }

/* employees: filter by any column (v-main.js) */
.cf-badge { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; }
.cf-chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: -4px 0 14px; }
.cf-chip { display: inline-flex; align-items: center; border: 1px solid var(--accent); background: var(--accent-soft); color: var(--accent); border-radius: 999px; font-size: 12.5px; overflow: hidden; }
.cf-chip button { background: none; border: 0; color: inherit; cursor: pointer; font: inherit; }
.qf-row { display: flex; gap: 8px; align-items: center; margin: -2px 0 12px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.qf-row::-webkit-scrollbar { display: none; }
.qf-l { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); white-space: nowrap; flex: none; } .qf-l svg { width: 15px; height: 15px; }
.qf-b { flex: none; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface2); color: var(--text); font: inherit; font-size: 12.5px; cursor: pointer; transition: border-color .15s, background .15s; }
.qf-b:hover { border-color: var(--accent); } .qf-b.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); font-weight: 700; }
.qf-b .qf-c { opacity: .5; font-size: 10px; } .qf-b svg { width: 14px; height: 14px; } .qf-more { border-style: dashed; color: var(--muted); }
.cf-range { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.cf-presets { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.cf-or { font-size: 12px; color: var(--faint); margin: 12px 0 0; display: flex; align-items: center; gap: 8px; } .cf-or::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.cf-edit { padding: 5px 10px 5px 4px; padding-inline: 12px 4px; }
.cf-x { display: grid; place-items: center; padding: 5px 8px; }
.cf-x svg { width: 13px; height: 13px; }
.cf-list { max-height: 340px; overflow-y: auto; border: 1px solid var(--line); border-radius: 10px; }
.cf-opt { display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-bottom: 1px solid var(--line); cursor: pointer; }
.cf-opt:last-child { border-bottom: 0; }
.cf-opt:hover { background: var(--surface2); }
.cf-opt span:first-of-type { flex: 1; }
.cf-n { color: var(--muted); font-size: 12px; }
.cf-empty { color: var(--muted); font-style: italic; }

/* ---------- housing capacity (dashboard) ---------- */
.hc-card { margin-bottom: 18px; animation: rise .6s var(--ease) both; }
.hc-c-info { --hc: var(--info); --hc-soft: var(--info-soft); }
.hc-c-violet { --hc: var(--violet); --hc-soft: var(--violet-soft); }
.hc-total { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 16px; }
.hc-tk { position: relative; padding: 14px 16px; border-radius: var(--radius-sm); background: var(--surface2); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.hc-tk small { color: var(--muted); font-size: 12px; }
.hc-tk span { font-family: var(--display); font-size: 26px; font-weight: 700; line-height: 1.1; }
.hc-tk em { font-style: normal; color: var(--faint); font-size: 12px; }
.hc-tk-left { background: var(--teal-soft); border-color: color-mix(in srgb, var(--teal) 35%, transparent); }
.hc-tk-left span { color: var(--teal); }
.hc-tk-rate .hc-bar { margin-top: 6px; }
.hc-sites { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.hc-site { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; background: linear-gradient(180deg, var(--hc-soft), transparent 140px), var(--surface); position: relative; overflow: hidden; }
.hc-site::before { content: ''; position: absolute; inset-inline: 0; top: 0; height: 3px; background: var(--hc); opacity: .85; }
.hc-sh { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.hc-sh .spacer { flex: 1; }
.hc-ic { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--hc-soft); color: var(--hc); flex: none; }
.hc-ic svg { width: 21px; height: 21px; }
.hc-st h4 { font-size: 17px; font-weight: 700; }
.hc-st .sub { color: var(--muted); font-size: 12.5px; }
.hc-ring { width: 64px; height: 64px; flex: none; }
.hc-ring circle { fill: none; stroke-width: 7; }
.hc-ring .trk { stroke: var(--line2); }
.hc-ring .val { stroke: var(--hc); stroke-linecap: round; transition: stroke-dasharray .8s var(--ease); }
.hc-ring text { fill: var(--text); font-family: var(--display); font-size: 15px; font-weight: 700; }
.hc-nums { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 10px; }
.hc-nums > div { display: flex; flex-direction: column; align-items: center; padding: 8px 4px; border-radius: 12px; background: var(--surface2); }
.hc-nums span { font-family: var(--display); font-size: 22px; font-weight: 700; line-height: 1.15; }
.hc-nums small { color: var(--muted); font-size: 12px; }
.hc-left.lvl-low span, .hc-left.lvl-mid span { color: var(--teal); }
.hc-left.lvl-high span { color: var(--warn); }
.hc-left.lvl-full span { color: var(--danger); }
.hc-bar { height: 8px; border-radius: 99px; background: var(--line); overflow: hidden; margin-bottom: 14px; }
.hc-tk .hc-bar { margin-bottom: 0; }
.hc-bar span { display: block; height: 100%; border-radius: inherit; background: var(--teal); transition: width .8s var(--ease); }
.hc-bar.lvl-mid span { background: var(--gold); }
.hc-bar.lvl-high span { background: var(--warn); }
.hc-bar.lvl-full span { background: var(--danger); }
.hc-floor + .hc-floor { margin-top: 12px; }
.hc-fh { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 8px; font-size: 13px; }
.hc-fh b { font-weight: 600; }
.hc-fh span { color: var(--muted); font-size: 12px; }
.hc-fh span b { color: var(--teal); font-weight: 700; }
.hc-rooms { display: grid; grid-template-columns: repeat(var(--cols, 6), minmax(0, 1fr)); gap: 8px; }
.hc-room { border: 1px solid var(--line); border-radius: 12px; padding: 8px 9px; background: var(--surface2); display: flex; flex-direction: column; gap: 6px; min-height: 74px; transition: transform .15s var(--ease), border-color .2s; }
.hc-room:hover { transform: translateY(-2px); border-color: var(--line2); }
.hc-rh { display: flex; align-items: center; justify-content: space-between; gap: 4px; }
.hc-rn { font-family: var(--display); font-weight: 700; font-size: 15px; color: var(--text); }
.hc-rc { font-size: 12.5px; font-weight: 600; }
.hc-rc small { color: var(--muted); font-weight: 400; }
.hc-rs { font-size: 11.5px; color: var(--muted); line-height: 1.2; }
.hc-dots { display: flex; flex-wrap: wrap; gap: 4px; }
.hc-dots i, .hc-legend i { width: 10px; height: 10px; border-radius: 3px; border: 1.5px solid var(--teal); background: transparent; display: inline-block; }
.hc-dots i.on, .hc-legend i.on { background: var(--hc, var(--info)); border-color: var(--hc, var(--info)); }
.hc-dots i.x, .hc-legend i.x { background: var(--danger); border-color: var(--danger); }
.hc-room.empty { border-color: color-mix(in srgb, var(--teal) 45%, transparent); background: var(--teal-soft); }
.hc-room.empty .hc-rs, .hc-room.part .hc-rs { color: var(--teal); font-weight: 600; }
.hc-room.full { background: var(--surface); }
.hc-room.full .hc-rs { color: var(--muted); }
.hc-room.full .hc-dots i { opacity: .7; }
.hc-room.over { border-color: var(--danger); background: var(--danger-soft); }
.hc-room.over .hc-rs { color: var(--danger); font-weight: 600; }
.hc-room.off { border-style: dashed; background: transparent; opacity: .7; justify-content: center; align-items: center; text-align: center; }
.hc-note { display: flex; gap: 8px; align-items: flex-start; margin-top: 12px; padding: 10px 12px; border-radius: 12px; background: var(--warn-soft); color: var(--warn); font-size: 12.5px; }
.hc-note svg { width: 16px; height: 16px; flex: none; margin-top: 2px; }
.hc-note span { color: var(--text); }
.hc-legend { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 14px; color: var(--muted); font-size: 12px; }
.hc-legend span { display: inline-flex; align-items: center; gap: 6px; }
.hc-legend i.on { --hc: var(--muted); }
@media (max-width: 1100px) { .hc-sites { grid-template-columns: 1fr; } }
@media (min-width: 1101px) and (max-width: 1400px) { .hc-rooms { grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); } }
@media (max-width: 760px) { .hc-total { grid-template-columns: 1fr 1fr; } .hc-tk-cost { grid-column: 1 / -1; } .hc-tk span { font-size: 22px; } .hc-rooms { grid-template-columns: repeat(auto-fill, minmax(68px, 1fr)); } }

/* ---------- side-by-side page layouts: a wide table inside one column scrolls in its
   own box instead of stretching the column (and the page) past the screen edge.
   Without min-width:0 a grid/flex column grows to its widest content, and in Arabic
   the extra width spills off the left side where it can't be scrolled to. ---------- */
.ht-two > *, .dash-grid > *, .gov-grid > *, .set-grid > *, .hc-sites > *, .lt-grid > *,
.grid2 > *, .kv > *, .pos > *, .rs > *, .kds > * { min-width: 0; }
.card.table-card { max-width: 100%; }

/* ---------------- the room board as a control surface ---------------- */
/* The legend used to be a key to the colours. It is the filter now, so it has to look pressable. */
.ht-legend { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; padding: 8px 0 }
.ht-leg { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border: 1px solid var(--line);
  border-radius: 999px; background: var(--surface2); color: var(--text); font-size: 12px; cursor: pointer }
.ht-leg:hover { border-color: var(--accent) }
.ht-leg.on { border-color: var(--accent); background: var(--accent-soft) }
.ht-leg b { font-variant-numeric: tabular-nums }
.ht-leg i { width: 10px; height: 10px; border-radius: 2px; display: inline-block }
/* a board of coloured squares does not look like something you press, so it says so */
.ht-hint { color: var(--faint); font-size: 12px; line-height: 1.7; padding: 0 0 8px }

/* ---------- AXIS AI floating assistant (public/js/nx-ai.js) ---------- */
.nxai { --nxai-gap: 20px; position: fixed; z-index: 45; inset-inline-end: var(--nxai-gap); bottom: max(var(--nxai-gap), env(safe-area-inset-bottom)); font-size: 14px; }
.nxai.nxai-unavailable, body.kiosk .nxai { display: none; }
.nxai-fab { width: 56px; height: 56px; border-radius: 50%; border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent); cursor: pointer; display: grid; place-items: center;
  background: radial-gradient(120% 120% at 30% 20%, color-mix(in srgb, var(--gold) 85%, #fff 15%), var(--accent) 60%, color-mix(in srgb, var(--accent) 70%, #000 30%));
  color: var(--accent-ink); box-shadow: 0 14px 34px -12px color-mix(in srgb, var(--accent) 70%, transparent), var(--shadow); transition: transform .2s var(--ease), box-shadow .2s var(--ease); }
.nxai-fab svg { width: 26px; height: 26px; }
.nxai-fab:hover { transform: translateY(-2px) scale(1.04); }
.nxai-fab:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 50%, transparent); outline-offset: 3px; }
.nxai.is-open .nxai-fab { transform: scale(.88); opacity: .0; pointer-events: none; }
.nxai.is-open.is-min .nxai-fab { opacity: 0; }
.nxai-panel { position: absolute; bottom: 0; inset-inline-end: 0; width: min(420px, calc(100vw - 2 * var(--nxai-gap))); height: min(640px, calc(100vh - 110px)); display: none; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line2); border-radius: 22px; box-shadow: 0 30px 70px -24px rgba(0, 0, 0, .55), var(--shadow); overflow: hidden; animation: rise .22s var(--ease); }
.nxai.is-open .nxai-panel { display: flex; }
.nxai.is-min .nxai-panel { height: auto; }
.nxai.is-min .nxai-body, .nxai.is-min .nxai-foot { display: none; }
.nxai.is-min .nxai-head { cursor: pointer; }
.nxai-head { display: flex; align-items: center; gap: 10px; padding: 12px 12px 12px 14px; border-bottom: 1px solid var(--line); background: linear-gradient(180deg, var(--accent-soft), transparent); }
.nxai-logo { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); flex: none; }
.nxai-logo svg { width: 19px; height: 19px; }
.nxai-t { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.25; }
.nxai-t b { font-family: var(--display); font-size: 15px; letter-spacing: .02em; }
.nxai-t small { color: var(--muted); font-size: 11.5px; }
.nxai-tools { display: flex; gap: 2px; }
.nxai.is-min .nxai-tools [data-nxa=min] svg { transform: rotate(180deg); }
.nxai-body { flex: 1; overflow-y: auto; padding: 16px 14px; display: flex; flex-direction: column; gap: 10px; overscroll-behavior: contain; }
.nxai-msg { display: flex; }
.nxai-msg.nxai-me { justify-content: flex-end; }
.nxai-bubble { max-width: 88%; padding: 10px 13px; border-radius: 16px; line-height: 1.65; overflow-wrap: anywhere; }
.nxai-msg.nxai-me .nxai-bubble { background: var(--accent); color: var(--accent-ink); border-end-end-radius: 6px; }
.nxai-msg.nxai-bot .nxai-bubble { max-width: 100%; min-width: 0; background: var(--surface2); border: 1px solid var(--line); border-end-start-radius: 6px; }
.nxai-msg.nxai-err .nxai-bubble { background: var(--danger-soft); border-color: color-mix(in srgb, var(--danger) 30%, transparent); color: var(--text); }
.nxai-bubble p { margin: 0; }
.nxai-bubble ul, .nxai-bubble ol { margin: 4px 0; padding-inline-start: 20px; }
.nxai-bubble li { margin: 2px 0; }
.nxai-bubble code { font-size: 12.5px; background: var(--accent-soft); padding: 1px 5px; border-radius: 6px; }
.nxai-gap { height: 6px; }
.nxai-tw { overflow-x: auto; margin: 6px 0; }
.nxai-tw table { border-collapse: collapse; font-size: 12.5px; min-width: 100%; }
.nxai-tw th, .nxai-tw td { border-bottom: 1px solid var(--line); padding: 5px 8px; text-align: start; white-space: nowrap; }
.nxai-tw th { color: var(--muted); font-weight: 600; }
.nxai-link { border: 0; background: var(--accent-soft); color: var(--accent); border-radius: 8px; padding: 1px 7px; cursor: pointer; font-weight: 600; }
.nxai-link:hover { background: color-mix(in srgb, var(--accent) 22%, transparent); }
.nxai-used { display: flex; align-items: center; gap: 6px; margin-top: 8px; padding-top: 7px; border-top: 1px dashed var(--line2); color: var(--muted); font-size: 11.5px; }
.nxai-used svg { width: 13px; height: 13px; flex: none; }
.nxai-card { margin-top: 10px; border: 1px solid var(--line2); border-radius: 12px; padding: 10px 12px; background: var(--surface); }
.nxai-card.is-danger { border-color: color-mix(in srgb, var(--danger) 45%, transparent); }
.nxai-card-h { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.nxai-card-h svg { width: 15px; height: 15px; flex: none; color: var(--gold, currentColor); }
.nxai-card.is-danger .nxai-card-h svg { color: var(--danger); }
.nxai-card-h small { color: var(--muted); font-size: 11.5px; flex-basis: 100%; }
.nxai-card dl { display: grid; grid-template-columns: max-content 1fr; gap: 3px 10px; margin: 8px 0 0; font-size: 12.5px; }
.nxai-card dt { color: var(--muted); }
.nxai-card dd { margin: 0; overflow-wrap: anywhere; }
.nxai-card-b { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.nxai-card-b .btn svg { width: 14px; height: 14px; }
.nxai-card-s { margin-top: 9px; font-size: 12.5px; font-weight: 600; }
.nxai-card-s.ok { color: var(--accent, #2dd4bf); }
.nxai-card-s.bad { color: var(--danger); }
.nxai-card-s.muted { color: var(--muted); font-weight: 500; }
.nxai-typing { display: flex; align-items: center; gap: 4px; }
.nxai-typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); animation: nxaiDot 1.2s infinite ease-in-out; }
.nxai-typing span:nth-child(2) { animation-delay: .15s; } .nxai-typing span:nth-child(3) { animation-delay: .3s; }
.nxai-typing small { color: var(--muted); margin-inline-start: 6px; }
@keyframes nxaiDot { 0%, 80%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
.nxai-empty { margin: auto 0; text-align: center; padding: 10px 6px; color: var(--muted); }
.nxai-empty h3 { color: var(--text); font-size: 17px; margin: 10px 0 6px; }
.nxai-empty p { margin: 0 auto; max-width: 320px; line-height: 1.7; }
.nxai-badge { width: 54px; height: 54px; margin: 0 auto; border-radius: 18px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.nxai-badge svg { width: 28px; height: 28px; }
.nxai-sugg { display: flex; flex-wrap: wrap; justify-content: center; gap: 7px; margin-top: 16px; }
.nxai-sugg button { border: 1px solid var(--line2); background: var(--surface2); color: var(--text); border-radius: 999px; padding: 7px 12px; cursor: pointer; font-size: 13px; transition: border-color .15s, background .15s; }
.nxai-sugg button:hover { border-color: var(--accent); background: var(--accent-soft); }
.nxai-foot { display: flex; gap: 8px; align-items: flex-end; padding: 10px; border-top: 1px solid var(--line); background: var(--surface); }
.nxai-foot textarea { flex: 1; resize: none; min-height: 42px; max-height: 140px; padding: 10px 12px; border-radius: 14px; border: 1px solid var(--line2); background: var(--surface2); outline: none; line-height: 1.5; }
.nxai-foot textarea::placeholder { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--faint); }
.nxai-foot textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.nxai-send { width: 42px; height: 42px; padding: 0; border-radius: 14px; flex: none; display: grid; place-items: center; }
.nxai-send svg { width: 18px; height: 18px; }
@media (max-width: 640px) {
  .nxai { --nxai-gap: 14px; }
  .nxai-fab { width: 52px; height: 52px; }
  .nxai.is-open:not(.is-min) { inset: 0; }
  .nxai.is-open:not(.is-min) .nxai-panel { position: fixed; inset: 0; width: 100%; height: 100%; height: 100dvh; border-radius: 0; border: 0; }
  .nxai-head { padding-top: max(12px, env(safe-area-inset-top)); }
  .nxai-foot { padding-bottom: max(10px, env(safe-area-inset-bottom)); }
  .nxai-foot textarea { font-size: 16px; } /* no zoom-on-focus on iOS */
}
@media (prefers-reduced-motion: reduce) { .nxai-panel, .nxai-fab, .nxai-typing span { animation: none; transition: none; } }
@media print { .nxai { display: none !important; } }

/* ---------- employee self-service profile (Settings → Account) ---------- */
.pf-wrap { display: grid; gap: 16px; margin-top: 16px; }
.pf-head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.pf-head small { display: block; color: var(--muted); }
.pf-head .avatar, .pf-photo { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; flex: none; font-size: 22px; }
.pf-info { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 4px; font-size: 13px; }
.pf-d { color: var(--muted); margin: 0 0 12px; line-height: 1.7; }
.pf-q { align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.pf-q p { margin: 6px 0 2px; }
.pf-wrap .list-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.pf-wrap .list-row:last-child { border-bottom: 0; }
.pf-wrap .list-row > div { min-width: 0; }
.pf-wrap .list-row small { display: block; color: var(--muted); margin-top: 2px; }
.pf-wrap .pf-q small { display: inline; }
.pf-wrap .pf-q > div > small:last-child { display: block; }

/* =================== AXIS HR dashboards (public/js/dash-kit.js) =================== */
.dk { --dk-bg: #0A1027; --dk-card: rgba(255,255,255,.06); --dk-line: rgba(255,255,255,.11); --dk-text: #F2F4FA; --dk-muted: rgba(225,231,247,.62); --dk-gold: #F0D58C; --dk-acc: #7C9BFF;
  --dk-good: #3DDC97; --dk-bad: #FF6B7A; --dk-warn: #FBBF5A; --dk-kpi: var(--dk-card); --dk-kpi-line: var(--dk-line); --dk-shadow: 0 10px 30px -16px rgba(0,0,0,.75);
  position: relative; isolation: isolate; color: var(--dk-text); background: var(--dk-bg); border-radius: 24px; padding: 18px; margin-bottom: 16px; overflow: hidden; }
.dk::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; }
/* glass */
.dk-glass { --dk-bg: linear-gradient(160deg,#0B1636 0%,#0A1027 55%,#120F2A 100%); }
.dk-glass::before { background: radial-gradient(45% 35% at 88% 4%, rgba(59,91,219,.42), transparent 70%), radial-gradient(40% 30% at 6% 70%, rgba(201,162,75,.20), transparent 70%); }
.dk-glass .dk-kpi, .dk-glass .dk-card { backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: var(--dk-shadow), inset 0 1px 0 rgba(255,255,255,.09); }
/* royal */
.dk-royal { --dk-bg: radial-gradient(120% 70% at 85% 0%, #16285A 0%, #0A1430 55%, #070E22 100%); --dk-card: linear-gradient(180deg,#12204A,#0E1A3D); --dk-line: #1F3268; --dk-acc: #5B8CFF; --dk-gold: #E9C977;
  --dk-kpi: linear-gradient(150deg,#1E3A8A 0%,#162C6B 55%,#11234F 100%); --dk-kpi-line: rgba(120,150,255,.24); }
.dk-royal .dk-kpi { box-shadow: 0 12px 26px -14px rgba(30,64,175,.95), inset 0 1px 0 rgba(255,255,255,.08); }
.dk-royal .dk-kpi.dk-t-gold { background: linear-gradient(150deg,#2A3D7A,#18285A); border-color: rgba(233,201,119,.6); box-shadow: 0 0 0 1px rgba(233,201,119,.14), 0 12px 26px -12px rgba(201,162,75,.55); }
/* calm */
.dk-calm { --dk-bg: #0C1324; --dk-card: #121B33; --dk-line: #1D2846; --dk-acc: #3B6BF0; --dk-gold: #D4B26A; --dk-text: #E6EAF3; --dk-kpi: #121B33; --dk-shadow: none; }
.dk-calm .dk-kpi { border-top: 2px solid var(--dk-acc); }
.dk-calm .dk-kpi.dk-t-gold { border-top-color: var(--dk-gold); } .dk-calm .dk-kpi.dk-t-red { border-top-color: var(--dk-bad); } .dk-calm .dk-kpi.dk-t-green { border-top-color: var(--dk-good); }
/* light theme versions */
[data-theme='light'] .dk { --dk-text: #0E1A3D; --dk-muted: #5B6685; --dk-line: rgba(14,26,61,.10); --dk-gold: #A57A1C; --dk-good: #0E9F6E; --dk-bad: #D93D52; --dk-warn: #B7791F; --dk-shadow: 0 10px 28px -18px rgba(14,26,61,.35); }
[data-theme='light'] .dk-glass { --dk-bg: linear-gradient(160deg,#EEF2FC 0%,#F6F7FB 60%,#F8F3E8 100%); --dk-card: rgba(255,255,255,.72); --dk-kpi: rgba(255,255,255,.78); --dk-acc: #3555D6; }
[data-theme='light'] .dk-glass::before { background: radial-gradient(45% 35% at 88% 4%, rgba(59,91,219,.16), transparent 70%), radial-gradient(40% 30% at 6% 70%, rgba(201,162,75,.14), transparent 70%); }
[data-theme='light'] .dk-royal { --dk-bg: linear-gradient(180deg,#F1F4FB,#F7F8FC); --dk-card: #fff; --dk-line: #E1E6F2; --dk-acc: #2347C5; }
[data-theme='light'] .dk-royal .dk-kpi { --dk-text: #F2F5FF; --dk-muted: rgba(230,236,255,.75); --dk-good: #5EF0B0; --dk-bad: #FF9AA6; color: var(--dk-text); }
[data-theme='light'] .dk-royal .dk-kpi.dk-t-gold .dk-v { color: #F3D98F; }
[data-theme='light'] .dk-calm { --dk-bg: #F5F7FB; --dk-card: #fff; --dk-kpi: #fff; --dk-line: #E3E8F1; --dk-acc: #2F5BD3; }
/* header + filters */
.dk-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.dk-head h2 { font-size: 20px; margin: 0; font-weight: 800; letter-spacing: .01em; }
.dk-head small { color: var(--dk-muted); font-size: 12.5px; }
.dk-actions { display: flex; align-items: center; gap: 6px; }
.dk-actions .icon-btn { background: var(--dk-card); border-color: var(--dk-line); color: var(--dk-text); }
.dk-upd { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--dk-muted); margin-inline-end: 4px; }
.dk-upd svg { width: 13px; height: 13px; }
.dk-filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 14px; }
.dk-seg { display: flex; gap: 4px; padding: 4px; border-radius: 999px; background: var(--dk-card); border: 1px solid var(--dk-line); overflow-x: auto; max-width: 100%; scrollbar-width: none; }
.dk-seg button { border: 0; background: none; color: var(--dk-muted); padding: 6px 13px; border-radius: 999px; cursor: pointer; font: inherit; font-size: 12.5px; white-space: nowrap; }
.dk-seg button.on { background: color-mix(in srgb, var(--dk-gold) 20%, transparent); color: var(--dk-gold); font-weight: 700; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--dk-gold) 45%, transparent); }
.dk-royal .dk-seg button.on { background: linear-gradient(90deg,#C9A24B,#E9C977); color: #1A1405; box-shadow: none; }
.dk-calm .dk-seg button.on { background: var(--dk-acc); color: #fff; box-shadow: none; }
.dk-filters .input { background: var(--dk-card); border-color: var(--dk-line); color: var(--dk-text); height: 36px; padding: 0 10px; border-radius: 12px; font-size: 13px; }
.dk-sel { max-width: 220px; }
.dk-custom { display: inline-flex; align-items: center; gap: 6px; color: var(--dk-muted); }
/* KPI cards */
.dk-kpis { display: grid; grid-template-columns: repeat(var(--dk-cols, 4), minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
@media (max-width: 1100px) { .dk-kpis { grid-template-columns: repeat(auto-fill, minmax(178px, 1fr)); } }
.dk-kgroup { margin-bottom: 4px; }
.dk-kgroup-h { display: flex; align-items: center; gap: 10px; font-size: 12.5px; font-weight: 700; color: var(--dk-muted, var(--muted)); margin: 2px 4px 8px; }
.dk-kgroup-h::after { content: ''; flex: 1; height: 1px; background: var(--dk-line, var(--line)); }
.dk-kpi { position: relative; text-align: start; display: flex; flex-direction: column; gap: 2px; padding: 14px 14px 12px; border-radius: 18px; border: 1px solid var(--dk-kpi-line); background: var(--dk-kpi); color: inherit; font: inherit; cursor: default; overflow: hidden; transition: transform .18s ease, box-shadow .18s ease; }
.dk-kpi[data-dkgo] { cursor: pointer; }
.dk-kpi[data-dkgo]:hover { transform: translateY(-2px); }
.dk-kpi[data-dkgo]::after { content: "↗"; position: absolute; bottom: 10px; inset-inline-end: 12px; font-size: 12px; color: var(--dk-muted); opacity: 0; transition: opacity .15s; }
.dk-kpi[data-dkgo]:hover::after { opacity: 1; }
.dk-ic { position: absolute; top: 12px; inset-inline-end: 12px; width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; background: color-mix(in srgb, var(--dk-acc) 26%, transparent); color: var(--dk-text); }
.dk-ic svg { width: 16px; height: 16px; }
.dk-t-gold .dk-ic { background: color-mix(in srgb, var(--dk-gold) 22%, transparent); color: var(--dk-gold); }
.dk-t-red .dk-ic { background: color-mix(in srgb, var(--dk-bad) 20%, transparent); color: var(--dk-bad); }
.dk-t-green .dk-ic { background: color-mix(in srgb, var(--dk-good) 20%, transparent); color: var(--dk-good); }
.dk-l { font-size: 12.5px; color: var(--dk-muted); padding-inline-end: 36px; line-height: 1.4; }
.dk-v { font-size: 27px; font-weight: 800; letter-spacing: -.01em; font-variant-numeric: tabular-nums; margin-top: 4px; line-height: 1.15; }
.dk-t-gold .dk-v { color: var(--dk-gold); } .dk-t-red .dk-v { color: var(--dk-bad); }
.dk-t-green .dk-v { color: var(--dk-good); }
.dk-t-blue .dk-ic { background: color-mix(in srgb, #5B8CFF 22%, transparent); color: #8DB0FF; } .dk-t-blue .dk-v { color: #8DB0FF; }
.dk-d { font-size: 11.5px; font-weight: 700; color: var(--dk-muted); min-height: 16px; }
.dk-d span { font-weight: 500; opacity: .8; }
.dk-d.good { color: var(--dk-good); } .dk-d.bad { color: var(--dk-bad); }
.dk-h { font-size: 11px; color: var(--dk-muted); }
/* cards grid */
.dk-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 12px; }
.dk-card { grid-column: span 6; min-width: 0; background: var(--dk-card); border: 1px solid var(--dk-line); border-radius: 20px; padding: 14px 16px 16px; box-shadow: var(--dk-shadow); }
.dk-card.dk-wide { grid-column: span 12; }
.dk-card header { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 10px; }
.dk-card h3 { margin: 0; font-size: 14.5px; font-weight: 800; }
.dk-card header small { color: var(--dk-muted); font-size: 11.5px; }
@media (min-width: 1200px) { .dk-card.dk-third { grid-column: span 4; } }
@media (max-width: 900px) { .dk-card { grid-column: span 12; } }
@media (max-width: 640px) { .dk { padding: 14px 12px; border-radius: 18px; } .dk-kpis { grid-template-columns: 1fr 1fr; gap: 9px; } .dk-v { font-size: 22px; } .dk-kpi { padding: 12px 11px 10px; } .dk-upd { display: none; } }
/* charts */
.dk-chart svg { width: 100%; display: block; overflow: visible; }
.dk-grid line, .dk-chart .dk-grid line { stroke: var(--dk-line); }
.dk-chart text { fill: var(--dk-muted); font-size: 10.5px; font-family: inherit; }
.dk-bar { transition: opacity .15s; } .dk-chart g[data-dktip]:hover .dk-bar { opacity: .82; }
.dk-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 8px; font-size: 12px; color: var(--dk-muted); }
.dk-legend span { display: inline-flex; align-items: center; gap: 6px; } .dk-legend b { color: var(--dk-text); font-weight: 700; }
.dk-legend i, .dk-tip i { width: 9px; height: 9px; border-radius: 3px; display: inline-block; }
.dk-donut { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.dk-donut svg { width: 150px; height: 150px; flex: none; }
.dk-donut circle { transition: stroke-width .15s; cursor: pointer; } .dk-donut circle:hover { stroke-width: 18; }
.dk-donut .dk-legend { flex-direction: column; flex: 1; min-width: 140px; }
.dk-dc { fill: var(--dk-text); font-size: 19px; font-weight: 800; } .dk-dl { fill: var(--dk-muted); font-size: 8.5px; }
.dk-hbars, .dk-prog { display: grid; gap: 11px; }
.dk-hb-t { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; } .dk-hb-t span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dk-hb-bar { height: 8px; border-radius: 9px; background: color-mix(in srgb, var(--dk-text) 9%, transparent); margin-top: 6px; overflow: hidden; }
.dk-hb-bar i { display: block; height: 100%; border-radius: 9px; background: var(--dk-acc); transition: width .5s ease; }
.dk-hb-bar i.dk-t-gold { background: var(--dk-gold); } .dk-hb-bar i.dk-t-red { background: var(--dk-bad); } .dk-hb-bar i.dk-t-green { background: var(--dk-good); }
.dk-pg small { color: var(--dk-muted); font-size: 11.5px; }
.dk-nodata { display: flex; align-items: center; gap: 10px; justify-content: center; min-height: 120px; color: var(--dk-muted); font-size: 13px; text-align: center; padding: 10px; border: 1px dashed var(--dk-line); border-radius: 14px; }
.dk-nodata svg { width: 18px; height: 18px; opacity: .7; }
.dk-tip { position: absolute; z-index: 5; pointer-events: none; min-width: 120px; max-width: 240px; padding: 8px 10px; border-radius: 12px; font-size: 12px; line-height: 1.6;
  background: rgba(8,14,34,.94); color: #F2F4FA; border: 1px solid rgba(240,213,140,.35); box-shadow: 0 12px 30px -10px rgba(0,0,0,.6); }
.dk-tip div { display: flex; align-items: center; gap: 6px; }
/* insights & tables */
.dk-ins { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.dk-ins li { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; line-height: 1.65; }
.dk-ins b { color: var(--dk-text); font-weight: 800; }
/* dashboard items that open the list already filtered to them */
.dk .dk-go { cursor: pointer; }
.dk .dk-hb.dk-go { border-radius: 10px; padding: 4px 6px; margin: 0 -6px; transition: background .15s; }
.dk .dk-hb.dk-go:hover, .dk .dk-hb.dk-go:focus-visible { background: color-mix(in srgb, var(--dk-text) 7%, transparent); }
.dk circle.dk-go { transition: stroke-width .15s, opacity .15s; } .dk circle.dk-go:hover { stroke-width: 19; }
.dk .dk-legend span.dk-go { padding: 2px 6px; margin: -2px -6px; border-radius: 8px; transition: background .15s; }
.dk .dk-legend span.dk-go:hover, .dk .dk-legend span.dk-go:focus-visible { background: color-mix(in srgb, var(--dk-text) 9%, transparent); color: var(--dk-text); }
.dk g.dk-go:hover .dk-bar { filter: brightness(1.18); }
.dk .dk-ins li.dk-go { border-radius: 10px; padding: 4px 6px; margin: -4px -6px; transition: background .15s; }
.dk .dk-ins li.dk-go:hover, .dk .dk-ins li.dk-go:focus-visible { background: color-mix(in srgb, var(--dk-text) 7%, transparent); }
.dk .dk-go-ar { margin-inline-start: auto; opacity: .45; display: grid; } .dk .dk-go-ar svg { width: 14px; height: 14px; }
[dir=ltr] .dk .dk-go-ar svg { transform: scaleX(-1); }
.dk .dk-ins li.dk-go:hover .dk-go-ar { opacity: 1; }
.dk .dk-table tr[data-act] { cursor: pointer; } .dk .dk-table tr[data-act]:hover td { background: color-mix(in srgb, var(--dk-text) 6%, transparent); }
.dk-dot { width: 9px; height: 9px; border-radius: 50%; margin-top: 7px; flex: none; background: var(--dk-acc); box-shadow: 0 0 0 4px color-mix(in srgb, var(--dk-acc) 18%, transparent); }
.dk-i-bad .dk-dot { background: var(--dk-bad); box-shadow: 0 0 0 4px color-mix(in srgb, var(--dk-bad) 18%, transparent); }
.dk-i-warn .dk-dot { background: var(--dk-warn); box-shadow: 0 0 0 4px color-mix(in srgb, var(--dk-warn) 18%, transparent); }
.dk-i-good .dk-dot { background: var(--dk-good); box-shadow: 0 0 0 4px color-mix(in srgb, var(--dk-good) 18%, transparent); }
.dk-muted { color: var(--dk-muted); font-size: 13px; margin: 4px 0; }
.dk-tw { overflow-x: auto; }
.dk-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.dk-table th { color: var(--dk-muted); font-weight: 600; text-align: start; padding: 6px 8px; border-bottom: 1px solid var(--dk-line); white-space: nowrap; }
.dk-table td { padding: 8px; border-bottom: 1px solid var(--dk-line); white-space: nowrap; }
.dk-table tr:last-child td { border-bottom: 0; }
.dk-pill { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 11px; font-weight: 700; background: color-mix(in srgb, var(--dk-acc) 18%, transparent); color: var(--dk-acc); }
.dk-pill.bad { background: color-mix(in srgb, var(--dk-bad) 16%, transparent); color: var(--dk-bad); } .dk-pill.warn { background: color-mix(in srgb, var(--dk-warn) 18%, transparent); color: var(--dk-warn); } .dk-pill.good { background: color-mix(in srgb, var(--dk-good) 16%, transparent); color: var(--dk-good); }
/* dashboard ⇄ list switch above a section */
.dk-switch { display: inline-flex; gap: 4px; padding: 4px; border-radius: 999px; background: var(--surface2); border: 1px solid var(--line); margin-bottom: 12px; }
.dk-switch button { border: 0; background: none; color: var(--muted); padding: 7px 14px; border-radius: 999px; cursor: pointer; font: inherit; font-size: 13px; display: inline-flex; gap: 6px; align-items: center; }
.dk-switch button.on { background: var(--accent); color: var(--accent-ink); font-weight: 700; }
.dk-switch svg { width: 15px; height: 15px; }
.dk-loading { min-height: 260px; display: grid; place-items: center; color: var(--dk-muted); }
/* PDF: print only the dashboard, with its colours */
@media print {
  body.dk-printing * { visibility: hidden; }
  body.dk-printing #dkRoot, body.dk-printing #dkRoot * { visibility: visible; }
  body.dk-printing #dkRoot { position: absolute; inset: 0 auto auto 0; width: 100%; border-radius: 0; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  body.dk-printing .dk-actions, body.dk-printing .dk-filters .dk-sel { display: none; }
  body.dk-printing .dk-card { break-inside: avoid; }
}
.dk-empty { text-align: center; padding: 48px 16px 40px; display: grid; justify-items: center; gap: 8px; }
.dk-empty > svg { width: 42px; height: 42px; padding: 10px; border-radius: 16px; background: color-mix(in srgb, var(--dk-gold) 16%, transparent); color: var(--dk-gold); box-sizing: content-box; }
.dk-empty h3 { margin: 6px 0 0; font-size: 17px; } .dk-empty p { margin: 0 0 10px; color: var(--dk-muted); max-width: 420px; line-height: 1.7; }
/* housing capacity: rooms open their residents; cost per building */
.hc-room[data-hcroom] { cursor: pointer; transition: transform .15s ease, box-shadow .15s ease; }
.hc-room[data-hcroom]:hover, .hc-room[data-hcroom]:focus-visible { transform: translateY(-2px); box-shadow: 0 8px 20px -10px rgba(0,0,0,.6); outline: none; }
.hc-note[data-hcroom] { cursor: pointer; }
.hc-cost { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 10px 0 2px; padding: 9px 12px; border-radius: 12px; background: color-mix(in srgb, var(--gold) 12%, transparent); font-size: 13px; }
.hc-cost span { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); } .hc-cost svg { width: 15px; height: 15px; }
.hc-cost b { font-size: 16px; color: var(--gold); } .hc-cost small { color: var(--muted); margin-inline-start: auto; }
.hc-mod-sum { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; padding: 12px 14px; border-radius: 12px; background: var(--surface2); }
.hc-mod-sum b { font-size: 17px; }
/* GOSI file vs payroll & wages */
.gc-card { padding: 18px; margin-bottom: 16px; }
.gc-hd { display: flex; align-items: flex-start; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.gc-hd h3 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 16px; } .gc-hd h3 svg { width: 18px; height: 18px; color: var(--gold); }
.gc-hd .sub { color: var(--muted); font-size: 12.5px; margin-top: 3px; }
.gc-meta { display: flex; align-items: center; gap: 6px; color: var(--faint); font-size: 12px; margin-bottom: 12px; } .gc-meta svg { width: 14px; height: 14px; }
.gc-pair { display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px; align-items: stretch; margin-bottom: 12px; }
.gc-side { display: flex; flex-direction: column; gap: 4px; padding: 16px; border-radius: 16px; border: 1px solid var(--line); }
.gc-side small { color: var(--muted); font-size: 12.5px; } .gc-side > b { font-size: 24px; } .gc-side > span { color: var(--faint); font-size: 12px; }
.gc-gosi { background: color-mix(in srgb, #3b82f6 12%, transparent); border-color: color-mix(in srgb, #3b82f6 35%, transparent); }
.gc-pay { background: color-mix(in srgb, var(--gold) 12%, transparent); border-color: color-mix(in srgb, var(--gold) 35%, transparent); }
.gc-vs { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-width: 120px; padding: 10px 14px; border-radius: 16px; background: var(--surface2); }
.gc-vs small { color: var(--muted); font-size: 12px; } .gc-vs b { font-size: 18px; } .gc-vs svg { width: 18px; height: 18px; }
.gc-vs.ok b, .gc-vs.ok svg { color: var(--accent); } .gc-vs.bad b, .gc-vs.bad svg { color: var(--danger); }
.gc-stats { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.gc-stats span { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: var(--surface2); font-size: 12.5px; color: var(--muted); }
.gc-stats b { font-size: 14px; } .gc-stats .ok b { color: var(--accent); } .gc-stats .bad b { color: var(--danger); } .gc-stats .warn b { color: var(--gold); }
.gc-seg { margin-bottom: 10px; }
.gc-card .t b.neg { color: var(--danger); } .gc-card .t b.pos { color: var(--gold); }
.gc-from { color: var(--faint); font-size: 11px; }
.gc-cta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px; border-radius: 14px; border: 1px dashed var(--line); background: var(--surface2); }
.gc-cta > svg { width: 22px; height: 22px; color: var(--gold); } .gc-cta div { flex: 1; min-width: 200px; display: flex; flex-direction: column; gap: 3px; } .gc-cta small { color: var(--muted); }
@media (max-width: 760px) { .gc-pair { grid-template-columns: 1fr; } .gc-vs { flex-direction: row; min-width: 0; } .gc-side > b { font-size: 21px; } }
/* activity log report */
#arRoot .ar-tabs { margin-bottom: 12px; }
.ar-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 14px; }
.ar-bar .ar-sel { width: auto; min-width: 150px; max-width: 220px; }
.ar-dates { display: inline-flex; align-items: center; gap: 6px; } .ar-dates .input { width: 150px; }
.ar-loading { display: flex; justify-content: center; padding: 6px; }
.ar-click { cursor: pointer; } .ar-click:hover td { background: color-mix(in srgb, var(--gold) 6%, transparent); }
.ar-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; margin-top: 14px; }
.ar-grid .card { padding: 16px; }
.ar-barrow { display: grid; grid-template-columns: minmax(90px, 38%) 1fr auto; align-items: center; gap: 10px; font-size: 13px; padding: 5px 0; }
.ar-barrow span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.ar-barrow i { height: 8px; border-radius: 99px; background: var(--surface2); overflow: hidden; } .ar-barrow em { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--gold), color-mix(in srgb, var(--gold) 60%, var(--accent))); }
.ar-cols { display: flex; align-items: flex-end; gap: 3px; height: 150px; padding-top: 8px; }
.ar-cols > div { flex: 1; min-width: 6px; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; }
.ar-cols em { display: block; width: 100%; max-width: 22px; border-radius: 5px 5px 2px 2px; background: color-mix(in srgb, var(--accent) 70%, transparent); }
.ar-cols small { font-size: 10px; color: var(--faint); }
.ar-when { white-space: nowrap; color: var(--muted); }
.ar-un { display: block; color: var(--faint); font-size: 11.5px; }
.ar-act { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 99px; font-size: 12px; background: color-mix(in srgb, currentColor 13%, transparent); white-space: nowrap; }
.ar-act svg { width: 13px; height: 13px; }
.ar-id { color: var(--faint); } .ar-det { font-size: 12.5px; color: var(--muted); max-width: 420px; }
.ar-more { display: flex; justify-content: center; padding: 12px; }
.ar-print-h { display: none; }
@media (max-width: 760px) { .ar-bar .ar-sel { flex: 1 1 45%; max-width: none; min-width: 0; } .ar-bar .seg { width: 100%; } .ar-det { max-width: none; } }
#arPrint { display: none; }
.ar-exp { display: inline-flex; gap: 8px; }
@media print {
  body.ar-printing > *:not(#arPrint) { display: none !important; }
  body.ar-printing { background: #fff !important; }
  body.ar-printing #arPrint, body.ar-printing #arPrint * { visibility: visible !important; }
  body.ar-printing #arPrint { display: block; color: #111; background: #fff; font-size: 10.5px; padding: 8mm 9mm; }
  #arPrint header { border-bottom: 2px solid #b08a3e; padding-bottom: 8px; margin-bottom: 10px; display: grid; gap: 3px; }
  #arPrint h1 { font-size: 18px; margin: 0; color: #111; } #arPrint .arp-meta { color: #666; font-size: 10px; }
  #arPrint .arp-kpis { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-bottom: 10px; } #arPrint .arp-kpis b { color: #b08a3e; }
  #arPrint table { width: 100%; border-collapse: collapse; margin-bottom: 12px; }
  #arPrint th { background: #f2ece0 !important; color: #333; font-weight: 700; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  #arPrint th, #arPrint td { border: 1px solid #ddd; padding: 4px 6px; text-align: start; vertical-align: top; }
  #arPrint tr { break-inside: avoid; } #arPrint thead, #arPrint tr:first-child { break-after: avoid; }
  #arPrint .arp-two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: start; } #arPrint .arp-note { color: #666; }
}
#arRoot .table-card > .card-h { padding: 14px 16px 8px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
#arRoot .table-card > .card-h h3 { margin: 0; } #arRoot .table-card > .card-h .sub { color: var(--muted); font-size: 12.5px; }

/* Casa login responsive correction: keep the sign-in card centered on mobile/tablet */
@media (max-width: 960px) {
  .login {
    min-height: 100vh;
    min-height: 100svh;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: center;
  }
  .login-hero { display: none !important; }
  .login-panel {
    width: 100%;
    min-height: 100vh;
    min-height: 100svh;
    display: grid;
    place-items: center;
    padding: max(64px, env(safe-area-inset-top)) 18px max(24px, env(safe-area-inset-bottom));
  }
  .login-card { width: min(440px, 100%); margin: auto; }
  .login-tools { position: fixed; top: max(12px, env(safe-area-inset-top)); inset-inline-end: 14px; }
}

/* Supplied Casa Di Ora logo on the Casa login form */
.login-card .casa-logo-wrap {
  justify-content: center;
  align-items: center;
  padding: 0 0 14px;
  margin-bottom: 14px;
  border: 0;
  background: transparent;
}
.login-card .casa-login-logo {
  display: block;
  width: min(220px, 68vw);
  max-height: 210px;
  height: auto;
  object-fit: contain;
  background: transparent;
  border-radius: 0;
  box-shadow: none;
}
@media (max-width: 640px) {
  .login-card .casa-login-logo {
    width: min(190px, 58vw);
    max-height: 180px;
  }
}
/* performance management */
.pf-tabs { margin-bottom: 12px; }
.pf-bar { flex-wrap: wrap; gap: 8px; }
.pf-intro { color: var(--muted); font-size: 13px; margin: -2px 2px 12px; }
.pf-muted { color: var(--muted); font-size: 12.5px; }
.kpi.pf-on { outline: 2px solid var(--gold); outline-offset: -2px; }
.pf-head { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; margin-bottom: 14px; }
.pf-head > div { display: flex; flex-direction: column; gap: 3px; padding: 10px 12px; border-radius: 12px; background: var(--surface2); }
.pf-head small { color: var(--faint); font-size: 11.5px; } .pf-head span { color: var(--muted); font-size: 12px; } .pf-head .chip { align-self: flex-start; }
.pf-h { margin: 16px 0 8px; font-size: 14px; }
.pf-goal { display: grid; grid-template-columns: 1.4fr 1fr auto; gap: 8px; margin-bottom: 8px; }
.pf-goal.ro { display: flex; flex-direction: column; gap: 2px; padding: 8px 12px; border-radius: 10px; background: var(--surface2); } .pf-goal.ro small { color: var(--muted); }
.pf-basis { display: flex; align-items: center; gap: 8px; margin: 10px 0; padding: 10px 12px; border-radius: 12px; font-size: 13px; background: color-mix(in srgb, var(--gold) 10%, transparent); } .pf-basis svg { width: 16px; height: 16px; color: var(--gold); flex: none; }
.pf-tools { margin: 8px 0 14px; flex-wrap: wrap; }
.pf-rule { color: var(--faint); font-size: 11.5px; line-height: 1.6; margin: 6px 2px 14px; }
.kv-lines tr.pf-na-row td { opacity: .55; } .kv-lines td.pts { font-weight: 600; }
.pf-ro { margin: 10px 0; padding: 10px 12px; border-radius: 12px; background: var(--surface2); } .pf-ro small { color: var(--faint); font-size: 11.5px; } .pf-ro p { margin: 4px 0 0; white-space: pre-wrap; } .pf-ro ol { margin: 6px 0 0; padding-inline-start: 20px; }
.pf-final-line { margin: 14px 0 4px; padding: 12px 14px; border-radius: 12px; border: 1px solid color-mix(in srgb, var(--gold) 40%, transparent); background: color-mix(in srgb, var(--gold) 8%, transparent); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pf-final-line b { font-size: 20px; color: var(--gold); } .pf-final-line small { color: var(--muted); }
.pf-final { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px; margin-bottom: 14px; }
.pf-final > div { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; } .pf-final small { color: var(--muted); width: 100%; } .pf-final b { font-size: 30px; color: var(--gold); }
.pf-final.sm { padding: 10px 12px; margin: 0 0 10px; } .pf-final.sm b { font-size: 22px; }
.pf-vs { font-size: 12px; } .pf-vs.up { color: var(--accent); } .pf-vs.down { color: var(--danger); }
.pf-trend { padding: 14px 16px; margin-bottom: 14px; } .pf-trend h4 { margin: 0 0 8px; font-size: 14px; }
.pf-cols { display: flex; align-items: flex-end; gap: 6px; height: 140px; }
.pf-cols.sm { height: 96px; margin: 6px 0 12px; }
.pf-cols > div { flex: 1; max-width: 46px; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 3px; }
.pf-cols em { display: block; width: 100%; max-width: 26px; border-radius: 6px 6px 2px 2px; background: linear-gradient(180deg, var(--gold), color-mix(in srgb, var(--gold) 45%, var(--accent))); }
.pf-cols small { font-size: 10px; color: var(--faint); } .pf-cols b { font-size: 11px; }
.pf-pick { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; border-radius: 10px; cursor: pointer; } .pf-pick:hover { background: var(--surface2); }
.pf-pick span { display: flex; flex-direction: column; gap: 2px; } .pf-pick small { color: var(--muted); font-size: 12px; } .pf-pick.done { opacity: .55; }
.pf-chk { display: flex; flex-wrap: wrap; gap: 6px 14px; padding: 8px 0; } .pf-chk label { display: inline-flex; gap: 6px; align-items: center; font-size: 13px; }
@media (max-width: 760px) { .pf-goal { grid-template-columns: 1fr auto; } .pf-goal input[data-gk=measure] { grid-column: 1; } }
#nxPrint { display: none; }
@media print {
  body.nx-printing > *:not(#nxPrint) { display: none !important; }
  body.nx-printing { background: #fff !important; }
  body.nx-printing #nxPrint, body.nx-printing #nxPrint * { visibility: visible !important; }
  body.nx-printing #nxPrint { display: block; color: #111; background: #fff; font-size: 11px; padding: 8mm 9mm; }
  #nxPrint header { border-bottom: 2px solid #b08a3e; padding-bottom: 8px; margin-bottom: 12px; display: grid; gap: 3px; }
  #nxPrint h1 { font-size: 18px; margin: 0; } #nxPrint h2 { font-size: 15px; margin: 6px 0 8px; } #nxPrint h3 { font-size: 13px; margin: 12px 0 6px; color: #8a6a2a; } #nxPrint .np-meta { color: #666; font-size: 10px; }
  #nxPrint table { width: 100%; border-collapse: collapse; margin-bottom: 10px; }
  #nxPrint th { background: #f2ece0 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; font-weight: 700; }
  #nxPrint th, #nxPrint td { border: 1px solid #ddd; padding: 4px 6px; text-align: start; vertical-align: top; white-space: pre-wrap; }
  #nxPrint .np-kv th { width: 28%; } #nxPrint tr { break-inside: avoid; }
  #nxPrint .np-final { margin-top: 10px; padding: 8px 10px; border: 2px solid #b08a3e; font-size: 13px; } #nxPrint .np-final b { font-size: 16px; }
  #nxPrint .np-break { break-before: page; }
}

/* org chart: department duties on hover, inline list and details */
.org-chart .org-node[data-act] { cursor: pointer; transition: box-shadow .15s ease, border-color .15s ease; }
.org-chart .org-node[data-act]:hover, .org-chart .org-node[data-act]:focus-visible { box-shadow: 0 10px 26px rgba(0,0,0,.14); border-color: var(--c, var(--gold)); outline: none; }
.org-node .org-tip { display: none; }
#orgTipFloat { position: fixed; z-index: 9000; width: 300px; max-width: calc(100vw - 24px); padding: 12px 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line2); border-top: 3px solid var(--c, var(--gold)); box-shadow: 0 16px 40px rgba(0,0,0,.24); text-align: start; pointer-events: none; animation: fadeIn .12s ease; }
#orgTipFloat b { display: flex; align-items: center; gap: 6px; font-size: 13px; margin-bottom: 6px; } #orgTipFloat b svg { width: 14px; height: 14px; color: var(--c, var(--gold)); }
#orgTipFloat ul { margin: 0; padding-inline-start: 18px; font-size: 12.5px; line-height: 1.7; color: var(--text); }
#orgTipFloat small { display: block; color: var(--faint); font-size: 11.5px; margin-top: 4px; } #orgTipFloat .org-tip-more { color: var(--muted); }
.org-tasks-inline { position: relative; z-index: 1; margin: 8px 0 0; padding: 8px 10px; width: 258px; border-radius: 12px; background: var(--surface2); border-inline-start: 3px solid var(--c, var(--gold)); font-size: 12px; line-height: 1.6; text-align: start; }
.org-tasks-inline > div::before { content: '•'; color: var(--gold); margin-inline-end: 6px; }
.org-tasks-inline.sug { opacity: .85; }
.dept-info .dept-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; margin-bottom: 14px; }
.dept-info .dept-facts > div { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 12px; background: var(--surface2); border-inline-start: 3px solid var(--c); }
.dept-info .dept-facts small { color: var(--muted); font-size: 11.5px; }
.dept-info h4 { display: flex; align-items: center; gap: 6px; margin: 14px 0 8px; font-size: 14px; } .dept-info h4 svg { width: 16px; height: 16px; color: var(--c); }
.dept-task-list { margin: 0; padding-inline-start: 22px; line-height: 1.9; font-size: 13.5px; }
.dept-info .org-emps { max-width: none; }

/* Human Resources menu sub-group headings */
.nav .nav-sub { margin: 10px 10px 3px; font-size: 10.5px; font-weight: 700; letter-spacing: .02em; color: var(--faint); text-transform: uppercase; display: flex; align-items: center; gap: 6px; }
.nav .nav-sub::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.nav .nav-group-items > .nav-sub:first-child { margin-top: 2px; }

/* the item a notification points at blinks once when it opens */
@keyframes notifHit { 0%, 100% { box-shadow: 0 0 0 0 transparent; } 30%, 70% { box-shadow: 0 0 0 3px var(--gold); } }
.notif-hit { animation: notifHit 1.6s ease 2; border-radius: 14px; }
tr.notif-hit td { background: var(--gold-soft); }

/* employee photos (or the company logo when the employee hides theirs) */
.av.av-photo { padding: 0; overflow: hidden; background: var(--surface2); }
.av.av-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.av.av-logo { background: var(--surface); border: 1px solid var(--line); }
.av.av-logo img { object-fit: contain; padding: 12%; }

/* My file */
.av.xl { width: 96px; height: 96px; border-radius: 26px; font-size: 32px; }
.mf-head { display: flex; align-items: center; gap: 20px; padding: 20px 22px; margin-bottom: 16px; flex-wrap: wrap; }
.mf-who { flex: 1; min-width: 220px; } .mf-who h2 { margin: 0 0 4px; font-family: var(--display); }
.mf-meta { color: var(--muted); font-size: 13.5px; }
.mf-note { margin-top: 8px; font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 6px; } .mf-note svg { width: 14px; height: 14px; }
.mf-btns { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.mf-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; margin-bottom: 16px; }
.mf-tile { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; min-height: 92px; }
.mf-tile.muted .mf-t b { color: var(--faint); font-weight: 500; font-size: 13.5px; }
.mf-tile.warn { border-color: color-mix(in srgb, var(--gold) 55%, transparent); }
.mf-ic { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); flex: none; }
.mf-ic svg { width: 18px; height: 18px; } .mf-ic.sm { width: 32px; height: 32px; border-radius: 10px; }
.mf-t { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.mf-t small { color: var(--muted); font-size: 12px; } .mf-t b { font-size: 15.5px; } .mf-t span { color: var(--muted); font-size: 12.5px; line-height: 1.6; }
.mf-blur { filter: blur(6px); cursor: pointer; transition: filter .2s; user-select: none; } .mf-blur.on { filter: none; }
.mf-how, .mf-docs { padding: 18px 20px; margin-bottom: 16px; }
.mf-how h3, .mf-docs h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 4px; font-size: 15px; } .mf-how h3 svg, .mf-docs h3 svg { width: 18px; height: 18px; color: var(--accent); }
.mf-sub { color: var(--muted); font-size: 13px; margin: 0 0 10px; }
.mf-how-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.mf-how-row .mf-t { flex: 1; } .mf-how-row .mf-t b { font-size: 14px; }
.mf-act { flex: none; } .mf-act label.busy { opacity: .6; pointer-events: none; }
.mf-doc-list { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; font-size: 13.5px; }
.mf-doc-list a, .mf-doc-list span { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; } .mf-doc-list svg { width: 15px; height: 15px; }
@media (max-width: 640px) { .mf-how-row { flex-wrap: wrap; } .mf-act { width: 100%; } }

/* users page search */
.us-filter { gap: 8px; flex-wrap: wrap; }
.us-search { position: relative; flex: 1; min-width: 240px; display: flex; }
.us-search svg { position: absolute; inset-inline-start: 12px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--faint); pointer-events: none; }
.us-search input.input { padding-inline-start: 38px !important; width: 100%; }
.us-count { color: var(--muted); font-size: 12.5px; white-space: nowrap; }

/* activity report: per-person breakdown */
.ar-dates label { font-size: 12.5px; color: var(--muted); }
.ar-person { margin-bottom: 14px; }
.ar-person .card-h { gap: 14px; flex-wrap: wrap; }
.ar-ptot { display: flex; flex-direction: column; align-items: center; min-width: 70px; }
.ar-ptot b { font-family: var(--display); font-size: 22px; line-height: 1.1; }
.ar-ptot small { color: var(--muted); font-size: 11.5px; }
.ar-person .ar-barrow { grid-template-columns: 1fr auto; min-width: 140px; }
#arPrint .arp-person { break-inside: avoid; margin-top: 14px; }
#arPrint .arp-person h2 { font-size: 14px; margin: 0 0 6px; }

/* Saudization moon orbiting the dashboard chart */
.sat-read { display: flex; flex-direction: column; align-items: center; line-height: 1.05; cursor: pointer; pointer-events: auto; user-select: none; }
.sat-read b { font-family: var(--display); font-size: 15px; text-shadow: 0 1px 8px rgba(0,0,0,.4); }
.sat-read small { font-size: 9.5px; color: var(--muted); }
.sat-name { font-size: 11.5px; font-weight: 700; color: var(--text); background: var(--glass); border: 1px solid var(--line); padding: 1px 8px; border-radius: 8px; cursor: pointer; pointer-events: auto; white-space: nowrap; }

/* GOSI vs payroll: causes and where the error is */
.gc-why { margin: 14px 0 6px; padding: 12px 14px; border-radius: 14px; background: var(--surface2); }
.gc-why h4 { display: flex; align-items: center; gap: 6px; margin: 0 0 10px; font-size: 14px; } .gc-why h4 svg { width: 16px; height: 16px; color: var(--gold); }
.gc-why-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; }
.gc-cause { display: flex; flex-direction: column; align-items: flex-start; gap: 5px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; text-align: start; color: inherit; font: inherit; }
.gc-cause:hover, .gc-cause.on { border-color: var(--gold); }
.gc-cause-t { font-weight: 600; font-size: 13.5px; } .gc-cause-n { color: var(--muted); font-size: 12.5px; }
.gc-why-note { display: block; color: var(--faint); font-size: 11.5px; margin-top: 8px; }
.gc-allok { display: flex; align-items: center; gap: 8px; margin: 14px 0 6px; padding: 12px 14px; border-radius: 14px; background: var(--accent-soft); color: var(--accent); font-weight: 600; } .gc-allok svg { width: 18px; height: 18px; }
.gc-finds { min-width: 280px; }
.gc-find { display: flex; gap: 6px; align-items: flex-start; font-size: 12.5px; line-height: 1.6; padding: 3px 0; }
.gc-find + .gc-find { border-top: 1px dashed var(--line); }
.gc-where { flex: none; font-size: 11px; white-space: nowrap; }
.gc-cause .neg, .gc-finds .neg { color: var(--danger); } .gc-cause .pos { color: var(--gold); }

/* housing: room cost details */
.hc-room { position: relative; }
.hc-rcdot { position: absolute; top: 4px; inset-inline-start: 4px; color: var(--gold); opacity: .85; } .hc-rcdot svg { width: 11px; height: 11px; }
.hc-cost2 { opacity: .9; } .hc-cost2 svg { color: var(--gold); }
.hc-rcpanel { margin-top: 14px; padding: 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface2); }
.hc-rc-h b { display: flex; align-items: center; gap: 6px; font-size: 14px; } .hc-rc-h b svg { width: 16px; height: 16px; color: var(--gold); }
.hc-rc-h small { display: block; color: var(--muted); font-size: 12px; margin: 2px 0 10px; }
.hc-rc-t td { padding: 4px 6px; } .hc-rc-t .input { min-width: 0; width: 100%; } .hc-rc-t td:nth-child(2) { width: 130px; } .hc-rc-t td:nth-child(3) { width: 130px; } .hc-rc-t td:nth-child(4) { width: 40px; }
.hc-rc-none { color: var(--faint); font-size: 13px; padding: 6px 0 10px; }
.hc-rc-notes { color: var(--muted); font-size: 13px; white-space: pre-wrap; }
.hc-rc-sum { display: flex; align-items: flex-end; gap: 18px; flex-wrap: wrap; margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--line); }
.hc-rc-sum > div { display: flex; flex-direction: column; } .hc-rc-sum small { color: var(--muted); font-size: 11.5px; } .hc-rc-sum b { font-size: 17px; }
.hc-rc-sum .btn { margin-inline-start: auto; }
.hc-rc-by { display: block; color: var(--faint); font-size: 11.5px; margin-top: 8px; }

/* org chart: hierarchy-network — levels wrap into rows under their parent; links drawn as a network behind the cards */
.org-chart.net { position: relative; }
.org-chart.net .org-links { position: absolute; inset: 0 auto auto 0; pointer-events: none; z-index: 0; overflow: visible; }
.org-chart.net .org-links path { fill: none; stroke: color-mix(in srgb, var(--c) 55%, var(--line2)); stroke-width: 2; stroke-linejoin: round; opacity: .85; }
.org-chart.net .org-links circle { fill: var(--c); stroke: var(--surface); stroke-width: 2; }
.org-chart.net .org-root { z-index: 1; margin-bottom: 40px; }
.org-chart.net .org-root::after, .org-chart.net .tree li::before, .org-chart.net .tree li::after, .org-chart.net .tree li > ul::before { display: none !important; }
.org-chart.net .tree, .org-chart.net .tree ul { flex-wrap: wrap; row-gap: 38px; column-gap: 0; width: auto; min-width: 0; max-width: min(100%, 1240px); margin: 0 auto; }
.org-chart.net .tree ul { max-width: 900px; padding: 40px 0 0; border: 0; margin-inline: auto; }
.org-chart.net .tree li { padding: 0 12px; z-index: 1; }
.org-chart.net .org-node, .org-chart.net .org-emps, .org-chart.net .org-tasks-inline { position: relative; z-index: 1; }
.org-chart.net .org-emps { padding-top: 8px; }
@media (max-width: 760px) { .org-chart.net .tree, .org-chart.net .tree ul { max-width: 100%; } }

/* show / hide password */
.pw-wrap { position: relative; display: block; }
.pw-wrap > input { width: 100%; padding-inline-end: 42px !important; }
.pw-eye { position: absolute; inset-inline-end: 6px; top: 50%; transform: translateY(-50%); width: 32px; height: 32px; display: grid; place-items: center; border: 0; border-radius: 9px; background: transparent; color: var(--muted); cursor: pointer; }
.pw-eye:hover { color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); }
.pw-eye[aria-pressed='true'] { color: var(--accent); }
.pw-eye svg { width: 18px; height: 18px; }

/* sidebar section with one page: the section heading itself is the link */
.nav a.nav-solo-link { padding: 13px 14px; font-size: 16px; font-weight: 700; color: var(--text); gap: 13px; border-radius: 14px; margin: 0; }
.nav a.nav-solo-link > svg:first-child { width: 22px; height: 22px; color: var(--muted); }
.nav a.nav-solo-link.on { background: var(--accent-soft); color: var(--accent); }
.nav a.nav-solo-link.on > svg:first-child { color: var(--accent); }
.nav a.nav-solo-link.on::before { inset-inline-start: -4px; }

/* housing costs card on the Housing page */
.hcc-card { margin-bottom: 16px; }
.hcc-card h3 svg { width: 18px; height: 18px; vertical-align: -3px; color: var(--gold); }
.hcc-grand { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.15; }
.hcc-grand b { font-family: var(--display); font-size: 22px; color: var(--gold); }
.hcc-grand small { color: var(--muted); font-size: 11.5px; }
.hcc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; padding: 0 16px 16px; }
.hcc-site { border: 1px solid var(--line); border-top: 3px solid color-mix(in srgb, currentColor 60%, transparent); border-radius: 16px; padding: 14px; background: var(--surface2); display: flex; flex-direction: column; gap: 10px; }
.hcc-top { display: flex; align-items: center; justify-content: space-between; }
.hcc-top b { display: inline-flex; align-items: center; gap: 6px; } .hcc-top svg { width: 16px; height: 16px; }
.hcc-top small { color: var(--muted); }
.hcc-total { display: flex; align-items: baseline; gap: 8px; }
.hcc-total b { font-family: var(--display); font-size: 26px; color: currentColor; }
.hcc-total small { color: var(--muted); }
.hcc-rows { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; font-size: 13px; color: var(--text); }
.hcc-rows span { color: var(--muted); }
.hcc-site .btn { align-self: flex-start; }

/* staff photos: the box shows the framed square chosen by photo-frame.js (face centred, never cut by the frame) */
.av.av-photo { position: relative; }
.av.av-photo img { object-fit: cover; object-position: 50% 22%; }
/* ---- accounting: "how was this number made?" and the books' health check ---- */
.xp-a { color: inherit; text-decoration: underline dotted color-mix(in srgb, var(--accent) 70%, transparent); text-underline-offset: 3px; cursor: help; }
.xp-a:hover, .xp-kpis a:hover { color: var(--accent); }
.xp-kpis a { color: inherit; text-decoration: none; border-bottom: 1px dotted color-mix(in srgb, var(--accent) 60%, transparent); cursor: help; }
.xp-q { color: var(--accent); font-weight: 700; cursor: help; }
.xp-lead { color: var(--muted); font-size: 13px; margin: 0 0 12px; line-height: 1.7; }
.xp-f { display: flex; flex-wrap: wrap; align-items: stretch; gap: 8px; margin: 0 0 16px; }
.xp-f > div { flex: 1 1 140px; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; background: var(--card, transparent); }
.xp-f > div small { color: var(--muted); font-size: 11.5px; }
.xp-f > div b { font-size: 18px; }
.xp-f > div.g { border-color: var(--accent); background: var(--accent-soft); }
.xp-f > i { align-self: center; font-style: normal; font-size: 20px; font-weight: 700; color: var(--muted); }
.xp-h { display: flex; align-items: center; gap: 6px; margin: 16px 0 8px; font-size: 14px; }
.xp-h svg { width: 16px; height: 16px; }
.xp-src { display: flex; flex-direction: column; gap: 6px; }
.xp-row { display: grid; grid-template-columns: 30px minmax(120px, 1.2fr) 1fr auto; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 10px; }
.xp-row:hover { background: var(--soft, rgba(127,127,127,.06)); }
.xp-ic { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.xp-ic svg { width: 16px; height: 16px; }
.xp-n { display: flex; flex-direction: column; } .xp-n small { color: var(--faint); font-size: 11.5px; }
.xp-bar { height: 8px; border-radius: 99px; background: var(--soft, rgba(127,127,127,.1)); overflow: hidden; } .xp-bar i { display: block; height: 100%; border-radius: 99px; }
.xp-row b.neg { color: var(--danger); }
@media (max-width: 640px) { .xp-row { grid-template-columns: 30px 1fr auto; } .xp-bar { display: none; } }
.xp-health { display: flex; align-items: center; gap: 14px; padding: 12px 16px; margin-bottom: 12px; border-inline-start: 4px solid var(--teal); }
.xp-health.warn { border-inline-start-color: var(--gold); } .xp-health.bad { border-inline-start-color: var(--danger); }
.xp-score { display: flex; flex-direction: column; align-items: center; min-width: 70px; } .xp-score b { font-size: 24px; } .xp-score small { color: var(--muted); font-size: 11px; }
.xp-hs { display: flex; flex-direction: column; gap: 2px; } .xp-hs small { color: var(--muted); font-size: 12.5px; }
.hc-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.hc { display: grid; grid-template-columns: 28px 1fr auto; gap: 10px; align-items: start; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; }
.hc > div { display: flex; flex-direction: column; gap: 3px; } .hc > div small { color: var(--muted); font-size: 12px; line-height: 1.6; }
.hc-d { font-size: 12.5px; } .hc-d ul { margin: 4px 0 0; padding-inline-start: 18px; } .hc-d li { margin: 2px 0; }
.hc-i { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; color: #fff; background: var(--teal); }
.hc.warn .hc-i { background: var(--gold); color: #1d1406; } .hc.bad .hc-i { background: var(--danger); }
.hc.bad { border-color: var(--danger); }
.lb-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; margin: 0 0 12px; }
.lb-stat { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; color: inherit; text-decoration: none; cursor: help; }
.lb-stat small { color: var(--muted); font-size: 12px; } .lb-stat b { font-size: 20px; }
.lb-stat.due { border-color: color-mix(in srgb, var(--gold) 60%, transparent); } .lb-stat.due b { color: var(--gold); }
.lb-stat:hover { border-color: var(--accent); }
/* ---- "send to finance" bar on department screens ---- */
.fin-bar { display: flex; align-items: center; gap: 12px; padding: 10px 14px; margin: 0 0 12px; border: 1px solid color-mix(in srgb, var(--gold) 55%, transparent); border-radius: 14px; background: color-mix(in srgb, var(--gold) 9%, transparent); }
.fin-bar.ok { border-color: var(--line); background: transparent; color: var(--muted); font-size: 13px; padding: 7px 12px; }
.fin-bar.ok svg { width: 15px; height: 15px; color: var(--teal); }
.fin-bar.pay-draft { border-color: color-mix(in srgb, var(--accent) 50%, transparent); background: color-mix(in srgb, var(--accent) 8%, transparent); }
.fin-ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: color-mix(in srgb, var(--gold) 20%, transparent); color: var(--gold); flex: none; }
.fin-ic svg { width: 18px; height: 18px; }
.fin-tx { display: flex; flex-direction: column; gap: 2px; min-width: 0; } .fin-tx small { color: var(--muted); font-size: 12px; }
@media (max-width: 640px) { .fin-bar { flex-wrap: wrap; } .fin-bar .btn { width: 100%; justify-content: center; } }
/* ---- external connections ---- */
.int-card .int-d { color: var(--muted); font-size: 12.5px; line-height: 1.7; margin: 0 0 10px; }
.int-meta { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); } .int-meta small { color: var(--faint); }
.int-hook { display: block; margin-top: 8px; color: var(--faint); } .int-hook code { font-size: 11px; }
.int-map td { padding: 4px; } .int-map .input { min-width: 120px; }

/* module pages: a filter button in every column heading (Excel-style auto-filter) and the highlighted totals */
.th-in { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.th-f { background: none; border: 0; padding: 2px; border-radius: 6px; cursor: pointer; color: var(--faint); opacity: .55; display: inline-grid; place-items: center; }
.th-f svg { width: 13px; height: 13px; }
.th-f:hover, .th-f.on { opacity: 1; color: var(--accent); background: var(--accent-soft); }
.t td.hl1, .t th.hl1 { background: color-mix(in srgb, var(--gold) 9%, transparent); }
.t td.hl2, .t th.hl2 { background: color-mix(in srgb, var(--accent) 12%, transparent); font-weight: 700; }
@media print { .th-f { display: none; } }

/* housing capacity card: every number and title opens what it counts */
.hc-go { cursor: pointer; transition: transform .15s, box-shadow .15s, border-color .15s, background .15s; }
.hc-go:hover { border-color: color-mix(in srgb, var(--accent) 45%, transparent); box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 30%, transparent); }
.hc-go:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.hc-tk.hc-go:hover, .hc-nums > .hc-go:hover { transform: translateY(-2px); }
.hc-sh.hc-go { border-radius: 12px; padding: 4px; margin: -4px -4px 10px; }
.hc-sh.hc-go:hover h4 { color: var(--accent); }
.hc-cost.hc-go:hover { background: color-mix(in srgb, var(--accent) 10%, var(--surface2)); }
tr.hc-go:hover td { background: color-mix(in srgb, var(--accent) 8%, transparent); }
span.hc-go { text-decoration: underline dotted; text-underline-offset: 3px; }
/* =================== Compliance & Saudization (v-compliance.js) =================== */
.comp-page { display: flex; flex-direction: column; gap: 18px; }
.comp-page > .kpis { margin-bottom: 0; }
.comp-hero { display: flex; align-items: center; gap: 18px; padding: 20px 22px; flex-wrap: wrap;
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 12%, var(--surface)), var(--surface) 60%); }
.comp-hero-tx { display: flex; gap: 16px; align-items: flex-start; flex: 1; min-width: 260px; }
.comp-hero-ic { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; flex: none; background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--accent); }
.comp-hero-ic svg { width: 26px; height: 26px; }
.comp-hero h2 { font-size: 20px; font-weight: 700; margin: 0 0 4px; }
.comp-hero p { margin: 0 0 8px; color: var(--muted); font-size: 13.5px; }
.comp-hero small { display: inline-flex; align-items: center; gap: 6px; color: var(--faint); font-size: 12.5px; }
.comp-hero small svg { width: 14px; height: 14px; }
.comp-hero-act { display: flex; gap: 10px; flex-wrap: wrap; }
button.comp-kpi { text-align: start; font: inherit; color: inherit; border: 1px solid var(--line); cursor: pointer; transition: border-color .2s, box-shadow .2s, transform .2s; width: 100%; }
button.comp-kpi:hover { border-color: currentColor; transform: translateY(-1px); }
button.comp-kpi.on { border-color: currentColor; box-shadow: 0 0 0 1px currentColor inset; }
.comp-kpi-sub { display: block; margin-top: 4px; font-size: 11.5px; opacity: .75; }
.comp-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
@media (max-width: 980px) { .comp-grid { grid-template-columns: 1fr; } }
.comp-card { padding: 18px; display: flex; flex-direction: column; }
.comp-card.table-card { padding: 0; }
.comp-card .card-h { margin-bottom: 14px; }
.comp-ic { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--surface2); color: var(--accent); flex: none; }
.comp-ic svg { width: 19px; height: 19px; }
.comp-form { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 14px; align-items: end; }
.comp-form .field { margin: 0; }
.comp-form-act { grid-column: 1 / -1; display: flex; justify-content: flex-end; }
@media (max-width: 720px) { .comp-form { grid-template-columns: 1fr; } }
.comp-note { margin-top: auto; padding-top: 12px; color: var(--faint); font-size: 12px; }
.comp-empty { display: flex; gap: 12px; align-items: center; padding: 14px; border: 1px dashed var(--line); border-radius: 14px; flex-wrap: wrap; }
.comp-empty > svg { width: 22px; height: 22px; color: var(--gold); flex: none; }
.comp-empty > div { flex: 1; min-width: 180px; display: flex; flex-direction: column; gap: 3px; }
.comp-empty small { color: var(--muted); }
.comp-gauge-v { display: flex; align-items: baseline; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.comp-gauge-v > b { font-family: var(--display); font-size: 34px; line-height: 1; }
.comp-gauge-v span { color: var(--muted); }
.comp-track { position: relative; height: 12px; border-radius: 99px; background: var(--surface2); margin: 6px 0 34px; }
.comp-track > i { position: absolute; inset-block: 0; inset-inline-start: 0; border-radius: 99px; background: linear-gradient(90deg, var(--gold), var(--accent)); transition: width .6s var(--ease); }
.comp-mark { position: absolute; top: -4px; width: 2px; height: 20px; background: var(--text); opacity: .55; transform: translateX(50%); }
[dir=ltr] .comp-mark { transform: translateX(-50%); }
.comp-mark small { position: absolute; top: 22px; inset-inline-start: 50%; transform: translateX(50%); white-space: nowrap; font-size: 11px; color: var(--faint); }
[dir=ltr] .comp-mark small { transform: translateX(-50%); }
.comp-mark.hit { background: var(--accent); opacity: 1; }
.comp-bands { display: flex; flex-wrap: wrap; gap: 8px 14px; font-size: 12.5px; color: var(--muted); margin-bottom: 4px; }
.comp-bands span { display: inline-flex; align-items: center; gap: 6px; }
.comp-bands i { width: 8px; height: 8px; border-radius: 50%; background: var(--line); }
.comp-bands .hit { color: var(--text); } .comp-bands .hit i { background: var(--accent); }
.comp-foot { display: flex; gap: 18px; flex-wrap: wrap; color: var(--muted); font-size: 13px; margin-top: 8px; }
.comp-ratio { display: flex; align-items: center; gap: 10px; }
.comp-bar { position: relative; width: 110px; height: 8px; border-radius: 99px; background: var(--surface2); flex: none; }
.comp-bar > i { position: absolute; inset-block: 0; inset-inline-start: 0; border-radius: 99px; background: var(--accent); }
.comp-bar.bad > i { background: var(--danger); }
.comp-bar > b { position: absolute; top: -3px; width: 2px; height: 14px; background: var(--text); opacity: .7; }
.comp-row-bad td.main-cell b { color: var(--danger); }
.comp-li { align-items: center; }
.comp-li .meta small a { color: var(--muted); }
.comp-li-act { display: flex; gap: 8px; align-items: center; flex: none; }
.comp-alert { margin-bottom: 10px; }
.comp-runs { display: flex; flex-direction: column; }
.comp-run { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr) auto; gap: 10px; align-items: center; padding: 10px 2px; border-bottom: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.comp-run:last-child { border-bottom: 0; }
.comp-run b { color: var(--text); }
@media (max-width: 720px) { .comp-run { grid-template-columns: 1fr 1fr; } .comp-page .kpis { grid-template-columns: repeat(2, 1fr); } }

/* ---------------- labour-market news (demo) ---------------- */
.market-news { margin: 18px 0; overflow: hidden; }
.market-news .card-h { padding-bottom: 12px; }
.work-news-track { display: flex; gap: 12px; overflow-x: auto; padding: 0 18px 16px; scroll-snap-type: x proximity; scrollbar-width: thin; }
.work-news-item { display: flex; flex: 0 0 min(330px, 34%); min-width: 260px; flex-direction: column; gap: 9px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface2); color: var(--text); text-decoration: none; scroll-snap-align: start; transition: border-color .2s, transform .2s; }
.work-news-item:hover { border-color: var(--accent); transform: translateY(-2px); }
.work-news-item > b { font-size: 14px; line-height: 1.65; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.work-news-item p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.work-news-tags, .work-news-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.work-news-category, .work-news-type { border-radius: 999px; padding: 3px 8px; font-size: 10px; background: var(--accent-soft); color: var(--accent); }
.work-news-type { background: var(--surface); color: var(--muted); }
.work-news-type.official { background: var(--teal-soft); color: var(--teal); }
.work-news-foot { justify-content: space-between; margin-top: auto; color: var(--muted); font-size: 11px; }
.work-news-placeholder { padding: 22px 4px; color: var(--muted); font-size: 13px; }
@media (max-width: 760px) { .work-news-item { flex-basis: 84%; min-width: 230px; } .market-news { margin: 12px 0; } }

/* platform tour */
.tour-hero h2 { margin: 0 0 6px; } .tour-hero p { margin: 0 0 6px; color: var(--muted); } .tour-hero small { color: var(--faint); }
.tour-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); gap: 14px; margin-top: 14px; align-items: start; }
.tour-player { padding: 10px; } .tour-player video { width: 100%; display: block; border-radius: 12px; background: #000; aspect-ratio: 16 / 9; }
.tour-chapters h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font-size: 15px; }
.tour-chapters ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; max-height: 62vh; overflow: auto; }
.tour-chapters li { display: flex; align-items: center; gap: 4px; border-radius: 10px; }
.tour-chapters li.on { background: color-mix(in srgb, var(--accent) 14%, transparent); }
.tour-ch { flex: 1; display: flex; align-items: center; gap: 10px; padding: 8px; border: 0; background: none; color: inherit; text-align: start; cursor: pointer; border-radius: 10px; font: inherit; }
.tour-ch:hover { background: var(--hover, rgba(255,255,255,.05)); }
.tour-n { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; background: color-mix(in srgb, var(--accent) 22%, transparent); color: var(--accent); }
.tour-tx { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; } .tour-tx small { color: var(--muted); font-size: 11.5px; line-height: 1.5; }
.tour-t { color: var(--faint); font-size: 12px; } .tour-go { flex: none; padding: 8px; color: var(--muted); border-radius: 8px; } .tour-go:hover { color: var(--accent); }
@media (max-width: 900px) { .tour-grid { grid-template-columns: 1fr; } .tour-chapters ol { max-height: none; } }
.tour-chapters h3 svg { width: 18px; height: 18px; flex: none; } .tour-go svg { width: 16px; height: 16px; display: block; }

/* ===== chart of accounts — interactive tree ===== */
.coa-sum { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
.coa-sc { padding: 12px 14px; cursor: pointer; border-top: 3px solid var(--tc, var(--line2)); transition: transform .15s var(--ease); }
.coa-sc:hover { transform: translateY(-2px); }
.coa-sc .l { display: flex; gap: 6px; align-items: center; color: var(--muted); font-size: 12.5px; }
.coa-sc .l svg { width: 15px; height: 15px; }
.coa-sc .v { font-size: 18px; font-weight: 700; margin-top: 4px; }
.coa-sc.ok { --tc: var(--teal); cursor: default; } .coa-sc.bad { --tc: var(--danger); cursor: default; }
.t-asset { --tc: var(--info); } .t-liability { --tc: var(--warn); } .t-equity { --tc: var(--violet); } .t-revenue { --tc: var(--teal); } .t-expense { --tc: var(--danger); }
.coa-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 12px; align-items: start; margin-bottom: 10px; }
.coa-tree { padding: 8px; max-height: 72vh; overflow: auto; }
.coa-tree ul { list-style: none; margin: 0; padding: 0; }
.coa-tree ul ul { margin-inline-start: 17px; border-inline-start: 1px dashed var(--line2); padding-inline-start: 4px; }
.coa-row { display: flex; align-items: center; gap: 7px; padding: 6px 8px; border-radius: 10px; cursor: pointer; position: relative; }
.coa-row:hover { background: var(--surface2); }
.coa-n.sel > .coa-row { background: color-mix(in srgb, var(--tc) 16%, transparent); box-shadow: inset 3px 0 0 var(--tc); }
[dir=rtl] .coa-n.sel > .coa-row { box-shadow: inset -3px 0 0 var(--tc); }
.coa-n.off > .coa-row { opacity: .5; }
.coa-n.g > .coa-row .coa-nm { font-weight: 700; }
.coa-tg { width: 22px; height: 22px; flex: none; display: grid; place-items: center; border: 0; background: transparent; color: var(--muted); border-radius: 6px; cursor: pointer; padding: 0; }
.coa-tg:hover { background: var(--line); }
.coa-tg svg { width: 14px; height: 14px; transform: rotate(-90deg); transition: transform .15s var(--ease); }
[dir=rtl] .coa-tg svg { transform: rotate(90deg); }
.coa-tg.open svg, [dir=rtl] .coa-tg.open svg { transform: none; }
.coa-tg.leaf::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--tc); opacity: .7; }
.coa-code { font-weight: 700; color: var(--tc); min-width: 38px; }
.coa-nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.coa-cnt { background: var(--line); color: var(--muted); border-radius: 99px; padding: 0 7px; font-size: 11px; }
.coa-lk { font-size: 11px; }
.coa-bal { margin-inline-start: auto; color: var(--muted); font-size: 13px; white-space: nowrap; }
.coa-n.g > .coa-row .coa-bal { color: var(--text); font-weight: 600; }
.coa-side { padding: 16px; position: sticky; top: 12px; border-top: 3px solid var(--tc, var(--line2)); }
.coa-side h3 { display: flex; gap: 6px; align-items: center; margin: 4px 0 8px; font-size: 16px; }
.coa-hint { text-align: center; color: var(--muted); padding: 30px 18px; }
.coa-hint svg { width: 34px; height: 34px; color: var(--faint); }
.coa-bc { font-size: 12px; color: var(--faint); }
.coa-bc a { color: var(--muted); text-decoration: none; } .coa-bc a:hover { color: var(--accent); }
.coa-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 10px; }
.coa-bigbal { display: flex; flex-direction: column; gap: 2px; background: var(--surface2); border-radius: var(--radius-sm); padding: 10px 12px; margin-bottom: 10px; }
.coa-bigbal b { font-size: 22px; color: var(--tc); }
.coa-bigbal small { color: var(--faint); font-size: 11.5px; }
.coa-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 10px; }
.coa-facts div { display: flex; flex-direction: column; background: var(--surface2); border-radius: 10px; padding: 7px 9px; }
.coa-facts small { color: var(--faint); font-size: 11px; } .coa-facts b { font-size: 15px; }
.coa-sys { border: 1px solid var(--line2); border-radius: 10px; padding: 9px 11px; margin-bottom: 10px; display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.coa-sys small { color: var(--muted); }
.coa-links { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 4px; }
.coa-links a { text-decoration: none; }
.coa-kids { display: flex; flex-direction: column; max-height: 220px; overflow: auto; margin-bottom: 10px; border: 1px solid var(--line); border-radius: 10px; }
.coa-kids a { display: flex; gap: 6px; padding: 6px 10px; color: var(--text); text-decoration: none; font-size: 13px; border-bottom: 1px solid var(--line); }
.coa-kids a:last-child { border-bottom: 0; } .coa-kids a:hover { background: var(--surface2); }
.coa-kids a .num:last-child { margin-inline-start: auto; color: var(--muted); }
.coa-acts { display: flex; flex-wrap: wrap; gap: 6px; }
@media (max-width: 1100px) { .coa-sum { grid-template-columns: repeat(3, minmax(0, 1fr)); } .coa-wrap { grid-template-columns: 1fr; } .coa-side { position: static; } .coa-wrap.has-sel .coa-side { order: -1; } }
@media (max-width: 600px) { .coa-sum { grid-template-columns: repeat(2, minmax(0, 1fr)); } .coa-tree { max-height: none; } .coa-bal { font-size: 12px; } }
.coa-links svg { width: 12px; height: 12px; margin-inline-end: 3px; vertical-align: -1px; }
@media (max-width: 600px) { .toolbar .coa-q { flex: 1 1 100%; order: -1; } }
/* chart of accounts — comparison & budget */
.coa-cols { margin-inline-start: auto; display: grid; grid-template-columns: 110px 110px 70px 90px; gap: 8px; align-items: center; text-align: end; font-size: 12.5px; flex: none; }
.coa-pv { color: var(--faint); }
.coa-hd { display: flex; align-items: center; padding: 4px 8px 8px; border-bottom: 1px solid var(--line); margin-bottom: 4px; color: var(--faint); font-size: 11.5px; position: sticky; top: -8px; background: var(--surface); z-index: 1; }
.coa-hd .coa-cols { font-size: 11.5px; }
.coa-note { font-size: 11.5px; color: var(--faint); padding: 4px 8px 8px; line-height: 1.6; }
.coa-note a { color: var(--accent); }
.coa-chg { font-size: 11.5px; font-weight: 600; white-space: nowrap; color: var(--faint); }
.coa-chg.up, .coa-bud.up b { color: var(--teal); } .coa-chg.dn, .coa-bud.dn b { color: var(--danger); }
.coa-bud { display: flex; align-items: center; gap: 5px; justify-content: flex-end; color: var(--faint); }
.coa-bud i { display: block; height: 5px; width: 0; max-width: 44px; flex: 0 0 auto; border-radius: 9px; background: var(--teal); }
.coa-bud.dn i { background: var(--danger); }
.coa-bud b { font-size: 11.5px; }
.coa-wrap.cmp { grid-template-columns: minmax(0, 1fr) 340px; }
.coa-cmp { border: 1px solid var(--line2); border-radius: 12px; padding: 10px; margin-bottom: 10px; display: flex; flex-direction: column; gap: 8px; }
.coa-cmp-g { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.coa-cmp-g div { display: flex; flex-direction: column; gap: 2px; }
.coa-cmp-g small, .coa-bdbar small { color: var(--faint); font-size: 11px; }
.coa-cmp-g b { font-size: 14px; }
.coa-bdbar { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; background: var(--surface2); border-radius: 10px; padding: 8px 10px; }
.coa-bdbar div { display: flex; flex-direction: column; } .coa-bdbar b { font-size: 14px; }
.coa-bdbar.none { display: block; }
.coa-prog { grid-column: 1 / -1; height: 7px; background: var(--line); border-radius: 9px; overflow: hidden; }
.coa-prog i { display: block; height: 100%; background: var(--teal); border-radius: 9px; }
.coa-bdbar.dn .coa-prog i { background: var(--danger); }
.coa-bdbar > small:last-child { grid-column: 1 / -1; }
.coa-bdlink { font-size: 12.5px; color: var(--accent); text-decoration: none; display: inline-flex; gap: 4px; align-items: center; }
.coa-bdlink svg { width: 14px; height: 14px; }
@media (max-width: 1300px) { .coa-cols { grid-template-columns: 100px 100px 64px 84px; } .coa-wrap.cmp { grid-template-columns: 1fr; } .coa-wrap.cmp .coa-side { position: static; } }
@media (max-width: 760px) { .coa-cols { grid-template-columns: 88px 64px; } .coa-cols .coa-pv, .coa-cols .coa-bud, .coa-hd .coa-cols > span:nth-child(2), .coa-hd .coa-cols > span:nth-child(4) { display: none; } .coa-cmp-g { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) {
  .coa-wrap.cmp .coa-row { flex-wrap: wrap; row-gap: 2px; }
  .coa-wrap.cmp .coa-row .coa-cols { flex: 1 1 100%; grid-template-columns: 1fr auto; padding-inline-start: 29px; }
  .coa-wrap.cmp .coa-nm { white-space: normal; flex: 1 1 0; }
  .coa-wrap.cmp .coa-hd .coa-cols { flex: 0 0 auto; grid-template-columns: 88px 64px; }
  .toolbar [data-acccoato] { flex: 1 1 150px; max-width: none !important; }
}
/* chart of accounts — comparison, polished */
.coa-wrap.cmp .coa-tree { padding: 0 8px 8px; }
.coa-note { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 12px 6px 10px; }
.coa-per { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; background: var(--surface2); border: 1px solid var(--line); border-radius: 99px; padding: 5px 12px; color: var(--muted); font-size: 12.5px; }
.coa-per svg { width: 14px; height: 14px; color: var(--accent); } .coa-per b { color: var(--text); font-weight: 600; }
.coa-info { color: var(--faint); font-size: 12px; cursor: help; border-bottom: 1px dotted var(--faint); }
.coa-nob { margin-inline-start: auto; display: inline-flex; gap: 5px; align-items: center; font-size: 12.5px; color: var(--accent); text-decoration: none; }
.coa-nob svg { width: 14px; height: 14px; }
.coa-hd { top: 0; padding: 9px 8px; border-bottom: 1px solid var(--line2); background: var(--surface); text-transform: none; font-weight: 600; color: var(--muted); letter-spacing: .2px; }
.coa-cols { grid-template-columns: 118px 118px 74px 120px; gap: 10px; }
.coa-cols > .num:first-child { color: var(--text); font-weight: 600; }
.coa-n.g > .coa-row .coa-cols > .num:first-child { font-weight: 700; }
.coa-pv { color: var(--muted); }
.coa-wrap.cmp .coa-row { padding: 7px 8px; border-bottom: 1px solid color-mix(in srgb, var(--line) 60%, transparent); border-radius: 0; }
.coa-wrap.cmp .coa-n.sel > .coa-row { border-radius: 10px; }
.coa-chg { display: inline-block; padding: 2px 7px; border-radius: 99px; font-size: 11.5px; font-weight: 700; justify-self: end; }
.coa-chg.up { background: var(--teal-soft); color: var(--teal); } .coa-chg.dn { background: var(--danger-soft); color: var(--danger); }
.coa-chg.nil, .coa-bud.nil { color: var(--faint); background: none; font-weight: 400; }
.coa-bud { display: flex; align-items: center; gap: 7px; justify-content: flex-end; }
.coa-bud .trk { display: block; width: 58px; height: 6px; border-radius: 9px; background: var(--line); overflow: hidden; }
.coa-bud .trk i { display: block; height: 100%; max-width: none; border-radius: 9px; background: var(--teal); }
.coa-bud.wn .trk i { background: var(--warn); } .coa-bud.dn .trk i { background: var(--danger); }
.coa-bud b { min-width: 36px; font-size: 12px; text-align: end; color: var(--muted); }
.coa-bud.up b { color: var(--teal); } .coa-bud.wn b { color: var(--warn); } .coa-bud.dn b { color: var(--danger); }
.coa-sc-f { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-top: 6px; }
.coa-sc-f small { color: var(--faint); font-size: 11.5px; }
.coa-sc-b { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-top: 6px; padding-top: 6px; border-top: 1px dashed var(--line2); }
.coa-sc-b small { color: var(--faint); font-size: 11px; }
.coa-sc-b .coa-bud .trk { width: 46px; }
.coa-sc.t-profit { --tc: var(--accent); cursor: default; }
.coa-cmp { gap: 10px; }
.coa-cmp-g { grid-template-columns: 1fr 1fr; }
.coa-cmp-g div { background: var(--surface2); border-radius: 10px; padding: 8px 10px; }
.coa-cmp-g b { font-size: 16px; } .coa-cmp-g b.pv { color: var(--muted); }
.coa-diff { display: flex; align-items: center; gap: 8px; } .coa-diff small { color: var(--faint); font-size: 11.5px; flex: 1; } .coa-diff b { font-size: 14px; }
.coa-bdbar.wn .coa-prog i { background: var(--warn); }
/* dashboard budget alert */
.bud-alert { padding: 14px 16px; margin-bottom: 12px; border-inline-start: 4px solid var(--warn); }
.bud-alert.over { border-inline-start-color: var(--danger); }
.bud-alert-h { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.bud-alert-h > svg { width: 22px; height: 22px; color: var(--warn); flex: none; } .bud-alert.over .bud-alert-h > svg { color: var(--danger); }
.bud-alert-h div { flex: 1; display: flex; flex-direction: column; } .bud-alert-h small { color: var(--muted); font-size: 12px; }
.bud-alert-l { display: flex; flex-direction: column; gap: 2px; }
.bud-row { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(90px, 1fr) auto 48px; gap: 12px; align-items: center; padding: 8px 10px; border-radius: 10px; text-decoration: none; color: var(--text); font-size: 13px; }
.bud-row:hover { background: var(--surface2); }
.bud-nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .bud-nm .num { color: var(--danger); font-weight: 700; }
.bud-trk { position: relative; height: 8px; border-radius: 9px; background: var(--line); }
.bud-trk i { display: block; height: 100%; border-radius: 9px; background: var(--warn); }
.bud-row.over .bud-trk i { background: var(--danger); }
.bud-trk em { position: absolute; top: -3px; width: 2px; height: 14px; background: var(--text); opacity: .55; border-radius: 2px; }
.bud-v { color: var(--muted); font-size: 12px; white-space: nowrap; } .bud-p { color: var(--warn); text-align: end; } .bud-row.over .bud-p { color: var(--danger); }
@media (max-width: 1300px) { .coa-cols { grid-template-columns: 104px 104px 70px 110px; } }
@media (max-width: 760px) { .coa-cols { grid-template-columns: 1fr auto 96px; } .coa-cols .coa-pv, .coa-hd .coa-cols > span:nth-child(2) { display: none; } .coa-cols .coa-bud, .coa-hd .coa-cols > span:nth-child(4) { display: flex; } .coa-bud .trk { width: 40px; } .bud-row { grid-template-columns: minmax(0, 1fr) 48px; } .bud-trk { grid-column: 1 / -1; grid-row: 2; } .bud-v { grid-column: 1 / -1; } }
@media (max-width: 600px) { .coa-wrap.cmp .coa-row .coa-cols { grid-template-columns: 1fr auto 96px; } .coa-wrap.cmp .coa-hd .coa-cols { grid-template-columns: 88px 64px 96px; } .coa-per { border-radius: 12px; } }
/* ===== deduction plans, exit clearance, integration center ===== */
.dp-sec { margin-top: 14px; }
.dp-prog { display: flex; flex-direction: column; gap: 4px; min-width: 150px; }
.dp-prog > span { display: block; height: 6px; border-radius: 9px; background: var(--line); overflow: hidden; }
.dp-prog > span i { display: block; height: 100%; background: var(--teal); border-radius: 9px; }
.dp-prog small { color: var(--faint); font-size: 11.5px; } .dp-prog small b { color: var(--text); }
.clr-box { margin-top: 12px; border: 1px solid var(--line2); border-radius: var(--radius-sm); padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.clr-box:empty { display: none; }
.clr-box > b { display: flex; gap: 6px; align-items: center; } .clr-box > b svg { width: 16px; height: 16px; color: var(--accent); }
.clr-i { display: flex; align-items: center; gap: 8px; font-size: 13px; padding: 7px 10px; border-radius: 10px; background: var(--surface2); }
.clr-i > svg { width: 16px; height: 16px; flex: none; color: var(--muted); } .clr-i > span { flex: 1; } .clr-i small { color: var(--faint); }
.clr-i.warn > svg { color: var(--warn); } .clr-i.bad > svg { color: var(--danger); } .clr-i.ok > svg { color: var(--teal); }
.lk-map { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.lk-flow { display: inline-flex; align-items: center; gap: 6px; background: var(--surface2); border: 1px solid var(--line); border-radius: 99px; padding: 4px 12px; font-size: 12px; color: var(--muted); }
.lk-flow i { font-style: normal; color: var(--accent); font-weight: 700; }
.lk-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 12px; }
.lk-sec { padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.lk-h { display: flex; align-items: center; gap: 8px; margin-bottom: 2px; } .lk-h svg { width: 18px; height: 18px; color: var(--accent); } .lk-h b { flex: 1; font-size: 15px; }
.lk-i { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--surface2); border-inline-start: 3px solid var(--warn); }
.lk-i.info { border-inline-start-color: var(--info); }
.lk-t { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; } .lk-t b { font-size: 13.5px; } .lk-t .num { font-weight: 700; color: var(--warn); font-size: 13px; } .lk-t small { color: var(--faint); font-size: 11.5px; }
.lk-ok { display: flex; gap: 6px; align-items: center; color: var(--teal); font-size: 13px; padding: 6px 2px; } .lk-ok svg { width: 16px; height: 16px; }
@media (max-width: 900px) { .lk-grid { grid-template-columns: 1fr; } .lk-i { flex-wrap: wrap; } }
.law-gov { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding-top: 4px; border-top: 1px dashed var(--line2); }
.law-gov small { width: 100%; color: var(--faint); font-size: 11.5px; }
.law-gov a { display: inline-flex; gap: 4px; align-items: center; font-size: 12px; padding: 4px 10px; border-radius: 99px; background: var(--surface2); color: var(--muted); text-decoration: none; border: 1px solid var(--line); }
.law-gov a svg { width: 12px; height: 12px; color: var(--teal); }
.tour-ask { text-align: center; } .tour-ask-ic { width: 64px; height: 64px; margin: 0 auto 12px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--accent); } .tour-ask-ic svg { width: 30px; height: 30px; }
/* a bare icon at the start of a card's text or heading stays text-sized (it otherwise stretches across the card) */
#content .card > svg, #content .card > h3 > svg { width: 18px; height: 18px; vertical-align: -3px; flex: none; }

/* Vehicle custody: pickup / return report and the pledge */
.vq-check, .vq-pledge { border: 1px solid var(--line, #e5e5e5); border-radius: 12px; padding: 12px; margin-top: 12px; }
.vq-items { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px 10px; }
.vq-tick { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; line-height: 1.6; cursor: pointer; padding: 6px 8px; border-radius: 9px; background: var(--soft, rgba(127,127,127,.06)); min-height: 38px; }
.vq-tick input { margin: 3px 0 0; flex: 0 0 auto; width: 17px; height: 17px; accent-color: var(--accent); }
.vq-pledge-text { white-space: pre-wrap; font-size: 13px; line-height: 1.9; max-height: 260px; overflow-y: auto; margin-top: 8px; padding: 10px 12px; border-radius: 10px; background: var(--soft, rgba(127,127,127,.06)); -webkit-overflow-scrolling: touch; }
.vq-pledge .vq-tick { background: var(--gold-soft, rgba(220,180,104,.15)); }
@media (max-width: 680px) { .vq-items { grid-template-columns: 1fr 1fr; } .vq-pledge-text { max-height: 220px; } }
.vq-clauses { min-height: 220px; line-height: 1.9; font-size: 13px; resize: vertical; }
.vq-count { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; }
.vq-read-hint { margin-top: 8px; font-size: 12px; color: var(--gold, #b8862b); display: flex; align-items: center; gap: 6px; }
.vq-read-hint.ok { color: var(--accent); }
.vq-tick.locked { opacity: .5; cursor: not-allowed; }

/* Sidebar sections: one tidy line each, same column for every icon */
:root { --sidebar: 316px; }
.nav-sec, .nav a.nav-sec { gap: 11px; padding: 12px 10px; font-size: 15px; }

/* iPhone install guide */
.inst-sub { color: var(--muted); margin: 0 0 12px; font-size: 14px; line-height: 1.7; }
.inst-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.inst-step { display: flex; gap: 12px; align-items: flex-start; }
.inst-step > div { min-width: 0; line-height: 1.7; }
.inst-step b { display: block; font-size: 15px; }
.inst-step small { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; }
.inst-no { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 14px; background: var(--accent-soft); color: var(--accent); }
.inst-bar { display: flex; align-items: center; gap: 8px; direction: ltr; margin: 0 0 4px; padding: 26px 10px 10px; border-radius: 16px; background: var(--surface2); border: 1px solid var(--line2); }
.inst-bar-btn { position: relative; flex: none; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--line2); color: var(--muted); font-weight: 800; font-size: 14px; letter-spacing: 1px; }
.inst-bar-btn.on { color: var(--accent); border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.inst-bar-url { flex: 1; min-width: 0; height: 38px; border-radius: 999px; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--line2); color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 0 12px; }
.inst-arrow { position: absolute; top: -26px; left: 50%; transform: translateX(-50%); font-style: normal; color: var(--accent); font-size: 18px; font-weight: 900; animation: instBob 1.1s ease-in-out infinite; }
@keyframes instBob { 0%, 100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, 5px); } }
@media (prefers-reduced-motion: reduce) { .inst-arrow { animation: none; } }
@media (max-width: 860px) { .sidebar { width: min(330px, calc(100vw - 40px)) !important; } }
.nav-sec-label { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }



/* Top-bar refresh: spins while the page reloads */
.icon-btn.reloading svg { animation: spin .8s linear infinite; }
/* Employee picker search: a box above the list that filters by name or employee number */
.emp-search { width: 100%; margin-bottom: 6px; }
/* letters sent to the employee: list in My file + framed A4 viewer; send/reprint row in HR history */
.mf-let-list { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.mf-let { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; }
.mf-let .mf-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.mf-let .mf-t span { font-size: 12.5px; color: var(--muted); }
.mf-let-frame { width: 100%; overflow: hidden; background: #fff; border-radius: 8px; }
.mf-let-frame iframe { width: 794px; height: 1123px; border: 0; transform-origin: top left; display: block; }
[dir=rtl] .mf-let-frame iframe { transform-origin: top right; margin-inline-start: 0; }
.lt-row-acts { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 640px) { .lt-row-acts { justify-content: flex-start; } .mf-let { flex-wrap: wrap; } }
/* the letter issued from a request, shown on the request card */
.req-letter { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 10px; padding: 8px 10px; border-radius: 10px; background: color-mix(in srgb, var(--accent) 10%, transparent); color: var(--text); font-size: 13px; }
.req-letter > svg { color: var(--accent); flex: none; width: 18px; height: 18px; }
.req-letter > span { flex: 1; min-width: 0; }

/* an unsaved draft offered at the top of a form (core.js attachDraft) */
.draft-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 12px; margin: 0 0 14px; border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--line)); border-radius: 12px; background: color-mix(in srgb, var(--accent) 9%, var(--surface)); font-size: 13px; animation: rise .2s var(--ease); }
.draft-bar > svg { width: 18px; height: 18px; flex: none; color: var(--accent); }
.draft-bar > span { flex: 1; min-width: 160px; line-height: 1.5; }
.draft-bar .btn { flex: none; }
@media (max-width: 560px) { .draft-bar > span { flex: 1 1 calc(100% - 30px); } .draft-bar .btn { flex: 1 1 0; justify-content: center; } }

/* a code or number written left-to-right inside a table cell stays on the cell's own side (it used to slide across and look like another column) */
[dir='rtl'] .t td small[dir='ltr'], [dir='rtl'] .t td div[dir='ltr'] { text-align: right; }

/* Integrations: connector programs installed on the hotel's own computers */
.int-dev-h { font-size: 15px; margin: 4px 0 10px; }
.int-dev { display: flex; flex-direction: column; gap: 10px; }
.int-where { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; line-height: 1.8; color: var(--muted); }
.int-where svg { width: 16px; height: 16px; flex: 0 0 auto; margin-top: 4px; }
.int-dev-stat { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12.5px; color: var(--muted); }
.int-dev-btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }
.int-dev-btns .btn:first-child { flex: 1 1 100%; justify-content: center; }
.int-dev-btns .btn:not(:first-child) { flex: 1 1 0; justify-content: center; }
.int-how { line-height: 1.9; font-size: 13.5px; }
.int-how-s { margin-bottom: 14px; } .int-how-s > b { display: block; font-size: 14px; margin-bottom: 4px; }
.int-how p { margin: 0; color: var(--muted); }
.int-steps { margin: 0; padding-inline-start: 22px; } .int-steps li { margin-bottom: 4px; }
.int-how code { direction: ltr; unicode-bidi: isolate; display: inline-block; background: var(--soft, rgba(127,127,127,.1)); padding: 1px 6px; border-radius: 5px; font-size: 12.5px; }

/* Scrolling inside a panel (side menu, window, list, notifications…) stops at the panel's end instead of carrying on
   and moving the page behind it. Only boxes that can actually scroll that way are affected; the page itself keeps
   its normal behaviour (pull-to-refresh on phones). */
/* only real scrolling panels get it (applying it to every element trapped the mouse wheel over tables and menu items) */
.nav, .drawer, .modal-b, .search-pop, .dropdown-menu, .notif-panel, .preview-scroll, .sv-texts, .cf-list, .nxai-body,
.tour-chapters ol, .coa-tree, .coa-kids, .vq-pledge-text { overscroll-behavior-y: contain; }

/* dashboard columns never grow past the screen because of a long line inside (upcoming leaves / latest activity on phones) */
.dash-grid { grid-template-columns: minmax(0, 1fr); } .dash-grid > *, .dash-side > * { min-width: 0; } .list-item .meta { min-width: 0; }
.list-item .meta small, .list-item .meta b { overflow-wrap: anywhere; }

/* ---------- e-archive ---------- */
.ar-filters { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 12px; margin-bottom: 16px; }
.ar-search { position: relative; flex: 1 1 260px; min-width: 0; } .ar-search svg { position: absolute; inset-inline-start: 12px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--faint); }
.ar-search .input { padding-inline-start: 36px; width: 100%; }
.ar-filters select.input { flex: 0 1 200px; min-width: 150px; }
.ar-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.ar-card { display: flex; flex-direction: column; gap: 10px; padding: 14px; text-align: start; cursor: pointer; font: inherit; color: inherit; border: 1px solid var(--line); transition: transform .15s, border-color .15s; min-width: 0; }
.ar-card:hover { transform: translateY(-2px); border-color: var(--accent); }
.ar-card-h, .ar-head { display: flex; align-items: center; gap: 12px; min-width: 0; }
.ar-who { display: flex; flex-direction: column; min-width: 0; flex: 1; } .ar-who b, .ar-who h2 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ar-who small { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .ar-who h2 { margin: 0; font-size: 20px; }
.ar-pct { font-family: var(--display); font-weight: 700; font-size: 17px; }
.ar-bar { height: 6px; border-radius: 6px; background: var(--line); overflow: hidden; } .ar-bar span { display: block; height: 100%; border-radius: 6px; transition: width .4s; }
.ar-dots { display: flex; gap: 5px; flex-wrap: wrap; } .ar-dots span { width: 24px; height: 24px; border-radius: 7px; display: grid; place-items: center; background: var(--bg-soft, rgba(127,127,127,.08)); color: var(--faint); opacity: .55; }
.ar-dots span svg { width: 13px; height: 13px; } .ar-dots span.on { background: var(--accent-soft); color: var(--accent); opacity: 1; } .ar-dots span.core:not(.on) { box-shadow: inset 0 0 0 1px var(--gold); opacity: .8; }
.ar-meta { color: var(--faint); font-size: 11.5px; }
.ar-head { padding: 18px; margin-bottom: 16px; flex-wrap: wrap; } .ar-head-p { flex: 1 1 260px; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.ar-head-pl { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); } .ar-head-pl b { font-size: 16px; } .ar-miss { color: var(--muted); font-size: 12px; }
.ar-secs { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.ar-sec { padding: 14px; display: flex; flex-direction: column; gap: 10px; min-width: 0; } .ar-sec.has { border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); }
.ar-sec-h { display: flex; align-items: center; gap: 8px; } .ar-sec-ic { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); } .ar-sec-ic svg { width: 16px; height: 16px; }
.ar-core { width: 6px; height: 6px; border-radius: 50%; background: var(--gold); display: inline-block; }
.ar-n { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--accent-soft); color: var(--accent); font-size: 12px; font-weight: 700; display: grid; place-items: center; }
.ar-none { color: var(--faint); font-size: 12.5px; padding: 8px 2px; }
.ar-files { display: flex; flex-direction: column; gap: 6px; }
.ar-file { display: flex; align-items: center; gap: 8px; padding: 8px; border-radius: 10px; background: var(--bg-soft, rgba(127,127,127,.06)); min-width: 0; }
.ar-ft { flex: none; width: 36px; height: 36px; border-radius: 8px; display: grid; place-items: center; font-size: 10px; font-weight: 800; letter-spacing: .3px; }
.ar-ft.pdf { background: rgba(220,53,69,.12); color: #d6455a; } .ar-ft.img { background: var(--info-soft); color: var(--info); }
.ar-fi { flex: 1; min-width: 0; display: flex; flex-direction: column; } .ar-fi b { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .ar-fi small { color: var(--faint); font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 640px) {
  .ar-grid, .ar-secs { grid-template-columns: 1fr; }
  .ar-filters { padding: 10px; } .ar-filters select.input { flex: 1 1 100%; } .ar-filters .seg { width: 100%; display: grid; grid-template-columns: repeat(4, 1fr); }
  .ar-head { padding: 14px; } .ar-who h2 { font-size: 17px; }
}

/* attachments on leaves / requests */
.at-chip { display: inline-flex; align-items: center; gap: 5px; font: inherit; font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--line)); background: var(--accent-soft); color: var(--accent); text-decoration: none; cursor: pointer; white-space: nowrap; }
.at-chip svg { width: 13px; height: 13px; } .at-chip.add { background: transparent; color: var(--muted); border-style: dashed; border-color: var(--line); }
.at-chip.add:hover { color: var(--accent); border-color: var(--accent); }

/* ---------- government matching hub ---------- */
.gh-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; margin-bottom: 14px; }
.gh-card { padding: 16px; display: flex; flex-direction: column; gap: 10px; min-width: 0; } .gh-card.off { opacity: .85; }
.gh-card > .btn { align-self: flex-start; margin-top: auto; }
.gh-ch { display: flex; align-items: center; gap: 10px; } .gh-ch b { font-size: 15px; flex: 1; }
.gh-ic { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); flex: none; } .gh-ic svg { width: 18px; height: 18px; }
.gh-ring { width: 54px; height: 54px; border-radius: 50%; background: conic-gradient(var(--c) var(--d), var(--line) 0); display: grid; place-items: center; flex: none; }
.gh-ring span { width: 44px; height: 44px; border-radius: 50%; background: var(--surface, var(--bg)); display: grid; place-items: center; font-weight: 700; font-size: 13px; color: var(--c); font-family: var(--display); }
.gh-meta { color: var(--muted); font-size: 12.5px; } .gh-meta b { color: var(--text); font-weight: 600; }
.gh-stale { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--gold); } .gh-stale svg { width: 14px; height: 14px; }
.gh-nums { display: flex; flex-wrap: wrap; gap: 6px; } .gh-empty { color: var(--muted); font-size: 13px; padding: 6px 0 4px; }
.gh-two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; }
.gh-box { padding: 14px 16px; min-width: 0; } .gh-box h3 { display: flex; align-items: center; gap: 8px; font-size: 14px; margin: 0 0 10px; } .gh-box h3 svg { width: 17px; height: 17px; color: var(--accent); }
.gh-pills { display: flex; flex-direction: column; gap: 6px; }
.gh-pill { display: flex; align-items: center; justify-content: space-between; gap: 10px; font: inherit; font-size: 13px; text-align: start; padding: 8px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg-soft, rgba(127,127,127,.05)); color: var(--text); cursor: pointer; }
.gh-pill b { min-width: 26px; height: 22px; padding: 0 7px; border-radius: 11px; display: grid; place-items: center; background: var(--gold-soft); color: var(--gold); font-size: 12px; }
.gh-pill.on, .gh-pill:hover { border-color: var(--accent); } .gh-pill.on b { background: var(--accent); color: #fff; }
.gh-none { display: flex; align-items: center; gap: 6px; color: var(--accent); font-size: 13px; } .gh-none svg { width: 16px; height: 16px; }
.gh-filters { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 12px; margin-bottom: 14px; }
.gh-t th.gh-c, .gh-t td.gh-c { text-align: center; width: 90px; }
.gh-m { width: 26px; height: 26px; border-radius: 8px; display: inline-grid; place-items: center; } .gh-m svg { width: 15px; height: 15px; }
.gh-m.ok { background: var(--accent-soft); color: var(--accent); } .gh-m.issue { background: var(--gold-soft); color: var(--gold); }
.gh-m.missing { background: rgba(220,53,69,.12); color: var(--danger); } .gh-m.na, .gh-m.nofile { color: var(--faint); }
.gh-n { display: inline-grid; place-items: center; min-width: 22px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--line); font-size: 11.5px; font-weight: 700; color: var(--muted); }
.gh-srcs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.gh-src { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.gh-src-h { display: flex; align-items: center; gap: 8px; } .gh-src-h > svg { width: 16px; height: 16px; color: var(--accent); } .gh-src-h small { color: var(--muted); margin-inline-start: auto; }
.gh-fix p { margin: 4px 0 0; font-size: 12.5px; color: var(--muted); line-height: 1.6; } .gh-fix small { color: var(--faint); }
.gh-h4 { margin: 14px 0 8px; font-size: 14px; } .gh-dt { color: var(--faint); font-size: 11.5px; }
@media (max-width: 760px) {
  .gh-two, .gh-srcs { grid-template-columns: 1fr; }
  .gh-cards { grid-template-columns: 1fr 1fr; gap: 10px; } .gh-card { padding: 12px; } .gh-ring { width: 46px; height: 46px; } .gh-ring span { width: 37px; height: 37px; font-size: 12px; }
  .gh-filters .seg { flex: 1 1 100%; display: grid; grid-template-columns: 1fr 1fr; }
  .gh-t th.gh-c, .gh-t td.gh-c { width: auto; text-align: start; }
  .gh-t td.gh-iss { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
  .gh-t td.gh-iss .chip { white-space: normal; max-width: 100%; text-align: start; line-height: 1.5; }
}
@media (max-width: 420px) { .gh-cards { grid-template-columns: 1fr; } }

.at-read { margin-top: 6px; font-size: 12.5px; padding: 6px 10px; border-radius: 8px; background: var(--info-soft); color: var(--info); }
.at-read.ok { background: var(--accent-soft); color: var(--accent); } .at-read.bad { background: var(--gold-soft); color: var(--gold); }
.gh-fine-cat { font-size: 12px; color: var(--muted); margin: -4px 0 10px; }
.gh-fines { display: flex; flex-direction: column; gap: 6px; }
.gh-fine { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 10px; background: var(--bg-soft, rgba(127,127,127,.05)); font-size: 13px; }
.gh-fine span { display: flex; flex-direction: column; } .gh-fine small { color: var(--faint); font-size: 11.5px; } .gh-fine b { font-family: var(--display); white-space: nowrap; }
.gh-fine.tot { background: rgba(220,53,69,.08); } .gh-fine.tot b { color: var(--danger); font-size: 16px; }
.gh-note { color: var(--faint); font-size: 11.5px; line-height: 1.7; margin: 10px 0 0; }
.gh-nins { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; } .gh-nin { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); } .gh-nin .input { height: 38px; }
.gh-nres { display: flex; align-items: center; justify-content: space-around; gap: 10px; margin-top: 12px; padding: 12px; border-radius: 12px; background: var(--bg-soft, rgba(127,127,127,.05)); }
.gh-nres > div { display: flex; flex-direction: column; align-items: center; gap: 4px; } .gh-nres small { color: var(--muted); font-size: 11.5px; } .gh-nres b { font-family: var(--display); font-size: 22px; }
.gh-nres .up b { color: var(--accent); } .gh-nres .down b { color: var(--danger); } .gh-arrow svg { width: 20px; height: 20px; color: var(--faint); }
[dir=ltr] .gh-arrow svg { transform: scaleX(-1); }
.gh-band { font-size: 11.5px; font-weight: 700; padding: 2px 9px; border-radius: 99px; background: color-mix(in srgb, var(--c) 20%, transparent); color: var(--c); }
.gc-k { cursor: pointer; font: inherit; text-align: start; border: 1px solid var(--line); } .gc-k.on { border-color: currentColor; }
.gc-kinds { display: flex; flex-wrap: wrap; gap: 6px; } .gc-kinds button { display: inline-flex; align-items: center; gap: 5px; font: inherit; font-size: 12.5px; padding: 6px 11px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--muted); cursor: pointer; }
.gc-kinds button svg { width: 14px; height: 14px; } .gc-kinds button b { font-size: 11px; opacity: .7; } .gc-kinds button.on { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); }
.gc-month { padding: 14px; margin-bottom: 12px; } .gc-month h3 { display: flex; align-items: center; gap: 8px; font-size: 14px; margin: 0 0 8px; } .gc-month h3 span { font-size: 11.5px; padding: 1px 8px; border-radius: 99px; background: var(--line); color: var(--muted); }
.gc-row { display: flex; align-items: center; gap: 12px; padding: 10px 8px; border-top: 1px solid var(--line); cursor: pointer; } .gc-row:first-of-type { border-top: 0; } .gc-row:hover { background: var(--bg-soft, rgba(127,127,127,.05)); border-radius: 10px; }
.gc-ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: none; } .gc-ic svg { width: 16px; height: 16px; }
.gc-ic.c-danger { background: rgba(220,53,69,.12); color: var(--danger); } .gc-ic.c-gold { background: var(--gold-soft); color: var(--gold); } .gc-ic.c-info { background: var(--info-soft); color: var(--info); }
.gc-who { flex: 1; min-width: 0; display: flex; flex-direction: column; } .gc-who b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .gc-who small { color: var(--muted); font-size: 12px; }
.gc-when { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; font-size: 13px; }
@media (max-width: 640px) { .gc-when b { font-size: 12px; } .gc-row { gap: 9px; } .gh-nins { grid-template-columns: 1fr 1fr; } }

/* journal entry: reversal link and supporting documents */
.jv-rev { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; padding: 8px 12px; border-radius: 10px; background: var(--surface2); border: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.jv-rev svg { width: 16px; height: 16px; flex: none; color: var(--gold); }
.jv-files { margin-top: 14px; padding: 12px 14px; border: 1px dashed var(--line2); border-radius: 12px; background: var(--surface2); }
.jv-files-h { display: flex; align-items: center; gap: 8px; min-height: 32px; }
.jv-files-h b { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; }
.jv-files-h b svg { width: 16px; height: 16px; }
.jv-files-l { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.jv-files-l li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); }
.jv-files-l a { display: inline-flex; align-items: center; gap: 8px; min-width: 0; color: inherit; text-decoration: none; font-size: 13px; }
.jv-files-l a span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jv-files-l a svg { width: 16px; height: 16px; flex: none; color: var(--accent, var(--teal)); }
.jv-files-l a:hover span { text-decoration: underline; }
.jv-files-l small { color: var(--faint); font-size: 11.5px; white-space: nowrap; }
.jv-files-l .jv-ext { flex: none; font-style: normal; font-size: 10.5px; font-weight: 700; letter-spacing: .4px; padding: 2px 7px; border-radius: 6px; background: var(--surface2); border: 1px solid var(--line); color: var(--muted); }
.jv-files-e { display: block; margin-top: 6px; color: var(--faint); font-size: 12px; line-height: 1.7; }
.jr-note { margin: 0 0 12px; color: var(--muted); font-size: 13px; line-height: 1.8; }
@media (max-width: 640px) {
  .jv-files-l li { grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px; }
  .jv-files-l li small:nth-of-type(2) { display: none; }
}

/* journal list: reversed badge */
.jv-revchip { display: inline-flex; align-items: center; gap: 4px; }
.jv-revchip svg { width: 12px; height: 12px; }
/* journal entry on a phone: one card per line instead of the wide table */
.jv-cards { display: none; }
@media (max-width: 640px) {
  .jv-tbl { display: none; }
  .jv-cards { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
  .jvc { padding: 12px 14px; border-radius: 12px; background: var(--surface2); border: 1px solid var(--line); }
  .jvc-acc { display: flex; align-items: baseline; gap: 8px; color: inherit; text-decoration: none; font-size: 14px; line-height: 1.5; }
  .jvc-acc b { color: var(--gold); flex: none; }
  .jvc-acc span { min-width: 0; overflow-wrap: anywhere; }
  .jvc-meta { margin-top: 4px; color: var(--faint); font-size: 12px; line-height: 1.6; }
  .jvc-amts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
  .jvc-amt { padding: 8px 10px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px; }
  .jvc-amt small { color: var(--faint); font-size: 11px; }
  .jvc-amt b { font-size: 14.5px; font-variant-numeric: tabular-nums; }
  .jvc-amt.nil b { color: var(--faint); font-weight: 400; }
  .jvc-tot { border-style: solid; }
  .jvc-tot-h { display: flex; align-items: center; gap: 8px; }
  .jvc-tot-h svg { width: 18px; height: 18px; flex: none; }
  .jvc-tot-h small { margin-inline-start: auto; font-size: 12px; }
  .jvc-tot.ok .jvc-tot-h svg, .jvc-tot.ok .jvc-tot-h small { color: var(--teal); }
  .jvc-tot.bad .jvc-tot-h svg, .jvc-tot.bad .jvc-tot-h small { color: var(--danger); }
}

/* the install pill / banner floats above everything; while a window is open it would cover that window's buttons
   (e.g. "void" at the bottom of a journal entry on a phone), so it steps aside until the window closes */
body:has(> .overlay) #nxInstall { display: none !important; }

/* ---- department sections (admin affairs, marketing, engineering, security) ---- */
.dp-board .dp-card { display: block; color: inherit; text-decoration: none; cursor: pointer; transition: transform .2s var(--ease), box-shadow .2s; }
.dp-board .dp-card:hover { transform: translateY(-2px); }
.dp-card .l { color: var(--text); font-weight: 600; font-size: 14px; }
.dp-card-foot { margin-top: 10px; min-height: 24px; }
.dp-maint { display: flex; align-items: center; gap: 14px; padding: 16px 18px; margin-bottom: 18px; }
.dp-maint-ic { width: 44px; height: 44px; flex: none; border-radius: 12px; display: grid; place-items: center; color: var(--info); background: var(--info-soft, color-mix(in srgb, var(--info) 14%, transparent)); }
.dp-maint-ic svg { width: 22px; height: 22px; }
.dp-maint-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.dp-maint-txt small { color: var(--muted); }
.dp-maint-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.dp-acts { text-align: end; white-space: nowrap; }
.dp-acts .btn.sm { margin-inline-end: 4px; }
.dp-q { width: 200px; }
tr.dp-al-danger td.main-cell { box-shadow: inset -3px 0 0 var(--danger); }
tr.dp-al-gold td.main-cell { box-shadow: inset -3px 0 0 var(--gold); }
[dir='ltr'] tr.dp-al-danger td.main-cell { box-shadow: inset 3px 0 0 var(--danger); }
[dir='ltr'] tr.dp-al-gold td.main-cell { box-shadow: inset 3px 0 0 var(--gold); }
@media (max-width: 860px) {
  .dp-q { width: 100%; }
  .dp-maint { flex-wrap: wrap; }
  .dp-maint .btn { width: 100%; justify-content: center; }
  .dp-acts { white-space: normal; display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
}

.rv-lock { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); } .rv-lock svg { width: 14px; height: 14px; color: var(--gold); }

/* ---- summons (meeting / investigation) ---- */
.sm-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 12px; }
.sm-card { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface2); }
.sm-card.off { opacity: .6; }
.sm-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sm-no { color: var(--faint); font-size: 12px; }
.sm-subj { font-size: 15px; line-height: 1.5; }
.sm-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; color: var(--muted); font-size: 13px; }
.sm-meta span { display: inline-flex; align-items: center; gap: 6px; }
.sm-meta svg, .sm-law svg { width: 15px; height: 15px; flex: none; }
.sm-notes { font-size: 13px; color: var(--text); background: var(--surface); border-radius: 10px; padding: 8px 10px; white-space: pre-wrap; }
.sm-law { display: flex; gap: 8px; align-items: flex-start; font-size: 12.5px; line-height: 1.6; color: var(--gold); background: color-mix(in srgb, var(--gold) 10%, transparent); border-radius: 10px; padding: 8px 10px; margin-top: 10px; }
.sm-act { display: flex; justify-content: flex-end; }
.sm-people { display: flex; flex-direction: column; border-top: 1px solid var(--line); margin-top: 4px; }
.sm-person { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.sm-person:last-child { border-bottom: 0; }
.sm-pn { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.sm-pn b, .sm-pn small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sm-pn small { color: var(--faint); font-size: 12px; }
.sm-mark { display: inline-flex; gap: 4px; }
.sm-kind button { padding: 8px 22px; font-size: 14px; }
.sm-kinds { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sm-kind button { display: inline-flex; align-items: center; gap: 6px; }
.sm-kind .sm-plus { padding: 8px 12px; color: var(--gold); }
.sm-kind .sm-plus svg { width: 16px; height: 16px; }
.sm-kx { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; font-size: 14px; line-height: 1; color: var(--faint); }
.sm-kx:hover { background: color-mix(in srgb, var(--danger) 18%, transparent); color: var(--danger); }
.sm-addk { display: inline-flex; align-items: center; gap: 6px; }
.sm-addk .input { width: 200px; padding-block: 8px; }
.sm-pick-bar { display: flex; gap: 8px; flex-wrap: wrap; margin: 6px 0 8px; }
.sm-pick-bar #smQ { flex: 2 1 200px; } .sm-pick-bar #smDept { flex: 1 1 160px; }
.sm-pick { max-height: 280px; overflow-y: auto; border: 1px solid var(--line); border-radius: 12px; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.sm-opt { display: flex; align-items: center; gap: 10px; padding: 9px 12px; cursor: pointer; border-bottom: 1px solid var(--line); }
.sm-opt:hover { background: var(--surface2); }
.sm-opt input { width: 18px; height: 18px; flex: none; accent-color: var(--gold); }
.sm-opt span { display: flex; flex-direction: column; min-width: 0; }
.sm-opt b, .sm-opt small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sm-opt small { color: var(--faint); font-size: 12px; }
@media (max-width: 680px) {
  .sm-list { grid-template-columns: 1fr; }
  .sm-person { flex-wrap: wrap; } .sm-pn { flex-basis: 100%; }
  .sm-pick { grid-template-columns: 1fr; max-height: 240px; }
  .sm-act .btn { width: 100%; justify-content: center; }
}

/* ---- refresh check: what isn't saved yet, with a button to each ---- */
.rl-list { display: flex; flex-direction: column; gap: 8px; }
.rl-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2, rgba(255,255,255,.03)); }
.rl-ic { width: 32px; height: 32px; flex: none; border-radius: 9px; display: grid; place-items: center; color: var(--gold); background: color-mix(in srgb, var(--gold) 14%, transparent); }
.rl-ic svg { width: 16px; height: 16px; }
.rl-t { flex: 1; min-width: 0; font-size: 14px; line-height: 1.5; }
.rl-item .btn { flex: none; white-space: nowrap; }
.rp-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.rp-head h3 { margin: 0; display: inline-flex; align-items: center; gap: 8px; font-size: 17px; }
.rp-head h3 svg { width: 18px; height: 18px; color: var(--gold); }

/* ---- tidier menu: family headings, slimmer rows, tour button by the logo ---- */
.nav .nav-cluster { display: flex; align-items: center; gap: 10px; margin: 16px 14px 6px; font-size: 11.5px; font-weight: 700; letter-spacing: .03em; color: var(--muted); }
.nav .nav-cluster::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.nav .nav-group { margin-bottom: 2px; }
.nav .nav-sec { padding: 10px 14px; font-size: 15px; gap: 12px; }
.nav .nav-sec svg { width: 19px; height: 19px; }
.brand .brand-tour { margin-inline-start: auto; flex: none; color: var(--gold); border-color: color-mix(in srgb, var(--gold) 35%, transparent); }
.brand .brand-tour svg { width: 15px; height: 15px; }
@media (max-width: 900px) { .brand .brand-tour + .nav-close { margin-inline-start: 6px; } }
a.kpi-tag { text-decoration: none; cursor: pointer; transition: border-color .2s, background .2s; }
a.kpi-tag:hover { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); }
@keyframes flashHl { 0% { box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 70%, transparent); } 100% { box-shadow: 0 0 0 0 transparent; } }
.flash-hl { animation: flashHl 1.4s ease-out; }
.fin-notes { display: grid; gap: 8px; margin: 0 0 12px; }
.fin-note { display: flex; align-items: flex-start; gap: 12px; padding: 10px 14px; border: 1px solid color-mix(in srgb, var(--danger) 45%, transparent); border-inline-start: 4px solid var(--danger); border-radius: 14px; background: color-mix(in srgb, var(--danger) 7%, transparent); }
.fin-note .fin-tx { flex: 1; min-width: 0; } .fin-note .fin-note-t { margin: 3px 0; white-space: pre-wrap; } .fin-note small { color: var(--muted); }
.fin-note .btn { align-self: center; }
.fin-nrow td { background: color-mix(in srgb, var(--gold) 5%, transparent); } .fin-nl { padding: 4px 0; font-size: 13px; } .fin-nl small { color: var(--muted); }
@media (max-width: 640px) { .fin-note { flex-wrap: wrap; } .fin-note .btn { width: 100%; justify-content: center; } }
/* wide windows: maximize to the whole screen */
.modal-h .modal-max { margin-inline-start: auto; } .modal-h .modal-max + [data-close] { margin-inline-start: 6px; }
.modal.max { width: 100vw !important; max-width: 100vw; height: 100vh; max-height: 100vh; border-radius: 0; }
.modal.max .modal-b { flex: 1; }
/* role permissions: the headings stay on top (and the page names on the side) while scrolling */
.perm-scroll { max-height: min(56vh, 560px); overflow: auto; border: 1px solid var(--line); border-radius: 12px; }
.modal.max .perm-scroll { max-height: calc(100vh - 330px); }
.perm-scroll .perm-table thead th { position: sticky; top: 0; z-index: 2; background: var(--surface); box-shadow: 0 1px 0 var(--line); vertical-align: bottom; }
.perm-scroll .perm-table td:first-child, .perm-scroll .perm-table th:first-child { position: sticky; inset-inline-start: 0; z-index: 1; background: var(--surface); }
.perm-scroll .perm-table thead th:first-child { z-index: 3; }
.perm-table tbody tr:hover td { background: color-mix(in srgb, var(--accent) 7%, var(--surface)); }
.perm-table .pc-on { background: color-mix(in srgb, var(--accent) 12%, var(--surface)) !important; }
.perm-table thead th.pc-on { color: var(--accent); }
.overlay:has(> .modal.max) { padding: 0; place-items: stretch; } .overlay > .modal.max { margin: 0; }
/* role editor: the menu this role gets */
.role-prev { display: flex; flex-wrap: wrap; gap: 8px; padding: 10px; border: 1px dashed var(--line); border-radius: 12px; }
.rp-sec { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2, transparent); color: inherit; cursor: pointer; font: inherit; font-size: 13px; }
.rp-sec svg { width: 15px; height: 15px; color: var(--muted); } .rp-sec small { color: var(--faint); }
.rp-sec:hover, .rp-sec.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); } .rp-sec.on svg { color: var(--accent); }
.rp-pages { flex-basis: 100%; font-size: 12.5px; color: var(--muted); padding: 2px 4px; }
.perm-table td.perm-cause { background: color-mix(in srgb, var(--gold) 30%, var(--surface)) !important; box-shadow: inset 0 0 0 2px var(--gold); }

/* ---------- employees: one continuous list; search bar + column titles stay on top ---------- */
.emp-list .t thead th { position: sticky; top: 0; z-index: 2; box-shadow: 0 1px 0 var(--line); }
@media (min-width: 861px) {
  .emp-list #empScroll { overflow: auto; overscroll-behavior: contain; scrollbar-width: thin; }
}
@media (max-width: 860px) {
  .emp-head > .toolbar { position: sticky; top: var(--tb-h, 60px); z-index: 12; background: var(--bg); margin-inline: -14px; padding: 8px 14px; margin-bottom: 10px; border-bottom: 1px solid var(--line); }
}

/* clickable KPI cards: hover lift + the selected one is outlined */
.card.kpi[data-act] { transition: transform .15s var(--ease), box-shadow .15s var(--ease); }
.card.kpi[data-act]:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.card.kpi.on { outline: 2px solid var(--accent); outline-offset: -2px; }

/* any page that is one long list: it scrolls inside its card (list-fit.js) with the column titles kept on top */
.table-scroll.fit-scroll { overflow: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.table-scroll.fit-scroll .t thead th { position: sticky; top: 0; z-index: 2; box-shadow: 0 1px 0 var(--line); }
.field[hidden] { display: none; }
#loginForm .forgot-row { justify-content: space-between; gap: 10px; }
.link-btn svg { width: 14px; height: 14px; vertical-align: -2px; }

/* sidebar brand: the company's name (and logo) big on top, AXIS HR small under it */
.brand-co .brand-co-name { font-size: 17px; line-height: 1.25; letter-spacing: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.brand-co .brand-by { font-family: var(--display); font-weight: 700; font-size: 11px; letter-spacing: .14em; margin-top: 3px; color: var(--muted); }
.brand-co .brand-by b { color: var(--accent); }
.brand-co .brand-by { text-align: end; }
html[dir=rtl] .brand-co .brand-by { text-align: right; }
.brand-co .brand-by i { font-style: normal; font-weight: 500; letter-spacing: .02em; text-transform: lowercase; opacity: .85; margin-inline-end: 2px; }

/* "My file": every tile is a button that opens its place */
.mf-tile.mf-click { cursor: pointer; position: relative; padding-inline-end: 30px; transition: transform .15s var(--ease), box-shadow .15s var(--ease), border-color .15s var(--ease); }
.mf-tile.mf-click::after { content: '›'; /* the glyph mirrors by itself in Arabic */ position: absolute; inset-inline-end: 12px; top: 50%; transform: translateY(-50%); font-size: 20px; line-height: 1; color: var(--faint); transition: color .15s, transform .15s; }
.mf-tile.mf-click:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.mf-tile.mf-click:hover::after { color: var(--accent); }
.mf-tile.mf-click:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.mf-tile.mf-click:active { transform: translateY(0); }
.mf-hs { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; }
.mf-hs > div { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface2, transparent); }
.mf-hs small { color: var(--muted); font-size: 12px; } .mf-hs b { font-size: 15px; }
@keyframes mfFlash { 0%, 60% { background: var(--accent-soft); } 100% { background: transparent; } }
.mf-flash { animation: mfFlash 1.6s ease-out 1; border-radius: 12px; }

/* org chart: work-site switch (All / each hotel or branch) */
.org-sitebar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.org-sitebar > span { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; font-weight: 600; }
.org-sitebar > span svg { width: 16px; height: 16px; }
.org-sitebar .seg button { text-transform: none; display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.org-sitebar .seg button .num { font-size: 11.5px; padding: 1px 7px; border-radius: 999px; background: var(--surface2); color: var(--muted); }
.org-sitebar .seg button.on .num { background: var(--accent); color: #fff; }
.org-site-name { font-weight: 700; color: var(--accent); font-size: 14px; }
@media (max-width: 700px) { .org-sitebar { gap: 8px; } .org-sitebar .seg { width: 100%; } .org-sitebar .seg button { flex: 1 1 auto; justify-content: center; } }

/* housing dashboard: building switch */
.dk-bsel button { display: inline-flex; align-items: center; gap: 6px; }
.dk-bsel button b { font-weight: 700; font-size: 11.5px; padding: 1px 7px; border-radius: 999px; background: color-mix(in srgb, var(--dk-text) 10%, transparent); }
.dk-bsel button.on b { background: color-mix(in srgb, var(--dk-gold) 30%, transparent); }

/* housing dashboard: one card per building (tap = that building only) */
.dk-bcards { flex: 1 1 100%; display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; margin-top: 4px; }
.dk-bcard { text-align: start; display: flex; flex-direction: column; gap: 9px; padding: 14px 16px; border-radius: 18px; border: 1px solid var(--dk-kpi-line); background: var(--dk-kpi); color: inherit; font: inherit; cursor: pointer; transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.dk-bcard:hover { transform: translateY(-2px); }
.dk-bcard.on { border-color: var(--dk-gold); box-shadow: inset 0 0 0 1px var(--dk-gold); }
.dk-bc-h { display: flex; align-items: center; gap: 8px; font-size: 14.5px; }
.dk-bc-h svg { width: 18px; height: 18px; color: var(--dk-gold); flex: none; }
.dk-bc-h .dk-pill, .dk-bc-p { margin-inline-start: auto; }
.dk-bc-p { font-weight: 800; font-size: 13px; color: var(--dk-muted); }
.dk-bc-n { display: flex; align-items: baseline; gap: 8px; }
.dk-bc-n strong { font-size: 30px; font-weight: 800; line-height: 1; }
.dk-bc-n small { color: var(--dk-muted); font-size: 12px; }
.dk-bcard .dk-hb-bar { margin-top: 0; }
.dk-bc-f { display: flex; flex-wrap: wrap; gap: 4px 14px; color: var(--dk-muted); font-size: 12px; }
@media (max-width: 560px) { .dk-bsel { width: 100%; } .dk-bsel button { flex: 1 1 auto; justify-content: center; padding-inline: 8px; } .dk-bsel button b { display: none; } }

/* record forms: part headings and 1-5 rating circles (manager's appraisal) */
.form-sec { grid-column: 1 / -1; margin: 18px 0 2px; padding-bottom: 7px; border-bottom: 2px solid var(--accent-soft); font-size: 15px; font-weight: 800; color: var(--text); }
.rate-scale { grid-column: 1 / -1; margin: 6px 0 2px; color: var(--muted); font-size: 12.5px; line-height: 1.7; }
.field.rate-row { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 0; padding: 11px 0; border-bottom: 1px solid var(--line); }
.rate-txt { min-width: 0; } .rate-txt > label { margin: 0 0 3px; } .rate-txt small { display: block; line-height: 1.55; }
.rate-dots { display: flex; gap: 8px; flex: none; }
.field .rate-dot { position: relative; display: block; margin: 0; cursor: pointer; }
.rate-dot input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.rate-dot span { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; border: 2px solid var(--line2); color: var(--muted); font-weight: 700; font-size: 14px; transition: background .15s, border-color .15s, color .15s, box-shadow .15s; }
.rate-dot:hover span { border-color: var(--accent); color: var(--accent); }
.rate-dot input:checked + span { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 0 0 4px var(--accent-soft); }
.rate-dot input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (max-width: 640px) { .field.rate-row { flex-direction: column; align-items: stretch; gap: 9px; } .rate-dots { justify-content: space-between; } .rate-dot span { width: 46px; height: 46px; font-size: 15px; } }

/* recruitment: the candidate's employment form (link, status, what came back) */
.af-box { border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; margin: 4px 0 14px; background: var(--surface2); }
.af-hd { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; } .af-hd b { display: inline-flex; align-items: center; gap: 7px; } .af-hd b svg { width: 16px; height: 16px; } .af-hd small { color: var(--muted); }
.af-intro { margin: 6px 0 10px; color: var(--muted); font-size: 12.5px; line-height: 1.7; }
.af-acts { display: flex; gap: 8px; flex-wrap: wrap; }
.af-view h3 { margin: 14px 0 6px; font-size: 14px; color: var(--accent); } .af-view h3:first-child { margin-top: 0; }
.af-view table { width: 100%; margin-bottom: 4px; } .af-view .np-kv th { width: 34%; text-align: start; color: var(--muted); font-weight: 600; }
@media (max-width: 640px) { .af-acts .btn { flex: 1 1 calc(50% - 4px); justify-content: center; } }

/* recruitment: the job offer (terms window, total, summary line) */
.af-box + .af-box { margin-top: -4px; }
.jo-sum b { color: var(--text); } .jo-no { color: var(--muted); font-size: 12.5px; margin-bottom: 2px; } .jo-no b { color: var(--text); }
.jo-inline { display: flex; gap: 8px; align-items: center; } .jo-inline .input { flex: 1; min-width: 0; } .jo-inline .btn { white-space: nowrap; }
.jo-total { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 14px; margin: 4px 0 14px; border-radius: 12px; background: var(--gold-soft); color: var(--gold); font-weight: 600; }
.jo-total b { font-size: 18px; }
.jo-g3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 14px; } @media (max-width: 760px) { .jo-g3 { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .jo-inline { flex-wrap: wrap; } .jo-inline .btn { flex: 1 1 100%; justify-content: center; } }

/* ---------------- online now: a pop-up at the bottom corner that comes and goes (public/js/v-online.js) ---------------- */
.nxon { position: fixed; z-index: 44; inset-inline-start: calc(var(--sidebar) + 20px); bottom: max(20px, env(safe-area-inset-bottom)); display: flex; flex-direction: column; align-items: flex-start; gap: 8px; font-size: 13px; pointer-events: none; }
.nxon.is-show .nxon-pop, .nxon.is-open .nxon-panel { pointer-events: auto; }
body.kiosk .nxon { display: none !important; }
/* the glimpse: small and see-through, it fades in gently, stays a moment and fades out gently */
.nxon-pop { display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 12px; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--text) 14%, transparent); background: color-mix(in srgb, var(--surface) 42%, transparent); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); color: var(--text); font: inherit; font-size: 12.5px; cursor: pointer;
  opacity: 0; transform: translateY(6px); transition: opacity .8s ease, transform .8s ease; }
.nxon.is-show .nxon-pop { opacity: .9; transform: none; transition-duration: .6s; }
.nxon.is-open .nxon-pop { display: none; }
.nxon-pop b { font-weight: 700; font-variant-numeric: tabular-nums; color: #22c55e; } .nxon-pop .nxon-dot { width: 7px; height: 7px; }
@keyframes nxonIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.nxon-hd em, .nxon-sep em { font-style: normal; color: #22c55e; font-variant-numeric: tabular-nums; }
.nxon-dot { width: 9px; height: 9px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 0 rgba(34, 197, 94, .55); animation: nxonPulse 2.2s infinite; flex: none; display: inline-block; }
@keyframes nxonPulse { 0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, .55); } 70% { box-shadow: 0 0 0 8px rgba(34, 197, 94, 0); } 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); } }
.nxon-panel { display: none; width: min(330px, calc(100vw - 28px)); max-height: min(60vh, 460px); border-radius: 16px; background: var(--surface); border: 1px solid var(--line2); box-shadow: var(--shadow); overflow: hidden; flex-direction: column; }
.nxon.is-open .nxon-panel { display: flex; animation: nxonIn .25s var(--ease); }
.nxon-hd { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.nxon-hd b { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; }
.nxon-x { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 9px; border: 1px solid var(--line); background: none; color: var(--muted); cursor: pointer; } .nxon-x svg { width: 15px; height: 15px; }
.nxon-list { overflow-y: auto; padding: 6px 8px; }
.nxon-row { display: flex; align-items: center; gap: 10px; padding: 8px 6px; border-radius: 10px; } .nxon-row.dim { opacity: .62; }
.nxon-av { width: 34px; height: 34px; flex: none; border-radius: 50%; display: grid; place-items: center; font-weight: 700; background: var(--surface2); border: 1px solid var(--line); color: var(--text); }
.nxon-av.me { border-color: color-mix(in srgb, var(--accent) 60%, transparent); color: var(--accent); }
.nxon-who { flex: 1; min-width: 0; display: grid; } .nxon-who b { font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .nxon-who b i { font-style: normal; font-weight: 500; font-size: 11.5px; color: var(--accent); }
.nxon-who small, .nxon-meta small { color: var(--muted); font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nxon-meta { flex: none; display: grid; justify-items: end; text-align: end; } .nxon-meta .dv { opacity: .8; }
.nxon-sep { margin: 8px 6px 2px; padding-top: 8px; border-top: 1px dashed var(--line); color: var(--muted); font-size: 12px; font-weight: 600; }
.nxon-empty { margin: 4px 6px 6px; color: var(--muted); font-size: 12.5px; }
.nxon-ft { padding: 8px 14px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.notif.nxon-bell .ic { background: color-mix(in srgb, #22c55e 14%, transparent); } .notif.nxon-bell b { color: #22c55e; } .notif.nxon-bell > span:last-child { display: grid; gap: 2px; }
@media (max-width: 860px) { .nxon { inset-inline-start: 14px; bottom: max(16px, env(safe-area-inset-bottom)); } }
.nxon { transition: bottom .35s var(--ease); }
@media print { .nxon { display: none !important; } }

/* request card: «needs Chamber of Commerce attestation» under the title */
.req-card .rq-chamber-row { margin: 8px 0 2px; }
.req-card .rq-chamber { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; } .req-card .rq-chamber svg { width: 13px; height: 13px; }
.rq-chamber-f { gap: 6px; } .rq-chamber-f svg { width: 14px; height: 14px; }
.rq-chamber-f .rq-n { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; display: inline-grid; place-items: center; font-size: 11.5px; background: color-mix(in srgb, var(--gold, #c9a227) 22%, transparent); }

/* tables: the horizontal and vertical scrollbars are always shown (macOS hides them otherwise until you scroll).
   A styled ::-webkit-scrollbar makes Chrome/Safari draw a permanent bar; scrollbar-width must stay «auto» for it to apply. */
.table-scroll, .table-scroll.fit-scroll, .emp-list #empScroll { scrollbar-width: auto; scrollbar-color: auto; }
.table-scroll::-webkit-scrollbar, .emp-list #empScroll::-webkit-scrollbar { width: 11px; height: 11px; }
.table-scroll::-webkit-scrollbar-track, .emp-list #empScroll::-webkit-scrollbar-track { background: color-mix(in srgb, var(--text) 7%, transparent); border-radius: 99px; }
.table-scroll::-webkit-scrollbar-thumb, .emp-list #empScroll::-webkit-scrollbar-thumb { background: color-mix(in srgb, var(--accent) 60%, var(--muted)); border-radius: 99px; border: 2px solid transparent; background-clip: padding-box; min-height: 40px; min-width: 40px; }
.table-scroll::-webkit-scrollbar-thumb:hover, .emp-list #empScroll::-webkit-scrollbar-thumb:hover { background: var(--accent); background-clip: padding-box; }
.table-scroll::-webkit-scrollbar-corner, .emp-list #empScroll::-webkit-scrollbar-corner { background: transparent; }

/* employee numbering: auto / manual */
.enc-lab{display:flex;align-items:center;justify-content:space-between;gap:8px}
.enc-lab label{margin:0}
.enc-btn{display:inline-flex;align-items:center;gap:4px;border:0;background:none;color:var(--accent);font:inherit;font-size:12px;font-weight:600;cursor:pointer;padding:2px 4px;border-radius:6px}
.enc-btn:hover{background:color-mix(in srgb,var(--accent) 10%,transparent)}
.enc-btn svg{width:13px;height:13px}
.enc-opts{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-bottom:14px}
@media(max-width:520px){.enc-opts{grid-template-columns:1fr}}
.enc-opt{display:flex;gap:10px;align-items:flex-start;padding:12px 14px;border:1.5px solid var(--line);border-radius:14px;cursor:pointer;transition:border-color .15s,background .15s}
.enc-opt input{position:absolute;opacity:0;pointer-events:none}
.enc-opt:has(input:checked){border-color:var(--accent);background:color-mix(in srgb,var(--accent) 8%,transparent)}
.enc-ic{flex:none;width:34px;height:34px;border-radius:10px;display:grid;place-items:center;background:color-mix(in srgb,var(--accent) 12%,transparent);color:var(--accent)}
.enc-ic svg{width:17px;height:17px}
.enc-opt b{display:block;font-size:14.5px;margin-bottom:2px}
.enc-opt small{color:var(--muted);font-size:12.5px;line-height:1.6}
.enc-next{display:flex;align-items:center;gap:10px;flex-wrap:wrap;padding:12px 14px;border-radius:12px;border:1px dashed color-mix(in srgb,var(--accent) 45%,var(--line));background:color-mix(in srgb,var(--accent) 6%,transparent);font-size:13.5px;color:var(--muted)}
.enc-next b{color:var(--text);font-size:17px;letter-spacing:.5px}
.enc-bad{color:var(--danger,#d33)}

/* staff by branch (home) */
.br-card .ic{color:var(--c);background:color-mix(in srgb,var(--c) 14%,transparent)}
.br-card .v{color:var(--c)}
.br-bar{height:5px;border-radius:99px;background:color-mix(in srgb,var(--text) 8%,transparent);overflow:hidden;margin-top:8px}
.br-bar i{display:block;height:100%;border-radius:99px;background:var(--c)}

/* employee home: his own section order */
.self-secs-bar{display:flex;justify-content:flex-end;margin:0}
.self-sec{min-width:0}
.my-req .card-h h3{display:flex;align-items:center;gap:8px}
.my-req .card-h h3 svg{width:18px;height:18px;color:var(--accent)}
.my-req .card-h{gap:10px;flex-wrap:wrap}
.my-req-row{color:inherit;text-decoration:none;border-radius:12px;transition:background .15s}
.my-req-row:hover{background:color-mix(in srgb,var(--accent) 7%,transparent)}
.my-req-row .ic{flex:none;width:36px;height:36px;border-radius:10px;display:grid;place-items:center;background:color-mix(in srgb,var(--accent) 12%,transparent);color:var(--accent)}
.my-req-row .ic svg{width:17px;height:17px}
.my-req-empty{padding:16px 20px;color:var(--muted);font-size:13.5px}
.hs-hint{color:var(--muted);font-size:13px;line-height:1.7;margin:0 0 12px}
.hs-list{display:flex;flex-direction:column;gap:8px}
.hs-row{display:flex;align-items:center;gap:8px;padding:10px 12px;border:1px solid var(--line);border-radius:12px;transition:opacity .15s}
.hs-row.off{opacity:.5}
.hs-n{width:24px;height:24px;border-radius:50%;display:grid;place-items:center;font-size:12px;font-weight:700;background:color-mix(in srgb,var(--accent) 14%,transparent);color:var(--accent)}
.hs-row .icon-btn[disabled]{opacity:.3;pointer-events:none}
.hs-sw{display:flex;align-items:center;gap:5px;font-size:12.5px;color:var(--muted);cursor:pointer;margin-inline-start:4px}

/* probation pill: violet, red in its last 10 days */
.pb-due:not(.soon){border-color:color-mix(in srgb,#8b7cf6 55%,transparent);background:color-mix(in srgb,#8b7cf6 13%,transparent);color:#8b7cf6}
.ctd-opt[disabled]{opacity:.5;cursor:not-allowed}

/* org chart: automatic / manual layout */
.org-mode button{display:inline-flex;align-items:center;gap:5px}
.org-mode svg{width:14px;height:14px}
.org-drag-hint{display:flex;align-items:center;gap:8px;margin:-4px 0 12px;padding:9px 14px;border-radius:12px;font-size:13px;color:var(--accent);background:color-mix(in srgb,var(--accent) 8%,transparent);border:1px dashed color-mix(in srgb,var(--accent) 40%,var(--line))}
.org-drag-hint svg{width:15px;height:15px;flex:none}
.org-movable .org-node{cursor:grab;touch-action:none;user-select:none}
.org-movable li.org-dragging{z-index:5}
.org-movable li.org-dragging > .org-node{cursor:grabbing;box-shadow:0 14px 34px rgba(0,0,0,.35);outline:2px solid var(--accent)}
.org-chart.net .tree li[data-okey]{transition:none}

/* previous salary advances on an advance request */
.adv-h{margin:12px 0 4px;padding:12px 14px;border-radius:14px;border:1px solid color-mix(in srgb,var(--accent) 35%,var(--line));background:color-mix(in srgb,var(--accent) 6%,transparent)}
.adv-h-top{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-bottom:10px}
.adv-h-top b{display:inline-flex;align-items:center;gap:6px;font-size:14px}
.adv-h-top b svg,.adv-h-empty svg{width:16px;height:16px;color:var(--accent)}
.adv-h-empty{display:flex;align-items:center;gap:8px;flex-wrap:wrap;color:var(--muted);font-size:13px}
.adv-h-pend{font-size:12px;padding:2px 9px;border-radius:99px;background:color-mix(in srgb,var(--gold, #dcb468) 15%,transparent);color:var(--gold, #dcb468)}
.adv-figs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.adv-f{padding:9px 12px;border-radius:11px;background:var(--surface);border:1px solid var(--line)}
.adv-f small{display:block;color:var(--muted);font-size:11.5px;margin-bottom:2px}
.adv-f b{font-size:15.5px}
.adv-f.ok b{color:var(--green, #2dd4bf)}
.adv-f.due b{color:var(--danger)}
.adv-reason td{color:var(--muted);font-size:12.5px;padding-top:0!important}
.adv-src{color:var(--muted);font-size:12px;margin:12px 0 0;line-height:1.7}
@media(max-width:420px){.adv-f{padding:8px}.adv-f b{font-size:14px}}

/* salary-advance ceiling in the request form */
.adv-lim{margin:4px 0 12px;padding:12px 14px;border-radius:14px;border:1px solid var(--line);background:var(--surface)}
.adv-lim-top{display:flex;align-items:center;justify-content:space-between;gap:10px}
.adv-lim-top span{display:inline-flex;align-items:center;gap:6px;font-weight:700;font-size:14px}
.adv-lim-top svg{width:16px;height:16px;color:var(--accent)}
.adv-lim-top b{font-size:18px;color:var(--accent)}
.adv-lim small{display:block;color:var(--muted);font-size:12px;line-height:1.7;margin-top:4px}
.adv-lim-st{margin-top:8px;font-size:12.5px;font-weight:600}
.adv-lim.ok{border-color:color-mix(in srgb,var(--green,#2dd4bf) 45%,var(--line))}.adv-lim.ok .adv-lim-st{color:var(--green,#2dd4bf)}
.adv-lim.over{border-color:color-mix(in srgb,var(--danger) 50%,var(--line));background:color-mix(in srgb,var(--danger) 6%,transparent)}.adv-lim.over .adv-lim-st{color:var(--danger)}
.adv-lim .btn{margin-top:10px}
.adv-lim-line{display:flex;align-items:center;gap:6px;flex-wrap:wrap;margin-top:8px;font-size:13px;color:var(--muted)}
.adv-lim-line svg{width:14px;height:14px;color:var(--accent)}
.adv-lim-line b{color:var(--text)}
.adv-lim-line.over b{color:var(--danger)}
.adv-lim-rows{display:grid;grid-template-columns:1fr auto;gap:4px 12px;margin:10px 0 4px;font-size:12.8px}
.adv-lim-rows span{color:var(--muted)}
.adv-lim-rows b{text-align:end}
.adv-lim-rows em{font-style:normal;color:var(--danger);font-size:12px}

.adv-kinds{display:grid;grid-template-columns:1fr 1fr;gap:8px}
@media(max-width:520px){.adv-kinds{grid-template-columns:1fr}}
.adv-kind{display:flex;gap:8px;align-items:flex-start;padding:10px 12px;border:1.5px solid var(--line);border-radius:12px;cursor:pointer}
.adv-kind:has(input:checked){border-color:var(--accent);background:color-mix(in srgb,var(--accent) 8%,transparent)}
.adv-kind input{margin-top:3px;accent-color:var(--accent);width:auto;flex:none;height:auto}
.adv-kind b{display:block;font-size:13.5px}
.adv-kind small{display:block;color:var(--muted);font-size:12px;line-height:1.6}
.adv-warn{display:flex;align-items:center;gap:7px;margin-top:10px;padding:8px 12px;border-radius:10px;font-size:13px;font-weight:600;color:var(--danger);background:color-mix(in srgb,var(--danger) 10%,transparent)}
.adv-warn svg{width:15px;height:15px;flex:none}
.adv-lim-line .tag{margin-inline-end:4px}
.field .adv-kind{flex-direction:row!important;justify-content:flex-start!important;text-align:start}
.field .adv-kind span{flex:1}
.lt-search{max-width:280px;height:36px}
#ltHistory .gov-hd{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
@media(max-width:640px){.lt-search{max-width:none;width:100%}}
.my-req-at{color:var(--accent);font-weight:600}
.my-req-prog{display:flex;gap:4px;margin-top:6px;max-width:180px}
.my-req-prog i{flex:1;height:4px;border-radius:99px;background:color-mix(in srgb,var(--text) 12%,transparent)}
.my-req-prog i.done{background:var(--green,#2dd4bf)}
.my-req-prog i.cur{background:var(--accent);animation:myreqBlink 1.6s ease-in-out infinite}
@keyframes myreqBlink{50%{opacity:.4}}

@media print {
  body.print-org * { visibility: hidden !important; }
  body.print-org .org-chart-card, body.print-org .org-chart-card * { visibility: visible !important; }
  body.print-org .org-chart-card { position: absolute; inset: 0 auto auto 0; width: 100%; border: 0; box-shadow: none; overflow: visible; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  body.print-org .org-chart { overflow: visible; }
  body.print-org .org-tip { display: none !important; }
  @page { size: A4 landscape; margin: 10mm; }
}
.lq-row{display:flex;gap:8px}.lq-row select{flex:1}.lq-row input{width:130px;flex:none}

/* ================= AXIS identity: olive · brown · cream (same as /intro and the logo) ================= */
[data-theme='dark'] {
  --bg: #101109; --bg2: #15160e; --surface: #1c1d14; --surface2: #23251a; --glass: rgba(28, 29, 20, .8);
  --card: #1e1f16;
  --line: rgba(222, 210, 180, .11); --line2: rgba(222, 210, 180, .2);
  --text: #ede7d9; --muted: #aaa496; --faint: #716c5f;
  --accent: #b5c47a; --accent-ink: #15170c; --accent-soft: rgba(181, 196, 122, .14);
  --gold: #d6a66d; --gold-soft: rgba(214, 166, 109, .15);
  --navy: #9fb36a;
  --shadow: 0 20px 50px -20px rgba(0, 0, 0, .75);
}
[data-theme='light'] {
  --bg: #f4ede3; --bg2: #ebe1d2; --surface: #fffdf9; --surface2: #f8f2e8; --glass: rgba(255, 253, 249, .82);
  --card: #fffdf9;
  --line: #e4dacb; --line2: #d6cab6;
  --text: #24241d; --muted: #6c675b; --faint: #a49e8f;
  --accent: #4b5a2e; --accent-ink: #ffffff; --accent-soft: rgba(75, 90, 46, .1);
  --gold: #7a5232; --gold-soft: rgba(122, 82, 50, .1);
  --navy: #4b5a2e;
  --shadow: 0 18px 40px -22px rgba(60, 50, 30, .35);
}
/* AXIS dashboards: the same olive / brown / cream, dark and light */
.dk { --dk-bg: #14150d; --dk-text: #EFE9DB; --dk-muted: rgba(234,226,206,.62); --dk-gold: #E2B77E; --dk-acc: #B5C47A; --dk-card: rgba(255,250,235,.05); --dk-line: rgba(234,226,206,.11); }
.dk-glass { --dk-bg: linear-gradient(160deg,#1a1c11 0%,#13140c 55%,#1d160f 100%); }
.dk-glass::before { background: radial-gradient(45% 35% at 88% 4%, rgba(125,145,69,.35), transparent 70%), radial-gradient(40% 30% at 6% 70%, rgba(185,129,78,.22), transparent 70%); }
.dk-royal { --dk-bg: radial-gradient(120% 70% at 85% 0%, #2a3018 0%, #171a0f 55%, #10110a 100%); --dk-card: linear-gradient(180deg,#22261a,#1a1d13); --dk-line: #333a22; --dk-acc: #B5C47A; --dk-gold: #E2B77E;
  --dk-kpi: linear-gradient(150deg,#4b5a2e 0%,#3b4724 55%,#2c351b 100%); --dk-kpi-line: rgba(181,196,122,.26); }
.dk-royal .dk-kpi { box-shadow: 0 12px 26px -14px rgba(40,50,20,.95), inset 0 1px 0 rgba(255,255,255,.08); }
.dk-royal .dk-kpi.dk-t-gold { background: linear-gradient(150deg,#7a5232,#5a3c24); border-color: rgba(226,183,126,.6); box-shadow: 0 0 0 1px rgba(226,183,126,.14), 0 12px 26px -12px rgba(122,82,50,.55); }
.dk-calm { --dk-bg: #15160e; --dk-card: #1e2016; --dk-line: #2d3021; --dk-acc: #9fb36a; --dk-gold: #D6A66D; --dk-text: #ECE6D8; --dk-kpi: #1e2016; }
[data-theme='light'] .dk { --dk-text: #24241d; --dk-muted: #6c675b; --dk-line: rgba(60,50,30,.12); --dk-gold: #7a5232; --dk-acc: #4b5a2e; --dk-shadow: 0 10px 28px -18px rgba(60,50,30,.35); }
[data-theme='light'] .dk-glass { --dk-bg: linear-gradient(160deg,#f1ecdf 0%,#f7f2e8 60%,#f5e9da 100%); --dk-card: rgba(255,253,249,.78); --dk-kpi: rgba(255,253,249,.85); --dk-acc: #4b5a2e; }
[data-theme='light'] .dk-glass::before { background: radial-gradient(45% 35% at 88% 4%, rgba(107,125,63,.16), transparent 70%), radial-gradient(40% 30% at 6% 70%, rgba(122,82,50,.12), transparent 70%); }
[data-theme='light'] .dk-royal { --dk-bg: linear-gradient(180deg,#f2ecdf,#f8f3ea); --dk-card: #fffdf9; --dk-line: #e4dacb; --dk-acc: #4b5a2e; }
[data-theme='light'] .dk-royal .dk-kpi.dk-t-gold .dk-v { color: #f3d9b0; }
[data-theme='light'] .dk-calm { --dk-bg: #f6f1e7; --dk-card: #fffdf9; --dk-kpi: #fffdf9; --dk-line: #e4dacb; --dk-acc: #4b5a2e; }

/* «شركاء النجاح» — soft tones: a calm terracotta instead of alarm red, the card stays the card colour */
:root { --ax-hot: #b4694b; }
[data-theme='dark'] { --ax-hot: #d79a7c; }
#content .ax-co { border-color: var(--line); }
#content .ax-co::before { height: 2px; opacity: .55; }
#content .ax-co.hot { background: var(--card); border-color: color-mix(in srgb, var(--ax-hot) 30%, var(--line)); animation: axSoft 3.2s ease-in-out infinite; }
#content .ax-co.open { animation: none; }
#content .ax-badge { background: color-mix(in srgb, var(--ax-hot) 16%, transparent); color: var(--ax-hot); box-shadow: none; animation: none; font-weight: 700; }
#content .ax-co.hot .ax-badge { animation: axSoftDot 3.2s ease-in-out infinite; }
#content .ax-badge.ok { background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); }
#content .ax-sum.u { color: var(--ax-hot); font-weight: 500; }
#content .ax-co.flash { animation: axSoftFlash 1.2s ease-in-out 3; }
@keyframes axSoft { 0%, 100% { box-shadow: 0 0 0 0 transparent; } 50% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--ax-hot) 10%, transparent); } }
@keyframes axSoftDot { 0%, 100% { box-shadow: 0 0 0 0 transparent; } 50% { box-shadow: 0 0 0 5px color-mix(in srgb, var(--ax-hot) 12%, transparent); } }
@keyframes axSoftFlash { 50% { background: color-mix(in srgb, var(--ax-hot) 9%, var(--card)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ax-hot) 22%, transparent); } }
@media (prefers-reduced-motion: reduce) { #content .ax-co.hot, #content .ax-co.hot .ax-badge { animation: none; } }
