/* ==========================================================================
   «أصلي» — NATIVE FEEL (owner's chosen direction, 2026-11-02). Phase 1, step 1.

   A LAYER, NOT A REWRITE. Loaded after styles.css, it re-points the app's existing
   tokens (--bg, --card, --text, --muted, --border, --gold, --primary and the status tints) at the
   new palette, so every screen inherits the new look without its own CSS being touched, then
   restyles the shared pieces — buttons, cards, list rows, chips, inputs — and adds the four new
   ones: the large title, the bottom tab bar, the Wallet-style day card and the bottom sheet.
   Later steps refine each screen.

   LIGHT BY DEFAULT, DARK WHEN THE PHONE IS. Every token is declared on :root FIRST and only then
   redefined under prefers-color-scheme (the project rule: a token that exists only inside a colour
   preference is undefined on every other device). In dark, nothing is ever highlighted with a pale
   fill: selection is a gold ring or a low-alpha gold wash (owner: "never a pale highlight").

   Type: Almarai (Arabic) and Rubik (Latin and numbers), from Google Fonts but SERVED FROM THIS
   ORIGIN — the CSP is `font-src 'self'`, and an installed app keeps them offline. Rubik is declared
   for Latin only, so in one line of text the browser sets the Arabic in Almarai and the numbers in
   Rubik on its own. System fonts are the fallback.
   ========================================================================== */

/* The type and the --n-* palette are declared in native-tokens.css, loaded just before this file
   (the one colour source for the employee app and the console). This layer maps the app's own
   token names onto them. */

/* ---------------------------------------------------------------- tokens (light, the default) */
:root {
  /* The app's own tokens, re-pointed. Every existing screen draws from these. */
  --bg: var(--n-bg);
  --card: var(--n-sf);
  --text: var(--n-tx);
  --muted: var(--n-mu);
  --border: var(--n-ln);
  --gold: var(--n-acd);
  --primary: var(--n-ink);
  --primary-press: var(--n-ink);
  --shadow: var(--n-shadow);
  --shadow-lg: 0 20px 40px -18px rgba(0, 0, 0, .35);
  --radius: 20px;
  --green-bg: var(--n-ok-bg);  --green: var(--n-ok);
  --blue-bg: var(--n-wait-bg); --blue: var(--n-wait);
  --orange-bg: var(--n-wash);  --orange: var(--n-acd);
  --red-bg: var(--n-bad-bg);   --red: var(--n-bad);
  color-scheme: light;
  font-family: var(--n-font);
}

/* ---------------------------------------------------------------- tokens (dark, when the phone is) */
@media (prefers-color-scheme: dark) {
  :root {
    --shadow-lg: 0 20px 40px -18px rgba(0, 0, 0, .8);
    color-scheme: dark;
  }
}

/* ---------------------------------------------------------------- base */
html, body { background: var(--n-bg); color: var(--n-tx); }
body { font-family: var(--n-font); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font-family: inherit; }
.num, .wl-time, .imp-balance-num, .bs-v, .balance .v { font-variant-numeric: tabular-nums; }
.view { padding-inline: 16px; padding-top: 4px; }
body.has-tabbar .view {
  padding-bottom: calc(var(--n-tab-h) + env(safe-area-inset-bottom) + 28px) !important;
}
body.has-tabbar .toast { bottom: calc(var(--n-tab-h) + env(safe-area-inset-bottom) + 16px); }
.muted, .empty { color: var(--n-mu); }
:focus-visible { outline: 2px solid var(--n-ac); outline-offset: 2px; }

/* Press: down to 0.95 at once, back on a spring — a visual "haptic". */
.btn, .service, .balance, .tb-item, .att-btn, .pend-card, .grp-row, .icon-btn, .lang-btn,
.sw-opt, .fld-kind, .imp-chip, .choice, .po-browse, .sec-link, .sheet-x, .side-link, .imp-submit {
  transition: transform .4s var(--n-spring), background-color .2s, filter .2s;
}
.btn:active, .service:active, .balance:active, .tb-item:active, .att-btn:active, .pend-card:active,
.grp-row:active, .icon-btn:active, .lang-btn:active, .sw-opt:active, .fld-kind:active,
.imp-chip:active, .choice:active, .po-browse:active, .sec-link:active, .sheet-x:active,
.imp-submit:active {
  transform: scale(.95); transition-duration: .1s;
}
.balance.no-detail:active { transform: none; }

