/* Mawared mobile (PWA). Logical properties only: one stylesheet for RTL (ar) and LTR (en). */
/* UAE Dirham symbol (CBUAE 2025) drawn as an inline SVG mask */
:root {
  --primary: #5B4FD4; --primary-600: #4A3FC0; --primary-700: #3B31A3; --primary-50: #EEECFC; --primary-100: #DEDAFA;
  --bg: #F3F3F9; --surface: #FFFFFF; --surface-2: #F8F8FC; --border: #E6E6F0; --text: #1F2340; --muted: #6B7280;
  --success: #1F9D63; --success-50: #E3F6EC; --danger: #D64545; --danger-50: #FCE6E6; --warning: #E07B12; --warning-50: #FFF1E0;
  --info: #1E6FE0; --info-50: #E3EEFD; --gray-50: #F1F1F5;
  --radius: 18px; --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(31, 35, 64, .05), 0 6px 20px rgba(31, 35, 64, .06);
  --font: "IBM Plex Sans Arabic", "Segoe UI", Tahoma, system-ui, sans-serif;
  --bar-h: 56px; --tab-h: 64px;
  --sat: env(safe-area-inset-top, 0px); --sab: env(safe-area-inset-bottom, 0px);
  --sal: env(safe-area-inset-left, 0px); --sar: env(safe-area-inset-right, 0px);
  color-scheme: light;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; background: var(--bg); }
