/* Dr Filler — attendance portal. Azure and white ("sky 2026" mockup), corporate, RTL. */

@font-face { font-family: "Vazirmatn"; src: url("../fonts/Vazirmatn-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Vazirmatn"; src: url("../fonts/Vazirmatn-Medium.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Vazirmatn"; src: url("../fonts/Vazirmatn-SemiBold.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Vazirmatn"; src: url("../fonts/Vazirmatn-Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --font: "Vazirmatn", "Segoe UI", Tahoma, system-ui, sans-serif;

  --bg: #e9f3fb;
  --surface: #ffffff;
  --surface-2: #f5f9fe;
  --surface-3: #e8f0fa;
  --border: #dbe6f3;
  --border-strong: #c3d3e6;
  --text: #12223a;
  --text-2: #4a5a70;
  --text-3: #5f6e84;

  --brand: #2366e6;
  --brand-hover: #1b5bd4;
  --brand-ink: #143f8f;
  --brand-soft: #e2edfe;
  --brand-softer: #f0f6ff;

  /* one hue per state — never two states on the same hue */
  --present: #16784a;  --present-soft: #e4f4eb;     /* green  — حاضر */
  --late: #9a5300;     --late-soft: #fdf0dc;        /* amber  — تأخیر */
  --absent: #b42318;   --absent-soft: #fdebe9;      /* red    — غیبت ناموجه */
  --leave: #3b52c4;    --leave-soft: #eaedfb;       /* indigo — مرخصی */
  --sick: #0369a1;     --sick-soft: #e2f0fa;        /* blue   — استعلاجی */
  --remote: #0e7490;   --remote-soft: #ddf2f7;      /* cyan   — دورکاری */
  --overtime: #7340b8; --overtime-soft: #f1eafb;    /* violet — اضافه‌کاری */
  --holiday: #a8295b;  --holiday-soft: #fbe9f0;     /* rose   — تعطیل رسمی */
  --incomplete: #52606d; --incomplete-soft: #eceff2;/* slate  — تردد ناقص */
  --off: #5f6e84;      --off-soft: #edf2f8;

  --radius-sm: 10px;
  --radius: 20px;
  --radius-lg: 24px;
  --shadow-pop: 0 18px 40px -12px rgba(30, 70, 140, 0.26), 0 2px 8px rgba(30, 70, 140, 0.08);
  --shadow-card: 0 14px 34px -20px rgba(30, 80, 160, 0.32), 0 2px 6px -2px rgba(30, 80, 160, 0.06);
  --shadow-soft: 0 6px 16px -10px rgba(30, 80, 160, 0.38), 0 1px 2px rgba(30, 80, 160, 0.06);
  --shadow-drawer: 0 0 56px rgba(30, 70, 140, 0.2);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  /* filled surfaces and their text (dark mode swaps these, not the hue meaning) */
  --on-brand: #ffffff;
  --brand-solid: #2366e6;
  /* vivid azure at the top, deep enough in the middle for white text (≥4.6:1) */
  --brand-grad: linear-gradient(180deg, #3585fb, #1b5dd8);
  --brand-glow: 0 10px 22px -10px rgba(35, 102, 230, 0.75);
  --present-solid: var(--present);
  --absent-solid: var(--absent);
  --topbar-bg: rgba(251, 253, 255, 0.94);
  --nav-bg: rgba(255, 255, 255, 0.97);
  --scrim: rgba(18, 34, 58, 0.34);
  --off-row: #f7fafe;
  --shift-band: #dfe9f6;
  --auto-border: #d9c9f0;
  --selection: #c9ddff;
  --ring: rgba(35, 102, 230, 0.2);
  --page-bg: linear-gradient(180deg, #e0edfd 0%, #ecf4fc 42%, #e9f3fb 100%);
  --panel-edge: rgba(200, 219, 240, 0.75);
  /* bright sky for the top of gradients (brand mark, icon): lit from above */
  --brand-lift: #4b9bff;
  /* sidebar: a light-blue gradient with soft white waves at the foot; the current item is an azure pill */
  --sidebar-bg: linear-gradient(180deg, #b5d4f6 0%, #a9ccf4 55%, #97c1f3 100%);
  --sidebar-waves: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 360' preserveAspectRatio='none'%3E%3Cpath d='M0 150 C 70 95 150 210 256 120 L256 360 L0 360 Z' fill='white' fill-opacity='0.22'/%3E%3Cpath d='M0 240 C 90 180 170 300 256 225 L256 360 L0 360 Z' fill='white' fill-opacity='0.2'/%3E%3C/svg%3E");
  --sidebar-edge: transparent;
  --sidebar-text: #16325a;
  --sidebar-strong: #0f2748;
  --sidebar-dim: #2a4c75;
  --sidebar-icon: #1f5fc6;
  --sidebar-accent: #ffffff;
  --sidebar-hover: rgba(255, 255, 255, 0.42);
  --sidebar-active: linear-gradient(160deg, #3f82de, #2863c9);
  --sidebar-active-text: #ffffff;
  --sidebar-active-shadow: 0 10px 22px -10px rgba(30, 90, 190, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  --sidebar-line: rgba(20, 70, 140, 0.14);
  --sidebar-pill: rgba(255, 255, 255, 0.45);
  --sidebar-card: rgba(255, 255, 255, 0.42);
  --sidebar-card-edge: rgba(255, 255, 255, 0.6);
  --sidebar-w: 256px;
  --topbar-h: 76px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  direction: rtl;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  caret-color: var(--brand);
}
::selection { background: var(--selection); color: var(--brand-ink); }
* { scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 10px; border: 3px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-track { background: transparent; }

h1, h2, h3, h4 { margin: 0; line-height: 1.35; font-weight: 700; letter-spacing: 0; }
h1 { font-size: 1.5rem; }
h2 { font-size: 1.125rem; }
h3 { font-size: 1rem; font-weight: 600; }
p { margin: 0; }
a { color: var(--brand); text-decoration-thickness: 1px; text-underline-offset: 3px; }
button, input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; display: block; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.icon { width: 20px; height: 20px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.icon.sm { width: 16px; height: 16px; }
.icon.lg { width: 24px; height: 24px; }
.icon.flip { transform: scaleX(-1); }

.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--text-2); }
.subtle { color: var(--text-3); font-size: 0.8125rem; }
.nowrap { white-space: nowrap; }
.ltr { direction: ltr; unicode-bidi: isolate; display: inline-block; }

/* ---------- app shell ---------- */
.shell { display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  background: var(--sidebar-bg); color: var(--sidebar-text); border-left: 1px solid var(--sidebar-edge);
  display: flex; flex-direction: column; padding: 20px 14px;
}
.brand { display: flex; align-items: center; gap: 12px; padding: 4px 10px 22px; text-decoration: none; color: inherit; }
.brand-mark {
  width: 40px; height: 40px; border-radius: 11px; color: var(--on-brand);
  background: linear-gradient(160deg, var(--brand-lift), var(--brand-solid) 70%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 4px 10px -4px rgba(0, 119, 201, 0.55);
  display: grid; place-items: center; font-weight: 700; font-size: 0.95rem; letter-spacing: 0.02em; direction: ltr;
}
.brand-name { display: flex; flex-direction: column; line-height: 1.25; }
.brand-name strong { font-size: 1rem; }
.brand-name span { font-size: 0.75rem; color: var(--text-3); direction: ltr; text-align: right; letter-spacing: 0.04em; }
.sidebar .brand-name strong { color: var(--sidebar-strong); }
.sidebar .brand-name span { color: var(--sidebar-dim); }

.nav-group { margin-top: 8px; }
.nav-group + .nav-group { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--sidebar-line); }
.nav-title { font-size: 0.75rem; color: var(--sidebar-dim); padding: 0 12px 6px; font-weight: 500; }
.nav-link {
  display: flex; align-items: center; gap: 12px; padding: 9px 12px; margin: 2px 0; border-radius: 10px;
  color: var(--sidebar-text); text-decoration: none; font-weight: 500; font-size: 0.9375rem;
  transition: background-color 150ms, color 150ms;
}
.nav-link:hover { background: var(--sidebar-hover); color: var(--sidebar-strong); }
.nav-link[aria-current="page"] { background: var(--sidebar-active); color: var(--sidebar-active-text); font-weight: 600; box-shadow: var(--sidebar-active-shadow); }
.nav-link[aria-current="page"] .icon { color: var(--sidebar-accent); }
.sidebar :focus-visible { outline-color: var(--brand-ink); }
.nav-link[aria-current="page"] .count { background: #fff; color: var(--brand-solid); }
.nav-link .count {
  margin-inline-start: auto; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 11px;
  background: var(--brand-solid); color: var(--on-brand); font-size: 0.75rem; font-weight: 600; display: grid; place-items: center;
}
.sidebar-foot { margin-top: auto; padding-top: 16px; }
.device-pill { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); font-size: 0.8125rem; color: var(--text-2); }
.sidebar .device-pill { background: var(--sidebar-pill); color: var(--sidebar-text); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--off); flex: none; }
.dot.online { background: var(--present); box-shadow: 0 0 0 3px var(--present-soft); }
.dot.offline, .dot.error { background: var(--absent); box-shadow: 0 0 0 3px var(--absent-soft); }
.dot.live { background: var(--present); animation: pulse 2s var(--ease-out) infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(22, 120, 74, 0.45); } 70% { box-shadow: 0 0 0 7px rgba(22, 120, 74, 0); } 100% { box-shadow: 0 0 0 0 rgba(22, 120, 74, 0); } }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 30; height: var(--topbar-h);
  display: flex; align-items: center; gap: 12px; padding: 0 32px;
  background: var(--topbar-bg); -webkit-backdrop-filter: saturate(1.4) blur(10px); backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid transparent; transition: border-color 200ms;
}
.topbar.scrolled { border-bottom-color: var(--border); }
.topbar-title { font-size: 1.0625rem; font-weight: 700; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-spacer { flex: 1; }
.clock { font-size: 0.875rem; color: var(--text-2); display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.clock b { color: var(--text); font-weight: 600; font-size: 0.9375rem; }
.icon-btn {
  position: relative; width: 40px; height: 40px; border-radius: 10px; border: 1px solid transparent; background: transparent;
  display: grid; place-items: center; color: var(--text-2); cursor: pointer; transition: background-color 150ms, color 150ms;
}
.icon-btn:hover { background: var(--surface-3); color: var(--text); }
.icon-btn .badge {
  position: absolute; top: 5px; left: 5px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: var(--absent-solid); color: #fff; font-size: 0.6875rem; font-weight: 700; display: grid; place-items: center; border: 2px solid var(--bg);
}
.user-chip { display: flex; align-items: center; gap: 10px; padding: 4px 4px 4px 12px; border-radius: 12px; border: 1px solid transparent; background: none; cursor: pointer; }
.user-chip:hover { background: var(--surface-3); }
.user-chip .who { display: flex; flex-direction: column; line-height: 1.25; text-align: right; }
.user-chip .who strong { font-size: 0.875rem; }
.user-chip .who span { font-size: 0.75rem; color: var(--text-3); }
.menu-btn { display: none; }

.page { padding: 8px 32px 48px; max-width: 1440px; width: 100%; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 12px 0 22px; }
.page-head h1 { font-size: 1.625rem; }
.page-head p { color: var(--text-2); margin-top: 4px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

.bottom-nav { display: none; }

/* ---------- surfaces ---------- */
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.panel-head h2 { font-size: 1rem; }
.panel-head .subtle { margin-top: 2px; }
.panel-body { padding: 20px; }
.panel-body.flush { padding: 0; }
.grid { display: grid; gap: 20px; align-items: start; }
.grid.two { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); }
.grid.halves { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.stack { display: flex; flex-direction: column; gap: 20px; }
.stack.tight { gap: 10px; }
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.between { justify-content: space-between; }

/* ledger: one strip of related figures separated by hairlines */
.ledger { display: grid; grid-template-columns: repeat(var(--cols, 6), minmax(0, 1fr)); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.ledger > * { padding: 14px 18px; border-inline-start: 1px solid var(--border); min-width: 0; }
.ledger > :first-child { border-inline-start: 0; }
.ledger .label { font-size: 0.8125rem; color: var(--text-2); display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.ledger .value { font-size: 1.25rem; font-weight: 700; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ledger .value small { display: block; font-size: 0.75rem; font-weight: 500; color: var(--text-3); line-height: 1.3; white-space: normal; }
.ledger button.cell { all: unset; box-sizing: border-box; padding: 14px 18px; border-inline-start: 1px solid var(--border); cursor: pointer; transition: background-color 150ms; }
.ledger button.cell:first-child { border-inline-start: 0; }
.ledger button.cell:hover { background: var(--surface-2); }
.ledger button.cell[aria-pressed="true"] { background: var(--brand-softer); box-shadow: inset 0 -2px 0 var(--brand); }
.ledger button.cell:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }

/* ---------- controls ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 0 16px;
  border-radius: 10px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text);
  font-weight: 600; font-size: 0.9rem; cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background-color 150ms, border-color 150ms, color 150ms, transform 120ms;
}
.btn:hover { background: var(--surface-2); border-color: var(--border-strong); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--brand-solid); border-color: var(--brand-solid); color: var(--on-brand); }
.btn.primary:hover { background: var(--brand-hover); border-color: var(--brand-hover); }
.btn.danger { color: var(--absent); }
.btn.danger:hover { background: var(--absent-soft); border-color: var(--absent); }
.btn.danger-solid { background: var(--absent-solid); border-color: var(--absent-solid); color: #fff; }
.btn.success { background: var(--present-solid); border-color: var(--present-solid); color: #fff; }
.btn.success:hover { filter: brightness(0.92); }
.btn.ghost { border-color: transparent; background: transparent; color: var(--text-2); }
.btn.ghost:hover { background: var(--surface-3); color: var(--text); }
.btn.sm { min-height: 32px; padding: 0 12px; font-size: 0.8125rem; border-radius: 8px; }
.btn.block { width: 100%; }
.btn[disabled], .btn[aria-busy="true"] { opacity: 0.55; cursor: not-allowed; pointer-events: none; }
.btn[aria-busy="true"]::after { content: ""; width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; border-top-color: transparent; animation: spin 700ms linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label, .field > .label { font-size: 0.875rem; font-weight: 600; color: var(--text); }
.field .hint { font-size: 0.8125rem; color: var(--text-3); }
.field .error { font-size: 0.8125rem; color: var(--absent); }
.input, .select, .textarea {
  width: 100%; min-height: 42px; padding: 8px 12px; border-radius: 10px; border: 1px solid var(--border-strong);
  background: var(--surface); transition: border-color 150ms, box-shadow 150ms; font-size: 0.9375rem;
}
.textarea { min-height: 88px; resize: vertical; line-height: 1.7; }
.input::placeholder, .textarea::placeholder { color: var(--text-3); }
.input:hover, .select:hover, .textarea:hover { border-color: var(--border-strong); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--ring); }
.input[aria-invalid="true"] { border-color: var(--absent); }
.input.ltr-input { direction: ltr; text-align: right; }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%23475756' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='4 6 8 10 12 6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: left 12px center; padding-left: 36px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.form-grid .span-2 { grid-column: 1 / -1; }
.input-affix { position: relative; }
.input-affix .input { padding-left: 44px; }
.input-affix .affix { position: absolute; left: 4px; top: 50%; transform: translateY(-50%); }

/* segmented control */
.segmented { display: inline-flex; padding: 3px; background: var(--surface-3); border-radius: 11px; gap: 2px; flex-wrap: wrap; }
.segmented button {
  border: 0; background: transparent; padding: 7px 14px; border-radius: 8px; font-weight: 600; font-size: 0.875rem;
  color: var(--text-2); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; transition: background-color 150ms, color 150ms, box-shadow 150ms;
}
.segmented button:hover { color: var(--text); }
.segmented button[aria-pressed="true"] { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgba(12, 33, 49, 0.12); }
.segmented .count { font-size: 0.75rem; background: var(--brand-solid); color: var(--on-brand); border-radius: 9px; padding: 0 6px; min-width: 18px; }

/* choice cards (overtime kind, device mode) */
.choices { display: grid; grid-template-columns: repeat(var(--n, 3), minmax(0, 1fr)); gap: 10px; }
.choice { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 14px; border: 1px solid var(--border-strong); border-radius: var(--radius); cursor: pointer; background: var(--surface); transition: border-color 150ms, background-color 150ms, box-shadow 150ms; text-align: right; }
.choice:hover { border-color: var(--border-strong); }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice .icon { color: var(--text-3); }
.choice strong { font-size: 0.9375rem; }
.choice span { font-size: 0.8125rem; color: var(--text-2); }
.choice:has(input:checked) { border-color: var(--brand); background: var(--brand-softer); box-shadow: 0 0 0 1px var(--brand); }
.choice:has(input:checked) .icon { color: var(--brand); }
.choice:has(input:focus-visible) { outline: 2px solid var(--brand); outline-offset: 2px; }

.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 0.9375rem; }
.switch input { appearance: none; width: 40px; height: 24px; border-radius: 12px; background: var(--border-strong); position: relative; cursor: pointer; transition: background-color 160ms; flex: none; margin: 0; }
.switch input::after { content: ""; position: absolute; top: 3px; right: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2); transition: transform 200ms var(--ease-out); }
.switch input:checked { background: var(--brand-solid); }
.switch input:checked::after { transform: translateX(-16px); }

.daypick { display: flex; gap: 6px; flex-wrap: wrap; }
.daypick label { cursor: pointer; }
.daypick input { position: absolute; opacity: 0; }
.daypick span { display: inline-grid; place-items: center; min-width: 64px; height: 38px; padding: 0 10px; border-radius: 10px; border: 1px solid var(--border-strong); font-size: 0.875rem; font-weight: 600; color: var(--text-2); transition: all 150ms; }
.daypick input:checked + span { background: var(--holiday-soft); border-color: var(--holiday); color: var(--holiday); }
.daypick input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }

/* ---------- avatar ---------- */
.avatar { --size: 40px; width: var(--size); height: var(--size); border-radius: 50%; flex: none; overflow: hidden; background: var(--brand-soft); color: var(--brand-ink); display: grid; place-items: center; font-weight: 700; font-size: calc(var(--size) * 0.36); position: relative; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.sq { border-radius: 14px; }
.avatar[data-tone="1"] { background: #e6eefb; color: #2b4a8f; }
.avatar[data-tone="2"] { background: #f7ebe0; color: #7a4a14; }
.avatar[data-tone="3"] { background: #efe8f8; color: #5b3a8c; }
.avatar[data-tone="4"] { background: #e3f2ea; color: #1e5e3d; }
.avatar[data-tone="5"] { background: #f9e6ec; color: #86294c; }
.person { display: flex; align-items: center; gap: 12px; min-width: 0; }
.person .meta { display: flex; flex-direction: column; min-width: 0; line-height: 1.35; }
.person .meta strong { font-size: 0.9375rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.person .meta span { font-size: 0.8125rem; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- status chips ---------- */
.chip { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 13px; font-size: 0.8125rem; font-weight: 600; white-space: nowrap; background: var(--off-soft); color: var(--off); }
.chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.chip.plain::before { display: none; }
.chip.present, .chip.approved { background: var(--present-soft); color: var(--present); }
.chip.late, .chip.pending { background: var(--late-soft); color: var(--late); }
.chip.absent, .chip.rejected { background: var(--absent-soft); color: var(--absent); }
.chip.leave { background: var(--leave-soft); color: var(--leave); }
.chip.sick { background: var(--sick-soft); color: var(--sick); }
.chip.remote { background: var(--remote-soft); color: var(--remote); }
.chip.overtime { background: var(--overtime-soft); color: var(--overtime); }
.chip.holiday { background: var(--holiday-soft); color: var(--holiday); }
.chip.incomplete { background: var(--incomplete-soft); color: var(--incomplete); }
.chip.in_office { background: var(--brand-soft); color: var(--brand); }
.chip.in_office::before { animation: pulse 2s var(--ease-out) infinite; }
.chip.cancelled, .chip.weekend, .chip.not_yet, .chip.no_data, .chip.future, .chip.not_employed { background: var(--off-soft); color: var(--off); }

/* ---------- banners ---------- */
.banner { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--radius); background: var(--late-soft); color: #6d3f00; border: 1px solid #f1d4a8; }
.banner .icon { margin-top: 2px; color: var(--late); }
.banner strong { display: block; margin-bottom: 2px; }
.banner.info { background: var(--brand-softer); color: var(--brand-ink); border-color: #c4e2f8; }
.banner.info .icon { color: var(--brand); }
.banner.error { background: var(--absent-soft); color: #7c1a12; border-color: #f2c1bb; }
.banner.error .icon { color: var(--absent); }
.banner .btn { margin-inline-start: auto; }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 0.9rem; }
.table th { text-align: right; font-weight: 600; font-size: 0.8125rem; color: var(--text-2); padding: 11px 16px; background: var(--surface-2); border-bottom: 1px solid var(--border); white-space: nowrap; position: sticky; top: 0; z-index: 1; }
.table td { padding: 12px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr.clickable { cursor: pointer; transition: background-color 120ms; }
.table tbody tr.clickable:hover { background: var(--surface-2); }
.table tbody tr.dim td { color: var(--text-3); }
.table tbody tr.off td { background: var(--off-row); }
.table .n { text-align: left; direction: ltr; unicode-bidi: plaintext; }
.table tfoot td { font-weight: 700; background: var(--surface-2); border-top: 1px solid var(--border-strong); padding: 12px 16px; }
.table th:first-child { border-top-right-radius: var(--radius); }
.table th:last-child { border-top-left-radius: var(--radius); }

/* ---------- empty / skeleton ---------- */
.empty { text-align: center; padding: 48px 24px; color: var(--text-2); display: flex; flex-direction: column; align-items: center; gap: 10px; }
.empty .icon { width: 36px; height: 36px; color: var(--border-strong); stroke-width: 1.5; }
.empty strong { color: var(--text); font-size: 1rem; }
.skeleton { background: linear-gradient(90deg, var(--surface-3) 0%, var(--surface-2) 50%, var(--surface-3) 100%); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; border-radius: 8px; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- toast ---------- */
.toasts { position: fixed; bottom: 24px; left: 24px; z-index: 100; display: flex; flex-direction: column; gap: 10px; pointer-events: none; }
.toast { pointer-events: auto; display: flex; gap: 12px; align-items: flex-start; min-width: 280px; max-width: 420px; padding: 12px 14px; border-radius: 12px; background: #0f2b40; color: #fff; box-shadow: var(--shadow-pop); animation: toast-in 320ms var(--ease-out); }
.toast .icon { margin-top: 2px; color: #6cc0fd; }
.toast.error { background: #5b1710; }
.toast.error .icon { color: #ffb4a9; }
.toast strong { display: block; font-size: 0.9375rem; }
.toast p { font-size: 0.8125rem; opacity: 0.85; }
.toast .avatar { --size: 36px; }
.toast.leaving { animation: toast-out 200ms ease-in forwards; }
@keyframes toast-in { from { opacity: 0; transform: translateY(12px) scale(0.98); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(8px); } }

/* ---------- drawer & dialog ---------- */
.scrim { position: fixed; inset: 0; background: var(--scrim); z-index: 60; animation: fade 200ms ease-out; }
@keyframes fade { from { opacity: 0; } }
.drawer {
  position: fixed; top: 0; bottom: 0; left: 0; z-index: 61; width: min(560px, 100vw); background: var(--surface);
  display: flex; flex-direction: column; box-shadow: var(--shadow-drawer); animation: drawer-in 320ms var(--ease-out);
}
.drawer.wide { width: min(760px, 100vw); }
@keyframes drawer-in { from { transform: translateX(-100%); } }
.drawer.leaving { animation: drawer-out 200ms ease-in forwards; }
@keyframes drawer-out { to { transform: translateX(-100%); } }
.drawer-head { display: flex; align-items: flex-start; gap: 12px; padding: 20px 24px; border-bottom: 1px solid var(--border); }
.drawer-head h2 { font-size: 1.125rem; }
.drawer-head p { color: var(--text-2); font-size: 0.875rem; margin-top: 2px; }
.drawer-head .icon-btn { margin-inline-start: auto; margin-top: -6px; }
.drawer-body { flex: 1; overflow-y: auto; padding: 24px; }
.drawer-foot { display: flex; gap: 10px; padding: 16px 24px; border-top: 1px solid var(--border); background: var(--surface-2); }
.drawer-foot .spacer { flex: 1; }

dialog.modal { border: 0; padding: 0; border-radius: var(--radius-lg); width: min(440px, calc(100vw - 32px)); box-shadow: var(--shadow-pop); color: var(--text); }
dialog.modal::backdrop { background: rgba(12, 33, 49, 0.36); }
dialog.modal[open] { animation: pop 260ms var(--ease-out); }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(0.98); } }
.modal-body { padding: 24px; display: flex; flex-direction: column; gap: 12px; }
.modal-body h2 { font-size: 1.125rem; }
.modal-foot { display: flex; gap: 10px; justify-content: flex-start; padding: 16px 24px; background: var(--surface-2); border-top: 1px solid var(--border); }

.popover { position: fixed; z-index: 80; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-pop); animation: pop 200ms var(--ease-out); }

/* ---------- notifications ---------- */
.notif-panel { width: min(380px, calc(100vw - 24px)); max-height: 70vh; display: flex; flex-direction: column; }
.notif-panel header { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.notif-list { overflow-y: auto; }
.notif { display: flex; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--border); text-decoration: none; color: inherit; }
.notif:hover { background: var(--surface-2); }
.notif:last-child { border-bottom: 0; }
.notif.unread { background: var(--brand-softer); }
.notif .ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: none; background: var(--surface-3); color: var(--text-2); }
.notif .ico.approved { background: var(--present-soft); color: var(--present); }
.notif .ico.rejected { background: var(--absent-soft); color: var(--absent); }
.notif .ico.request { background: var(--late-soft); color: var(--late); }
.notif strong { font-size: 0.875rem; display: block; }
.notif p { font-size: 0.8125rem; color: var(--text-2); white-space: pre-line; }
.notif time { font-size: 0.75rem; color: var(--text-3); }

.menu { min-width: 220px; padding: 6px; }
.menu a, .menu button { display: flex; width: 100%; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 8px; border: 0; background: none; text-decoration: none; color: var(--text); cursor: pointer; font-size: 0.9rem; text-align: right; }
.menu a:hover, .menu button:hover { background: var(--surface-3); }
.menu hr { border: 0; border-top: 1px solid var(--border); margin: 6px 0; }

/* ---------- login ---------- */
.login { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); }
.login-side { position: relative; background: radial-gradient(90% 60% at 100% 0%, rgba(255, 255, 255, 0.85) 0%, transparent 65%), linear-gradient(165deg, #dcf1ff 0%, #a9dbff 100%); color: var(--text); padding: 48px; display: flex; flex-direction: column; overflow: hidden; }
.login-side .brand-name strong { color: var(--text); }
.login-side .brand-name span { color: var(--text-2); }
.login-side h2 { font-size: 2rem; line-height: 1.4; margin-top: auto; max-width: 16ch; color: var(--text); }
.login-side p { margin-top: 14px; color: #36505f; max-width: 44ch; }
.login-clock { margin-top: 36px; display: flex; gap: 28px; flex-wrap: wrap; }
.login-clock div { display: flex; flex-direction: column; }
.login-clock b { font-size: 2.5rem; font-weight: 600; color: var(--text); line-height: 1.2; }
.login-clock span { color: #36505f; font-size: 0.875rem; }
.login-dial { position: absolute; top: -140px; left: -140px; width: 460px; height: 460px; opacity: 0.22; color: var(--brand-solid); }
.login-main { display: grid; place-items: center; padding: 32px 24px; }
.login-card { width: min(400px, 100%); }
.login-card h1 { font-size: 1.625rem; }
.login-card > p { color: var(--text-2); margin: 6px 0 28px; }
.login-card form { display: flex; flex-direction: column; gap: 18px; }
.login-help { margin-top: 24px; font-size: 0.8125rem; color: var(--text-3); line-height: 1.8; }

/* ---------- employee home ---------- */
.panel.today { display: grid; grid-template-columns: minmax(0, 1fr); }
.today-top { display: flex; gap: 20px; align-items: center; padding: 22px 24px; flex-wrap: wrap; }
.today-top .avatar { --size: 72px; }
.today-top .hello { flex: 1; min-width: 200px; }
.today-top .hello h1 { font-size: 1.375rem; }
.today-top .hello p { color: var(--text-2); margin-top: 2px; }
.today-figures { display: flex; gap: 0; }
.today-figures > div { padding: 0 22px; border-inline-start: 1px solid var(--border); display: flex; flex-direction: column; }
.today-figures > div:first-child { border-inline-start: 0; }
.today-figures span { font-size: 0.8125rem; color: var(--text-2); }
.today-figures b { font-size: 1.5rem; font-weight: 700; line-height: 1.35; }
.today-figures b.live-count { color: var(--brand); }

.ribbon { padding: 18px 24px 22px; border-top: 1px solid var(--border); }
.ribbon-track { position: relative; height: 44px; margin-top: 30px; }
.ribbon-rail { position: absolute; inset: 18px 0; height: 8px; border-radius: 4px; background: var(--surface-3); }
.ribbon-shift { position: absolute; top: 14px; height: 16px; border-radius: 4px; background: repeating-linear-gradient(90deg, transparent 0 calc(11.11% - 1px), rgba(12, 33, 49, 0.07) calc(11.11% - 1px) 11.11%), var(--shift-band); }
.ribbon-auto { position: absolute; top: 14px; height: 16px; background: var(--overtime-soft); border: 1px solid var(--auto-border); }
.ribbon-presence { position: absolute; top: 16px; height: 12px; border-radius: 6px; background: var(--brand); }
.ribbon-presence.ongoing::after { content: ""; position: absolute; left: -5px; top: 50%; width: 10px; height: 10px; border-radius: 50%; background: var(--brand); transform: translateY(-50%); animation: pulse-brand 1.8s var(--ease-out) infinite; }
@keyframes pulse-brand { 0% { box-shadow: 0 0 0 0 rgba(0, 119, 201, 0.45); } 80% { box-shadow: 0 0 0 10px rgba(0, 119, 201, 0); } 100% { box-shadow: 0 0 0 0 rgba(0, 119, 201, 0); } }
.ribbon-ot { position: absolute; top: 12px; height: 20px; border-radius: 5px; border: 1.5px dashed var(--overtime); background: rgba(115, 64, 184, 0.08); }
.ribbon-ot.approved { border-style: solid; }
.ribbon-mark { position: absolute; top: -26px; transform: translateX(50%); display: flex; flex-direction: column; align-items: center; font-size: 0.75rem; font-weight: 600; color: var(--text); white-space: nowrap; }
.ribbon-mark::after { content: ""; width: 2px; height: 30px; background: var(--brand-ink); margin-top: 2px; border-radius: 1px; }
.ribbon-mark.fresh { animation: mark-in 900ms var(--ease-out); }
@keyframes mark-in { 0% { opacity: 0; transform: translateX(50%) translateY(-10px); } 60% { opacity: 1; } }
.ribbon-scale { position: relative; height: 18px; margin-top: 6px; }
.ribbon-scale span { position: absolute; transform: translateX(50%); font-size: 0.75rem; color: var(--text-3); }
.ribbon-now { position: absolute; top: 6px; bottom: 6px; width: 2px; background: var(--absent); border-radius: 1px; }
.ribbon-now::before { content: ""; position: absolute; top: -3px; left: -3px; width: 8px; height: 8px; border-radius: 50%; background: var(--absent); }
.ribbon-legend { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 10px; font-size: 0.8125rem; color: var(--text-2); }
.ribbon-legend i { display: inline-block; width: 14px; height: 8px; border-radius: 3px; margin-inline-end: 6px; vertical-align: middle; }

.req-row { display: flex; align-items: center; gap: 14px; padding: 14px 20px; border-bottom: 1px solid var(--border); }
.req-row:last-child { border-bottom: 0; }
.req-row .ico { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; flex: none; }
.req-row .ico.leave { background: var(--leave-soft); color: var(--leave); }
.req-row .ico.overtime { background: var(--overtime-soft); color: var(--overtime); }
.req-row .ico.remote { background: var(--remote-soft); color: var(--remote); }
.req-row .body { flex: 1; min-width: 0; }
.req-row .body strong { font-size: 0.9375rem; font-weight: 600; display: block; }
.req-row .body span { font-size: 0.8125rem; color: var(--text-2); }
.req-row .note { margin-top: 6px; font-size: 0.8125rem; padding: 8px 10px; border-radius: 8px; background: var(--surface-2); color: var(--text-2); }

.meter { height: 10px; background: var(--surface-3); border-radius: 5px; overflow: hidden; display: flex; }
.meter i { display: block; height: 100%; background: var(--leave); }
.meter i.warn { background: var(--late); }

/* ---------- month switcher ---------- */
.month-switch { display: inline-flex; align-items: center; gap: 4px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 4px; }
.month-switch .label { display: flex; flex-direction: column; align-items: center; min-width: 190px; padding: 0 8px; line-height: 1.3; }
.month-switch .label strong { font-size: 0.9375rem; }
.month-switch .label span { font-size: 0.75rem; color: var(--text-3); }
.month-switch .icon-btn { width: 36px; height: 36px; }

/* ---------- calendar (attendance month) ---------- */
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.cal-head { font-size: 0.8125rem; color: var(--text-2); font-weight: 600; text-align: center; padding-bottom: 2px; }
.cal-head.off { color: var(--holiday); }
.cal-day {
  position: relative; min-height: 118px; padding: 10px 10px 8px; border-radius: 12px; border: 1px solid var(--border);
  background: var(--surface); text-align: right; cursor: pointer; display: flex; flex-direction: column; gap: 4px;
  transition: border-color 150ms, box-shadow 150ms, transform 150ms;
}
.cal-day:hover { border-color: var(--border-strong); box-shadow: 0 4px 14px -6px rgba(12, 33, 49, 0.16); }
.cal-day.blank { visibility: hidden; }
.cal-day .d { display: flex; align-items: baseline; justify-content: space-between; gap: 4px; }
.cal-day .d b { font-size: 1.125rem; font-weight: 700; line-height: 1; }
.cal-day .d span { font-size: 0.6875rem; color: var(--text-3); white-space: nowrap; }
.cal-day .times { font-size: 0.8125rem; color: var(--text); font-weight: 500; direction: ltr; text-align: right; }
.cal-day .worked { font-size: 0.75rem; color: var(--text-3); }
.cal-day .tag { margin-top: auto; font-size: 0.75rem; font-weight: 600; display: flex; align-items: center; gap: 5px; }
.cal-day .tag::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.cal-day .extras { display: flex; gap: 4px; flex-wrap: wrap; }
.cal-day .extras em { font-style: normal; font-size: 0.6875rem; font-weight: 600; padding: 0 6px; border-radius: 6px; }
.cal-day .extras .ot { background: var(--overtime-soft); color: var(--overtime); }
.cal-day .extras .df { background: var(--absent-soft); color: var(--absent); }
.cal-day .extras .hl { background: var(--leave-soft); color: var(--leave); }
.cal-day .extras .pd { background: var(--late-soft); color: var(--late); }
.cal-day.weekend, .cal-day.holiday { background: var(--surface-2); }
.cal-day.weekend .d b, .cal-day.holiday .d b { color: var(--holiday); }
.cal-day.today { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand); }
.cal-day.future { background: transparent; border-style: dashed; }
.cal-day.future .d b { color: var(--text-3); }
.cal-day.not_employed { opacity: 0.5; }
.tag.present { color: var(--present); } .tag.late { color: var(--late); } .tag.absent { color: var(--absent); }
.tag.leave { color: var(--leave); } .tag.holiday { color: var(--holiday); } .tag.weekend { color: var(--off); }
.tag.incomplete { color: var(--incomplete); } .tag.remote { color: var(--remote); } .tag.sick { color: var(--sick); } .tag.in_office { color: var(--brand); } .tag.not_yet, .tag.no_data, .tag.future, .tag.not_employed { color: var(--text-3); }
.cal-day.absent { background: #fffafa; border-color: #f3d0cc; }
.cal-day.remote { background: #f7fcfd; border-color: #bfe4ed; }
.cal-day.leave { background: #fafbff; border-color: #cdd4f6; }
.cal-day.leave.sick { background: #f7fbfe; border-color: #bcd9ee; }
.cal-day.incomplete { border-style: dashed; border-color: var(--border-strong); }
.cal-day .extras .rm { background: var(--remote-soft); color: var(--remote); }

/* ---------- presence board ---------- */
.board { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; padding: 16px; }
.tile { display: flex; gap: 12px; align-items: center; padding: 12px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); cursor: pointer; text-align: right; transition: border-color 150ms, background-color 400ms; width: 100%; }
.tile:hover { border-color: var(--border-strong); }
.tile .meta { flex: 1; min-width: 0; }
.tile .meta strong { display: block; font-size: 0.9rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile .meta span { font-size: 0.8125rem; color: var(--text-2); display: flex; gap: 6px; align-items: center; }
.tile .avatar { --size: 42px; }
.tile .avatar::after { content: ""; position: absolute; bottom: 1px; left: 1px; width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--surface); background: var(--off); }
.tile.s-in_office .avatar::after { background: var(--present); }
.tile.s-present .avatar::after, .tile.s-late .avatar::after, .tile.s-incomplete .avatar::after { background: #97a6b2; }
.tile.s-absent .avatar::after { background: var(--absent); }
.tile.s-leave .avatar::after { background: var(--leave); }
.tile.s-remote .avatar::after { background: var(--remote); }
.tile.flash { background: var(--brand-softer); border-color: var(--brand); }

.feed { max-height: 520px; overflow-y: auto; }
.feed-item { display: flex; gap: 12px; align-items: center; padding: 10px 20px; border-bottom: 1px solid var(--border); }
.feed-item:last-child { border-bottom: 0; }
.feed-item .t { margin-inline-start: auto; text-align: left; font-weight: 600; font-size: 0.875rem; }
.feed-item .t span { display: block; font-weight: 400; font-size: 0.75rem; color: var(--text-3); }
.feed-item.fresh { animation: feed-in 700ms var(--ease-out); background: var(--brand-softer); transition: background-color 2s; }
@keyframes feed-in { from { opacity: 0; transform: translateY(-8px); } }

/* ---------- request inbox ---------- */
.inbox-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; padding: 18px 20px; border-bottom: 1px solid var(--border); }
.inbox-item:last-child { border-bottom: 0; }
.inbox-item .what { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 10px; }
.inbox-item .when { font-weight: 600; }
.inbox-item .reason { margin-top: 8px; color: var(--text-2); font-size: 0.9rem; }
.inbox-item .context { margin-top: 10px; display: block; line-height: 1.9; font-size: 0.8125rem; color: var(--text-2); padding: 8px 12px; background: var(--surface-2); border-radius: 8px; }
.inbox-item .context b { color: var(--text); font-weight: 600; }
.inbox-item .decide { display: flex; flex-direction: column; gap: 8px; align-items: stretch; min-width: 150px; }
.inbox-item .reject-box { grid-column: 1 / -1; display: flex; gap: 10px; align-items: flex-start; }
.inbox-item .reject-box .textarea { min-height: 44px; }
.inbox-item.done { animation: done-out 450ms var(--ease-out) forwards; }
@keyframes done-out { to { opacity: 0; transform: translateX(-24px); } }

/* ---------- attendance matrix ---------- */
.matrix-wrap { overflow: auto; max-height: calc(100vh - 250px); border-radius: 0 0 var(--radius) var(--radius); }
table.matrix { border-collapse: separate; border-spacing: 0; font-size: 0.75rem; }
.matrix th, .matrix td { border-bottom: 1px solid var(--border); border-inline-start: 1px solid var(--border); padding: 0; text-align: center; }
.matrix thead th { position: sticky; top: 0; z-index: 2; background: var(--surface-2); font-weight: 600; min-width: 42px; padding: 6px 2px; line-height: 1.25; }
.matrix thead th.off { color: var(--holiday); background: #f8eff2; }
.matrix thead th small { display: block; font-weight: 400; color: var(--text-3); font-size: 0.6875rem; }
.matrix thead th.today-col { box-shadow: inset 0 -3px 0 var(--brand); }
.matrix .name { position: sticky; right: 0; z-index: 1; background: var(--surface); text-align: right; padding: 6px 14px; min-width: 200px; border-inline-start: 0; box-shadow: -1px 0 0 var(--border); }
.matrix thead .name { z-index: 3; background: var(--surface-2); }
.matrix .sum { padding: 6px 10px; white-space: nowrap; background: var(--surface-2); font-weight: 600; min-width: 64px; }
.mcell { width: 42px; height: 40px; border: 0; background: transparent; cursor: pointer; font: inherit; font-size: 0.6875rem; font-weight: 700; display: grid; place-items: center; }
.mcell:hover { outline: 2px solid var(--brand); outline-offset: -2px; }
.mcell.present { background: var(--present-soft); color: var(--present); }
.mcell.late { background: var(--late-soft); color: var(--late); }
.mcell.absent { background: var(--absent-soft); color: var(--absent); }
.mcell.leave { background: var(--leave-soft); color: var(--leave); }
.mcell.holiday, .mcell.weekend { background: #f6f3f4; color: #b9a3ab; }
.mcell.incomplete { background: var(--incomplete-soft); color: var(--incomplete); }
.mcell.remote { background: var(--remote-soft); color: var(--remote); }
.mcell.in_office { background: var(--brand-soft); color: var(--brand); }
.mcell.not_yet, .mcell.no_data, .mcell.future, .mcell.not_employed { color: var(--border-strong); }
.mcell .otdot { width: 5px; height: 5px; border-radius: 50%; background: var(--overtime); margin-top: 1px; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 0.8125rem; color: var(--text-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 14px; height: 14px; border-radius: 4px; display: inline-block; }

/* ---------- payroll ---------- */
.pay-table td, .pay-table th { padding-inline: 10px; }
.pay-table td.money { direction: ltr; text-align: left; white-space: nowrap; }
.pay-table td.neg { color: var(--absent); }
.pay-table td.pos { color: var(--present); }
.pay-table td.net { font-weight: 700; font-size: 0.9375rem; }
.pay-table tr.expanded td { background: var(--brand-softer); }
.pay-detail td { background: var(--surface-2) !important; padding: 0 !important; }
.pay-breakdown { position: sticky; right: 0; max-width: calc(100vw - var(--sidebar-w) - 70px); display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 24px; padding: 20px 24px; }
.calc-lines { display: flex; flex-direction: column; }
.calc-line { display: flex; justify-content: space-between; gap: 16px; padding: 8px 0; border-bottom: 1px dashed var(--border-strong); font-size: 0.875rem; }
.calc-line:last-child { border-bottom: 0; }
.calc-line .how { color: var(--text-3); font-size: 0.75rem; display: block; }
.calc-line b { direction: ltr; white-space: nowrap; }
.calc-line.total { border-top: 1px solid var(--text); border-bottom: 0; margin-top: 4px; padding-top: 12px; font-size: 1rem; }
.warn-list { display: flex; gap: 6px; flex-wrap: wrap; }

/* ---------- date picker ---------- */
.datefield { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 42px; padding: 6px 12px; border-radius: 10px; border: 1px solid var(--border-strong); background: var(--surface); cursor: pointer; text-align: right; transition: border-color 150ms, box-shadow 150ms; }
.datefield:hover { border-color: var(--border-strong); }
.datefield[aria-expanded="true"] { border-color: var(--brand); box-shadow: 0 0 0 3px var(--ring); }
.datefield .icon { color: var(--text-3); }
.datefield .v { display: flex; flex-direction: column; line-height: 1.3; }
.datefield .v b { font-weight: 600; font-size: 0.9375rem; }
.datefield .v span { font-size: 0.75rem; color: var(--text-3); }
.datefield .ph { color: var(--text-3); }
.picker { width: 332px; padding: 14px; }
.picker-head { display: flex; align-items: center; gap: 6px; margin-bottom: 10px; }
.picker-head .ttl { flex: 1; text-align: center; line-height: 1.3; }
.picker-head .ttl strong { display: block; font-size: 0.9375rem; }
.picker-head .ttl span { font-size: 0.75rem; color: var(--text-3); }
.picker-head .icon-btn { width: 34px; height: 34px; }
.picker-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.picker-grid .wd { font-size: 0.6875rem; color: var(--text-3); text-align: center; padding: 4px 0; }
.picker-grid .wd.off { color: var(--holiday); }
.pday { height: 42px; border: 0; border-radius: 8px; background: transparent; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.1; font-weight: 600; font-size: 0.875rem; }
.pday small { font-size: 0.625rem; font-weight: 400; color: var(--text-3); }
.pday:hover { background: var(--surface-3); }
.pday.off { color: var(--holiday); }
.pday.today { box-shadow: inset 0 0 0 1px var(--brand); }
.pday[aria-selected="true"] { background: var(--brand-solid); color: var(--on-brand); }
.pday[aria-selected="true"] small { color: #d8efff; }
.pday.in-range { background: var(--brand-soft); border-radius: 0; }
.pday:disabled { opacity: 0.3; cursor: not-allowed; }
.picker-foot { display: flex; justify-content: space-between; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border); }

/* mini timeline inside overtime form */
.mini-line { position: relative; height: 34px; margin: 22px 0 6px; }
.mini-line .rail { position: absolute; top: 14px; left: 0; right: 0; height: 6px; border-radius: 3px; background: var(--surface-3); }
.mini-line .shift { position: absolute; top: 12px; height: 10px; border-radius: 3px; background: #cddbe6; }
.mini-line .req { position: absolute; top: 9px; height: 16px; border-radius: 4px; background: var(--overtime); opacity: 0.85; transition: all 300ms var(--ease-out); }
.mini-line .tick { position: absolute; top: -18px; transform: translateX(50%); font-size: 0.6875rem; color: var(--text-3); }
.calc-pill { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 10px; background: var(--overtime-soft); color: var(--overtime); font-weight: 600; font-size: 0.875rem; }
.calc-pill.leave { background: var(--leave-soft); color: var(--leave); }
.calc-pill.remote { background: var(--remote-soft); color: var(--remote); }

.kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 10px 20px; font-size: 0.9rem; }
.kv dt { color: var(--text-2); }
.kv dd { margin: 0; font-weight: 500; }

.punch-list { display: flex; flex-direction: column; gap: 6px; }
.punch { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); }
.punch b { font-size: 1rem; direction: ltr; }
.punch .src { font-size: 0.75rem; color: var(--text-3); }
.punch .btn { margin-inline-start: auto; }

.copy-box { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 10px; background: var(--brand-softer); border: 1px dashed var(--brand); }
.copy-box code { font-size: 1.25rem; font-weight: 700; letter-spacing: 0.08em; direction: ltr; font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; color: var(--brand-ink); }
.copy-box .btn { margin-inline-start: auto; }

.dropzone { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 28px 20px; border: 1.5px dashed var(--border-strong); border-radius: var(--radius); background: var(--surface-2); text-align: center; cursor: pointer; transition: border-color 150ms, background-color 150ms; }
.dropzone:hover, .dropzone.over { border-color: var(--brand); background: var(--brand-softer); }
.dropzone .icon { width: 28px; height: 28px; color: var(--brand); }

.steps { margin: 0; padding: 0; list-style: none; counter-reset: s; display: flex; flex-direction: column; gap: 10px; }
.steps li { counter-increment: s; position: relative; display: block; min-height: 24px; padding-inline-start: 36px; font-size: 0.9rem; line-height: 1.8; }
.steps li::before { content: counter(s, persian); position: absolute; inset-inline-start: 0; top: 1px; width: 24px; height: 24px; border-radius: 50%; background: var(--brand-soft); color: var(--brand-ink); display: grid; place-items: center; font-size: 0.75rem; font-weight: 700; }
.steps code { direction: ltr; unicode-bidi: isolate; background: var(--surface-3); padding: 1px 6px; border-radius: 5px; font-size: 0.85em; }

.device-card { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 18px 20px; border-bottom: 1px solid var(--border); }
.device-card:last-child { border-bottom: 0; }
.device-card .ico { width: 48px; height: 48px; border-radius: 12px; background: var(--surface-3); display: grid; place-items: center; color: var(--text-2); }
.device-card .ico.online { background: var(--present-soft); color: var(--present); }
.device-card .facts { display: flex; gap: 14px; flex-wrap: wrap; font-size: 0.8125rem; color: var(--text-2); margin-top: 4px; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); padding: 0 20px; overflow-x: auto; overflow-y: hidden; }
.tabs button { border: 0; background: none; padding: 12px 12px; font-weight: 600; color: var(--text-2); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; display: inline-flex; gap: 6px; align-items: center; }
.tabs button:hover { color: var(--text); }
.tabs button[aria-selected="true"] { color: var(--brand-ink); border-bottom-color: var(--brand); }

.settings-section { display: grid; grid-template-columns: minmax(0, 280px) minmax(0, 1fr); gap: 32px; padding: 26px 24px; border-bottom: 1px solid var(--border); }
.settings-section:last-child { border-bottom: 0; }
.settings-section > div:first-child p { color: var(--text-2); font-size: 0.875rem; margin-top: 4px; }

.search { position: relative; }
.search .icon { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--text-3); pointer-events: none; }
.search .input { padding-right: 40px; min-width: 240px; }

.boot { min-height: 100vh; display: grid; place-items: center; }
.boot .brand-mark { animation: breathe 1.4s ease-in-out infinite; }
@keyframes breathe { 50% { transform: scale(0.92); opacity: 0.7; } }

/* ---------- responsive ---------- */
@media (max-width: 1320px) {
  .grid.two { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 1180px) {
  .ledger { --cols: 3 !important; }
  .ledger > :nth-child(3n + 1), .ledger button.cell:nth-child(3n + 1) { border-inline-start: 0; }
  .ledger > :nth-child(n + 4) { border-top: 1px solid var(--border); }
  .pay-breakdown { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 960px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: fixed; top: 0; right: 0; z-index: 70; width: 280px; transform: translateX(100%); transition: transform 280ms var(--ease-out); box-shadow: none; }
  .sidebar.open { transform: none; box-shadow: var(--shadow-drawer); }
  .menu-btn { display: grid; }
  .topbar { padding: 0 16px; }
  .page { padding: 4px 16px 96px; }
  .pay-breakdown { max-width: calc(100vw - 36px); }
  .login { grid-template-columns: minmax(0, 1fr); }
  .login-side { padding: 28px 24px; min-height: auto; }
  .login-side h2 { font-size: 1.375rem; margin-top: 28px; }
  .login-clock { margin-top: 18px; }
  .login-clock b { font-size: 1.75rem; }
  .settings-section { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .bottom-nav { display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 40; background: var(--nav-bg); border-top: 1px solid var(--border); padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
  .bottom-nav a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 2px; font-size: 0.6875rem; font-weight: 600; color: var(--text-3); text-decoration: none; border-radius: 10px; position: relative; }
  .bottom-nav a[aria-current="page"] { color: var(--brand); }
  .bottom-nav a .count { position: absolute; top: 2px; left: calc(50% - 20px); min-width: 16px; height: 16px; border-radius: 8px; background: var(--absent-solid); color: #fff; font-size: 0.625rem; display: grid; place-items: center; padding: 0 4px; }
  .toasts { left: 12px; right: 12px; bottom: 84px; }
  .toast { min-width: 0; max-width: none; }
  .clock .date-part { display: none; }
  .user-chip .who { display: none; }
}
@media (max-width: 720px) {
  h1, .page-head h1 { font-size: 1.3rem; }
  .ledger { --cols: 2 !important; }
  .ledger > *, .ledger button.cell { padding: 12px 14px; }
  .ledger > :nth-child(3n + 1), .ledger button.cell:nth-child(3n + 1) { border-inline-start: 1px solid var(--border); }
  .ledger > :nth-child(2n + 1), .ledger button.cell:nth-child(2n + 1) { border-inline-start: 0; }
  .ledger > :nth-child(n + 3) { border-top: 1px solid var(--border); }
  .ledger .value { font-size: 1.0625rem; }
  .form-grid, .grid.halves { grid-template-columns: minmax(0, 1fr); }
  .choices { --n: 1 !important; }
  .today-top { padding: 18px; }
  .today-top .avatar { --size: 56px; }
  .today-figures { width: 100%; }
  .today-figures > div { flex: 1; padding: 0 12px; }
  .today-figures > div:first-child { padding-inline-start: 0; }
  .today-figures b { font-size: 1.125rem; }
  .ribbon { padding: 14px 18px 18px; }
  .cal { gap: 4px; }
  .cal-day { min-height: 66px; padding: 6px; border-radius: 9px; gap: 2px; }
  .cal-day .d { flex-direction: column; align-items: flex-start; gap: 0; }
  .cal-day .d b { font-size: 0.9375rem; }
  .cal-day .times, .cal-day .worked, .cal-day .extras { display: none; }
  .cal-day .tag { font-size: 0; }
  .cal-day .tag::before { width: 8px; height: 8px; }
  .cal-day .d span { font-size: 0.5625rem; }
  .cal-head { font-size: 0.6875rem; }
  .inbox-item { grid-template-columns: minmax(0, 1fr); }
  .inbox-item .decide { flex-direction: row; }
  .inbox-item .decide .btn { flex: 1; }
  .drawer-body { padding: 18px; }
  .drawer-head, .drawer-foot { padding: 14px 18px; }
  .page-head { margin: 8px 0 16px; }
  .month-switch { width: 100%; justify-content: space-between; }
  [data-switch] { flex: 1 1 100%; }
  .hide-sm { display: none; }
  .month-switch .label { min-width: 0; }
  .search .input { min-width: 0; }
  .search { flex: 1; }
  .device-card { grid-template-columns: auto minmax(0, 1fr); }
  .device-card > .actions { grid-column: 1 / -1; }
  .picker { width: min(332px, calc(100vw - 24px)); }
  .req-row { flex-wrap: wrap; align-items: flex-start; }
  /* status chip and «لغو» drop under the text, so the tracking steps get the full width */
  .req-row .body { flex-basis: calc(100% - 54px); }
  .req-row > .row { margin-inline-start: 54px; }
  .topbar-title { font-size: 1rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; }
}


/* ---------- year calendar ---------- */
.year-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); gap: 16px; }
.ym { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); padding: 12px 12px 10px; }
.ym h3 { font-size: 0.9375rem; display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.ym h3 span { font-size: 0.75rem; font-weight: 500; color: var(--text-3); }
.ym .wd-row, .ym .days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.ym .wd-row div { font-size: 0.6875rem; color: var(--text-3); text-align: center; padding-bottom: 4px; }
.ym .wd-row div.off { color: var(--holiday); }
.yd { appearance: none; -webkit-appearance: none; background: transparent; color: var(--text); font: inherit; padding: 0; cursor: pointer; position: relative; aspect-ratio: 1; border-radius: 7px; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.05; font-size: 0.8125rem; font-weight: 600; border: 1px solid transparent; }
.yd:not(.blank):hover { border-color: var(--border-strong); }
.yd:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }
.yd small { font-size: 0.5625rem; font-weight: 400; color: var(--text-3); }
.yd.blank { visibility: hidden; }
.yd.weekend { color: var(--off); background: var(--surface-2); }
.yd.holiday { background: var(--holiday-soft); color: var(--holiday); border-color: #f0c6d6; }
.yd.today { outline: 2px solid var(--brand); outline-offset: -2px; }
.yd.s-present, .yd.s-late, .yd.s-in_office, .yd.s-incomplete { background: var(--present-soft); color: var(--present); }
.yd.s-late { background: var(--late-soft); color: var(--late); }
.yd.s-absent { background: var(--absent-soft); color: var(--absent); }
.yd.s-leave { background: var(--leave-soft); color: var(--leave); }
.yd.s-remote { background: var(--remote-soft); color: var(--remote); }
.yd.s-leave small, .yd.s-remote small, .yd.s-absent small, .yd.s-late small, .yd.s-present small { color: inherit; opacity: 0.75; }
.holiday-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; }
.holiday-list div { display: flex; gap: 10px; align-items: baseline; padding: 10px 12px; border-radius: 10px; background: var(--holiday-soft); color: #7a1c41; }
.holiday-list b { white-space: nowrap; color: var(--holiday); }
@media (max-width: 720px) { .year-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); } }

/* ---- reports ---------------------------------------------------------- */
.report-period { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 2px 2px 0;
  font-size: 0.9375rem; color: var(--text); }
.report-period svg { color: var(--brand); }
.report-period .subtle { margin-inline-start: auto; }

/* ---- salary sheet ----------------------------------------------------------- */
.salary-table { font-size: 0.875rem; }
.salary-table th, .salary-table td { padding: 8px 10px; }
.salary-table th.c, .salary-table td.c { text-align: center; }
.salary-table thead tr.grp th { background: var(--brand-softer, #eef6f5); color: var(--text); border-bottom: 1px solid var(--border); }
.salary-table thead th small { font-weight: 500; color: var(--text-3); }
.salary-table td.n { direction: ltr; unicode-bidi: plaintext; white-space: nowrap; font-variant-numeric: tabular-nums; }
.salary-table td.neg { color: var(--absent); }
.salary-table td.pos { color: var(--overtime); }
.salary-table .strong { font-weight: 700; }
.salary-table td.pay { color: var(--brand-ink, var(--brand)); background: var(--brand-softer, #eef6f5); }
.salary-table .sticky { position: sticky; inset-inline-start: 0; background: var(--surface); z-index: 2; min-width: 190px; box-shadow: -1px 0 0 var(--border) inset; }
.salary-table thead .sticky { background: var(--surface-2); z-index: 3; }
.salary-table tfoot .sticky { background: var(--surface-2); }
.salary-table .cell {
  width: 100%; min-width: 84px; font: inherit; color: var(--text); text-align: center;
  padding: 6px 8px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface);
  font-variant-numeric: tabular-nums; transition: border-color 120ms, box-shadow 120ms;
}
.salary-table .cell.wide { min-width: 120px; }
.salary-table .cell.note { min-width: 150px; text-align: right; }
.salary-table .cell.cur { min-width: 76px; padding-inline: 4px; }
.salary-table .cell:hover { border-color: var(--border-strong); }
.salary-table .cell:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.salary-table .cell[aria-invalid="true"] { border-color: var(--absent); box-shadow: 0 0 0 3px var(--absent-soft); }
.salary-table .cell[aria-busy="true"] { opacity: 0.6; }
.salary-table .cell::placeholder { color: var(--text-3); opacity: 1; }
.salary-table .hcell { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.salary-table .hcell .auto { font-size: 0.6875rem; color: var(--text-3); }
.salary-table .hcell.manual { flex-direction: row; }
.salary-table .hcell.manual .cell { border-color: var(--late); background: var(--late-soft); }
.salary-table .reset { all: unset; cursor: pointer; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; color: var(--text-3); }
.salary-table .reset:hover { background: var(--surface-3); color: var(--text); }
.salary-table .warn { color: var(--late); display: inline-flex; vertical-align: middle; cursor: help; }
.salary-table tbody tr.saved td { animation: saved-flash 900ms var(--ease-out, ease-out); }
@keyframes saved-flash { from { background: var(--present-soft); } }
@media (prefers-reduced-motion: reduce) { .salary-table tbody tr.saved td { animation: none; } }

/* ---- app install & notifications ---------------------------------------------------- */
.setup-slot:empty { display: none; }
.setup-slot { padding: 0 32px; }
.setup-banner {
  all: unset; box-sizing: border-box; cursor: pointer; width: 100%; margin-top: 12px;
  display: flex; align-items: center; gap: 14px; padding: 12px 14px 12px 12px;
  border-radius: var(--radius); border: 1px solid var(--brand-soft); background: linear-gradient(90deg, var(--brand-softer), var(--surface));
  transition: border-color 150ms, box-shadow 150ms;
}
.setup-banner:hover { border-color: var(--brand); box-shadow: 0 2px 10px rgba(11, 107, 100, 0.08); }
.setup-banner:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.setup-banner > span:nth-child(2) { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.setup-banner strong { font-size: 0.9375rem; }
.setup-banner > span:nth-child(2) > span { font-size: 0.8125rem; color: var(--text-2); }
.setup-banner-ico { width: 40px; height: 40px; border-radius: 12px; background: var(--brand-solid); color: var(--on-brand); display: grid; place-items: center; flex: none; animation: ring 2.6s var(--ease-out) infinite; }
@keyframes ring { 0%, 70%, 100% { transform: rotate(0); } 74% { transform: rotate(-12deg); } 78% { transform: rotate(10deg); } 82% { transform: rotate(-6deg); } 86% { transform: rotate(3deg); } }
@media (prefers-reduced-motion: reduce) { .setup-banner-ico { animation: none; } }

.setup-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.setup-step { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 12px; padding: 12px 0; position: relative; }
.setup-step + .setup-step { border-top: 1px dashed var(--border); }
.setup-num { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 0.875rem; background: var(--surface-3); color: var(--text-2); }
.setup-step.active .setup-num { background: var(--brand-solid); color: var(--on-brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.setup-step.done .setup-num { background: var(--present-soft); color: var(--present); }
.setup-step.blocked .setup-num { background: var(--late-soft); color: var(--late); }
.setup-step.tip .setup-num { background: var(--leave-soft); color: var(--leave); }
.setup-body strong { display: block; font-size: 0.9375rem; margin-top: 4px; }
.setup-step.done .setup-body strong { color: var(--present); }
.setup-text { color: var(--text-2); font-size: 0.875rem; line-height: 1.8; margin-top: 4px; }
.setup-text .icon.sm { vertical-align: -3px; }
.setup-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.ios-steps { list-style: none; padding: 0; margin: 8px 0 0; display: flex; flex-direction: column; gap: 10px; counter-reset: s; }
.ios-steps li { display: grid; grid-template-columns: 38px minmax(0, 1fr); gap: 10px; align-items: center; }
.ios-key { width: 38px; height: 38px; border-radius: 10px; background: var(--surface); border: 1px solid var(--border); display: grid; place-items: center; color: #0a84ff; box-shadow: 0 1px 2px rgba(12, 33, 49, 0.06); }
.ios-key.ios-add { font-weight: 700; font-size: 0.8125rem; direction: ltr; }
.pref-list { display: flex; flex-direction: column; gap: 12px; padding: 12px 0 4px; border-top: 1px solid var(--border); }

.form-section { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 0.875rem; color: var(--brand-ink); padding-top: 10px; margin-top: 4px; border-top: 1px solid var(--border); }
.form-section .subtle { font-weight: 500; }
.jdate { display: grid; grid-template-columns: 0.8fr 1.3fr 1fr; gap: 8px; }
.hint.error { color: var(--absent); }
.change-table { width: 100%; border-collapse: collapse; margin-top: 10px; font-size: 0.875rem; }
.change-table th { text-align: right; font-weight: 600; color: var(--text-3); font-size: 0.75rem; padding: 4px 8px; }
.change-table td { padding: 8px; border-top: 1px solid var(--border); }
.change-table td.old { color: var(--text-3); text-decoration: line-through; }
.change-table td.new { font-weight: 700; color: var(--brand-ink); }
.toast [data-toast-action] { margin-inline-start: auto; flex: none; }

/* installed app: respect the notch / home indicator */
@media (display-mode: standalone) {
  .topbar { padding-top: env(safe-area-inset-top); height: calc(var(--topbar-h) + env(safe-area-inset-top)); }
  .sidebar { padding-top: calc(env(safe-area-inset-top) + 16px); }
  body { overscroll-behavior-y: none; }
}
@media (max-width: 960px) {
  .setup-slot { padding: 0 16px; }
}

/* ---- phone polish ------------------------------------------------------------------------ */
@media (max-width: 960px) {
  /* iOS Safari zooms into any field under 16 px — keep the page still */
  .input, .select, .textarea, select.input { font-size: 16px; }
  /* toasts sit above the bottom menu and span the width */
  .toasts { left: 12px; right: 12px; bottom: calc(76px + env(safe-area-inset-bottom)); }
  .toast { min-width: 0; max-width: none; }
  .drawer { width: 100vw; }
  .drawer-foot { padding-bottom: calc(16px + env(safe-area-inset-bottom)); flex-wrap: wrap; }
}
@media (display-mode: standalone) {
  .drawer-head { padding-top: calc(20px + env(safe-area-inset-top)); }
  .login-main, .login-side { padding-top: calc(28px + env(safe-area-inset-top)); }
  .popover { max-height: calc(100vh - 120px - env(safe-area-inset-top)); overflow-y: auto; }
}
/* long-press on the installed app should not select UI chrome */
.bottom-nav, .topbar, .setup-banner { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
.diag { margin-top: 4px; font-size: 0.8125rem; }
.diag summary { cursor: pointer; color: var(--text-2); padding: 6px 0; }
.diag .kv { margin-top: 6px; }


/* ---- phone pass (2026-09-27) ------------------------------------------------------------ */
/* tables that become readable rows on a phone: main cell + side cell on top, labelled facts below */
@media (max-width: 720px) {
  .table.rows-sm, .table.rows-sm tbody { display: block; width: 100%; }
  .table.rows-sm thead { display: none; }
  .table.rows-sm tr { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px 12px; padding: 12px 16px; border-bottom: 1px solid var(--border); }
  .table.rows-sm tbody tr:last-child { border-bottom: 0; }
  .table.rows-sm td, .table.rows-sm tbody tr td, .table.rows-sm tbody tr.off td { display: block; padding: 0; border: 0; min-width: 0; background: transparent; }
  .table.rows-sm tr.bare td[data-label], .table.rows-sm tbody tr td.hide-sm { display: none; }
  .table.rows-sm tr.off { background: var(--surface-2); }
  .table.rows-sm tr.today { box-shadow: inset 3px 0 0 var(--brand); background: var(--brand-softer); }
  .table.rows-sm td.cell-main { grid-row: 1; grid-column: 1 / 4; align-self: center; }
  .table.rows-sm td.cell-side { grid-row: 1; grid-column: 4; justify-self: end; align-self: center; text-align: end; }
  .table.rows-sm td[data-label]::before { content: attr(data-label); display: block; font-size: 0.6875rem; font-weight: 500; color: var(--text-3); margin-bottom: 1px; }
  .table.rows-sm td[data-label] { font-variant-numeric: tabular-nums; }
  .table.rows-sm .hide-sm { display: none; }
  .table-wrap:has(> .table.rows-sm) { overflow: visible; }

  /* setup reminder: one compact line on a phone */
  .setup-banner { gap: 10px; padding: 10px 10px 10px 12px; margin-top: 10px; }
  .setup-banner > span:nth-child(2) > span { display: none; }
  .setup-banner strong { font-size: 0.875rem; }
  .setup-banner-ico { width: 34px; height: 34px; border-radius: 10px; }

  /* page intro text: keep it to two lines so content starts sooner */
  .page-head p { font-size: 0.8125rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .page-head { gap: 12px; }

  /* touch targets */
  .icon-btn { width: 44px; height: 44px; }
  .btn.sm { min-height: 36px; }
  .segmented button { min-height: 36px; }
}
/* the side menu dims the page it covers */
@media (max-width: 960px) {
  body.menu-open::before { content: ""; position: fixed; inset: 0; z-index: 65; background: var(--scrim); animation: fade 200ms ease-out; }
  body.menu-open { overflow: hidden; }
}

/* leave balance: three figures, the one that matters first */
.bal-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.bal-stats > div { padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.bal-stats > div + div { border-inline-start: 1px solid var(--border); }
.bal-stats .label { font-size: 0.75rem; color: var(--text-2); }
.bal-stats b { font-size: 1.375rem; font-weight: 700; line-height: 1.25; font-variant-numeric: tabular-nums; }
.bal-stats b small { font-size: 0.75rem; font-weight: 500; color: var(--text-3); }
.bal-stats .sub { font-size: 0.6875rem; color: var(--text-3); }
@media (max-width: 720px) { .bal-stats > div { padding: 10px; } .bal-stats b { font-size: 1.125rem; } }

/* ==== dark theme ============================================================================
   A deep teal-black, not pure black: the same calm world at night. Every state keeps its hue;
   foregrounds are lifted and soft grounds darkened so each chip stays ≥4.5:1. Filled buttons
   keep white text on a mid-tone solid (the lifted brand is for text, icons and focus). */
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0a111d;
  --surface: #111a29;
  --surface-2: #142033;
  --surface-3: #1a2740;
  --border: #22314a;

  --border-strong: #34455f;
  --text: #e8eef7;
  --text-2: #b1bdcf;
  --text-3: #8d9ab0;

  --brand: #7fb0ff;
  --brand-hover: #2f74f0;
  --brand-ink: #b9d3ff;
  --brand-soft: #16305c;
  --brand-softer: #0f2140;
  --brand-solid: #2366e6;
  --on-brand: #ffffff;

  --present: #5dd39a;  --present-soft: #123526;  --present-solid: #1c7d51;
  --late: #f2b457;     --late-soft: #36270f;
  --absent: #ff8f84;   --absent-soft: #3e1915;   --absent-solid: #c23a2f;
  --leave: #9aa9ff;    --leave-soft: #1c2346;
  --sick: #72c6f2;     --sick-soft: #0f2d44;
  --remote: #5cd0e3;   --remote-soft: #0e333c;
  --overtime: #c7a6f6; --overtime-soft: #2a1f44;
  --holiday: #f48fb5;  --holiday-soft: #3d1a2a;
  --incomplete: #a7b3c4; --incomplete-soft: #1b2638;
  --off: #8d9ab0;      --off-soft: #16213a;

  --shadow-pop: 0 14px 36px -8px rgba(0, 0, 0, 0.6), 0 2px 8px rgba(0, 0, 0, 0.35);
  --shadow-drawer: 0 0 56px rgba(0, 0, 0, 0.55);
  --topbar-bg: rgba(17, 26, 41, 0.94);
  --nav-bg: rgba(17, 26, 41, 0.97);
  --scrim: rgba(0, 0, 0, 0.55);
  --off-row: #0d1523;
  --shift-band: #22314a;
  --auto-border: #4a3a6b;
  --selection: #23457f;
  --ring: rgba(127, 176, 255, 0.3);
  --page-bg: linear-gradient(180deg, #0d1829 0%, #0a111d 60%);
  --panel-edge: var(--border);
  --shadow-card: 0 14px 34px -20px rgba(0, 0, 0, 0.7), 0 2px 6px -2px rgba(0, 0, 0, 0.4);
  --shadow-soft: 0 6px 16px -10px rgba(0, 0, 0, 0.7);
  --brand-glow: 0 10px 22px -12px rgba(35, 102, 230, 0.8);
  --brand-lift: #4b9bff;
  --sidebar-bg: linear-gradient(180deg, #14264a 0%, #0f1d38 55%, #0c172d 100%);
  --sidebar-waves: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 360' preserveAspectRatio='none'%3E%3Cpath d='M0 150 C 70 95 150 210 256 120 L256 360 L0 360 Z' fill='white' fill-opacity='0.04'/%3E%3Cpath d='M0 240 C 90 180 170 300 256 225 L256 360 L0 360 Z' fill='white' fill-opacity='0.04'/%3E%3C/svg%3E");
  --sidebar-edge: var(--border);
  --sidebar-text: #c9d6ea;
  --sidebar-strong: #eef3fb;
  --sidebar-dim: #93a4c2;
  --sidebar-icon: #8db8ff;
  --sidebar-hover: rgba(255, 255, 255, 0.06);
  --sidebar-active-text: #ffffff;
  --sidebar-line: rgba(255, 255, 255, 0.08);
  --sidebar-pill: rgba(255, 255, 255, 0.06);
  --sidebar-card: rgba(255, 255, 255, 0.06);
  --sidebar-card-edge: rgba(255, 255, 255, 0.08);
}
[data-theme="dark"] .avatar[data-tone="1"] { background: #1c2a45; color: #a9c1f5; }
[data-theme="dark"] .avatar[data-tone="2"] { background: #3a2a18; color: #f0c48e; }
[data-theme="dark"] .avatar[data-tone="3"] { background: #2c2244; color: #cdb3f3; }
[data-theme="dark"] .avatar[data-tone="4"] { background: #15372a; color: #8fdbb4; }
[data-theme="dark"] .avatar[data-tone="5"] { background: #3d1c2a; color: #f3a9c4; }
[data-theme="dark"] .banner { color: #f7d49c; border-color: #5a4217; }
[data-theme="dark"] .banner.info { color: var(--brand-ink); border-color: #0e4466; }
[data-theme="dark"] .banner.error { color: #ffb8b0; border-color: #6a2821; }
[data-theme="dark"] .cal-day.absent { background: #1d1413; border-color: #5a2520; }
[data-theme="dark"] .cal-day.remote { background: #101f23; border-color: #1e4f5a; }
[data-theme="dark"] .cal-day.leave { background: #141a2c; border-color: #33407a; }
[data-theme="dark"] .cal-day.leave.sick { background: #111d28; border-color: #235273; }
[data-theme="dark"] .matrix thead th.off { background: #2a1720; }
[data-theme="dark"] .mcell.holiday, [data-theme="dark"] .mcell.weekend { background: #1b1619; color: #8d6f7a; }
[data-theme="dark"] .yd.holiday { border-color: #6a2d45; }
[data-theme="dark"] .holiday-list div { color: #f6b3cc; }
[data-theme="dark"] .mini-line .shift { background: var(--shift-band); }
[data-theme="dark"] .tile.s-present .avatar::after, [data-theme="dark"] .tile.s-late .avatar::after,
[data-theme="dark"] .tile.s-incomplete .avatar::after { background: #6b7a86; }
[data-theme="dark"] .ribbon-shift { background: repeating-linear-gradient(90deg, transparent 0 calc(11.11% - 1px), rgba(255, 255, 255, 0.07) calc(11.11% - 1px) 11.11%), var(--shift-band); }
[data-theme="dark"] .toast { background: #14364d; box-shadow: var(--shadow-pop); }
[data-theme="dark"] .toast.error { background: #4a1a14; }
[data-theme="dark"] .switch input::after { background: #e7eef3; }
[data-theme="dark"] .skeleton { opacity: 0.8; }
[data-theme="dark"] img.photo, [data-theme="dark"] .avatar img { filter: brightness(0.92); }
[data-theme="dark"] .login-side { background: radial-gradient(90% 60% at 100% 0%, rgba(47, 167, 243, 0.22) 0%, transparent 65%), linear-gradient(165deg, #0f2231, #0a141b); }
[data-theme="dark"] .login-side p, [data-theme="dark"] .login-clock span { color: var(--text-2); }

/* theme toggle */
.theme-btn .icon { transition: transform 360ms var(--ease-out); }
.theme-btn:hover .icon { transform: rotate(-18deg); }
.login-theme { position: fixed; top: calc(12px + env(safe-area-inset-top)); left: 12px; z-index: 20; background: var(--surface); border: 1px solid var(--border); }
@media (prefers-reduced-motion: reduce) { .theme-btn .icon { transition: none; } }

/* request tracking for the sender: sent → on the manager's phone → seen */
/* this week: today stands out, days still ahead are muted */
.table tr.today td { background: var(--brand-softer); }
.table tr.today td.cell-main div:first-child { color: var(--brand); }
.table tr.future td { color: var(--text-3); }
.req-row .sent-at { margin-top: 4px; font-size: 0.75rem; }
.track { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 8px; font-size: 0.75rem; }
.track .st { display: inline-flex; align-items: center; gap: 4px; color: var(--text-3); white-space: nowrap; }
.track .st.note { white-space: normal; }
.track .st .icon { width: 14px; height: 14px; }
.track .st.done { color: var(--present); }
.track .st.done time { color: var(--text-3); }
.track .st.wait .icon { color: var(--late); }
.track .st.note { color: var(--text-2); }
.track .st.note .icon { color: var(--off); }

/* =====================================================================================
   Azure skin (2026-09-28): the owner's mockup, component by component.
   Light-blue page, light-blue sidebar with soft waves, floating white topbar, 20px cards
   with soft blue shadows, pill buttons and pill tabs, requests as cards with a ⋮ menu.
   ===================================================================================== */
body { background: var(--page-bg); background-attachment: fixed; }

/* sidebar */
.sidebar { background: var(--sidebar-waves) bottom / 100% 46% no-repeat, var(--sidebar-bg); border-left: 1px solid var(--sidebar-edge); padding: 18px 16px; }
.sidebar .brand { margin: 0 0 20px; padding: 12px 14px; border-radius: 18px; background: var(--sidebar-card); border: 1px solid var(--sidebar-card-edge); box-shadow: 0 8px 20px -14px rgba(20, 70, 150, 0.45); }
.brand-mark { width: 46px; height: 46px; border-radius: 13px; background: linear-gradient(160deg, var(--brand-lift), #1f5fd6); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 8px 16px -8px rgba(35, 102, 230, 0.7); }
.sidebar .brand-name strong { font-size: 1.0625rem; }
.sidebar:not(:has(.nav-group + .nav-group)) .nav-title { display: none; }
.nav-group + .nav-group { border-top-color: var(--sidebar-line); }
.nav-link { padding: 11px 14px; margin: 3px 0; border-radius: 14px; font-size: 0.96rem; }
.nav-link .icon { color: var(--sidebar-icon); }
.nav-link[aria-current="page"] .icon { color: #fff; }
.sidebar .device-pill { border-radius: 14px; border: 1px solid var(--sidebar-card-edge); padding: 12px 14px; }

/* topbar: a floating white bar, rounded towards the page */
.topbar { background: var(--topbar-bg); border-bottom: 0; border-bottom-left-radius: 24px; box-shadow: 0 12px 30px -20px rgba(30, 80, 160, 0.45); padding: 0 28px; gap: 16px; }
.topbar.scrolled { border-bottom-color: transparent; }
.topbar-title { display: flex; align-items: center; gap: 10px; font-size: 1.125rem; }
.topbar-title::before { content: ""; width: 4px; height: 22px; border-radius: 2px; background: var(--brand-grad); flex: none; }
.topbar-sep { width: 1px; height: 30px; background: var(--border); flex: none; }
.clock { gap: 16px; }
.clock .date-part { display: flex; flex-direction: column; line-height: 1.35; font-size: 0.8125rem; color: var(--text-2); }
.clock .date-part small { font-size: 0.75rem; color: var(--text-3); }
.clock b { font-size: 1.375rem; font-weight: 700; }
.icon-btn { width: 42px; height: 42px; border-radius: 12px; color: #2c4a74; }
[data-theme="dark"] .icon-btn { color: var(--text-2); }
.icon-btn .badge { background: var(--brand-solid); border-color: var(--surface); top: 4px; left: 4px; }
.user-chip { gap: 12px; padding: 4px; border-radius: 16px; }
.user-chip > .icon { color: var(--text-3); }
.user-chip .avatar { --size: 46px; box-shadow: 0 0 0 3px var(--surface), 0 6px 14px -6px rgba(30, 80, 160, 0.5); }
.user-chip .who strong { font-size: 0.9375rem; }

/* page */
.page { padding: 20px 32px 48px; }
.setup-slot { padding: 0 32px; }
.page-head { margin: 8px 0 24px; align-items: center; }
.page-head h1 { font-size: 1.75rem; }

/* cards */
.panel, .ledger { border: 1px solid var(--panel-edge); border-radius: var(--radius); box-shadow: var(--shadow-card); }
.panel-head { padding: 18px 22px; }
.panel-body { padding: 22px; }

/* buttons: pills; primary is an azure gradient with a soft glow */
.btn { min-height: 44px; padding: 0 20px; border-radius: 999px; border-color: transparent; background: var(--surface); box-shadow: var(--shadow-soft); }
.btn:hover { background: var(--surface-2); border-color: transparent; }
.btn.primary { background: var(--brand-grad); border: 0; box-shadow: var(--brand-glow); }
.btn.primary:hover { background: var(--brand-grad); filter: brightness(1.07); }
.btn.ghost { box-shadow: none; }
.btn.sm { min-height: 34px; padding: 0 14px; border-radius: 999px; }
.btn.danger-solid, .btn.success { border: 0; }
.drawer .btn, .modal .btn, .popover .btn { box-shadow: none; border-color: var(--border); }
.drawer .btn.primary, .modal .btn.primary { box-shadow: var(--brand-glow); border: 0; }

/* tabs become pill chips */
.tabs { gap: 10px; padding: 16px 20px 6px; border-bottom: 0; }
.tabs button { padding: 8px 16px; margin: 0; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--text-2); }
.tabs button:hover { border-color: var(--border-strong); }
.tabs button[aria-selected="true"] { background: var(--brand-soft); color: var(--brand); border-color: transparent; }
.segmented { border-radius: 999px; padding: 4px; }
.segmented button { border-radius: 999px; }

/* inputs */
.input, .select, .textarea { border-radius: 12px; }

/* notification set-up banner */
.setup-banner { position: relative; overflow: hidden; margin-top: 16px; padding: 18px 20px; border-radius: var(--radius); border: 1px solid #cde0f8;
  background: radial-gradient(60% 140% at 0% 100%, rgba(255, 255, 255, 0.7), transparent 60%), linear-gradient(100deg, #d6e9fe, #e8f2fe 60%, #dcebfd); box-shadow: var(--shadow-card); }
.setup-banner:hover { border-color: #b9d4f6; box-shadow: var(--shadow-card); }
.setup-banner-ico { width: 52px; height: 52px; border-radius: 15px; background: var(--brand-grad); box-shadow: var(--brand-glow); }
.setup-banner strong { font-size: 1.0625rem; }
.setup-banner .btn { min-height: 46px; padding: 0 24px; font-size: 0.95rem; }
[data-theme="dark"] .setup-banner { border-color: #20365c; background: radial-gradient(60% 140% at 0% 100%, rgba(75, 155, 255, 0.12), transparent 60%), linear-gradient(100deg, #13284a, #111f38); }

/* leave balance: three small cards, each with a round icon */
.bal-head { display: flex; align-items: center; gap: 10px; }
.bal-head > .icon { color: var(--brand); width: 24px; height: 24px; }
.bal-stats { gap: 14px; border: 0; overflow: visible; }
.bal-stats > div { flex-direction: row; align-items: flex-start; gap: 14px; padding: 16px 18px; border: 1px solid var(--border); border-radius: 16px; background: var(--surface); }
.bal-stats > div + div { border-inline-start: 1px solid var(--border); }
.bal-stats .bal-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.bal-stats .label { font-size: 0.875rem; color: var(--text); font-weight: 600; }
.bal-ico { width: 48px; height: 48px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; flex: none; }
.bal-ico .icon { width: 22px; height: 22px; }
.meter.brand { height: 12px; border-radius: 6px; background: var(--brand-soft); }
.meter.brand i { height: 12px; background: linear-gradient(90deg, #1f62dc, #4b95fb); border-radius: 6px; }

/* request list: pill tabs + search, each request its own card */
.list-tools { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 16px 20px 8px; }
.list-tools .tabs { padding: 0; }
.list-search { display: flex; align-items: center; gap: 6px; min-width: 260px; height: 44px; padding: 0 6px 0 14px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); }
.list-search:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px var(--ring); }
.list-search > .icon { color: var(--text-3); }
.list-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; height: 100%; }
.list-search input::placeholder { color: var(--text-3); }
.list-search .icon-btn { width: 34px; height: 34px; border-radius: 50%; }
.list-search .icon-btn[aria-pressed="true"] { background: var(--brand-soft); color: var(--brand); }
.status-row { padding: 4px 20px 8px; }
.req-cards { padding: 8px 20px 20px; display: flex; flex-direction: column; gap: 12px; }
.req-cards .req-row, .req-cards > .empty { border: 1px solid var(--border); border-radius: 16px; background: var(--surface); padding: 16px 18px; }
.req-cards .req-row:last-child { border-bottom: 1px solid var(--border); }
.req-row .ico { border-radius: 50%; width: 46px; height: 46px; }
.req-row .more { width: 36px; height: 36px; border-radius: 50%; }

/* bottom navigation on phones */
@media (max-width: 960px) {
  .topbar { border-radius: 0 0 22px 22px; padding: 0 14px; gap: 10px; }
  .topbar-sep { display: none; }
  .clock .date-part { display: none; }
  .clock b { font-size: 1.125rem; }
  .user-chip > .icon { display: none; }
  .user-chip .avatar { --size: 38px; }
  .setup-slot { padding: 0 16px; }
  .page { padding: 16px 16px 104px; }
  .bottom-nav { border-top: 0; border-radius: 22px 22px 0 0; box-shadow: 0 -10px 30px -18px rgba(30, 80, 160, 0.45); }
  .bottom-nav a[aria-current="page"] { color: var(--brand); }
  .bottom-nav a[aria-current="page"] .icon { background: var(--brand-soft); border-radius: 12px; padding: 4px; width: 32px; height: 28px; }
  .list-search { min-width: 0; flex: 1 1 100%; }
  .req-cards { padding: 8px 12px 14px; }
  .bal-stats { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 720px) {
  .page-head h1 { font-size: 1.4rem; }
}

/* =====================================================================================
   Glass (2026-09-28): frosted surfaces over a softly coloured page.
   Only the main surfaces blur (cards, topbar, sidebar, bottom bar, popovers, drawers);
   cards inside them are translucent without their own blur, so scrolling stays smooth on
   ordinary Android phones. No blur support or "reduce transparency" → solid surfaces.
   ===================================================================================== */
:root {
  --glass: rgba(255, 255, 255, 0.6);
  --glass-strong: rgba(255, 255, 255, 0.8);
  --glass-inner: rgba(255, 255, 255, 0.58);
  --glass-edge: rgba(255, 255, 255, 0.78);
  --glass-blur: blur(22px) saturate(165%);
  --glass-hi: inset 0 1px 0 rgba(255, 255, 255, 0.9);
  --glass-head: rgba(244, 248, 254, 0.9);
  --blobs: radial-gradient(38% 32% at 88% 6%, rgba(96, 165, 255, 0.5), transparent 70%),
           radial-gradient(34% 30% at 6% 26%, rgba(150, 140, 255, 0.26), transparent 70%),
           radial-gradient(46% 38% at 26% 98%, rgba(70, 190, 255, 0.34), transparent 70%),
           radial-gradient(30% 28% at 62% 58%, rgba(255, 255, 255, 0.7), transparent 70%);
}
:root[data-theme="dark"] {
  --glass: rgba(17, 26, 41, 0.58);
  --glass-strong: rgba(17, 26, 41, 0.8);
  --glass-inner: rgba(255, 255, 255, 0.035);
  --glass-edge: rgba(255, 255, 255, 0.08);
  --glass-hi: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  --glass-head: rgba(20, 31, 50, 0.92);
  --blobs: radial-gradient(38% 32% at 88% 6%, rgba(35, 102, 230, 0.32), transparent 70%),
           radial-gradient(34% 30% at 6% 26%, rgba(110, 80, 220, 0.18), transparent 70%),
           radial-gradient(46% 38% at 26% 98%, rgba(20, 140, 220, 0.22), transparent 70%);
}
body::after { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; background: var(--blobs); }

.panel, .ledger, .setup-banner {
  background-color: var(--glass); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
  border-color: var(--glass-edge); box-shadow: var(--glass-hi), var(--shadow-card);
}
.setup-banner { background-image: linear-gradient(100deg, rgba(190, 220, 255, 0.55), rgba(232, 242, 254, 0.35) 60%, rgba(200, 225, 255, 0.5)); }
[data-theme="dark"] .setup-banner { background-image: linear-gradient(100deg, rgba(35, 102, 230, 0.22), rgba(17, 26, 41, 0.2) 60%, rgba(35, 102, 230, 0.16)); }
.topbar { background: var(--glass-strong); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); box-shadow: var(--glass-hi), 0 12px 30px -20px rgba(30, 80, 160, 0.45); }
.sidebar { background: var(--sidebar-waves) bottom / 100% 46% no-repeat, linear-gradient(180deg, rgba(181, 212, 246, 0.74) 0%, rgba(169, 204, 244, 0.76) 55%, rgba(151, 193, 243, 0.8) 100%);
  -webkit-backdrop-filter: blur(26px) saturate(160%); backdrop-filter: blur(26px) saturate(160%); border-left: 1px solid rgba(255, 255, 255, 0.55); }
[data-theme="dark"] .sidebar { background: var(--sidebar-waves) bottom / 100% 46% no-repeat, linear-gradient(180deg, rgba(20, 38, 74, 0.82), rgba(12, 23, 45, 0.86)); border-left-color: var(--glass-edge); }
.popover, .drawer, dialog.modal { background: var(--glass-strong); -webkit-backdrop-filter: blur(28px) saturate(170%); backdrop-filter: blur(28px) saturate(170%); border-color: var(--glass-edge); }
.drawer-foot { background: transparent; }

/* inside the glass: translucent, no blur of their own */
.bal-stats > div, .req-cards .req-row, .req-cards > .empty, .tabs button, .list-search, .btn:not(.primary):not(.danger-solid):not(.success):not(.ghost),
.tile, .cal-day, .segmented { background-color: var(--glass-inner); border-color: var(--glass-edge); }
.segmented button[aria-pressed="true"] { background: var(--surface); }
.btn:not(.primary):not(.danger-solid):not(.success):not(.ghost):hover { background-color: var(--glass-strong); }
.tabs button[aria-selected="true"] { background: var(--brand-soft); }
.table th { background: var(--glass-head); }
.icon-btn:hover, .user-chip:hover { background: rgba(255, 255, 255, 0.55); }
[data-theme="dark"] .icon-btn:hover, [data-theme="dark"] .user-chip:hover { background: rgba(255, 255, 255, 0.06); }

@media (max-width: 960px) {
  .bottom-nav { background: var(--glass-strong); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); box-shadow: var(--glass-hi), 0 -10px 30px -18px rgba(30, 80, 160, 0.45); }
  /* the off-canvas menu needs a solid-enough ground over the page */
  .sidebar { background: var(--sidebar-waves) bottom / 100% 46% no-repeat, var(--sidebar-bg); }
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  :root { --glass: rgba(255, 255, 255, 0.95); --glass-strong: #ffffff; }
  :root[data-theme="dark"] { --glass: #111a29; --glass-strong: #111a29; }
}
@media (prefers-reduced-transparency: reduce) {
  :root { --glass: rgba(255, 255, 255, 0.96); --glass-strong: #ffffff; --glass-inner: #ffffff; }
  :root[data-theme="dark"] { --glass: #111a29; --glass-strong: #111a29; --glass-inner: #142033; }
  body::after { display: none; }
}

/* ---- mobile audit fixes (2026-09-28: Android 360/412, iPhone SE/15 Pro Max) ---- */
.avatar { font-size: max(11px, calc(var(--size) * 0.36)); }
.salary-table thead th small { font-size: 0.75rem; }
details > summary { padding-block: 12px; }
@media (max-width: 960px) {
  /* frosted, but opaque enough that nothing behind reads through the labels */
  .bottom-nav { background: rgba(255, 255, 255, 0.9); }
  [data-theme="dark"] .bottom-nav { background: rgba(17, 26, 41, 0.92); }
  .bottom-nav a .count { font-size: 0.6875rem; min-width: 18px; height: 18px; border-radius: 9px; }
  .drawer, .popover, dialog.modal { background: rgba(255, 255, 255, 0.94); }
  [data-theme="dark"] .drawer, [data-theme="dark"] .popover, [data-theme="dark"] dialog.modal { background: rgba(17, 26, 41, 0.95); }
  /* switches large enough for a thumb */
  .switch input { width: 52px; height: 32px; border-radius: 16px; }
  .switch input::after { width: 26px; height: 26px; }
  .switch input:checked::after { transform: translateX(-20px); }
  /* notification banner: text beside the icon, the button full width underneath */
  .setup-banner { flex-wrap: wrap; gap: 12px; padding: 14px; }
  .setup-banner-ico { width: 44px; height: 44px; border-radius: 13px; }
  .setup-banner strong { font-size: 0.975rem; }
  .setup-banner .btn { order: 3; width: 100%; min-height: 44px; }
  /* year calendar: one month per row, real tap targets */
  .year-grid { grid-template-columns: minmax(0, 1fr); }
  .yd { aspect-ratio: auto; min-width: 0; min-height: 42px; font-size: 0.875rem; }
  .yd small { font-size: 0.6875rem; }
  .ym .wd-row div { font-size: 0.75rem; }
}
/* narrow phones (iPhone SE, small Android): the phone shows the time already, the title needs the room */
@media (max-width: 440px) {
  .topbar .clock { display: none; }
  .topbar { gap: 6px; }
  .topbar-title { font-size: 1.02rem; }
  .icon-btn { width: 40px; height: 40px; }
}

/* =====================================================================================
   Smoothness (2026-09-28). Measured with a 6×-slowed phone: the always-on pulses inside
   blurred cards kept the GPU busy even at rest, and blur is re-applied on every scroll frame.
   • every endless animation is transform/opacity only (runs on the compositor, no repaint)
   • the page ground is one fixed layer (no background-attachment: fixed → no repaint on scroll)
   • on phones and touch screens there is no real blur: the glass is translucent + highlight
   ===================================================================================== */
body { background: var(--bg); background-attachment: scroll; }
body::after { background: var(--blobs), var(--page-bg); transform: translateZ(0); }
a, button, [role="tab"], summary, label, .nav-link, .bottom-nav a { touch-action: manipulation; }
html { -webkit-tap-highlight-color: transparent; }

@keyframes halo { 0% { transform: scale(1); opacity: 0.55; } 80%, 100% { transform: scale(2.8); opacity: 0; } }
@keyframes blink { 50% { opacity: 0.35; } }
@keyframes beat { 50% { transform: translateY(-50%) scale(1.35); opacity: 0.7; } }
.dot.live { position: relative; animation: none; }
.dot.live::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: inherit; animation: halo 2.4s var(--ease-out) infinite; will-change: transform, opacity; }
.chip.in_office::before { animation: blink 2.4s ease-in-out infinite; }
.ribbon-presence.ongoing::after { animation: beat 2s ease-in-out infinite; }
.setup-banner-ico { animation-iteration-count: 3; }
.skeleton { animation-duration: 1.6s; }

@media (max-width: 960px), (hover: none) and (pointer: coarse) {
  .panel, .ledger, .setup-banner, .topbar, .sidebar, .bottom-nav, .popover, .drawer, dialog.modal {
    -webkit-backdrop-filter: none !important; backdrop-filter: none !important;
  }
  :root { --glass: rgba(255, 255, 255, 0.8); --glass-strong: rgba(255, 255, 255, 0.95);
    --shadow-card: 0 8px 20px -14px rgba(30, 80, 160, 0.35), 0 1px 3px rgba(30, 80, 160, 0.06); }
  :root[data-theme="dark"] { --glass: rgba(17, 26, 41, 0.86); --glass-strong: rgba(17, 26, 41, 0.97);
    --shadow-card: 0 8px 20px -14px rgba(0, 0, 0, 0.7); }
  .topbar { background: rgba(255, 255, 255, 0.96); }
  [data-theme="dark"] .topbar { background: rgba(17, 26, 41, 0.97); }
  .bottom-nav { background: rgba(255, 255, 255, 0.97); }
  [data-theme="dark"] .bottom-nav { background: rgba(17, 26, 41, 0.98); }
  /* long pages paint only what is on screen */
  .ym, .req-cards .req-row { content-visibility: auto; contain-intrinsic-height: auto 320px; }
  .req-cards .req-row { contain-intrinsic-height: auto 120px; }
}
@media (prefers-reduced-motion: reduce) {
  .dot.live::after, .chip.in_office::before, .ribbon-presence.ongoing::after, .setup-banner-ico { animation: none; }
}

/* ---- wide spreadsheets (2026-09-28) ----
   salary, payroll and the month matrix use the whole width of the screen; while the pointer is
   over such a table, a horizontal scrollbar pinned to the bottom of the screen appears (ui.hscroll) */
.page:has(.salary-table), .page:has(.pay-table), .page:has(.matrix) { max-width: none; }
.hbar { position: sticky; bottom: 0; z-index: 6; height: 18px; margin: 0 12px; overflow-x: auto; overflow-y: hidden;
  opacity: 0; transition: opacity 180ms var(--ease-out); border-radius: 9px;
  background: var(--glass-strong); box-shadow: 0 -6px 16px -10px rgba(30, 80, 160, 0.35);
  scrollbar-width: auto; scrollbar-color: var(--brand-solid) transparent; }
.hbar.show, .hbar:hover { opacity: 1; }
.hbar > div { height: 1px; }
.hbar::-webkit-scrollbar { height: 12px; }
.hbar::-webkit-scrollbar-thumb { background: var(--brand-solid); border-radius: 6px; border: 3px solid transparent; background-clip: padding-box; }
.hbar::-webkit-scrollbar-thumb:hover { background-color: var(--brand-hover); border-width: 2px; }
.hbar::-webkit-scrollbar-track { background: transparent; }
/* the row under the pointer is easy to follow across a wide sheet */
.salary-table tbody tr:hover td, .pay-table tbody tr:hover td { background-color: var(--brand-softer); }
/* the floating bar replaces the table's own scrollbar (no second bar right above it) */
.table-wrap[data-hbar] { scrollbar-width: none; }
.table-wrap[data-hbar]::-webkit-scrollbar { display: none; }
/* phones have no blur, so anything translucent lets the page read through: drawers, menus,
   dialogs and the top/bottom bars are solid there */
@media (max-width: 960px), (hover: none) and (pointer: coarse) {
  .drawer, .popover, dialog.modal, .topbar, .bottom-nav { background: var(--surface) !important; }
}

/* ---- payroll hours page (2026-09-29) ----
   every column centred — header and figures on the same axis */
.pay-table th, .pay-table td { text-align: center; }
.pay-table th:first-child, .pay-table td:first-child { text-align: right; }
.pay-table td.money { text-align: center; direction: ltr; unicode-bidi: isolate; }
.pay-table tr.expanded td { background: var(--brand-soft); }
.pay-detail td { background: transparent !important; padding: 0 !important; }
/* the opened employee: two readable cards */
.pay-breakdown { gap: 16px; padding: 16px 18px 20px; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); align-items: start; text-align: right; }
.pb-warn { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 12px; background: var(--late-soft); color: var(--late); font-size: 0.875rem; font-weight: 600; }
.pb-card { display: flex; flex-direction: column; gap: 12px; padding: 18px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-soft); }
.pb-card h3 { display: flex; align-items: center; gap: 8px; font-size: 1rem; color: var(--text); }
.pb-card h3 .icon { color: var(--brand); }
.pb-steps { display: flex; flex-direction: column; }
.pb-step { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.pb-step:last-child { border-bottom: 0; }
.pb-step strong { display: block; font-size: 0.9375rem; font-weight: 600; }
.pb-step span { display: block; margin-top: 2px; font-size: 0.8125rem; color: var(--text-3); line-height: 1.6; }
.pb-step b { direction: ltr; unicode-bidi: isolate; white-space: nowrap; font-size: 1rem; font-weight: 700; padding: 3px 10px; border-radius: 8px; background: var(--surface-3); color: var(--text-2); }
.pb-step.neg b { background: var(--absent-soft); color: var(--absent); }
.pb-step.pos b { background: var(--present-soft); color: var(--present); }
.pb-sum { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; border-radius: 12px; background: var(--surface-2); font-weight: 600; }
.pb-sum b, .pb-total b { direction: ltr; unicode-bidi: isolate; white-space: nowrap; }
.pb-sum b.neg { color: var(--absent); }
.pb-total { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; border-radius: 14px; background: var(--brand-soft); color: var(--brand-ink); font-size: 1.0625rem; font-weight: 700; }
.pb-total b { font-size: 1.375rem; }
.pb-total.neg { background: var(--absent-soft); color: var(--absent); }
.pb-total.pos { background: var(--present-soft); color: var(--present); }
.pb-note { font-size: 0.8125rem; color: var(--text-3); line-height: 1.7; }
.pb-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.pb-tile { display: flex; flex-direction: column; gap: 4px; padding: 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); text-align: center; }
.pb-tile span { font-size: 0.8125rem; color: var(--text-2); }
.pb-tile b { font-size: 1.125rem; direction: ltr; unicode-bidi: isolate; }
.pb-tile.pos b { color: var(--present); }
.pb-tile.neg b { color: var(--absent); }
.pb-tile.main { background: var(--brand-soft); border-color: transparent; }
.pb-tile.main b { color: var(--brand-ink); font-size: 1.3rem; }
.pb-form { border: 1px dashed var(--border-strong); border-radius: 12px; padding: 0 14px; }
.pb-form[open] { padding-bottom: 14px; }
.pb-form summary { display: flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 600; font-size: 0.875rem; color: var(--brand); list-style: none; }
.pb-form summary::-webkit-details-marker { display: none; }
@media (max-width: 960px) {
  .pay-breakdown { grid-template-columns: minmax(0, 1fr); padding: 12px; }
  .pb-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* this week: today is a clear box, not just coloured text */
.table tr.today td { background: var(--brand-soft) !important; border-top: 2px solid var(--brand); border-bottom: 2px solid var(--brand); }
.table tr.today td:first-child { border-right: 2px solid var(--brand); }
.table tr.today td:last-child { border-left: 2px solid var(--brand); }
.today-tag { display: inline-block; margin-inline-start: 6px; padding: 1px 8px; border-radius: 999px; background: var(--brand-grad); color: #fff; font-size: 0.6875rem; font-weight: 700; vertical-align: 2px; }
@media (max-width: 720px) {
  .table.rows-sm tr.today { outline: 2px solid var(--brand); outline-offset: -2px; border-radius: 12px; background: var(--brand-soft); box-shadow: none; }
  .table.rows-sm tr.today td { border: 0 !important; }
}

/* =====================================================================================
   Status colours v2 (2026-09-29): nine clearly different hues — no three blues, no
   amber-next-to-red. Days in the month calendar are filled with their status colour.
     حاضر green · تأخیر orange · غیبت red · مرخصی blue · استعلاجی yellow · دورکاری teal
     اضافه‌کاری purple · تعطیل رسمی pink · آخر هفته / ناقص grey
   ===================================================================================== */
:root {
  --present: #15803d;  --present-soft: #dcfce7;
  --late: #c2410c;     --late-soft: #ffedd5;
  --absent: #b91c1c;   --absent-soft: #fee2e2;
  --leave: #1d4ed8;    --leave-soft: #dbeafe;
  --sick: #854d0e;     --sick-soft: #fef3c7;   --sick-mark: #eab308;
  --remote: #0f766e;   --remote-soft: #ccfbf1;
  --overtime: #7e22ce; --overtime-soft: #f3e8ff;
  --holiday: #be185d;  --holiday-soft: #fce7f3;
  --incomplete: #475569; --incomplete-soft: #e2e8f0;
  --off: #64748b;      --off-soft: #f1f5f9;
  --present-solid: #15803d; --absent-solid: #b91c1c;
}
:root[data-theme="dark"] {
  --present: #4ade80;  --present-soft: #0f2e1c;
  --late: #fb923c;     --late-soft: #3a1f0c;
  --absent: #f87171;   --absent-soft: #3b1414;
  --leave: #60a5fa;    --leave-soft: #10244a;
  --sick: #facc15;     --sick-soft: #332a07;   --sick-mark: #facc15;
  --remote: #2dd4bf;   --remote-soft: #0b2e2b;
  --overtime: #c084fc; --overtime-soft: #2a1543;
  --holiday: #f472b6;  --holiday-soft: #3a1026;
  --incomplete: #94a3b8; --incomplete-soft: #1e2633;
  --off: #8d9ab0;      --off-soft: #16213a;
  --present-solid: #16803f; --absent-solid: #c23a2f;
}
.chip.sick, .tag.sick { color: var(--sick); }

/* month calendar: the whole day square carries its status */
.cal-day { --fill: var(--surface); --edge: var(--border); background: var(--fill) !important; border-color: var(--edge) !important; }
.cal-day.present, .cal-day.in_office { --fill: var(--present-soft); --edge: color-mix(in srgb, var(--present) 40%, transparent); }
.cal-day.late      { --fill: var(--late-soft);     --edge: color-mix(in srgb, var(--late) 45%, transparent); }
.cal-day.absent    { --fill: var(--absent-soft);   --edge: color-mix(in srgb, var(--absent) 45%, transparent); }
.cal-day.leave     { --fill: var(--leave-soft);    --edge: color-mix(in srgb, var(--leave) 40%, transparent); }
.cal-day.leave.sick, .cal-day.sick { --fill: var(--sick-soft); --edge: color-mix(in srgb, var(--sick-mark) 70%, transparent); }
.cal-day.remote    { --fill: var(--remote-soft);   --edge: color-mix(in srgb, var(--remote) 40%, transparent); }
.cal-day.holiday   { --fill: var(--holiday-soft);  --edge: color-mix(in srgb, var(--holiday) 40%, transparent); }
.cal-day.weekend   { --fill: var(--off-soft);      --edge: var(--border); }
.cal-day.incomplete{ --fill: var(--incomplete-soft); --edge: var(--incomplete); border-style: dashed !important; }
.cal-day.weekend .d b { color: var(--off); }
.cal-day.holiday .d b { color: var(--holiday); }
.cal-day.today { box-shadow: 0 0 0 2px var(--brand) !important; border-color: var(--brand) !important; }
.cal-day.future { --fill: transparent; }
/* legend squares follow the same fills */
.legend i { width: 14px; height: 14px; border-radius: 4px; display: inline-block; }

/* year calendar: a normally-off day declared a working day */
.yd.workday { background: var(--present-soft); color: var(--present); border-color: color-mix(in srgb, var(--present) 45%, transparent); border-style: dashed; }
.lg-work { background: var(--present-soft); border: 1px dashed var(--present); }
.holiday-list div.work { background: var(--present-soft); color: var(--present); }
.holiday-list [data-manage] { cursor: pointer; }
.holiday-list [data-manage]:hover { filter: brightness(0.97); }
.day-kind { flex-wrap: wrap; }
/* whose month this is — the manager must never wonder */
.emp-hero { display: flex; align-items: center; gap: 18px; padding: 18px 22px; border-radius: var(--radius); background: var(--glass, var(--surface)); border: 1px solid var(--glass-edge, var(--border)); box-shadow: var(--shadow-card); }
.emp-hero .avatar { --size: 72px; font-size: 1.5rem; }
.emp-hero > div { flex: 1; min-width: 0; }
.emp-hero h2 { font-size: 1.625rem; font-weight: 800; line-height: 1.3; }
.emp-hero p { color: var(--text-2); margin-top: 2px; }
@media (max-width: 720px) { .emp-hero { flex-wrap: wrap; padding: 14px; } .emp-hero h2 { font-size: 1.3rem; } .emp-hero .avatar { --size: 56px; } }

/* ---- manual punches: 24-hour picker (no AM/PM), entry + exit together, time correction ---- */
.timefield { display: flex; flex-direction: column; gap: 8px; }
.tf-selects { display: inline-flex; align-items: center; gap: 6px; direction: ltr; }
.tf-selects .input { width: 78px; min-height: 46px; text-align: center; text-align-last: center; font-size: 1.125rem; font-weight: 700;
  padding: 0 8px; background: var(--surface); border-radius: 12px; cursor: pointer; }
.tf-selects b { font-size: 1.25rem; color: var(--text-3); }
.tf-quick { display: flex; flex-wrap: wrap; gap: 6px; }
.tf-quick button { border: 1px solid var(--border); background: var(--surface); color: var(--text-2); border-radius: 999px; padding: 4px 12px;
  font-size: 0.8125rem; font-weight: 600; cursor: pointer; min-height: 32px; direction: ltr; }
.tf-quick button:hover { border-color: var(--brand); color: var(--brand); }
.tf-quick .tf-clear { padding: 4px 8px; }
.tf-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.tf-pair .label { display: inline-flex; align-items: center; gap: 6px; }
.add-punch h3 { font-size: 1rem; }
.punch-acts { display: flex; gap: 6px; margin-inline-start: auto; }
.punch-edit { display: flex; flex-direction: column; gap: 10px; margin: -2px 0 10px; padding: 14px; border-radius: 12px; background: var(--brand-softer); border: 1px dashed var(--brand); }
@media (max-width: 720px) { .tf-pair { grid-template-columns: minmax(0, 1fr); } .punch-acts { flex-wrap: wrap; } }
/* the time pickers sit under their label (the start of the line in RTL) */
.tf-selects { align-self: flex-start; }
/* forms in drawers must not show the page through them, on desktop either */
.drawer, dialog.modal { background: rgba(255, 255, 255, 0.96); }
[data-theme="dark"] .drawer, [data-theme="dark"] dialog.modal { background: rgba(17, 26, 41, 0.97); }
@media (max-width: 720px) {
  .emp-hero > div { flex: 1 1 0; }
  .emp-hero > .btn { flex-basis: 100%; justify-content: center; }
}

/* =====================================================================================
   Time wheel (2026-09-30) — set a time the way a phone alarm does: two drums that spin,
   snap, and read through a band in the middle; rows curve and fade away from it.
   Row height 44px (ui.js WH) × 5 visible rows.
   ===================================================================================== */
.timewheel { --wh: 44px; display: flex; flex-direction: column; gap: 10px; padding: 14px 14px 12px; border-radius: 18px;
  background: var(--surface-2); border: 1px solid var(--border); transition: opacity 200ms var(--ease-out); }
.tw-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.tw-label { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 0.95rem; }
.tw-label .icon { color: var(--brand); }
.tw-head .switch input { width: 46px; height: 28px; border-radius: 14px; }
.tw-head .switch input::after { width: 22px; height: 22px; }
.tw-head .switch input:checked::after { transform: translateX(-18px); }
.tw-wheel { position: relative; display: flex; justify-content: center; align-items: stretch; gap: 2px; height: calc(var(--wh) * 5);
  direction: ltr; user-select: none; -webkit-user-select: none;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 26%, #000 74%, transparent 100%);
          mask-image: linear-gradient(to bottom, transparent 0, #000 26%, #000 74%, transparent 100%); }
.tw-band { position: absolute; inset-inline: 6px; top: 50%; height: var(--wh); transform: translateY(-50%); border-radius: 12px;
  background: var(--surface); box-shadow: 0 0 0 1px var(--border), 0 4px 12px -6px rgba(30, 80, 160, 0.35); pointer-events: none; }
.wh-col { position: relative; z-index: 1; width: 76px; height: 100%; overflow-y: scroll; overflow-x: hidden; scroll-snap-type: y mandatory;
  overscroll-behavior: contain; scrollbar-width: none; perspective: 520px; outline: none; cursor: grab; touch-action: pan-y; border-radius: 12px; }
.wh-col::-webkit-scrollbar { display: none; }
.wh-col.dragging { cursor: grabbing; }
.wh-col:focus-visible { box-shadow: inset 0 0 0 2px var(--ring); }
.wh-list { padding-block: calc(var(--wh) * 2); transform-style: preserve-3d; }
.wh-item { height: var(--wh); display: grid; place-items: center; scroll-snap-align: center; font-size: 1.45rem; font-weight: 500;
  color: var(--text-3); font-variant-numeric: tabular-nums; backface-visibility: hidden; transition: color 120ms; will-change: transform; }
.wh-item.sel { color: var(--brand-ink); font-weight: 800; font-size: 1.7rem; }
.tw-colon { position: relative; z-index: 1; align-self: center; font-size: 1.6rem; font-weight: 800; color: var(--brand-ink); padding-bottom: 4px; }
.tw-quick { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.tw-quick button { min-height: 30px; padding: 2px 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface);
  color: var(--text-2); font-size: 0.8125rem; font-weight: 600; cursor: pointer; direction: ltr; }
.tw-quick button:hover { border-color: var(--brand); color: var(--brand); }
/* switched off: the alarm is there but not set */
.timewheel.off .tw-wheel, .timewheel.off .tw-quick { opacity: 0.32; filter: grayscale(1); }
.timewheel.off .tw-band { box-shadow: 0 0 0 1px var(--border); }
.tf-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.punch-edit .timewheel { background: var(--surface); }
@media (max-width: 520px) { .tf-pair { grid-template-columns: minmax(0, 1fr); } }
@media (prefers-reduced-motion: reduce) { .wh-item { transition: none; } }
.wh-col:focus-visible { box-shadow: none; }
.tw-wheel:focus-within .tw-band { box-shadow: 0 0 0 2px var(--ring), 0 4px 12px -6px rgba(30, 80, 160, 0.35); }

/* ---- payslips (فیش حقوق) ---- */
.slip-list { display: flex; flex-direction: column; }
.slip-row { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1.2fr) auto; align-items: center; gap: 16px;
  padding: 14px 20px; border-bottom: 1px solid var(--border); }
.slip-row:last-child { border-bottom: 0; }
.slip-pay { display: flex; flex-direction: column; }
.slip-pay span, .slip-state small { font-size: 0.75rem; color: var(--text-3); }
.slip-pay b { font-size: 1.125rem; font-weight: 800; direction: ltr; text-align: right; }
.slip-pay small { font-size: 0.75rem; color: var(--text-2); }
.slip-state { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.slip-acts { display: flex; align-items: center; gap: 6px; }
.slip-sum { display: flex; justify-content: space-between; align-items: center; padding: 16px 18px; border-radius: 16px; background: var(--brand-soft); color: var(--brand-ink); font-weight: 700; }
.slip-sum b { font-size: 1.5rem; direction: ltr; }
.slip-sum small, .pb-total small { font-size: 0.8rem; font-weight: 600; }
.slip-history { display: flex; flex-direction: column; gap: 10px; }
.slip-h { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--border); }
.slip-h b { direction: ltr; white-space: nowrap; }
.slip-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 16px; }
.slip-card { display: flex; flex-direction: column; gap: 12px; padding: 20px; border-radius: var(--radius); background: var(--glass, var(--surface));
  border: 1px solid var(--glass-edge, var(--border)); box-shadow: var(--shadow-card); }
.slip-card header { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.slip-card header h2 { font-size: 1.25rem; }
.slip-card header span { font-size: 0.8125rem; color: var(--text-3); }
.slip-card header > .icon { width: 30px; height: 30px; color: var(--brand); }
.slip-amount { display: flex; align-items: baseline; gap: 8px; padding: 14px 16px; border-radius: 14px; background: var(--brand-soft); color: var(--brand-ink); }
.slip-amount span { font-size: 0.8125rem; font-weight: 600; }
.slip-amount b { font-size: 1.75rem; font-weight: 800; margin-inline-start: auto; direction: ltr; }
.slip-amount small { font-weight: 600; }
.slip-facts { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 0.875rem; color: var(--text-2); }
.slip-card footer { display: flex; gap: 8px; flex-wrap: wrap; }
@media (max-width: 960px) {
  .slip-row { grid-template-columns: minmax(0, 1fr) auto; padding: 14px; }
  .slip-row .slip-state { grid-column: 1 / -1; order: 3; flex-direction: row; flex-wrap: wrap; align-items: center; }
  .slip-row .slip-acts { grid-column: 1 / -1; order: 4; flex-wrap: wrap; }
  .slip-h { grid-template-columns: minmax(0, 1fr) auto; }
  .slip-h .btn { grid-column: 1 / -1; justify-self: start; }
}

/* =====================================================================================
   Employee form (2026-09-30): three cards, calm inputs with icons, pill choices,
   wheel pickers for dates and times — no bare selects, no browser AM/PM controls.
   ===================================================================================== */
.ed-hero { display: flex; align-items: center; gap: 16px; padding: 16px; margin-bottom: 18px; border-radius: 18px;
  background: linear-gradient(120deg, var(--brand-soft), var(--surface-2)); border: 1px solid var(--border); }
.ed-hero .avatar { --size: 76px; border-radius: 20px; box-shadow: 0 0 0 3px var(--surface), 0 8px 18px -10px rgba(30, 80, 160, 0.5); }
.ed-hero-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.ed-hero-body strong { font-size: 1.2rem; }
.ed-hero-body > span { font-size: 0.8125rem; color: var(--text-2); }
.ed-hero-body .row { margin-top: 6px; gap: 6px; }

.form-card { display: flex; flex-direction: column; gap: 14px; padding: 18px; border-radius: 18px; background: var(--surface);
  border: 1px solid var(--border); box-shadow: var(--shadow-soft); }
.form-card > h3 { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; font-size: 1rem; }
.form-card > h3 .icon { align-self: center; color: var(--brand); }
.form-card > h3 .subtle { font-weight: 500; }
.form-card .form-grid { gap: 14px 16px; }
.form-card .input, .form-card .datefield, .pickfield { min-height: 46px; border-radius: 12px; }
.form-card label, .form-card .label { font-weight: 600; font-size: 0.875rem; color: var(--text); }

/* an icon inside the start of an input */
.input-icon { position: relative; }
.input-icon > .icon { position: absolute; inset-inline-start: 12px; top: 50%; transform: translateY(-50%); color: var(--text-3); pointer-events: none; }
.input-icon > .input { padding-inline-start: 38px; }
.input-icon > .input.ltr-input { padding-inline-start: 38px; }
.input-icon:focus-within > .icon { color: var(--brand); }

/* switches with a title and a line of explanation */
.switch-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.switch-row .switch { align-items: flex-start; padding: 12px 14px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--border); }
.switch-row .switch > span { display: flex; flex-direction: column; gap: 2px; }
.switch-row .switch b { font-size: 0.9rem; }
.switch-row .switch small { font-size: 0.75rem; color: var(--text-3); font-weight: 400; }

/* pill choices */
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { position: relative; cursor: pointer; }
.pill input { position: absolute; opacity: 0; pointer-events: none; }
.pill span { display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--border-strong);
  background: var(--surface); color: var(--text-2); font-weight: 600; font-size: 0.875rem; transition: background-color 150ms, border-color 150ms, color 150ms; }
.pill:hover span { border-color: var(--brand); color: var(--brand); }
.pill input:checked + span { background: var(--brand-grad); border-color: transparent; color: #fff; box-shadow: var(--brand-glow); }
.pill input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }

/* a field that opens a wheel picker */
.pickfield { display: flex; align-items: center; gap: 10px; width: 100%; padding: 6px 12px; border: 1px solid var(--border-strong);
  background: var(--surface); color: var(--text); font: inherit; text-align: start; cursor: pointer; transition: border-color 150ms, box-shadow 150ms; }
.pickfield:hover { border-color: var(--brand); }
.pickfield:focus-visible { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--ring); }
.pickfield > .icon:first-child { color: var(--brand); }
.pickfield > .icon:last-child { margin-inline-start: auto; color: var(--text-3); }
.pickfield > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.pickfield > span small { font-weight: 500; color: var(--text-3); font-size: 0.8rem; }
.pickfield.is-empty > span { color: var(--text-3); font-weight: 500; }
.pick-pop { padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.pick-pop .timewheel { padding: 8px; background: transparent; border: 0; }
.pick-foot { display: flex; align-items: center; gap: 8px; padding-top: 6px; border-top: 1px solid var(--border); }
.pick-read { text-align: center; font-weight: 700; color: var(--brand-ink); font-size: 0.95rem; }
.pick-read span { font-weight: 500; color: var(--text-3); font-size: 0.85rem; }
/* date: three drums, day · month · year, read right to left */
.dw-wheel { direction: rtl; gap: 0; }
.dw-wheel .wh-col[data-part="d"] { width: 64px; }
.dw-wheel .wh-col[data-part="mo"] { width: 116px; }
.dw-wheel .wh-col[data-part="y"] { width: 84px; }
.dw-wheel .wh-item { font-size: 1.15rem; }
.dw-wheel .wh-item.sel { font-size: 1.3rem; }
.wh-item.na { color: var(--border-strong); }
@media (max-width: 720px) {
  .switch-row { grid-template-columns: minmax(0, 1fr); }
  .ed-hero { flex-wrap: wrap; }
}
/* the drum row height belongs to every wheel (time and date), not only the time card */
:root { --wh: 44px; }
/* the icon sits on the right (the page is RTL) — also for left-to-right inputs such as numbers,
   whose own "inline start" is the left: use physical sides so text never runs under the icon */
.input-icon > .icon { inset-inline-start: auto; right: 13px; }
.input-icon > .input, .input-icon > .input.ltr-input { padding-inline-start: 12px; padding-right: 40px; }

/* ===== Employee form v2: typed birth date, drop-downs, leave balance =================== */
/* typed Jalali date — the calendar button on the left opens the wheels */
.datein { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.datein-box { position: relative; }
.datein-box > .input { min-height: 46px; border-radius: 12px; padding-left: 54px; padding-right: 14px; text-align: right;
  font-weight: 700; letter-spacing: 0.04em; font-variant-numeric: tabular-nums; }
.datein-box > .input:placeholder-shown { direction: rtl; font-weight: 500; letter-spacing: 0; }
.datein-cal { position: absolute; left: 4px; top: 50%; transform: translateY(-50%); width: 42px; height: 38px; border: 0; border-radius: 9px;
  display: grid; place-items: center; color: var(--brand); background: var(--brand-softer); cursor: pointer; transition: background-color 150ms; }
.datein-cal:hover { background: var(--brand-soft); }
.datein-cal:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }
.datein-read { display: flex; align-items: center; gap: 6px; min-height: 1.3em; line-height: 1.5; }
.datein-read .icon { flex: none; color: var(--present); }
.datein-read small { font-size: inherit; color: var(--text-3); }
.datein.is-invalid .input { border-color: var(--absent); }
.datein.is-invalid .datein-read, .datein.is-invalid .datein-read .icon { color: var(--absent); }
/* drop-downs: same box as the inputs, icon on the right, chevron on the left (follows the theme) */
.select-icon::after { content: ""; position: absolute; left: 14px; top: 50%; width: 16px; height: 16px; transform: translateY(-50%);
  background: var(--text-3); pointer-events: none;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='4 6 8 10 12 6'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='4 6 8 10 12 6'/%3E%3C/svg%3E") center / contain no-repeat; }
.select-icon > .select { min-height: 46px; border-radius: 12px; padding-right: 40px; padding-left: 38px; background-image: none; font-weight: 600; cursor: pointer; }
.select-icon > .select.is-empty { color: var(--text-3); font-weight: 500; }
.select-icon > .select option { color: var(--text); background: var(--surface); }
.select-icon:hover > .select { border-color: var(--brand); }
.select-icon:focus-within::after { background: var(--brand); }
/* leave balance card in the employee editor */
.lb-now { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.lb-big { display: flex; flex-direction: column; gap: 2px; padding: 12px 16px; border-radius: 14px; background: var(--brand-softer); min-width: 150px; }
.lb-big span { font-size: 0.8rem; color: var(--text-2); font-weight: 600; }
.lb-big b { font-size: 1.5rem; color: var(--brand-ink); font-variant-numeric: tabular-nums; }
.lb-big small { font-size: 0.8rem; color: var(--text-3); font-weight: 500; }
.lb-facts { display: flex; flex-direction: column; gap: 4px; font-size: 0.85rem; color: var(--text-2); }
.lb-set { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px 16px; padding: 14px; border-radius: 14px;
  background: var(--surface-2); border: 1px solid var(--border); }
.lb-set .span-2 { grid-column: 1 / -1; }
.lb-amount { display: flex; gap: 8px; align-items: stretch; }
.lb-amount .input { text-align: center; font-weight: 700; font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.lb-preview { font-size: 0.85rem; color: var(--text-2); }
.lb-preview b { color: var(--brand-ink); }
@media (max-width: 720px) { .lb-set { grid-template-columns: minmax(0, 1fr); } }
.lb-amount > .input { flex: 1 1 auto; min-width: 0; }
.lb-amount > .segmented { flex: none; display: inline-flex; flex-direction: row; flex-wrap: nowrap; align-self: center; }
.datein-read { align-items: flex-start; }
.datein-read .icon { margin-top: 3px; }
@media (max-width: 720px) { .lb-big { flex: 1 1 100%; } .lb-now > [data-lb-open] { width: 100%; justify-content: center; } }

/* ===== Document viewer (payslip shown inside the site) ================================ */
.drawer.doc-drawer { width: min(900px, 100vw); }
.doc-drawer .drawer-body { padding: 0; overflow: hidden; display: flex; background: #e6ecf5; }
.doc-stage { position: relative; flex: 1; display: flex; min-height: 0; }
.doc-frame { flex: 1; width: 100%; height: 100%; border: 0; background: #e6ecf5; display: block; }
.doc-frame[hidden] { display: none; }
.doc-loading { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  color: #4a5a70; font-weight: 600; }
.doc-loading .skeleton { width: min(420px, 70%); aspect-ratio: 210 / 297; max-height: 70%; border-radius: 8px; }

/* ===== Day drawer: manager records a leave / remote day ================================= */
.grant-form h3 { font-size: 1rem; }
.grant-kinds { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.grant-kind { position: relative; cursor: pointer; }
.grant-kind input { position: absolute; opacity: 0; pointer-events: none; }
.grant-kind > span { display: grid; grid-template-columns: auto 1fr; column-gap: 8px; row-gap: 2px; align-items: center; height: 100%;
  padding: 12px 14px; border-radius: 14px; border: 1px solid var(--border-strong); background: var(--surface);
  transition: border-color 150ms, background-color 150ms, box-shadow 150ms; }
.grant-kind > span .icon { color: var(--text-3); }
.grant-kind b { font-size: 0.9rem; }
.grant-kind small { grid-column: 2; font-size: 0.75rem; color: var(--text-3); line-height: 1.5; }
.grant-kind:hover > span { border-color: var(--brand); }
.grant-kind input:checked + span { border-color: var(--brand); background: var(--brand-softer); box-shadow: 0 0 0 1px var(--brand) inset; }
.grant-kind input:checked + span .icon, .grant-kind input:checked + span b { color: var(--brand-ink); }
.grant-kind input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }
@media (max-width: 420px) { .grant-kinds { grid-template-columns: minmax(0, 1fr); } }

/* ===== Employee order (ترتیب نمایش) ====================================================== */
.order-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.order-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 14px; background: var(--surface);
  border: 1px solid var(--border); position: relative; }
.order-row.dragging { z-index: 2; border-color: var(--brand); box-shadow: 0 10px 28px rgba(18, 34, 58, .18); background: var(--surface); }
.order-grip { flex: none; width: 36px; height: 40px; display: grid; place-items: center; border: 0; border-radius: 10px; background: transparent;
  color: var(--text-3); cursor: grab; touch-action: none; }
.order-grip:hover { background: var(--surface-2); color: var(--brand); }
.order-grip:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }
.order-row.dragging .order-grip { cursor: grabbing; color: var(--brand); }
.order-n { flex: none; min-width: 26px; text-align: center; font-weight: 800; color: var(--brand-ink); font-variant-numeric: tabular-nums; }
.order-name { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.order-name b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.order-name small { font-size: 0.78rem; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.order-move { flex: none; display: flex; gap: 2px; }
.order-move .icon-btn[disabled] { opacity: .3; }


/* ---- day review: away longer than the hourly leave (2026-10-03) ---- */
.inbox-item .decide.choices { min-width: 230px; }
.choice { display: flex; gap: 10px; align-items: flex-start; text-align: start; padding: 10px 14px; border-radius: 14px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer; font: inherit;
  min-height: 48px; transition: border-color .15s, background .15s; }
.choice:hover { border-color: var(--brand); background: var(--brand-soft, var(--surface-2)); }
.choice:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.choice .icon { color: var(--brand); margin-top: 2px; flex: none; }
.choice.warn .icon { color: var(--late); }
.choice strong { display: block; font-weight: 600; font-size: .9rem; }
.choice small { display: block; color: var(--text-2); font-size: .75rem; line-height: 1.6; }
@media (max-width: 720px) {
  .inbox-item .decide.choices { min-width: 0; flex-direction: column; }
  .inbox-item .decide.choices .choice { width: 100%; }
  /* an over-limit hourly leave has three buttons: let them wrap instead of pushing the page wider */
  .inbox-item .decide { flex-wrap: wrap; }
  .inbox-item .decide .btn { flex: 1 1 40%; min-width: 0; }
}


/* ---- time wheels: typing the time (2026-10-04) ---- */
.tw-type { position: absolute; z-index: 3; inset-inline: 6px; top: 50%; height: var(--wh); transform: translateY(-50%);
  border: 2px solid var(--brand); border-radius: 12px; background: var(--surface); color: var(--brand-ink);
  text-align: center; font: inherit; font-size: 1.6rem; font-weight: 800; font-variant-numeric: tabular-nums;
  letter-spacing: .08em; padding: 0; outline: none; box-shadow: 0 6px 18px -8px rgba(30, 80, 160, .45); }
.tw-type.bad { border-color: var(--absent); animation: tw-shake .25s; }
.tw-type[hidden] { display: none; }
.wh-item.sel { cursor: text; }
@keyframes tw-shake { 25% { transform: translateY(-50%) translateX(-4px); } 75% { transform: translateY(-50%) translateX(4px); } }
@media (prefers-reduced-motion: reduce) { .tw-type.bad { animation: none; } }

/* month calendar: «24 سپتامبر» (Latin digits) over «۲ مهر» (2026-10-05) */
.cal-day .d b.g { font-variant-numeric: tabular-nums; white-space: nowrap; }
.cal-day .d b.g small { font-size: 0.6875rem; font-weight: 600; color: var(--text-2); }
@media (max-width: 720px) { .cal-day .d b.g small { font-size: 0.5625rem; } }


/* ---- manager UX pass (2026-10-07) ---- */
/* section tabs: پایان ماه (hours → salary → payslips · reports) and تنظیمات */
.section-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 4px 0 6px; padding: 5px; width: fit-content; max-width: 100%;
  background: var(--surface); border: 1px solid var(--border); border-radius: 999px; box-shadow: var(--shadow-card); }
.section-tabs a { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 16px; border-radius: 999px;
  color: var(--text-2); font-weight: 600; font-size: .875rem; white-space: nowrap; text-decoration: none; }
.section-tabs a:hover { background: var(--brand-softer); color: var(--brand-ink); }
.section-tabs a[aria-current="page"] { background: var(--brand-grad); color: var(--on-brand); box-shadow: var(--shadow-soft); }
.section-tabs a[aria-current="page"] .icon { color: inherit; }
@media (max-width: 720px) {
  .section-tabs { flex-wrap: nowrap; overflow-x: auto; width: 100%; border-radius: 16px; scrollbar-width: none; }
  .section-tabs::-webkit-scrollbar { display: none; }
  .section-tabs a { padding: 0 12px; }
}

/* «کارهای خودم» folded at the bottom of the manager's menu */
.nav-mine > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 10px; }
.nav-mine > summary::-webkit-details-marker { display: none; }
.nav-mine > summary:hover { background: var(--sidebar-hover); color: var(--sidebar-strong); }
.nav-mine > summary .icon:last-child { margin-inline-start: auto; transition: transform .2s; }
.nav-mine[open] > summary .icon:last-child { transform: rotate(180deg); }

/* page help behind «?» */
.help-btn { display: inline-grid; place-items: center; width: 28px; height: 28px; margin-inline-start: 8px; vertical-align: middle;
  border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text-3); cursor: pointer; }
.help-btn:hover, .help-btn[aria-expanded="true"] { color: var(--brand); border-color: var(--brand); }
.page-head p.page-help { max-width: 72ch; background: var(--brand-softer); border-radius: 12px; padding: 10px 14px; margin-top: 10px; }

/* notification set-up: closable banner, then a dot on the bell */
.setup-slot { position: relative; }
.setup-wrap { position: relative; }
.setup-close { position: absolute; inset-inline-end: 8px; top: 8px; z-index: 2; width: 30px; height: 30px; min-height: 0; }
.setup-wrap .setup-banner { padding-inline-end: 48px; }
[data-notif].needs-setup::after { content: ""; position: absolute; top: 7px; inset-inline-start: 7px; width: 9px; height: 9px;
  border-radius: 999px; background: var(--late); box-shadow: 0 0 0 2px var(--surface); }
[data-notif] { position: relative; }
.notif-setup { display: flex; gap: 10px; align-items: flex-start; width: 100%; text-align: start; padding: 12px 16px; border: 0;
  border-bottom: 1px solid var(--border); background: var(--late-soft, #fff4e5); color: var(--text); cursor: pointer; font: inherit; }
.notif-setup strong { display: block; }
.notif-setup span span, .notif-setup span { font-size: .8125rem; }

/* «امروز»: what is waiting for her */
.attention .attention-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; padding: 0 16px 16px; }
.attention-item { display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 10px 14px; border-radius: 14px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text); text-decoration: none; }
.attention-item:hover { border-color: var(--brand); background: var(--brand-softer); }
.attention-item .ico { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--brand-soft); color: var(--brand); flex: none; }
.attention-item b { font-size: 1.25rem; font-variant-numeric: tabular-nums; }
.attention-item span:not(.ico) { color: var(--text-2); font-size: .875rem; flex: 1; }
.attention-item > .icon:last-child { color: var(--text-3); }
.attention-clear { display: flex; gap: 12px; align-items: center; padding: 16px 20px; color: var(--present); }
.attention-clear strong { display: block; color: var(--text); }
.attention-clear span { color: var(--text-2); font-size: .875rem; }

/* inbox: type tabs + status select on one line */
.inbox-tools { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.inbox-tools .tabs { flex: 1; min-width: 0; }
.tabs.scroll-x { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.tabs.scroll-x::-webkit-scrollbar { display: none; }
.tabs.scroll-x button { white-space: nowrap; }
.select-pill { display: inline-flex; align-items: center; gap: 6px; padding: 0 12px; min-height: 40px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text-2); flex: none; }
.select-pill select { border: 0; background: transparent; font: inherit; color: var(--text); min-height: 38px; cursor: pointer; }
@media (max-width: 720px) {
  .inbox-tools { flex-direction: column; align-items: stretch; }
  .select-pill select { font-size: 16px; }
}

/* standing notices as one quiet line */
.notice-line { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.notice { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 12px; border-radius: 999px;
  background: var(--late-soft, #fff4e5); color: var(--late); font-size: .8125rem; font-weight: 600; text-decoration: none; }
a.notice:hover { filter: brightness(.97); }