/* ---------------------------------------------------------------- the top bar, frosted */
.topbar {
  background: var(--n-bar) !important;
  backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: .5px solid transparent !important;
  color: var(--n-tx);
  min-height: 52px; gap: 4px;
  padding: 4px 8px; padding-top: calc(4px + env(safe-area-inset-top));
  transition: border-color .25s;
}
#main.lt-collapsed .topbar { border-bottom-color: var(--n-ln) !important; }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .topbar, .tabbar { background: var(--n-bar-solid) !important; }
}
.topbar .icon-btn, .lang-btn {
  width: 44px; height: 44px; border-radius: 50%; background: transparent; color: var(--n-tx);
}
.topbar .icon-btn .msym, .lang-btn .msym { width: 23px; height: 23px; color: var(--n-tx); }
.topbar .icon-btn:hover, .lang-btn:hover { background: var(--n-fill); }
.topbar .icon-btn:active, .lang-btn:active { background: var(--n-fill); }
#back-btn { order: 0; color: var(--n-acd); }
#menu-btn { order: 1; }
.topbar-title { order: 2; flex: 1 1 auto; min-width: 0; text-align: center; color: var(--n-tx);
  font-size: 17px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#lang-btn { order: 3; }
#mail-btn { order: 4; }
#notif-btn { order: 5; }
#topbar-action { order: 6; }
#menu-btn + #notif-btn { margin-inline-start: 0; }
/* The bar holds the title now; the brand stays on the sign-in screen and in the drawer. */
.topbar-logo { display: none; }
/* «المزيد» in the tab bar opens the drawer, so the bar's own menu button would be a second door. */
body.has-tabbar #menu-btn { display: none; }
/* Between the back arrow's place (start) and the three icons (end), centred in what is left. */
.topbar-lt {
  position: absolute; inset-inline-start: 56px; inset-inline-end: 150px; bottom: 0; height: 52px;
  display: block; line-height: 52px; text-align: center;
  font-size: 17px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  opacity: 0; transform: translateY(6px); transition: opacity .25s, transform .25s; pointer-events: none;
}
#main.lt-collapsed .topbar-lt { opacity: 1; transform: none; }
.notif-dot { background: var(--n-bad); box-shadow: 0 0 0 2px var(--n-bg); top: 9px; inset-inline-end: 10px; }
.mail-count { background: var(--n-ac); color: var(--n-on-ac); box-shadow: 0 0 0 2px var(--n-bg); }

/* ---------------------------------------------------------------- the large title */
.lt { max-width: 620px; margin: 0 auto; width: 100%; padding: 6px 20px 10px; }
.lt-h { margin: 0; font-size: 32px; font-weight: 800; line-height: 1.2; letter-spacing: -.01em;
  color: var(--n-tx); overflow-wrap: anywhere; }
#view > .lt { padding-inline: 4px; }
.lt-home { display: flex; align-items: center; gap: 12px; }
.lt-home .lt-text { flex: 1; min-width: 0; }
.lt-date { display: block; font-size: 14px; font-weight: 700; color: var(--n-mu); }
.lt-home .lt-h { font-size: 30px; margin-top: 2px; }
.lt-home .welcome { color: inherit; font-size: inherit; }
.lt-home .who-name { display: inline; font-size: inherit; font-weight: inherit; line-height: inherit; }
.avatar-wrap.avatar-lt { width: 52px; height: 52px; }
.avatar-wrap.avatar-lt .avatar-fallback { font-size: 20px; }
.avatar-fallback { background: var(--n-ink); color: var(--n-on-ink); border-color: var(--n-ac); }

/* ---------------------------------------------------------------- the bottom tab bar */
.tabbar {
  position: fixed; inset-inline: 0; bottom: 0; z-index: 40;
  display: flex; justify-content: space-around;
  padding: 6px max(8px, calc((100% - 620px) / 2)) env(safe-area-inset-bottom);
  min-height: calc(var(--n-tab-h) + env(safe-area-inset-bottom));
  background: var(--n-bar);
  backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-top: .5px solid var(--n-ln);
}
.tabbar:empty { display: none; }
.tb-item {
  flex: 1 1 0; min-width: 0; min-height: 48px; padding: 2px 2px 4px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  border: 0; background: none; color: var(--n-mu); font: inherit; cursor: pointer; border-radius: 12px;
}
.tb-item .msym { width: 25px; height: 25px; }
.tb-l { font-size: 10.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.tb-item.on { color: var(--n-tx); }
.tb-item.on .msym { color: var(--n-acd); }

/* ---------------------------------------------------------------- the drawer («المزيد») */
.side-nav { background: var(--n-bg); border-inline-start: 0; box-shadow: -10px 0 40px rgba(0, 0, 0, .25); }
.side-backdrop { background: rgba(0, 0, 0, .32); backdrop-filter: none; -webkit-backdrop-filter: none; }
#side-close { border: 0; background: var(--n-fill); color: var(--n-tx); width: 36px; height: 36px; }
#side-close:hover { background: var(--n-fill); }
.side-profile { background: var(--n-sf); border: 0; border-radius: 18px; }
.side-links { background: var(--n-sf); border-radius: 18px; padding: 4px; gap: 0; }
.side-link { color: var(--n-tx); border-radius: 14px; min-height: 48px; padding: 11px 12px; }
.side-link .msym { color: var(--n-acd); }
.side-link:hover { background: var(--n-press); color: var(--n-tx); }
.side-link.active { background: var(--n-wash); color: var(--n-tx); border-color: transparent; }
.side-foot { border-top: 0; }
.side-logout { color: var(--n-bad); background: var(--n-sf); border-radius: 18px; }
.side-logout:hover { background: var(--n-bad-bg); color: var(--n-bad); }

/* ---------------------------------------------------------------- cards and list rows */
.card, .list-item, .profile, .stat, .imp-card, .mps {
  background: var(--n-sf); border-color: var(--n-ln); box-shadow: var(--n-shadow);
}
.card, .imp-card, .profile, .stat, .mps { border-radius: 20px; }
.list-item { border-radius: 16px; }
.imp-card::before { display: none; }
.card h3 { font-size: 17px; font-weight: 800; }
.section-title { font-size: 13px; font-weight: 700; color: var(--n-mu); margin: 22px 16px 8px; }
.empty { padding: 32px 12px; }

/* ---------------------------------------------------------------- buttons */
.btn {
  min-height: 48px; border-radius: 14px; border: 0; background: var(--n-fill); color: var(--n-tx);
  font-weight: 700;
}
.btn-primary, .btn-primary:active {
  background: var(--n-ink); color: var(--n-on-ink); border-radius: 999px; min-height: 52px;
}
.btn-green { background: var(--n-ok); color: var(--n-on-ink); }
.btn-red { background: var(--n-bad); color: #FFFFFF; }
.btn-sm { min-height: 40px; }
.imp-submit {
  background: var(--n-ink); color: var(--n-on-ink); border: 0; border-radius: 999px;
  min-height: 54px; box-shadow: none; font-weight: 800;
}
.imp-submit:hover { border-color: transparent; filter: brightness(1.06); }
.choice { background: var(--n-sf); border-color: var(--n-ln); }
.choice.selected { background: var(--n-ink); border-color: var(--n-ink); color: var(--n-on-ink); }

/* ---------------------------------------------------------------- chips and pills */
.pill, .badge { border-radius: 999px; border: 0; }
.pill.in, .pill.ok, .pill.wait, .pill.no, .pill.rejected, .pill.mgmt { border: 0; }
.pill.out, .badge { background: var(--n-fill); color: var(--n-mu); border: 0; }
.status-chip.on { color: var(--n-ok); background: var(--n-ok-bg); border-color: transparent; }
.status-chip.off { color: var(--n-mu); background: var(--n-fill); border-color: transparent; }
.imp-chip { background: var(--n-field); border-color: transparent; }
.imp-chip.selected { background: var(--n-wash); border-color: var(--n-ac); color: var(--n-tx); }
.lv-tag { background: var(--n-wash); color: var(--n-acd); }

/* ---------------------------------------------------------------- inputs */
.field > span, .imp-card .field > span { color: var(--n-mu); font-weight: 700; font-size: 13px; }
.field input, .field select, .field textarea,
.imp-card input:not([type="checkbox"]), .imp-card select, .imp-card textarea,
.att-fix-l input, .att-fix-l textarea, .tk-note, .th-row .th-po, .att-shift select, .setpw-input,
.mps-object textarea, .ps-month-pick,
.po-sel-btn, .po-sel-panel .po-sel-q, .imp-card .po-sel-panel .po-sel-q, .sheet .po-sel-q {
  background: var(--n-field); color: var(--n-tx); border: 1px solid transparent; border-radius: 14px;
  min-height: 48px;
}
.field input:focus, .field select:focus, .field textarea:focus,
.imp-card input:focus, .imp-card select:focus, .imp-card textarea:focus,
.att-fix-l input:focus, .att-fix-l textarea:focus, .tk-note:focus, .po-sel-q:focus,
.po-sel-btn:focus-visible, .po-sel-btn[aria-expanded="true"] {
  outline: none; border-color: var(--n-ac); box-shadow: 0 0 0 3px var(--n-wash);
}
.field input::placeholder, .field textarea::placeholder, .imp-card input::placeholder,
.imp-card textarea::placeholder { color: var(--n-mu2); }
.imp-note { background: var(--n-field); border: 0; border-radius: 14px; }
.imp-note-ic .msym, .ex-ic .msym, .imp-file-ic .msym { color: var(--n-acd); }
.imp-file, .imp-check { background: var(--n-field); }
.sw-opt, .fld-kind { background: var(--n-field); border-color: transparent; color: var(--n-tx); }
.sw-opt.on, .fld-kind.on { background: var(--n-wash); border-color: var(--n-ac); }
.att-shift-one { background: var(--n-field); border-color: transparent; }
.th-date { background: var(--n-ac); color: var(--n-on-ac); }
.po-ready-on { color: var(--n-ok); }
.tk-state.ok { color: var(--n-ok); }
.tk-state.err { color: var(--n-bad); }

/* the request forms' hero */
.imp-hero { text-align: start; margin: 4px 4px 18px; }
.imp-hero-ic { width: 56px; height: 56px; border-radius: 16px; background: var(--n-wash);
  border: 0; box-shadow: none; margin-bottom: 12px; }
.imp-hero-ic .msym { width: 28px; height: 28px; color: var(--n-acd); }
.imp-hero h2 { font-size: 28px; font-weight: 800; letter-spacing: -.01em; }

/* balance pages */
.imp-balance-num { color: var(--n-tx); font-weight: 600; }

/* ---------------------------------------------------------------- home: balances */
.balances { gap: 10px; }
.balance { background: var(--n-sf); border-color: transparent; border-radius: 18px; box-shadow: var(--n-shadow);
  padding: 12px 6px; }
.balance .ic { width: 36px; height: 36px; border-radius: 11px; }
.balance .ic .msym { width: 21px; height: 21px; }
.balance .t { font-size: 11px; font-weight: 700; color: var(--n-mu); }
.balance .v { font-size: 16px; color: var(--n-tx); }

/* ---------------------------------------------------------------- home: quick actions */
#view[data-screen="home"] .section-title {
  font-size: 21px; font-weight: 800; color: var(--n-tx); margin: 26px 4px 10px; letter-spacing: -.01em;
}
#view[data-screen="home"] .services { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
#view[data-screen="home"] .service {
  min-height: 0; padding: 14px 6px 12px; gap: 8px; border: 0; border-radius: 20px;
  background: var(--n-sf); box-shadow: var(--n-shadow);
}
#view[data-screen="home"] .service .ic {
  width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center;
  background: var(--n-ink); font-size: 0;
}
#view[data-screen="home"] .service .ic .msym { width: 23px; height: 23px; color: #FFFFFF; }
#view[data-screen="home"] .service .l { margin-top: 0; font-size: 13px; font-weight: 700; line-height: 1.3; }
#view[data-screen="home"] .service .d { display: none; }
.service[aria-label="طلب سلفة"] .ic { background: #34C759 !important; }
.service[aria-label="تسجيل عمل اضافي"] .ic { background: #FF9F0A !important; }
.service[aria-label="طلب إجازة"] .ic { background: #30B0C7 !important; }
.service[aria-label="تقديم شكوى"] .ic { background: #AF52DE !important; }
.service[data-tab="tasks"] .ic { background: #5E5CE6 !important; }
.service[data-tab="payslip"] .ic { background: #3A3A3C !important; }
.service.service-report .ic { background: #FF453A !important; }

/* ---------------------------------------------------------------- home: the day card (Wallet pass) */
.wallet {
  position: relative; overflow: hidden; margin-top: 6px;
  padding: 18px; border-radius: 26px; color: #FFFFFF;
  background:
    radial-gradient(400px 200px at 100% 0%, rgba(232, 163, 23, .35), transparent 60%),
    linear-gradient(160deg, #1C1C1E, #0B0B0C);
  box-shadow: 0 18px 40px -16px rgba(0, 0, 0, .45), 0 0 0 .5px rgba(255, 255, 255, .08);
}
.wallet::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(120deg, rgba(255, 255, 255, .03) 0 1px, transparent 1px 12px);
}
.wallet > * { position: relative; z-index: 1; }
.wl-head { display: flex; justify-content: space-between; align-items: center; gap: 10px;
  font-size: 13px; color: rgba(255, 255, 255, .7); }
.wl-title { font-weight: 700; }
.wallet .status-chip.on { color: #7EE2A0; background: rgba(52, 199, 89, .18); }
.wallet .status-chip.off { color: rgba(255, 255, 255, .78); background: rgba(255, 255, 255, .12); }
.wl-time { font-family: "Rubik", system-ui, sans-serif; font-weight: 600; font-size: 46px;
  letter-spacing: -.03em; line-height: 1.1; margin: 10px 0 2px; text-align: right; min-height: 50px; }
.wallet .att-shift-one { margin: 0; padding: 0; background: none; border: 0; border-radius: 0;
  color: rgba(255, 255, 255, .72); font-size: 13.5px; text-align: start; }
.wallet .att-actions { grid-template-columns: 1fr; margin-top: 16px; gap: 0; }
.wallet .att-btn[disabled] { display: none; }
.wallet .att-btn {
  min-height: 58px; border-radius: 999px; border: 0; font-size: 18px; font-weight: 800; gap: 10px;
}
.wallet .att-btn .msym { width: 22px; height: 22px; }
/* GREEN TO START THE DAY, RED TO END IT — the owner's own request, recorded in styles.css above
   `.att-btn.att-in` ("Green to start the day, red to end it — the owner's request."). His rule wins
   over the mock-up's gold button. A saturated fill with white text in both themes: no pale block. */
.wallet .att-btn.att-in { background: #1F9D48; color: #FFFFFF;
  box-shadow: 0 10px 24px -8px rgba(52, 199, 89, .65); }
.wallet .att-btn.att-out { background: #FF453A; color: #FFFFFF;
  box-shadow: 0 10px 24px -8px rgba(255, 69, 58, .6); }
.wallet .att-btn:hover { border: 0; }
.wl-gps { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 11px;
  font-size: 12.5px; color: rgba(255, 255, 255, .62); }
.wl-gps .msym { width: 14px; height: 14px; color: var(--n-ac); }
.wallet .att-meta { margin-top: 6px; color: rgba(255, 255, 255, .5); font-size: 12px; }

/* the field day (shift G) and the shift switch keep their own cards, in the new skin */
.fld-sum-num { color: var(--n-tx); }

/* ---------------------------------------------------------------- home: sections */
.home-sec { margin-top: 26px; }
.sec-head { display: flex; justify-content: space-between; align-items: baseline; margin: 0 4px 10px; }
.sec-head h2 { margin: 0; font-size: 21px; font-weight: 800; letter-spacing: -.01em; }
.sec-link { border: 0; background: none; color: var(--n-acd); font: inherit; font-size: 15px;
  font-weight: 700; min-height: 44px; min-width: 44px; padding: 0 4px; cursor: pointer; }

.pend-stack { display: grid; position: relative; isolation: isolate; }
.pend-stack.pend-2 { padding-bottom: 12px; }
.pend-stack.pend-3 { padding-bottom: 23px; }
.pend-card {
  grid-area: 1 / 1; display: flex; align-items: center; gap: 12px; width: 100%; min-height: 72px;
  padding: 14px 16px; border: 0; border-radius: 20px; background: var(--n-sf); color: var(--n-tx);
  box-shadow: var(--n-shadow); font: inherit; text-align: start; cursor: pointer;
}
.pend-card.pend-behind { pointer-events: none; }
.pend-card:nth-child(2) { transform: translateY(12px) scale(.94); z-index: -1; opacity: .85; }
.pend-card:nth-child(3) { transform: translateY(23px) scale(.88); z-index: -2; opacity: .6; }
.pend-ic { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; flex: none;
  background: var(--n-wash); color: var(--n-acd); }
.pend-ic .msym { width: 22px; height: 22px; }
.pend-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pend-txt b { font-size: 15px; }
.pend-txt small { font-size: 13px; color: var(--n-mu); }
.pend-n { font-size: 12px; font-weight: 700; color: var(--n-on-ink); background: var(--n-ink);
  border-radius: 999px; padding: 3px 9px; }

.grp { background: var(--n-sf); border-radius: 20px; overflow: hidden; box-shadow: var(--n-shadow); }
.grp-row {
  position: relative; display: flex; align-items: center; gap: 12px; width: 100%; min-height: 62px;
  padding: 12px 16px; border: 0; background: none; color: var(--n-tx); font: inherit;
  text-align: start; cursor: pointer;
}
.grp-row + .grp-row::before {
  content: ""; position: absolute; top: 0; inset-inline-start: 66px; inset-inline-end: 0;
  height: .5px; background: var(--n-ln);
}
.grp-row:active { transform: none; background: var(--n-press); }
.grp-ic { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; flex: none;
  background: var(--n-ac); color: var(--n-on-ac); }
.grp-ic .msym { width: 19px; height: 19px; }
.grp-row.is-read .grp-ic { background: var(--n-fill); color: var(--n-mu); }
.grp-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.grp-txt b { font-size: 15px; line-height: 1.35; }
.grp-txt small { font-size: 13px; color: var(--n-mu); overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; }
.grp-time { align-self: flex-start; margin-top: 2px; font-size: 12px; color: var(--n-mu); white-space: nowrap; }

/* ---------------------------------------------------------------- the order (PO) lists */
.ot-po-list { background: var(--n-sf); border-color: var(--n-ln); border-radius: 16px; box-shadow: var(--shadow-lg); }
.ot-po-opt { border-bottom-color: var(--n-ln); min-height: 56px; }
.ot-po-opt:hover, .ot-po-opt:focus-visible { background: var(--n-press); box-shadow: inset 0 0 0 1px var(--n-ac); }
.ot-po-opt.is-on { background: var(--n-wash); box-shadow: inset 0 0 0 2px var(--n-ac); }
.po-thumb { background: var(--n-field); border-color: transparent; border-radius: 12px; }
.po-sel-caret { border-top-color: var(--n-mu); }
.po-browse {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 64px; margin-top: 10px;
  padding: 10px 14px; border: 0; border-radius: 16px; background: var(--n-field); color: var(--n-tx);
  font: inherit; text-align: start; cursor: pointer;
}
.po-browse-ic { width: 44px; height: 44px; border-radius: 12px; border: 1.5px dashed var(--n-mu2);
  display: grid; place-items: center; color: var(--n-mu); flex: none; }
.po-browse-ic .msym { width: 20px; height: 20px; }
.po-browse-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.po-browse-t b { font-size: 16px; }
.po-browse-t small { font-size: 13px; color: var(--n-mu); }
.po-browse-chev { color: var(--n-mu2); font-size: 24px; line-height: 1; }

/* The overtime orders, picked never typed (owner, 2026-11-02): one chip per choice under the field
   — photo, «PO · name», ✕ — and with several, the hours of each; the last shows the remainder. */
.po-multi .po-browse { margin-top: 0; }
.po-chips { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.po-chips:empty { display: none; }
.po-chip { display: flex; flex-direction: column; gap: 8px; padding: 8px 10px; border-radius: 16px;
  background: var(--n-sf); box-shadow: inset 0 0 0 1px var(--n-ln); }
.po-chip-top { display: flex; align-items: center; gap: 10px; min-width: 0; }
.po-chip .po-label { font-size: 15px; }
.po-chip-x { flex: none; width: 36px; height: 36px; display: grid; place-items: center; padding: 0;
  border: 0; border-radius: 50%; background: var(--n-fill); color: var(--n-tx); cursor: pointer; }
.po-chip-x .msym { width: 16px; height: 16px; }
.po-other-ic { display: grid; place-items: center; color: var(--n-mu); background: var(--n-fill); }
.po-other-ic .msym { width: 18px; height: 18px; }
.po-other-sub { margin-inline-start: 6px; color: var(--n-mu); font-size: 12.5px; white-space: nowrap; }
.po-split-row { display: flex; align-items: center; gap: 10px; padding-inline-start: 50px;
  font-size: 14px; color: var(--n-mu); }
.po-chip, .po-chip-top { min-width: 0; }
.imp-card .po-split-row input.po-split-h { width: 96px; max-width: 96px; flex: none; min-height: 40px;
  padding: 6px 10px; border: 1px solid transparent; border-radius: 12px; background: var(--n-field);
  color: var(--n-tx); font: inherit; font-size: 16px; text-align: center; }
.po-split-hm { font-variant-numeric: tabular-nums; color: var(--n-mu); }
.po-split-rest { color: var(--n-tx); font-size: 15px; }
.po-split-rest.is-bad { color: var(--n-bad); }
.po-split-note { font-size: 12.5px; color: var(--n-mu); padding-inline: 4px; }
.po-multi-hint { flex: none; margin: 0 2px 10px; font-size: 13px; color: var(--n-mu); }
.po-multi-done { flex: none; margin-top: 8px; }
.po-tick { position: relative; flex: none; width: 24px; height: 24px; border-radius: 50%;
  box-shadow: inset 0 0 0 1.5px var(--n-mu2); }
.ot-po-opt.is-on .po-tick { background: var(--n-ink); box-shadow: none; }
.ot-po-opt.is-on .po-tick::after { content: ""; position: absolute; left: 8.5px; top: 4.5px; width: 5px;
  height: 10px; border: solid var(--n-on-ink); border-width: 0 2.5px 2.5px 0; transform: rotate(45deg); }
.po-other-opt .po-label { align-items: center; }

/* ---------------------------------------------------------------- the bottom sheet */
.sheet-dim {
  position: fixed; inset: 0; z-index: 900; background: rgba(0, 0, 0, .34);
  animation: n-fade .25s ease both;
}
.sheet-dim.sheet-dim-out { animation: n-fade-out .26s ease both; }
.sheet-float, .sheet.sheet-modal {
  position: fixed; inset-inline: 0; bottom: 0; z-index: 901;
  max-width: 620px; margin: 0 auto; max-height: 86vh; max-height: 86dvh;
  display: flex; flex-direction: column; margin-top: 0;
  padding: 4px 16px calc(16px + env(safe-area-inset-bottom));
  background: var(--n-bg); color: var(--n-tx);
  border-radius: 28px 28px 0 0; box-shadow: 0 -10px 40px rgba(0, 0, 0, .2);
  transition: transform .45s var(--n-spring); outline: none;
}
.sheet.sheet-in { animation: n-sheet-up .62s var(--n-spring) both; }
.sheet.sheet-drag { transition: none; animation: none; }
.sheet.sheet-out { animation: n-sheet-down .26s cubic-bezier(.4, 0, 1, 1) both; }
.sheet-head { flex: none; touch-action: none; cursor: grab; padding-bottom: 10px; }
.sheet-grab { display: block; width: 38px; height: 5px; border-radius: 3px; background: var(--n-grab);
  margin: 6px auto 10px; }
.sheet-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.sheet-title { font-size: 20px; font-weight: 800; }
.sheet-x { width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--n-fill);
  color: var(--n-tx); display: grid; place-items: center; cursor: pointer; flex: none; }
.sheet-x .msym { width: 18px; height: 18px; }
/* A sheet-able panel that is a dropdown on a wide screen shows no sheet chrome there. */
.sheet-inline:not(.sheet-modal) .sheet-head { display: none; }
.sheet-content { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.sheet .po-sel-q { flex: none; width: 100%; margin-bottom: 12px; padding: 10px 14px; font-size: 16px; }
.sheet-float .ot-po-list, .sheet.sheet-modal .po-sel-list {
  flex: 1; min-height: 0; max-height: none; overflow-y: auto; margin: 0;
  border: 0; border-radius: 0; background: transparent; box-shadow: none;
  overscroll-behavior: contain;
}
.sheet-float .ot-po-opt, .sheet.sheet-modal .ot-po-opt {
  min-height: 72px; margin-bottom: 10px; padding: 10px 12px; gap: 14px;
  border: 0; border-radius: 20px; background: var(--n-sf); box-shadow: var(--n-shadow);
}
.sheet-float .ot-po-opt .po-thumb-sm, .sheet.sheet-modal .ot-po-opt .po-thumb-sm {
  width: 52px; height: 52px; border-radius: 14px;
}
.sheet-float .ot-po-opt.is-on, .sheet.sheet-modal .ot-po-opt.is-on { box-shadow: 0 0 0 2.5px var(--n-ink); background: var(--n-sf); }
.sheet .ot-po-ready { color: var(--n-ok); background: var(--n-ok-bg); border-radius: 999px; padding: 3px 9px; font-size: 12.5px; }
html.sheet-lock { overflow: hidden; }

@keyframes n-sheet-up { from { transform: translateY(105%); } }
@keyframes n-sheet-down { to { transform: translateY(105%); } }
@keyframes n-fade { from { opacity: 0; } }
@keyframes n-fade-out { to { opacity: 0; } }

/* ================================================================ STEP 2 — the request forms
   overtime, leave (day / hours), advance, complaint: one shell (`.imp-hero` + `.imp-card`). */

/* The screen's own heading IS its large title: the icon tile goes, and the bar's title waits until
   the heading has scrolled under it (see navCollapse) — one title on screen, never two. */
#view > .imp-hero { text-align: start; margin: 2px 4px 16px; }
#view > .imp-hero .imp-hero-ic { display: none; }
#view > .imp-hero h2 { font-size: 30px; line-height: 1.2; margin: 0 0 6px; overflow-wrap: anywhere; }
#view > .imp-hero p { margin: 0; font-size: 14.5px; line-height: 1.6; }
#main.has-hero:not(.lt-collapsed) .topbar-title { opacity: 0; }
.topbar-title { transition: opacity .25s; }
.lt.lt-yield { display: none; }
/* A card's own heading line (نوع الإجازة, هذا العام, طلباتي …). */
.card > .t { font-size: 17px; font-weight: 800; color: var(--n-tx); }

/* The form card is the grouped section; nothing inside clips the sticky action bar. */
.imp-card { overflow: visible; padding: 18px 16px; }
.imp-card .field { margin-bottom: 14px; }
.imp-card .field > span { margin-bottom: 7px; padding-inline-start: 2px; }

/* Big date and time pickers — the whole box opens the picker, numbers in Rubik. */
.imp-pick-wrap input, .imp-card .imp-pick-wrap input {
  min-height: 56px; font-size: 18px; font-weight: 600; text-align: center;
  font-family: "Rubik", var(--n-font); font-variant-numeric: tabular-nums;
}
.imp-pair { gap: 12px; }

/* The duration line, read as the answer to the four boxes above it. */
.imp-note:has(#ot-calc) { background: var(--n-wash); align-items: center; }
#ot-calc { font-size: 16px; font-weight: 800; color: var(--n-tx); }

/* THE PRIMARY ACTION STAYS IN REACH: it sticks above the tab bar while the form scrolls. */
.imp-card .imp-submit {
  position: sticky; bottom: calc(var(--n-tab-h) + env(safe-area-inset-bottom) + 12px); z-index: 5;
  box-shadow: 0 10px 26px -8px rgba(0, 0, 0, .38); margin-top: 20px;
}
.imp-submit[disabled] { opacity: .55; }

/* Inline validation, said natively: a tinted line with the reason, nudged once so it is seen. */
.imp-card .error:not(.hidden) {
  margin: 14px 0 0; padding: 11px 14px; border-radius: 14px;
  background: var(--n-bad-bg); color: var(--n-bad); font-size: 14px; font-weight: 700; line-height: 1.5;
  animation: n-nudge .32s ease;
}
@keyframes n-nudge { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }

/* The order box: on a phone the sheet («اختر من أوامر الشغل») is the way to pick; the list that
   follows typing stays for wider screens. Typing a number directly still works everywhere. */
@media (max-width: 640px) {
  .ot-po-wrap > .ot-po-list { display: none !important; }
}

/* The success state: a check that springs in, the message under it, then back. */
.done-ov {
  position: fixed; inset: 0; z-index: 950; display: grid; place-items: center; padding: 24px;
  background: rgba(0, 0, 0, .28); animation: n-fade .2s ease both;
}
.done-box {
  min-width: 220px; max-width: 320px; padding: 26px 22px 22px; border-radius: 26px; text-align: center;
  background: var(--n-sf); color: var(--n-tx); box-shadow: var(--shadow-lg);
  animation: n-pop .5s var(--n-spring) both;
}
.done-check {
  position: relative; display: block; width: 72px; height: 72px; margin: 0 auto 14px;
  border-radius: 50%; background: #1F9D48; animation: n-pop .55s var(--n-spring) .05s both;
}
.done-check::after {
  content: ""; position: absolute; left: 25px; top: 17px; width: 18px; height: 32px;
  border: solid #FFFFFF; border-width: 0 5px 5px 0; border-radius: 2px; transform: rotate(45deg);
  animation: n-tick .25s ease .25s both;
}
.done-t { font-size: 16px; font-weight: 800; line-height: 1.5; }
@keyframes n-pop { from { transform: scale(.4); opacity: 0; } }
@keyframes n-tick { from { opacity: 0; } }

/* ================================================================ STEP 3 — مهامي and the field day */

/* The day bar: one big date box, nothing around it. */
.tk-datebar, .fld-daybar { padding: 10px; }
.fld-daybar-l { padding-inline-start: 8px; }

/* «غير محدّثة منذ …», «لا توجد أوامر شغل …», no PO access: a native inline banner — a tinted
   line with its icon, not a card pretending to be content. */
.card.imp-note, .fld-orders-note, .th-orders-note {
  display: flex; gap: 10px; align-items: flex-start;
  margin: 0 0 12px; padding: 11px 14px; border: 0; border-radius: 14px; box-shadow: none;
  background: var(--n-wash); color: var(--n-tx);
}
.card.imp-note p { margin: 0; color: var(--n-tx); font-size: 13.5px; line-height: 1.6; }
.fld-orders-note, .th-orders-note { margin-top: 8px; font-size: 12.5px; line-height: 1.6; }

/* The running tally: one quiet row, green once every hour is answered. */
.tk-tally { padding: 14px 16px; border-radius: 16px; }
.tk-tally b { font-size: 15px; }
.tk-tally .tk-done { color: var(--n-ok); }

/* One hour = one native row card: the hour as a chip, its time, its saved state at the end. */
.tk-row { padding: 14px; border-radius: 20px; margin-bottom: 12px; }
.tk-head { gap: 10px; margin-bottom: 10px; }
.tk-head > b {
  display: inline-flex; align-items: center; padding: 4px 11px; border-radius: 999px;
  background: var(--n-ink); color: var(--n-on-ink); font-size: 13px;
}
.tk-head .muted { font-family: "Rubik", var(--n-font); font-size: 13.5px; font-variant-numeric: tabular-nums; }
.tk-state:not(:empty) {
  display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 999px;
  background: var(--n-fill); color: var(--n-mu);
}
.tk-state.ok:not(:empty) { background: var(--n-ok-bg); color: var(--n-ok); }
.tk-state.err:not(:empty) { background: var(--n-bad-bg); color: var(--n-bad); }
.tk-state .msym { width: 16px; height: 16px; }
.tk-pick { gap: 8px; }
.tk-del { min-width: 44px; min-height: 48px; border-radius: 14px; background: var(--n-bad-bg); color: var(--n-bad); }
.tk-del .msym { width: 18px; height: 18px; }
.tk-add, .tk-photo { background: transparent; color: var(--n-acd); padding-inline: 4px; min-height: 44px; }
.tk-add .msym, .tk-photo .msym { width: 18px; height: 18px; vertical-align: -3px; }
.tk-row.tk-system { border-inline-start: 3px solid var(--n-ac); box-shadow: var(--n-shadow); }
.tk-row.tk-idle { opacity: .9; }
.tk-pho { background: var(--n-field); border: 0; }
.tk-later { padding: 16px; border-radius: 20px; }
.day-warn { border: 0; background: var(--n-wash); }
.fld-kinds { gap: 6px; padding: 3px; border-radius: 14px; background: var(--n-field); }
.fld-kind { min-height: 44px; border: 0; background: transparent; border-radius: 11px; }
.fld-kind.on { background: var(--n-sf); color: var(--n-tx); box-shadow: 0 1px 3px rgba(0, 0, 0, .14); }
.fld-summary { padding: 22px 18px; }
/* Delete on a recorded row is a quiet tinted control, not a red block shouting beside the data. */
.fld-del, .imp-row .btn-red { background: var(--n-bad-bg); color: var(--n-bad); min-height: 40px; }

/* ---------------------------------------------------------------- every dialog is a sheet on a phone
   The missing-hours window, the language list, the out-of-hours offer, the location explainer:
   at phone width they rise from the bottom like the order sheet, with the same handle. Same
   markup, same buttons, same handlers. */
.modal { background: var(--n-sf); }
.modal-head { font-size: 20px; }
.th-hour { background: var(--n-wash); color: var(--n-acd); border: 0; }
.th-row .th-hour { flex: 0 0 auto; white-space: nowrap; font-size: 12.5px; padding: 6px 9px; }
/* Inside a dialog the controls sit on the sheet's own grey, so they take the card colour. */
.modal .po-sel-btn, .modal .th-po, .modal input, .modal select, .modal textarea { background: var(--n-sf); }
@media (max-width: 640px) {
  .modal-backdrop { align-items: flex-end; padding: 0; background: rgba(0, 0, 0, .34);
    animation: n-fade .25s ease both; }
  .modal {
    max-width: 620px; width: 100%; max-height: 90vh; max-height: 90dvh; overflow-y: auto;
    border: 0; border-radius: 28px 28px 0 0; background: var(--n-bg);
    padding: 26px 16px calc(18px + env(safe-area-inset-bottom)); position: relative;
    animation: n-sheet-up .6s var(--n-spring) backwards;
  }
  .modal::before {
    content: ""; position: absolute; top: 8px; left: 50%; width: 38px; height: 5px; margin-left: -19px;
    border-radius: 3px; background: var(--n-grab);
  }
  .th-modal .modal-body { max-height: none; }
  .modal-foot, .modal-actions { position: sticky; bottom: 0; padding-top: 12px; background: var(--n-bg); }
}

/* ================================================================ STEP 4 — the remaining screens */

/* The name is said once: a first heading repeating the large title steps aside (navCollapse). */
.section-title.lt-dup { display: none; }

/* ---- طلباتي and every plain list: rows as native cards, the status pill at the end */
.list-item { padding: 14px 16px; margin-bottom: 10px; border: 0; }
.list-item .row { font-size: 15px; align-items: center; }
.list-item .row + .row { margin-top: 6px; }
.list-item .row .k, .list-item .row .muted { font-size: 13.5px; }
.badge { padding: 4px 11px; font-size: 12.5px; }
.badge.ok { background: var(--n-ok-bg); color: var(--n-ok); }
.badge.wait { background: var(--n-wait-bg); color: var(--n-wait); }
.badge.rejected, .badge.no { background: var(--n-bad-bg); color: var(--n-bad); }
.badge.review { background: var(--n-wash); color: var(--n-acd); }
.admin-actions .btn-green { background: var(--n-ok); color: #FFFFFF; }
.own-acts .btn-sm { min-height: 36px; border-radius: 999px; }

/* ---- الحضور: the correction rule as a banner, the days as rows */
.att-gate { border: 0; border-radius: 16px; padding: 12px 14px; background: var(--n-sf); }
.att-gate.ok { background: var(--n-ok-bg); }
.att-gate.wait { background: var(--n-wash); }
.att-fix { background: var(--n-sf2); border: 0; }
.lc-note { border-radius: 14px; margin-bottom: 10px; }

/* ---- قسيمة الراتب: the slip as one grouped card, the figures in Rubik */
.mps { border: 0; padding: 18px 16px; }
.mps-head b { font-size: 18px; font-weight: 800; }
.mps-month { color: var(--n-acd); }
.mps-table td { border-bottom-color: var(--n-ln); padding: 12px 2px; }
.mps-table td.num { font-family: "Rubik", var(--n-font); font-variant-numeric: tabular-nums; }
.mps-total td { border-top: 2px solid var(--n-tx); font-size: 16px; }
.mps-paid, .mps-sent { border: 0; background: var(--n-ok-bg); color: var(--n-ok); border-radius: 14px; }
.mps-table tr.mps-det td { background: var(--n-sf2); }
.mps-table tr.mps-open:hover td { background: var(--n-press); }
.mps-caret, .mps-det-when { color: var(--n-acd); }

/* ---- الإشعارات: one grouped list, an unread dot in gold */
.notification-inbox .list-item.notif { border-radius: 18px; margin-bottom: 8px; }
.notif .dot { background: var(--n-ac); margin-top: 7px; }
.notif.read .dot { background: transparent; border-color: var(--n-ln); }
.notif .body .t { font-size: 15px; }
.notif.tappable:hover, .notif.tappable:focus-visible { background: var(--n-press); border-color: var(--n-ln); }
.notif .chev { color: var(--n-mu2); }

/* ---- حسابي: the profile, then the settings as one grouped list, sign-out on its own */
#view[data-screen="account"] .profile { flex-direction: column; text-align: center; padding: 22px 16px; }
#view[data-screen="account"] .profile .who h2 { font-size: 24px; font-weight: 800; }
.acct-rows { padding: 4px 0; overflow: hidden; }
.acct-rows .btn {
  display: flex; align-items: center; width: 100%; min-height: 54px; margin: 0; padding: 0 16px;
  border-radius: 0; background: transparent; color: var(--n-tx); font-weight: 700; text-align: start;
  position: relative;
}
.acct-rows .btn:active { transform: none; background: var(--n-press); }
.acct-rows .btn + .btn::before {
  content: ""; position: absolute; top: 0; inset-inline: 16px 0; height: .5px; background: var(--n-ln);
}
.acct-rows .btn:not(.btn-red)::after {
  content: ""; margin-inline-start: auto; width: 20px; height: 20px; flex: none; background: var(--n-mu2);
  -webkit-mask: url("/icons/material/chevron_left.svg") center / contain no-repeat;
  mask: url("/icons/material/chevron_left.svg") center / contain no-repeat;
}
.acct-out .btn-red { justify-content: center; color: var(--n-bad); }

/* ---- «المزيد»: the brand sits on an ink plate, legible in both themes */
.side-head { padding: 2px 2px 0; }
.side-brand-logo { height: 46px; padding: 8px 12px; border-radius: 14px; background: #111113; }

/* ---- أبلغ عن مشكلة: the form card, its counter quiet */
.report-problem .t { font-size: 22px; font-weight: 800; }
.report-problem .rp-count { color: var(--n-mu); }
.report-problem-done .t { color: var(--n-ok); }

/* ---------------------------------------------------------------- dark: what tokens cannot reach */
@media (prefers-color-scheme: dark) {
  .wallet { box-shadow: 0 0 0 .5px rgba(255, 255, 255, .12); }
  .service[data-tab="payslip"] .ic { background: #48484A !important; }
  .card, .list-item, .profile, .stat, .imp-card, .mps, .balance, .grp, .pend-card { box-shadow: none; }
}

/* ---------------------------------------------------------------- reduced motion: instant */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0s !important; animation-delay: 0s !important;
    transition-duration: 0s !important;
  }
}

/* ---- a change to an APPROVED request (owner, 2026-11-04, «ج») */
.ac-bar { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.ac-bar:empty { display: none; }
.ac-open { align-self: flex-start; min-height: 36px; border-radius: 999px; display: inline-flex;
  align-items: center; gap: 6px; }
.ac-state { display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-radius: 12px;
  font-size: 13.5px; line-height: 1.5; }
.ac-state.wait { background: var(--n-wait-bg); color: var(--n-wait); }
.ac-state.no { background: var(--n-bad-bg); color: var(--n-bad); }
.ac-now { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 12px 14px;
  border-radius: 14px; background: var(--n-sf2); }
.ac-now .muted { grid-column: 1 / -1; font-size: 12.5px; }
.ac-now b { font-size: 16px; }
.ac-now .pill { grid-row: 2 / span 2; grid-column: 2; align-self: center; }
.ac-now > span:not(.muted):not(.pill) { font-size: 14px; color: var(--n-mu); }
.ac-item .ac-line, .ac-line { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px;
  font-size: 14px; margin-top: 6px; }
.ac-line > span:first-child { color: var(--n-mu); min-width: 64px; }
.ac-was { color: var(--n-mu); text-decoration: line-through; font-weight: 600; }
.ac-arrow { color: var(--n-mu2); }
.ac-new { color: var(--n-tx); }
.ac-card .fld-kind[disabled] { opacity: .45; }