body { font-family: var(--font); font-size: 15px; line-height: 1.55; color: var(--text); -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: contain; min-block-size: 100dvh; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--primary); text-decoration: none; }
h1, h2, h3 { margin: 0; line-height: 1.3; }
.ltr { direction: ltr; unicode-bidi: isolate; display: inline-block; }
.muted { color: var(--muted); }
.sar::before { content: ""; display: inline-block; width: .82em; height: .82em; background: currentColor; vertical-align: -0.06em;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath d='M32 14v72M32 14h18c22 0 36 15 36 36S72 86 50 86H32' fill='none' stroke='%23000' stroke-width='11'/%3E%3Cpath d='M10 41h76M10 59h76' stroke='%23000' stroke-width='7'/%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 100 100'%3E%3Cpath d='M32 14v72M32 14h18c22 0 36 15 36 36S72 86 50 86H32' fill='none' stroke='%23000' stroke-width='11'/%3E%3Cpath d='M10 41h76M10 59h76' stroke='%23000' stroke-width='7'/%3E%3C/svg%3E") center / contain no-repeat; }
.sar { display: inline-block; line-height: 1; font-size: .92em; }
.money { display: inline-flex; align-items: baseline; gap: 4px; direction: ltr; unicode-bidi: isolate; white-space: nowrap; }
.hidden { display: none !important; }
svg.i { inline-size: 22px; block-size: 22px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sm svg.i, svg.i.sm { inline-size: 18px; block-size: 18px; }

/* ---------- splash / spinner ---------- */
.splash { min-block-size: 100dvh; display: grid; place-content: center; justify-items: center; gap: 22px; }
.splash img { border-radius: 22px; box-shadow: var(--shadow); }
.spinner { inline-size: 26px; block-size: 26px; border-radius: 50%; border: 3px solid var(--primary-100); border-block-start-color: var(--primary); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- app shell ---------- */
.appbar { position: fixed; inset-block-start: 0; inset-inline: 0; z-index: 30; background: var(--primary); color: #fff;
  padding-block-start: var(--sat); padding-inline: calc(8px + var(--sal)) calc(8px + var(--sar)); box-shadow: 0 2px 12px rgba(59, 49, 163, .25); }
html[dir=ltr] .appbar { padding-inline: calc(8px + var(--sal)) calc(8px + var(--sar)); }
.appbar-row { block-size: var(--bar-h); display: flex; align-items: center; gap: 6px; }
.appbar h1 { flex: 1; font-size: 17.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-inline: 6px; }
.icon-btn { position: relative; inline-size: 42px; block-size: 42px; display: grid; place-items: center; border: 0; background: transparent;
  color: inherit; border-radius: 50%; cursor: pointer; }
.icon-btn:active { background: rgba(255, 255, 255, .16); }
.icon-btn .dot { position: absolute; inset-block-start: 6px; inset-inline-end: 5px; min-inline-size: 18px; block-size: 18px; padding-inline: 5px;
  border-radius: 9px; background: #FF5A5F; color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; border: 2px solid var(--primary); }
html[dir=rtl] .flip, html[dir=rtl] .flip-rtl { transform: scaleX(-1); }
.view { padding-block: calc(var(--sat) + var(--bar-h) + 14px) calc(var(--sab) + var(--tab-h) + 22px);
  padding-inline: calc(14px + var(--sal)) calc(14px + var(--sar)); max-inline-size: 720px; margin-inline: auto; }
.view.no-tabs { padding-block-end: calc(var(--sab) + 28px); }
.tabbar { position: fixed; inset-block-end: 0; inset-inline: 0; z-index: 30; background: rgba(255, 255, 255, .96); backdrop-filter: blur(12px);
  border-block-start: 1px solid var(--border); padding-block-end: var(--sab); padding-inline: var(--sal) var(--sar); display: flex; }
.tabbar a { flex: 1; block-size: var(--tab-h); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  color: #8A8FA8; font-size: 11.5px; font-weight: 600; position: relative; }
.tabbar a.active { color: var(--primary); }
.tabbar a.active::before { content: ""; position: absolute; inset-block-start: 0; inline-size: 34px; block-size: 3px; border-radius: 0 0 3px 3px; background: var(--primary); }
.tabbar a .dot { position: absolute; inset-block-start: 8px; inset-inline-start: calc(50% + 6px); min-inline-size: 16px; block-size: 16px; border-radius: 8px;
  background: var(--danger); color: #fff; font-size: 10px; display: grid; place-items: center; padding-inline: 4px; }

/* ---------- banners / toasts ---------- */
.offline-bar { position: fixed; inset-inline: 0; inset-block-start: calc(var(--sat) + var(--bar-h)); z-index: 29; background: #2B2F4A; color: #fff;
  font-size: 13px; padding: 7px 14px; display: flex; gap: 8px; align-items: center; justify-content: center; }
.toasts { position: fixed; inset-inline: 12px; inset-block-end: calc(var(--sab) + var(--tab-h) + 12px); z-index: 60; display: grid; gap: 8px; pointer-events: none; }
.toast { pointer-events: auto; background: #23263F; color: #fff; padding: 12px 16px; border-radius: 14px; box-shadow: 0 10px 30px rgba(0, 0, 0, .25);
  display: flex; gap: 10px; align-items: flex-start; font-size: 14px; animation: toast-in .25s ease-out; max-inline-size: 560px; margin-inline: auto; inline-size: 100%; }
.toast.success { background: #137A4B; } .toast.error { background: #B83434; } .toast.warning { background: #A85A0B; }
.toast.out { opacity: 0; transform: translateY(10px); transition: .25s; }
@keyframes toast-in { from { opacity: 0; transform: translateY(14px); } }
.ptr { position: fixed; inset-block-start: calc(var(--sat) + var(--bar-h) + 6px); inset-inline-start: 50%; transform: translateX(-50%); z-index: 25;
  inline-size: 38px; block-size: 38px; border-radius: 50%; background: #fff; box-shadow: var(--shadow); display: grid; place-items: center; color: var(--primary);
  opacity: 0; transition: opacity .15s; }
html[dir=rtl] .ptr { transform: translateX(50%); }
.ptr.show { opacity: 1; } .ptr.spin svg { animation: spin .8s linear infinite; }

/* ---------- cards & lists ---------- */
.card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; margin-block-end: 14px; }
.card.flush { padding: 0; overflow: hidden; }
.card-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-block-end: 12px; }
.card-title h2 { font-size: 16px; }
.card-title a, .link-btn { font-size: 13px; font-weight: 600; color: var(--primary); background: none; border: 0; padding: 0; cursor: pointer; }
.section-title { font-size: 13px; font-weight: 700; color: var(--muted); margin: 20px 4px 8px; text-transform: none; }
.list { list-style: none; margin: 0; padding: 0; }
.list > li, .list > a { display: flex; align-items: center; gap: 12px; padding: 13px 16px; border-block-end: 1px solid var(--border); color: inherit; }
.list > :last-child { border-block-end: 0; }
.list .grow { flex: 1; min-inline-size: 0; }
.list .grow b { display: block; font-weight: 600; }
.list .grow small { display: block; color: var(--muted); font-size: 12.5px; }
.list .chev { color: #B8BBCB; }
.list .ico { inline-size: 38px; block-size: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--primary-50); color: var(--primary); flex: none; }
.kv { display: grid; gap: 0; margin: 0; }
.kv > div { display: flex; justify-content: space-between; gap: 14px; padding: 11px 0; border-block-end: 1px dashed var(--border); }
.kv > div:last-child { border-block-end: 0; }
.kv dt { color: var(--muted); font-size: 13.5px; }
.kv dd { margin: 0; font-weight: 600; text-align: end; }
.empty { text-align: center; padding: 40px 16px; color: var(--muted); }
.empty svg.i { inline-size: 46px; block-size: 46px; color: var(--primary-100); stroke-width: 1.4; margin-block-end: 10px; }
.empty p { margin: 0; }

/* ---------- chips, badges ---------- */
.chips { display: flex; gap: 8px; overflow-x: auto; padding-block-end: 4px; margin-block-end: 12px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 99px; background: var(--surface);
  border: 1px solid var(--border); font-size: 13px; font-weight: 600; color: var(--text); cursor: pointer; white-space: nowrap; }
.chip.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.chip .n { background: rgba(0, 0, 0, .08); border-radius: 99px; padding: 0 7px; font-size: 11.5px; }
.chip.active .n { background: rgba(255, 255, 255, .25); }
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 99px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.b-pending, .b-late, .b-incomplete { background: var(--warning-50); color: var(--warning); }
.b-approved, .b-present, .b-paid { background: var(--success-50); color: var(--success); }
.b-rejected, .b-absent { background: var(--danger-50); color: var(--danger); }
.b-cancelled, .b-weekend, .b-draft { background: var(--gray-50); color: #5B6275; }
.b-leave { background: var(--info-50); color: var(--info); }
.b-holiday { background: #FFF8E1; color: #8A5A00; }
.stat-chips { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-block-end: 14px; }
.stat-chips div { background: var(--surface); border-radius: 14px; padding: 10px 6px; text-align: center; box-shadow: var(--shadow); }
.stat-chips b { display: block; font-size: 19px; }
.stat-chips small { color: var(--muted); font-size: 11.5px; }
.stat-chips .g b { color: var(--success); } .stat-chips .o b { color: var(--warning); } .stat-chips .r b { color: var(--danger); } .stat-chips .bl b { color: var(--info); }

/* ---------- buttons & forms ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-block-size: 46px; padding: 10px 18px; border-radius: 14px;
  border: 0; background: var(--primary); color: #fff; font-weight: 700; cursor: pointer; font-size: 15px; }
.btn:active { transform: scale(.98); }
.btn[disabled] { opacity: .55; pointer-events: none; }
.btn.block { inline-size: 100%; }
.btn.soft { background: var(--primary-50); color: var(--primary); }
.btn.ghost { background: transparent; color: var(--primary); border: 1px solid var(--border); }
.btn.success { background: var(--success); } .btn.danger { background: var(--danger); }
.btn.danger-soft { background: var(--danger-50); color: var(--danger); }
.btn.sm { min-block-size: 36px; padding: 6px 14px; font-size: 13.5px; border-radius: 11px; }
.btn-row { display: flex; gap: 10px; } .btn-row > * { flex: 1; }
.field { margin-block-end: 14px; }
.field > label { display: block; font-weight: 600; font-size: 13.5px; margin-block-end: 6px; }
.field .req { color: var(--danger); }
.input, .field input:not([type=checkbox]):not([type=radio]), .field select, .field textarea {
  inline-size: 100%; min-block-size: 48px; padding: 11px 14px; border-radius: 13px; border: 1.5px solid var(--border); background: var(--surface);
  outline: none; font-size: 16px; transition: border-color .15s, box-shadow .15s; }
.field textarea { min-block-size: 92px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-50); }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: var(--danger); }
.field .err { color: var(--danger); font-size: 12.5px; margin-block-start: 5px; display: block; }
.field .hint { color: var(--muted); font-size: 12.5px; margin-block-start: 5px; display: block; }
.field input[type=file] { padding: 10px; font-size: 14px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.check { display: flex; align-items: center; gap: 10px; padding: 8px 0; font-size: 14.5px; }
.check input { inline-size: 20px; block-size: 20px; accent-color: var(--primary); }
.alert { border-radius: 14px; padding: 12px 14px; display: flex; gap: 10px; font-size: 14px; margin-block-end: 14px; }
.alert.error { background: var(--danger-50); color: #9B2C2C; } .alert.info { background: var(--info-50); color: #164E9E; }
.alert.warning { background: var(--warning-50); color: #8A4A06; } .alert.success { background: var(--success-50); color: #126B42; }
.alert ul { margin: 0; padding-inline-start: 18px; }
.date-field { position: relative; }
.date-field .date-row { display: flex; gap: 8px; }
.date-field .date-row input { flex: 1; }
.date-field .hijri-toggle { flex: none; inline-size: 48px; border-radius: 13px; border: 1.5px solid var(--border); background: var(--primary-50); color: var(--primary); font-weight: 700; cursor: pointer; }
.date-field .hijri-preview { display: block; color: var(--primary); font-size: 12.5px; margin-block-start: 5px; min-block-size: 1em; }
.hijri-picker { display: none; grid-template-columns: 70px 1fr 90px; gap: 8px; margin-block-start: 8px; }
.hijri-picker.open { display: grid; }
.hijri-picker input, .hijri-picker select { min-block-size: 44px !important; font-size: 15px !important; padding: 8px 10px !important; }
.seg { display: flex; background: var(--gray-50); border-radius: 13px; padding: 4px; gap: 4px; }
.seg button { flex: 1; border: 0; background: transparent; border-radius: 10px; padding: 9px 6px; font-weight: 600; font-size: 13.5px; cursor: pointer; color: var(--muted); }
.seg button.active { background: var(--surface); color: var(--primary); box-shadow: 0 1px 4px rgba(0, 0, 0, .08); }
.fab { position: fixed; inset-inline-end: calc(18px + var(--sar)); inset-block-end: calc(var(--sab) + var(--tab-h) + 18px); z-index: 28; inline-size: 58px; block-size: 58px;
  border-radius: 20px; border: 0; background: var(--primary); color: #fff; box-shadow: 0 10px 24px rgba(91, 79, 212, .45); display: grid; place-items: center; cursor: pointer; }
.fab svg.i { inline-size: 28px; block-size: 28px; stroke-width: 2.2; }

/* ---------- skeleton ---------- */
.sk { background: linear-gradient(90deg, #ECECF4 25%, #F6F6FB 50%, #ECECF4 75%); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: 10px; }
@keyframes sk { to { background-position: -200% 0; } }
.sk.line { block-size: 14px; margin-block: 8px; } .sk.w60 { inline-size: 60%; } .sk.w40 { inline-size: 40%; } .sk.w80 { inline-size: 80%; }
.sk.block { block-size: 120px; border-radius: var(--radius); margin-block-end: 14px; }
.sk.circle { inline-size: 170px; block-size: 170px; border-radius: 50%; margin: 10px auto; }

/* ---------- login ---------- */
.login { min-block-size: 100dvh; display: flex; flex-direction: column; background: linear-gradient(165deg, #6C60E6 0%, #4A3FC0 46%, var(--bg) 46.1%); }
.login-top { padding: calc(var(--sat) + 18px) 20px 0; display: flex; justify-content: flex-end; }
.login-top .lang { background: rgba(255, 255, 255, .18); color: #fff; border: 0; border-radius: 99px; padding: 7px 14px; font-weight: 700; cursor: pointer; display: inline-flex; gap: 6px; align-items: center; }
.login-hero { text-align: center; color: #fff; padding: 14px 20px 26px; }
.login-hero img { inline-size: 76px; block-size: 76px; border-radius: 22px; box-shadow: 0 10px 30px rgba(0, 0, 0, .2); }
.login-hero h1 { font-size: 26px; margin-block-start: 12px; }
.login-hero p { margin: 4px 0 0; opacity: .85; }
.login-card { margin: 0 16px; padding: 22px 18px; }
.login-card h2 { font-size: 19px; margin-block-end: 4px; }
.login-foot { text-align: center; color: var(--muted); font-size: 12.5px; padding: 18px 16px calc(var(--sab) + 18px); margin-block-start: auto; }
.pw-wrap { position: relative; }
.pw-wrap button { position: absolute; inset-block-start: 4px; inset-inline-end: 4px; inline-size: 40px; block-size: 40px; border: 0; background: none; color: var(--muted); cursor: pointer; }

/* ---------- home ---------- */
.hello { display: flex; align-items: center; gap: 12px; margin-block-end: 14px; }
.hello .grow { flex: 1; min-inline-size: 0; }
.hello h2 { font-size: 19px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hello small { color: var(--muted); display: block; }
.avatar { inline-size: 48px; block-size: 48px; border-radius: 16px; flex: none; display: grid; place-items: center; font-weight: 700; color: #fff;
  background: hsl(var(--h, 248) 55% 55%); object-fit: cover; font-size: 16px; overflow: hidden; }
.avatar.lg { inline-size: 76px; block-size: 76px; border-radius: 24px; font-size: 26px; }
.avatar.sm { inline-size: 38px; block-size: 38px; border-radius: 12px; font-size: 13px; }
.punch-card { text-align: center; padding-block: 18px 16px; position: relative; overflow: hidden; }
.punch-card::before { content: ""; position: absolute; inset-block-start: 0; inset-inline: 0; block-size: 110px; background: linear-gradient(180deg, var(--primary-50), transparent); pointer-events: none; }
.punch-card > * { position: relative; }
.punch-date b { display: block; font-size: 15px; }
.punch-date small { color: var(--primary); font-weight: 600; }
.clock { font-size: 34px; font-weight: 700; letter-spacing: .5px; margin-block: 4px 2px; font-variant-numeric: tabular-nums; direction: ltr; }
.shift-chip { display: inline-flex; gap: 6px; align-items: center; background: var(--surface-2); border: 1px solid var(--border); border-radius: 99px; padding: 4px 12px; font-size: 12.5px; color: var(--muted); font-weight: 600; }
.punch-wrap { position: relative; inline-size: 184px; block-size: 184px; margin: 18px auto 12px; display: grid; place-items: center; }
.punch-ring { position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--primary-100); }
.punch-wrap.in .punch-ring { border-color: rgba(214, 69, 69, .25); }
.punch-ring.anim { animation: ring 2.4s ease-out infinite; }
.punch-ring.anim.d2 { animation-delay: 1.2s; }
@keyframes ring { 0% { transform: scale(.78); opacity: 1; } 100% { transform: scale(1.08); opacity: 0; } }
.punch-btn { position: relative; inline-size: 150px; block-size: 150px; border-radius: 50%; border: 0; cursor: pointer; color: #fff;
  background: radial-gradient(circle at 30% 25%, #7D72F0, var(--primary) 55%, var(--primary-700));
  box-shadow: 0 14px 34px rgba(91, 79, 212, .45), inset 0 -6px 14px rgba(0, 0, 0, .15); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; font-weight: 700; font-size: 16px; }
.punch-btn svg.i { inline-size: 40px; block-size: 40px; stroke-width: 1.8; }
.punch-btn.out { background: radial-gradient(circle at 30% 25%, #F07A7A, var(--danger) 55%, #A82E2E); box-shadow: 0 14px 34px rgba(214, 69, 69, .4), inset 0 -6px 14px rgba(0, 0, 0, .15); }
.punch-btn.done { background: radial-gradient(circle at 30% 25%, #4CC38A, var(--success) 60%, #157548); box-shadow: 0 14px 30px rgba(31, 157, 99, .35); cursor: default; }
.punch-btn.busy { opacity: .85; }
.punch-btn:active:not(.done) { transform: scale(.96); }
.punch-btn small { font-weight: 500; font-size: 12px; opacity: .9; }
.punch-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-block-start: 6px; }
.punch-stats div { background: var(--surface-2); border-radius: 14px; padding: 10px 4px; }
.punch-stats small { display: block; color: var(--muted); font-size: 12px; }
.punch-stats b { font-size: 16.5px; display: inline-block; unicode-bidi: isolate; }
.punch-stats .in b { color: var(--success); } .punch-stats .out b { color: var(--danger); }
.geo-note { font-size: 12.5px; color: var(--warning); margin-block-start: 10px; display: flex; gap: 6px; justify-content: center; align-items: center; }
.rings { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ring-card { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; padding: 14px 8px; background: var(--surface-2); border-radius: 16px; }
.ring { position: relative; inline-size: 96px; block-size: 96px; }
.ring svg { inline-size: 100%; block-size: 100%; transform: rotate(-90deg); }
html[dir=rtl] .ring svg { transform: rotate(-90deg) scaleY(-1); }
.ring circle { fill: none; stroke-width: 9; stroke-linecap: round; }
.ring .bg { stroke: #E9E8F5; }
.ring .fg { transition: stroke-dashoffset .8s ease; }
.ring .lbl { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; line-height: 1.1; }
.ring .lbl b { font-size: 22px; }
.ring .lbl small { font-size: 11px; color: var(--muted); }
.ring-card .name { font-weight: 700; font-size: 13.5px; }
.ring-card .sub { color: var(--muted); font-size: 12px; }
.quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.quick a { display: flex; flex-direction: column; align-items: center; gap: 7px; text-align: center; color: var(--text); font-size: 12.5px; font-weight: 600; padding: 6px 2px; }
.quick .qi { inline-size: 52px; block-size: 52px; border-radius: 17px; display: grid; place-items: center; background: var(--primary-50); color: var(--primary); }
.quick a:nth-child(2) .qi { background: var(--info-50); color: var(--info); }
.quick a:nth-child(3) .qi { background: var(--success-50); color: var(--success); }
.quick a:nth-child(4) .qi { background: var(--warning-50); color: var(--warning); }
.banner { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: var(--radius); margin-block-end: 14px; color: #fff;
  background: linear-gradient(120deg, #E07B12, #F2A65A); box-shadow: 0 8px 22px rgba(224, 123, 18, .28); }
.banner .grow { flex: 1; } .banner b { display: block; } .banner small { opacity: .9; }
.banner.install { background: linear-gradient(120deg, var(--primary), #7D72F0); box-shadow: 0 8px 22px rgba(91, 79, 212, .3); }
.banner .btn { background: rgba(255, 255, 255, .22); min-block-size: 36px; padding: 6px 14px; }
.mini-row { display: flex; align-items: center; gap: 12px; }
.mini-row .ico { inline-size: 44px; block-size: 44px; border-radius: 14px; display: grid; place-items: center; background: #FFF8E1; color: #8A5A00; flex: none; }
.mini-row .grow { flex: 1; min-inline-size: 0; }
.mini-row b { display: block; } .mini-row small { color: var(--muted); display: block; }
.pill { background: var(--primary-50); color: var(--primary); border-radius: 99px; padding: 4px 10px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.net-big { font-size: 24px; font-weight: 700; }

/* ---------- attendance ---------- */
.month-nav { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-block-end: 12px; background: var(--surface);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 8px; }
.month-nav .icon-btn { color: var(--primary); background: var(--primary-50); }
.month-nav .lbl { text-align: center; }
.month-nav .lbl b { display: block; font-size: 16px; }
.month-nav .lbl small { color: var(--primary); font-size: 12px; }
.days { list-style: none; margin: 0; padding: 0; }
.day { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-block-end: 1px solid var(--border); border-inline-start: 4px solid transparent; }
.day:last-child { border-block-end: 0; }
.day .dnum { inline-size: 46px; text-align: center; flex: none; }
.day .dnum b { display: block; font-size: 19px; line-height: 1.1; }
.day .dnum small { color: var(--muted); font-size: 11px; }
.day .grow { flex: 1; min-inline-size: 0; }
.day .times { display: flex; gap: 10px; font-size: 13px; color: var(--muted); flex-wrap: wrap; margin-block-start: 3px; }
.day .times b { color: var(--text); font-weight: 600; display: inline-block; unicode-bidi: isolate; }
.day .hij { font-size: 11.5px; color: var(--primary); }
.day.st-present { border-inline-start-color: var(--success); } .day.st-late { border-inline-start-color: var(--warning); }
.day.st-absent { border-inline-start-color: var(--danger); } .day.st-leave { border-inline-start-color: var(--info); }
.day.st-holiday { border-inline-start-color: #C9A227; } .day.st-weekend { background: #FAFAFC; } .day.st-incomplete { border-inline-start-color: var(--warning); }
.day.today { background: var(--primary-50); }

/* ---------- requests ---------- */
.req-card { display: block; color: inherit; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 16px; margin-block-end: 10px; }
.req-card .top { display: flex; align-items: center; gap: 10px; }
.req-card .ti { inline-size: 40px; block-size: 40px; border-radius: 13px; display: grid; place-items: center; background: var(--primary-50); color: var(--primary); flex: none; }
.req-card .grow { flex: 1; min-inline-size: 0; }
.req-card .grow b { display: block; }
.req-card .grow small { color: var(--muted); font-size: 12.5px; }
.req-card .meta { display: flex; justify-content: space-between; gap: 8px; margin-block-start: 10px; font-size: 13px; color: var(--muted); flex-wrap: wrap; }
.req-card .meta b { color: var(--text); }
.types-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.type-tile { display: flex; flex-direction: column; gap: 8px; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px; color: inherit; min-block-size: 122px; }
.type-tile .ti { inline-size: 42px; block-size: 42px; border-radius: 13px; display: grid; place-items: center; background: var(--primary-50); color: var(--primary); }
.type-tile b { font-size: 14.5px; } .type-tile small { color: var(--muted); font-size: 12px; line-height: 1.4; }
.preview { background: var(--surface-2); border-radius: 16px; padding: 14px; margin-block-end: 14px; border: 1px solid var(--border); }
.preview .nums { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; text-align: center; }
.preview .nums div { background: var(--surface); border-radius: 12px; padding: 8px 4px; }
.preview .nums small { display: block; color: var(--muted); font-size: 11.5px; }
.preview .nums b { font-size: 18px; }
.preview .nums b.neg { color: var(--danger); }
.preview ul { list-style: none; margin: 10px 0 0; padding: 0; max-block-size: 220px; overflow: auto; }
.preview li { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; padding: 6px 0; border-block-end: 1px dashed var(--border); }
.preview li.off { color: var(--muted); text-decoration: line-through; }
.preview .total { display: flex; justify-content: space-between; margin-block-start: 10px; font-weight: 700; }
.preview .total b { color: var(--danger); }
.flow { display: flex; flex-direction: column; gap: 0; }
.flow .st { display: flex; gap: 12px; align-items: center; padding: 8px 0; }
.flow .n { inline-size: 30px; block-size: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 13px; background: var(--gray-50); color: var(--muted); flex: none; }
.flow .done .n { background: var(--success); color: #fff; } .flow .current .n { background: var(--warning); color: #fff; box-shadow: 0 0 0 4px var(--warning-50); }
.flow .rejected .n { background: var(--danger); color: #fff; }
.flow .st small { color: var(--muted); display: block; font-size: 12px; }
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline li { position: relative; padding-inline-start: 30px; padding-block-end: 16px; }
.timeline li::before { content: ""; position: absolute; inset-inline-start: 8px; inset-block: 18px 0; border-inline-start: 2px solid var(--border); }
.timeline li:last-child::before { display: none; }
.timeline .dot { position: absolute; inset-inline-start: 2px; inset-block-start: 5px; inline-size: 14px; block-size: 14px; border-radius: 50%; background: var(--primary-100); border: 3px solid var(--surface); box-shadow: 0 0 0 1px var(--border); }
.timeline .a-approved .dot { background: var(--success); } .timeline .a-rejected .dot { background: var(--danger); }
.timeline .a-cancelled .dot { background: #9AA0B4; } .timeline .a-commented .dot { background: var(--info); } .timeline .a-submitted .dot { background: var(--primary); }
.timeline b { font-size: 14px; } .timeline small { color: var(--muted); font-size: 12px; display: block; }
.timeline .cm { background: var(--surface-2); border-radius: 12px; padding: 8px 12px; margin-block-start: 6px; font-size: 14px; white-space: pre-wrap; }
.appr .msg { font-weight: 600; }
.appr .reason { background: var(--surface-2); border-radius: 12px; padding: 8px 12px; margin-block: 10px; font-size: 13.5px; white-space: pre-wrap; }
.appr textarea { min-block-size: 60px !important; }

/* ---------- payslip ---------- */
.ps-head { text-align: center; background: linear-gradient(140deg, var(--primary), #7D72F0); color: #fff; border-radius: var(--radius); padding: 20px 16px; margin-block-end: 14px; box-shadow: 0 10px 26px rgba(91, 79, 212, .3); }
.ps-head small { opacity: .85; display: block; }
.ps-head .net { font-size: 30px; font-weight: 700; margin-block: 6px; }
.ps-head .words { font-size: 12.5px; opacity: .9; }
.lines { list-style: none; margin: 0; padding: 0; }
.lines li { display: flex; justify-content: space-between; gap: 10px; padding: 9px 0; border-block-end: 1px dashed var(--border); font-size: 14px; }
.lines li:last-child { border-block-end: 0; }
.lines .tot { font-weight: 700; border-block-start: 2px solid var(--border); border-block-end: 0; margin-block-start: 4px; }
.lines.ded .money { color: var(--danger); }
.ps-print { display: none; }

/* ---------- profile ---------- */
.profile-head { text-align: center; padding-block: 22px 16px; }
.profile-head .avatar { margin: 0 auto 10px; }
.profile-head h2 { font-size: 19px; }
.profile-head small { color: var(--muted); display: block; }

@media (min-width: 720px) {
  .quick { grid-template-columns: repeat(4, 1fr); }
  .types-grid { grid-template-columns: repeat(3, 1fr); }
}
@media print {
  .appbar, .tabbar, .toasts, .fab, .offline-bar, .no-print, .ptr { display: none !important; }
  body, html { background: #fff; }
  .view { padding: 0 !important; max-inline-size: none; }
  .card, .ps-head { box-shadow: none; border: 1px solid #ddd; }
  .ps-head { background: #fff !important; color: var(--text); }
  .ps-print { display: block; text-align: center; margin-block-end: 10px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before { animation: none !important; transition: none !important; } }
html, body { overflow-x: hidden; }
.row2 > *, .date-field .date-row input, .hijri-picker > * { min-inline-size: 0; }
.preview ul { padding-inline: 4px 10px; }

/* Theme: brand-purple scrollbars and selection */
::selection { background: #DEDAFA; color: #241A63; }
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #C9C4F3; border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: #5B4FD4; }
@supports not selector(::-webkit-scrollbar) { * { scrollbar-width: thin; scrollbar-color: #C9C4F3 transparent; } }

/* company chip (DUMONT / KINDA) */
.co-chip { display: inline-flex; align-items: center; padding: 1px 7px; border-radius: 6px; font-size: 11px; font-weight: 700; letter-spacing: .3px;
  color: #fff; background: var(--co, #8A6D3B); line-height: 1.6; vertical-align: middle; white-space: nowrap; }
.co-switch .btn span { display: inline-flex; gap: 6px; align-items: center; }
.co-switch .dropdown-menu a.active { font-weight: 700; }
