/*
 * Partner Care Management - Operations Ledger
 * Single visual authority for the application. The product is intentionally
 * dense, calm and operational: information first, decoration second.
 */

/* ---------- Theme foundations ---------- */
.app-shell {
  --pc-display: "Segoe UI Variable Display", "Noto Sans Arabic", "Segoe UI", Tahoma, sans-serif;
  --pc-body: "Segoe UI Variable Text", "Noto Sans Arabic", "Segoe UI", Tahoma, sans-serif;
  --pc-data: "Cascadia Mono", "IBM Plex Mono", Consolas, monospace;
  --pc-r1: 6px;
  --pc-r2: 10px;
  --pc-r3: 16px;
  --pc-r4: 24px;
  --pc-fast: 160ms cubic-bezier(.2,.75,.25,1);
  --pc-shadow-1: 0 1px 2px rgba(21, 33, 38, .035), 0 16px 42px rgba(21, 33, 38, .065);
  --pc-shadow-2: 0 32px 90px rgba(21, 33, 38, .16);
  --pc-rail: #152126;
  --pc-rail-2: #0c1519;
  --pc-rail-ink: #f7fbfa;
  --pc-rail-muted: #b8c8c5;
  --pc-nav-active: #f5ecef;
  --pc-nav-active-ink: #512550;
  --canvas: #f3f6f5;
  --surface: #ffffff;
  --surface-2: #eaf0ee;
  --surface-3: #dce7e4;
  --ink: #152126;
  --muted: #60716f;
  --line: #d5e1de;
  --line-strong: #aebfbb;
  --purple: #512550;
  --purple-2: #351736;
  --purple-soft: #efe5ef;
  --orange: #f26732;
  --orange-text: #9d3716;
  --orange-soft: #ffebe2;
  --green: #177a74;
  --green-soft: #e1f1ee;
  --red: #b94553;
  --red-soft: #f8e7ea;
  --warning: #80601b;
  --warning-soft: #fbf0d5;
  --blue: #356b78;
  --blue-soft: #e3eff1;
  --pc-highlight-bg: linear-gradient(135deg, #512550 0%, #173d43 68%, #177a74 100%);
  --bg: var(--canvas);
  --white: var(--surface);
  min-height: 100vh;
  background: var(--canvas);
  color: var(--ink);
  font: 450 15px/1.64 var(--pc-body);
  font-variant-numeric: tabular-nums;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  color-scheme: light;
}

/* Final operations UI hardening: accessibility, hierarchy, and responsive clarity. */
:root {
  --pcm-font-arabic: "Segoe UI", Tahoma, Arial, sans-serif;
  --pcm-focus: #2563eb;
  --pcm-urgent: #b42318;
  --pcm-action: #9a5b00;
  --pcm-info: #0f6b63;
}

.app-shell {
  font-family: var(--pcm-font-arabic);
  font-size: 14px;
  text-rendering: optimizeLegibility;
}

.app-shell button,
.app-shell input,
.app-shell select,
.app-shell textarea { font: inherit; }

.skip-link {
  position: fixed;
  inset-block-start: 10px;
  inset-inline-start: 50%;
  z-index: 10000;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--ink);
  color: var(--white);
  transform: translate(-50%, -160%);
  transition: transform .16s ease;
}
.skip-link:focus { transform: translate(-50%, 0); }
.content:focus { outline: 0; }

.app-shell :is(button, a, input, select, textarea):focus-visible {
  outline: 3px solid color-mix(in srgb, var(--pcm-focus) 72%, transparent);
  outline-offset: 2px;
}

.operations-center > div button {
  min-height: 92px;
  align-content: center;
  box-shadow: none;
}
.operations-center > div strong { font-variant-numeric: tabular-nums; }

.system-health-card .health-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.system-health-card .health-summary span {
  display: grid;
  gap: 4px;
  padding: 11px 12px;
  border-radius: 11px;
  background: color-mix(in srgb, var(--bg) 76%, var(--white));
  color: var(--muted);
  font-size: 12px;
}
.system-health-card .health-summary b { color: var(--ink); }
.system-health-card .health-error {
  margin: 12px 0 0;
  padding: 11px 12px;
  border: 1px solid color-mix(in srgb, var(--danger) 36%, var(--line));
  border-radius: 11px;
  background: color-mix(in srgb, var(--danger) 9%, transparent);
  color: var(--danger);
  overflow-wrap: anywhere;
}
.system-health-card .health-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 12px;
}

.notifications article { min-height: 82px; }
.notifications article > div { min-width: 0; }
.notifications article header { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.notification-category {
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
}
.notification-category.urgent { color: var(--pcm-urgent); background: color-mix(in srgb, var(--pcm-urgent) 12%, transparent); }
.notification-category.action { color: var(--pcm-action); background: color-mix(in srgb, var(--pcm-action) 13%, transparent); }
.notification-category.info { color: var(--pcm-info); background: color-mix(in srgb, var(--pcm-info) 12%, transparent); }
.notification-open { margin-inline-start: auto; }

.notification-popover-item {
  width: 100%;
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr) auto;
  align-items: start;
  gap: 10px;
  padding: 12px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  text-align: start;
}
.notification-popover-item > span { width: 8px; height: 8px; margin-top: 6px; border-radius: 50%; background: var(--pcm-info); }
.notification-popover-item.category-urgent > span { background: var(--pcm-urgent); }
.notification-popover-item.category-action > span { background: var(--pcm-action); }
.notification-popover-item p { margin: 4px 0; color: var(--muted); line-height: 1.55; }
.notification-popover-item em { font-size: 9px; font-style: normal; color: var(--muted); }

.audit-table td:nth-child(3) strong,
.audit-table td:nth-child(3) small { display: block; }
.audit-table td:nth-child(3) small { margin-top: 4px; color: var(--muted); unicode-bidi: isolate; }
.audit-table time,
[dir="ltr"] { unicode-bidi: isolate; }

.schedule-table thead th,
.leave-calendar thead th { backdrop-filter: blur(8px); }
.schedule-table tbody th,
.leave-calendar tbody th { box-shadow: 4px 0 14px color-mix(in srgb, var(--ink) 7%, transparent); }

@media (max-width: 760px) {
  .system-health-card .health-summary { grid-template-columns: 1fr; }
  .notifications article { align-items: flex-start; flex-wrap: wrap; }
  .notification-open { margin-inline-start: 23px; }
  .audit-table { min-width: 0; }
  .audit-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .audit-table tbody,
  .audit-table tr,
  .audit-table td { display: block; width: 100%; }
  .audit-table tr { padding: 10px 12px; border-bottom: 1px solid var(--line); }
  .audit-table td { display: grid; grid-template-columns: 92px minmax(0,1fr); gap: 10px; padding: 6px 0; border: 0; }
  .audit-table td::before { content: attr(data-label); color: var(--muted); font-size: 11px; font-weight: 700; }
}

@media (prefers-reduced-motion: reduce) {
  .skip-link { transition: none; }
}

.app-shell[data-theme="dark"] {
  --pc-rail: #0a1316;
  --pc-rail-2: #071013;
  --pc-rail-ink: #fff9f5;
  --pc-rail-muted: #cbbdca;
  --pc-nav-active: #f3e9f2;
  --pc-nav-active-ink: #351736;
  --canvas: #0e171a;
  --surface: #162226;
  --surface-2: #1d2c30;
  --surface-3: #26383c;
  --ink: #f3f8f7;
  --muted: #abc0bc;
  --line: #2c4145;
  --line-strong: #496267;
  --purple: #d8add5;
  --purple-2: #efd4ec;
  --purple-soft: #39243a;
  --orange: #ff875f;
  --orange-text: #ffc9b5;
  --orange-soft: #452b25;
  --green: #65c9bd;
  --green-soft: #173c39;
  --red: #f298a3;
  --red-soft: #45292f;
  --warning: #edca78;
  --warning-soft: #41351f;
  --blue: #8fc2cc;
  --blue-soft: #20383e;
  --pc-highlight-bg: linear-gradient(135deg, #5b2b59 0%, #143d43 66%, #176b67 100%);
  --pc-shadow-1: 0 1px 2px rgba(0,0,0,.30), 0 14px 38px rgba(0,0,0,.20);
  --pc-shadow-2: 0 30px 90px rgba(0,0,0,.45);
  color-scheme: dark;
}

.app-shell *, .app-shell *::before, .app-shell *::after { box-sizing: border-box; }
.app-shell :where(button,input,select,textarea) { font: inherit; color: inherit; }
.app-shell :where(button,a,input,select,textarea,summary):focus-visible {
  outline: 3px solid color-mix(in srgb, var(--orange) 42%, transparent);
  outline-offset: 3px;
}
.app-shell :where(h1,h2,h3,h4) { margin: 0; color: var(--ink); font-family: var(--pc-display); letter-spacing: -.02em; text-wrap: balance; }
.app-shell :where(p) { text-wrap: pretty; }
.app-shell :where(input,select,textarea) { min-height: 44px; padding-inline: 12px; border: 1px solid var(--line); border-radius: var(--pc-r2); background: var(--surface); }
.app-shell :where(input,select,textarea)::placeholder { color: color-mix(in srgb, var(--muted) 72%, transparent); }
.app-shell :where(.card,.panel,.toolbar,.schedule-wrap,.coverage-board,.stat,.modal,.setting-card) { min-width: 0; }

/* ---------- Product shell ---------- */
.app-shell .sidebar {
  position: fixed;
  inset-block: 0;
  inset-inline-start: 0;
  z-index: 50;
  width: 252px;
  padding: 0 14px 18px;
  overflow-x: hidden;
  overflow-y: auto;
  background:
    radial-gradient(circle at 18% 8%, rgba(242,103,50,.14), transparent 28%),
    linear-gradient(162deg, var(--pc-rail) 0 54%, var(--pc-rail-2) 100%);
  color: var(--pc-rail-ink);
  border-inline-end: 1px solid rgba(255,255,255,.09);
  box-shadow: 12px 0 36px rgba(18, 13, 23, .11);
}
.app-shell .sidebar::before {
  content: "";
  position: sticky;
  display: block;
  top: 0;
  z-index: 2;
  height: 4px;
  margin-inline: -14px;
  background: linear-gradient(90deg, var(--orange) 0 42%, #9b587f 42% 67%, var(--green) 67%);
}
.app-shell .brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 82px;
  padding: 15px 8px 13px;
  color: var(--pc-rail-ink);
  border-bottom: 1px solid rgba(255,255,255,.11);
}
.app-shell .brand-mark {
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  border-radius: 13px;
  background: var(--orange) url('/icon.svg') center/80% no-repeat;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.28), 0 12px 24px rgba(0,0,0,.22);
}
.app-shell .brand strong { display: block; color: var(--pc-rail-ink); font: 740 1.02rem/1.18 var(--pc-display); letter-spacing: -.01em; }
.app-shell .brand small { display: block; margin-top: 5px; color: var(--pc-rail-muted); font-size: .72rem; font-weight: 650; letter-spacing: .09em; text-transform: uppercase; }
.app-shell .sidebar nav { display: grid; gap: 19px; min-width: 0; max-width: 100%; padding: 20px 0 124px; overflow-x: clip; }
.app-shell .nav-group { display: grid; gap: 4px; min-width: 0; max-width: 100%; overflow-x: clip; }
.app-shell .nav-group > small {
  padding: 3px 10px 7px;
  color: color-mix(in srgb, var(--pc-rail-muted) 78%, transparent);
  font-size: .73rem;
  font-weight: 750;
  letter-spacing: .08em;
}
.app-shell .sidebar nav button {
  position: relative;
  display: grid;
  grid-template-columns: 24px 1fr auto;
  align-items: center;
  gap: 9px;
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: var(--pc-r2);
  background: transparent;
  color: var(--pc-rail-muted);
  text-align: start;
  cursor: pointer;
  transition: color var(--pc-fast), background var(--pc-fast), border-color var(--pc-fast), transform var(--pc-fast);
}
.app-shell .sidebar nav button:hover { color: var(--pc-rail-ink); background: rgba(255,255,255,.075); transform: translateX(-2px); }
body[data-locale="en"] .app-shell .sidebar nav button:hover { transform: translateX(2px); }
.app-shell .sidebar nav button.active {
  color: var(--pc-nav-active-ink);
  background: var(--pc-nav-active);
  border-color: rgba(255,255,255,.35);
  box-shadow: 0 10px 26px rgba(0,0,0,.21);
  font-weight: 720;
}
.app-shell .sidebar nav button.active::after { content: ""; position: absolute; inset-block: 8px; inset-inline-end: -1px; width: 4px; border-radius: 4px 0 0 4px; background: var(--orange); }
.app-shell .nav-icon-wrap { display:grid; place-items:center; width:24px; height:24px; color:currentColor; }
.app-shell .nav-icon { width:19px; height:19px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.app-shell .sidebar nav button > em { min-width: 22px; padding: 2px 6px; border-radius: 99px; background: var(--orange); color: #fff; font-style: normal; font: 720 .72rem/1.4 var(--pc-data); text-align: center; }
.app-shell .sidebar-footer {
  position: sticky;
  bottom: 0;
  display: grid;
  grid-template-columns: 1fr 42px;
  gap: 8px;
  padding-top: 12px;
  min-width: 0;
  max-width: 100%;
  overflow-x: clip;
  background: linear-gradient(180deg, transparent, var(--pc-rail-2) 22%);
}
.app-shell .sidebar-profile {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 9px;
  width: 100%;
  padding: 8px;
  border: 1px solid rgba(255,255,255,.11);
  border-radius: var(--pc-r2);
  background: rgba(255,255,255,.055);
  color: var(--pc-rail-ink);
  text-align: start;
}
.app-shell .sidebar-profile strong,.app-shell .sidebar-profile small,.app-shell .sidebar-profile em { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-shell .sidebar-profile strong { font-size: .84rem; }
.app-shell .sidebar-profile small { color: var(--pc-rail-muted); font-size: .73rem; }
.app-shell .sidebar-profile em { color: #ffad8f; font-size: .7rem; font-style: normal; }
.app-shell .sidebar-logout { min-width: 42px; border: 1px solid rgba(255,255,255,.12); border-radius: var(--pc-r2); background: rgba(255,255,255,.055); color: var(--pc-rail-ink); cursor: pointer; }

.app-shell .workspace {
  min-height: 100vh;
  margin-inline-start: 252px;
  margin-right: 0;
  background:
    radial-gradient(circle at 8% 0%, color-mix(in srgb,var(--green) 7%,transparent), transparent 31rem),
    radial-gradient(circle at 92% 18%, color-mix(in srgb,var(--purple) 5%,transparent), transparent 30rem),
    var(--canvas);
}
body[data-locale="ar"] .app-shell .workspace { margin-inline-start: 0; margin-right: 252px; }
.app-shell .topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: grid;
  grid-template-columns: auto minmax(170px,1fr) auto auto;
  align-items: center;
  gap: 14px;
  min-height: 70px;
  padding: 9px clamp(16px,2.4vw,34px);
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 91%, transparent);
  backdrop-filter: blur(18px) saturate(125%);
}
.app-shell .topbar::after { content: ""; position: absolute; inset-inline: 0; bottom: -1px; height: 1px; background: linear-gradient(90deg, transparent, var(--orange), #7ba99e, transparent); opacity: .5; }
.app-shell .topbar-title { min-width: 0; padding-inline-start: 12px; border-inline-start: 3px solid var(--orange); }
.app-shell .topbar-title strong { display: block; overflow: hidden; color: var(--ink); font: 740 1.06rem/1.25 var(--pc-display); text-overflow: ellipsis; white-space: nowrap; }
.app-shell .topbar-title small { display: block; margin-top: 3px; color: var(--muted); font: 560 .76rem/1.2 var(--pc-data); }
.app-shell .beta-notice { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border: 1px solid color-mix(in srgb,var(--orange) 45%,var(--line)); border-radius: 99px; background: var(--orange-soft); color: var(--orange-text); }
.app-shell .beta-notice span { font-weight: 760; font-size: .75rem; }
.app-shell .beta-notice small { color: inherit; font-size: .7rem; }
.app-shell .top-actions { display: flex; align-items: center; gap: 7px; }
.app-shell .top-actions > button,.app-shell .language-switch button,.app-shell .menu-button {
  min-width: 40px;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: var(--pc-r2);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  transition: transform var(--pc-fast),border-color var(--pc-fast),background var(--pc-fast);
}
.app-shell .top-actions > button:hover,.app-shell .language-switch button:hover { transform: translateY(-1px); border-color: var(--line-strong); background: var(--surface-2); }
.app-shell .menu-button { display: none; }
.app-shell .bell { position: relative; }
.app-shell .bell > span { position: absolute; inset-block-start: -7px; inset-inline-end: -7px; min-width: 20px; padding: 2px 5px; border-radius: 20px; background: var(--orange); color:#fff; font: 700 .63rem/1.35 var(--pc-data); }
.app-shell .avatar { display: grid; place-items: center; border-radius: 50%; background: var(--orange); color: #fff; font-weight: 780; }

.app-shell .content { width: min(1540px,100%); margin-inline:auto; padding: 42px clamp(22px,3.2vw,52px) 72px; }
.app-shell .concept-credit { padding: 22px; color: var(--muted); font-size: .72rem; letter-spacing: .09em; text-align: center; text-transform: uppercase; }

/* ---------- Hierarchy and actions ---------- */
.app-shell .page-heading {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  min-height: 154px;
  margin: 0 0 24px;
  padding: clamp(24px,3vw,38px);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--pc-r4);
  background:
    linear-gradient(115deg,color-mix(in srgb,var(--surface) 98%,transparent),color-mix(in srgb,var(--surface-2) 82%,var(--surface))),
    var(--surface);
  box-shadow: var(--pc-shadow-1);
}
.app-shell .page-heading::before {
  content:"";
  position:absolute;
  width:210px;
  height:210px;
  inset-inline-end:-96px;
  top:-112px;
  border:1px solid color-mix(in srgb,var(--green) 24%,transparent);
  border-radius:50%;
  box-shadow:0 0 0 30px color-mix(in srgb,var(--green) 4%,transparent),0 0 0 66px color-mix(in srgb,var(--purple) 3%,transparent);
  pointer-events:none;
}
.app-shell .page-heading::after { content: ""; position: absolute; inset-inline-start: 0; inset-block: 26px; width: 5px; border-radius: 0 5px 5px 0; background: linear-gradient(var(--orange),var(--green)); }
.app-shell .page-heading > * { position:relative; z-index:1; }
.app-shell .page-heading h1 { font-size: clamp(2rem,3vw,2.9rem); line-height: 1.08; font-weight: 760; }
.app-shell .page-heading p { max-width: 780px; margin: 8px 0 0; color: var(--muted); font-size: .98rem; }
.app-shell .eyebrow { display: block; margin-bottom: 8px; color: var(--orange); font-size: .76rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.app-shell .heading-actions { display:flex; flex-wrap:wrap; align-items:center; gap:9px; }
.app-shell :where(.primary-button,.approve,.report-download) {
  min-height: 43px;
  padding: 9px 16px;
  border: 1px solid var(--orange);
  border-radius: var(--pc-r2);
  background: var(--orange);
  color: #fff;
  box-shadow: 0 8px 18px color-mix(in srgb,var(--orange) 23%,transparent);
  font-weight: 720;
  cursor: pointer;
}
.app-shell :where(.primary-button,.approve,.report-download):hover { background: color-mix(in srgb,var(--orange) 88%,#7e2d17); transform: translateY(-1px); }
.app-shell :where(.ghost,.secondary,.table-action,.archive-action) { min-height: 40px; padding: 8px 13px; border: 1px solid var(--line); border-radius: var(--pc-r2); background: var(--surface); color: var(--ink); cursor:pointer; }
.app-shell :where(.ghost,.secondary,.table-action,.archive-action):hover { border-color: var(--line-strong); background: var(--surface-2); }
.app-shell button:disabled { cursor:not-allowed; opacity:.5; box-shadow:none; transform:none; }

/* ---------- Reusable operational surfaces ---------- */
.app-shell :where(.card,.panel,.schedule-wrap,.coverage-board,.toolbar,.setting-card,.bridge-panel,.health-checks,.team-leadership,.team-roster-grid,.leave-calendar,.employee-profile-page) {
  border: 1px solid var(--line);
  border-radius: var(--pc-r3);
  background: linear-gradient(145deg,var(--surface),color-mix(in srgb,var(--surface-2) 28%,var(--surface)));
  box-shadow: var(--pc-shadow-1);
}
.app-shell :where(.card,.panel,.setting-card,.bridge-panel,.health-checks,.team-leadership) { padding: clamp(18px,2.1vw,28px); }
.app-shell .stats-grid,.app-shell .metrics-grid { display:grid; grid-template-columns: repeat(auto-fit,minmax(190px,1fr)); gap:14px; }
.app-shell .stat {
  position:relative;
  min-height:122px;
  padding:18px;
  overflow:hidden;
  border:1px solid var(--line);
  border-radius:var(--pc-r3);
  background:var(--surface);
  box-shadow:var(--pc-shadow-1);
}
.app-shell .stat::before { content:""; position:absolute; inset-block:14px; inset-inline-start:0; width:3px; border-radius:3px; background:var(--blue); }
.app-shell .stat.highlight,.app-shell .stat.primary { background:var(--pc-highlight-bg); color:#fff; border-color:transparent; }
.app-shell .stat.highlight :where(strong,small),.app-shell .stat.primary :where(strong,small) { color:inherit; }
.app-shell .stat strong { display:block; margin-top:11px; color:var(--ink); font:760 clamp(1.42rem,2.4vw,2.05rem)/1 var(--pc-display); }
.app-shell .stat small { color:var(--muted); font-size:.82rem; }
.app-shell .status,.app-shell .draft-pill,.app-shell .today-badge,.app-shell .source-kind {
  display:inline-flex; align-items:center; gap:5px; min-height:26px; padding:4px 9px; border:1px solid transparent; border-radius:99px; background:var(--surface-2); color:var(--muted); font-size:.73rem; font-weight:720;
}
.app-shell .status.success,.app-shell .draft-pill.success { background:var(--green-soft); color:var(--green); }
.app-shell .status.warning,.app-shell .draft-pill.warning { background:var(--warning-soft); color:var(--warning); }
.app-shell .status.danger,.app-shell .draft-pill.danger { background:var(--red-soft); color:var(--red); }
.app-shell .empty-state,.app-shell .empty-inline { padding:42px 22px; border:1px dashed var(--line-strong); border-radius:var(--pc-r3); background:color-mix(in srgb,var(--surface-2) 48%,transparent); color:var(--muted); text-align:center; }

/* ---------- Home: command brief ---------- */
.app-shell .welcome-row { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:18px; margin-bottom:22px; }
.app-shell .welcome-row h1 { font-size:clamp(2rem,3.4vw,3.25rem); }
.app-shell .home-welcome {
  position:relative;
  min-height:190px;
  padding:clamp(24px,4vw,48px);
  overflow:hidden;
  border:1px solid color-mix(in srgb,var(--orange) 34%,transparent);
  border-radius:var(--pc-r4);
  background:
    radial-gradient(circle at 11% 16%,rgba(255,255,255,.14),transparent 25%),
    radial-gradient(circle at 84% 10%,rgba(242,103,50,.16),transparent 24%),
    linear-gradient(122deg,#10262b 0%,#204c4d 48%,#512550 100%);
  color:#fff;
  box-shadow:var(--pc-shadow-2);
}
.app-shell .home-welcome::after {
  content:"";
  position:absolute;
  width:240px;
  height:240px;
  inset-inline-end:-76px;
  bottom:-138px;
  border:1px solid rgba(255,255,255,.16);
  border-radius:50%;
  box-shadow:0 0 0 28px rgba(255,255,255,.04),0 0 0 64px rgba(255,255,255,.025);
}
.app-shell .home-welcome > * { position:relative; z-index:1; }
.app-shell .home-welcome :where(h1,h2,strong) { color:#fff; }
.app-shell .home-welcome p { max-width:58ch; color:rgba(255,255,255,.84); font-size:1rem; }
.app-shell .home-welcome .eyebrow { color:#ffb39a; }
.app-shell .home-welcome .date-chip {
  border-color:rgba(255,255,255,.24);
  background:rgba(255,255,255,.10);
  color:#fff;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.12);
  backdrop-filter:blur(10px);
}
.app-shell .home-welcome .date-chip :where(span,strong,small) { color:inherit; }
.app-shell .daily-inspiration {
  position:relative;
  min-height:112px;
  margin-bottom:18px;
  padding:24px clamp(20px,4vw,44px);
  overflow:hidden;
  border:1px solid color-mix(in srgb,var(--orange) 35%,var(--line));
  border-radius:var(--pc-r3);
  background:
    radial-gradient(circle at 88% 20%,rgba(255,255,255,.09),transparent 23%),
    linear-gradient(112deg,#17373b 0%,#28645e 56%,#512550 100%);
  color:#fff;
  box-shadow:var(--pc-shadow-2);
}
.app-shell .daily-inspiration::before { content:""; position:absolute; inset-block:0; inset-inline-start:0; width:7px; background:linear-gradient(var(--orange),#83b9a9); }
.app-shell .daily-inspiration::after { content:"\201C"; position:absolute; inset-inline-end:26px; top:-38px; color:rgba(255,255,255,.08); font:800 10rem/1 Georgia,serif; }
.app-shell .daily-inspiration :where(h2,strong,p,small) { position:relative; z-index:1; color:#fff; }
.app-shell .dashboard-grid { display:grid; grid-template-columns:minmax(0,1.5fr) minmax(320px,.82fr); gap:18px; align-items:start; }
.app-shell .dashboard-grid > * { min-width:0; }
.app-shell .next-shift { border-top:4px solid var(--blue); }
.app-shell .quick-actions { display:grid; gap:10px; }
.app-shell .quick-actions button { display:grid; grid-template-columns:44px 1fr auto; align-items:center; gap:11px; min-height:66px; padding:11px 13px; border:1px solid var(--line); border-radius:var(--pc-r2); background:var(--surface); color:var(--ink); text-align:start; }
.app-shell .quick-actions button:hover { border-color:var(--orange); background:var(--orange-soft); }

/* ---------- Schedules, leave calendar and data grids ---------- */
.app-shell .toolbar { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:13px; margin-bottom:16px; padding:15px 17px; border-top:3px solid color-mix(in srgb,var(--green) 72%,var(--line)); }
.app-shell .team-tabs,.app-shell .segmented,.app-shell .leave-view-tabs { display:flex; flex-wrap:wrap; gap:5px; padding:4px; border:1px solid var(--line); border-radius:var(--pc-r2); background:var(--surface-2); }
.app-shell .team-tabs button,.app-shell .segmented button,.app-shell .leave-view-tabs button { min-height:38px; padding:7px 13px; border:0; border-radius:8px; background:transparent; color:var(--muted); font-size:.8rem; font-weight:700; cursor:pointer; }
.app-shell .team-tabs button.active,.app-shell .segmented button.active,.app-shell .leave-view-tabs button.active { background:var(--surface); color:var(--ink); box-shadow:0 1px 5px rgba(0,0,0,.08); }
.app-shell .week-nav,.app-shell .month-navigator { display:flex; align-items:center; gap:8px; }
.app-shell .week-nav button,.app-shell .month-navigator button { min-width:38px; min-height:38px; border:1px solid var(--line); border-radius:var(--pc-r2); background:var(--surface); }
.app-shell .schedule-wrap,.app-shell .leave-calendar { overflow:hidden; }
.app-shell .schedule-scroll,.app-shell .leave-calendar-scroll { overflow:auto; scrollbar-color:var(--line-strong) transparent; }
.app-shell .schedule-matrix-header {
  display:grid;
  grid-template-columns:minmax(220px,1fr) auto;
  align-items:end;
  gap:18px;
  padding:20px 20px 16px;
  border-bottom:1px solid var(--line);
}
.app-shell .schedule-matrix-header h2 { margin-top:3px; font-size:clamp(1.25rem,2vw,1.7rem); }
.app-shell .schedule-matrix-header p { margin:5px 0 0; color:var(--muted); font-size:.78rem; }
.app-shell .schedule-legend {
  display:flex;
  flex-wrap:wrap;
  justify-content:flex-end;
  gap:6px;
  max-width:100%;
}
.app-shell .schedule-legend span {
  display:inline-flex;
  align-items:center;
  gap:6px;
  min-height:30px;
  padding:5px 9px;
  border:1px solid var(--line);
  border-radius:999px;
  background:var(--surface-2);
  color:var(--muted);
  font-size:.68rem;
  font-weight:760;
  white-space:nowrap;
}
.app-shell .schedule-legend span::before {
  content:"";
  width:7px;
  height:7px;
  flex:0 0 auto;
  border-radius:50%;
  background:var(--line-strong);
}
.app-shell .schedule-legend .shift::before { background:var(--purple); }
.app-shell .schedule-legend .off::before { background:var(--warning); }
.app-shell .schedule-legend .oncall::before { background:var(--blue); }
.app-shell .schedule-legend .leave::before { background:var(--red); }
.app-shell .schedule-legend .unassigned::before { background:var(--muted); }
.app-shell :where(.schedule-table,.log-table,.leave-calendar table) { width:100%; border-collapse:separate; border-spacing:0; font-size:.82rem; }
.app-shell :where(.schedule-table,.log-table,.leave-calendar table) th { position:sticky; top:0; z-index:4; padding:13px 11px; border-bottom:1px solid var(--line-strong); background:color-mix(in srgb,var(--surface-3) 70%,var(--surface)); color:var(--ink); font-size:.74rem; font-weight:800; letter-spacing:.01em; }
.app-shell :where(.schedule-table,.log-table,.leave-calendar table) td { padding:10px 11px; border-bottom:1px solid var(--line); background:var(--surface); color:var(--ink); }
.app-shell :where(.schedule-table,.log-table,.leave-calendar table) tr:nth-child(even) td { background:color-mix(in srgb,var(--surface-2) 42%,var(--surface)); }
.app-shell :where(.schedule-table,.log-table,.leave-calendar table) tr:hover td { background:color-mix(in srgb,var(--blue-soft) 64%,var(--surface)); }
.app-shell .employee-cell { position:sticky; inset-inline-start:0; z-index:3; min-width:190px; background:var(--surface)!important; box-shadow:6px 0 16px rgba(21,39,40,.055); }
.app-shell .employee-cell strong { display:block; max-width:185px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.app-shell .shift-cell { min-width:120px; min-height:62px; border:1px solid var(--line); border-radius:var(--pc-r2); background:var(--surface-2); color:var(--ink); }
.app-shell .shift-cell.shift { border-color:color-mix(in srgb,var(--purple) 40%,var(--line)); background:var(--purple-soft); color:var(--purple-2); }
.app-shell .shift-cell.off { background:var(--warning-soft); color:var(--warning); }
.app-shell .shift-cell.leave { background:var(--red-soft); color:var(--red); }
.app-shell .shift-cell.oncall { background:var(--blue-soft); color:var(--blue); }
.app-shell .coverage-board { margin-top:18px; padding:20px; }
.app-shell .coverage-strip { display:grid; grid-template-columns:repeat(7,minmax(150px,1fr)); gap:9px; overflow:auto; padding-bottom:5px; }
.app-shell .coverage-strip > * { border:1px solid var(--line); border-radius:var(--pc-r2); background:var(--surface-2); }
.app-shell .leave-calendar { border-top:5px solid var(--green); box-shadow:var(--pc-shadow-2); }
.app-shell .leave-calendar table { min-width:1480px; direction:ltr; }
.app-shell .leave-calendar :where(th,td) { text-align:center; }
.app-shell .leave-calendar th:nth-child(-n+3),.app-shell .leave-calendar td:nth-child(-n+3) { position:sticky; z-index:5; background:var(--surface); }
.app-shell .leave-calendar th:nth-child(1),.app-shell .leave-calendar td:nth-child(1) { left:0; width:62px; }
.app-shell .leave-calendar th:nth-child(2),.app-shell .leave-calendar td:nth-child(2) { left:62px; width:86px; }
.app-shell .leave-calendar th:nth-child(3),.app-shell .leave-calendar td:nth-child(3) { left:148px; width:190px; text-align:start; box-shadow:7px 0 14px rgba(20,39,38,.07); }
.app-shell .leave-calendar td.leave { background:var(--red-soft); color:var(--red); font-weight:700; }
.app-shell .leave-calendar td.off { background:var(--warning-soft); color:var(--warning); font-weight:700; }

/* ---------- Directory, teams and profile ---------- */
.app-shell .employee-toolbar { display:grid; grid-template-columns:minmax(260px,1fr) auto auto; gap:11px; margin-bottom:16px; padding:14px; border:1px solid var(--line); border-radius:var(--pc-r3); background:var(--surface); box-shadow:var(--pc-shadow-1); }
.app-shell .team-roster-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; padding:14px; }
.app-shell .team-roster-head { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:17px 18px; border-bottom:1px solid var(--line); }
.app-shell .team-member-list,.app-shell .team-leader-list { display:grid; gap:8px; padding:14px; }
.app-shell .senior-member,.app-shell .team-member-list button,.app-shell .team-leader-chip { display:grid; grid-template-columns:44px minmax(0,1fr) auto; align-items:center; gap:11px; min-height:62px; padding:10px 12px; border:1px solid var(--line); border-radius:var(--pc-r2); background:var(--surface); color:var(--ink); text-align:start; }
.app-shell .team-member-list button:hover { border-color:var(--orange); box-shadow:var(--pc-shadow-1); transform:translateY(-1px); }
.app-shell .employee-profile-page { max-width:1320px; margin-inline:auto; padding:clamp(20px,2.6vw,34px); }
.app-shell .employee-profile-page-head { display:grid; grid-template-columns:auto minmax(0,1fr) auto; align-items:center; gap:16px; padding-bottom:20px; border-bottom:1px solid var(--line); }
.app-shell .profile-overview { display:grid; grid-template-columns:minmax(280px,.74fr) minmax(0,1.38fr); gap:18px; margin-top:20px; }
.app-shell .profile-contact,.app-shell .profile-section { border:1px solid var(--line); border-radius:var(--pc-r3); background:var(--surface-2); padding:19px; }
.app-shell .profile-data-grid,.app-shell .profile-metrics { display:grid; grid-template-columns:repeat(auto-fit,minmax(160px,1fr)); gap:10px; }
.app-shell .profile-data-grid > *,.app-shell .profile-metrics > * { min-height:88px; padding:14px; border:1px solid var(--line); border-radius:var(--pc-r2); background:var(--surface); }
.app-shell .profile-data-grid strong,.app-shell .profile-metrics strong { display:block; margin-top:8px; color:var(--ink); font-size:1.04rem; overflow-wrap:anywhere; }
.app-shell .profile-tabs { display:flex; gap:4px; margin:18px 0 12px; padding:4px; overflow:auto; border:1px solid var(--line); border-radius:var(--pc-r2); background:var(--surface-2); }
.app-shell .profile-tabs button { min-height:38px; padding:7px 13px; white-space:nowrap; border:0; border-radius:7px; background:transparent; color:var(--muted); }
.app-shell .profile-tabs button.active { background:var(--surface); color:var(--ink); font-weight:730; box-shadow:0 1px 5px rgba(0,0,0,.07); }

/* ---------- Requests, reports, settings and notifications ---------- */
.app-shell .requests-list,.app-shell .settings-grid,.app-shell .reports-grid,.app-shell .notifications { display:grid; gap:12px; }
.app-shell .requests-list { grid-template-columns:repeat(auto-fit,minmax(330px,1fr)); }
.app-shell .request-card { position:relative; min-height:154px; padding:19px; border:1px solid var(--line); border-radius:var(--pc-r3); background:var(--surface); box-shadow:var(--pc-shadow-1); }
.app-shell .request-card::before { content:""; position:absolute; inset-block:14px; inset-inline-start:0; width:3px; border-radius:3px; background:var(--blue); }
.app-shell .settings-grid,.app-shell .reports-grid { grid-template-columns:repeat(auto-fit,minmax(300px,1fr)); }
.app-shell .report-download { display:flex; align-items:center; justify-content:center; gap:8px; }
.app-shell .notification-popover,.app-shell .account-menu { position:absolute; z-index:90; width:min(370px,calc(100vw - 28px)); margin-top:8px; overflow:hidden; border:1px solid var(--line); border-radius:var(--pc-r3); background:var(--surface); box-shadow:var(--pc-shadow-2); }
.app-shell .notification-popover-list { max-height:420px; overflow:auto; }
.app-shell .notification-popover-list button,.app-shell .notifications > * { width:100%; padding:14px 16px; border:0; border-bottom:1px solid var(--line); background:var(--surface); color:var(--ink); text-align:start; }
.app-shell .notification-popover-list button:hover { background:var(--surface-2); }
.app-shell .health-checks { border-top:4px solid var(--green); }

/* ---------- Interaction polish ---------- */
.app-shell :where(.card,.panel,.stat,.request-card,.setting-card,.team-member-list button) {
  transition:transform var(--pc-fast),border-color var(--pc-fast),box-shadow var(--pc-fast),background var(--pc-fast);
}
.app-shell :where(.card,.panel,.stat,.request-card,.setting-card):hover {
  border-color:color-mix(in srgb,var(--green) 30%,var(--line));
  box-shadow:0 2px 5px rgba(21,33,38,.04),0 22px 54px rgba(21,33,38,.09);
}
.app-shell .request-card:hover,.app-shell .stat:hover,.app-shell .setting-card:hover { transform:translateY(-2px); }
.app-shell .schedule-wrap,.app-shell .coverage-board,.app-shell .leave-calendar { isolation:isolate; }
.app-shell .log-table-wrap { overflow:hidden; }
.app-shell .log-table-wrap > .log-table { min-width:920px; }
.app-shell .table-pagination { display:flex; align-items:center; justify-content:center; gap:10px; padding:15px; border-top:1px solid var(--line); }
.app-shell .table-pagination button { min-height:36px; padding:6px 12px; border:1px solid var(--line); border-radius:var(--pc-r2); background:var(--surface); }
.app-shell .table-pagination span { color:var(--muted); font-size:.8rem; }

/* ---------- Dialogs, messages and login ---------- */
.app-shell .modal-backdrop { position:fixed; inset:0; z-index:100; display:grid; place-items:center; padding:20px; background:rgba(16,11,17,.62); backdrop-filter:blur(6px); }
.app-shell .modal { width:min(720px,100%); max-height:min(88vh,900px); padding:0; overflow:hidden auto; border:1px solid var(--line-strong); border-radius:var(--pc-r4); background:var(--surface); box-shadow:var(--pc-shadow-2); }
.app-shell .modal-head { position:sticky; top:0; z-index:2; display:flex; align-items:center; justify-content:space-between; gap:12px; padding:18px 20px; border-bottom:1px solid var(--line); background:var(--surface); }
.app-shell .modal > :not(.modal-head) { margin-inline:20px; }
.app-shell .modal-actions { position:sticky; bottom:0; display:flex; justify-content:flex-end; gap:8px; margin:20px 0 0!important; padding:14px 20px; border-top:1px solid var(--line); background:var(--surface); }
.app-shell .toast { position:fixed; inset-inline-start:24px; bottom:24px; z-index:150; display:grid; grid-template-columns:28px minmax(0,1fr); align-items:center; gap:10px; width:min(420px,calc(100vw - 32px)); padding:13px 15px; border:1px solid color-mix(in srgb,var(--green) 45%,var(--line)); border-radius:var(--pc-r2); background:var(--surface); color:var(--ink); box-shadow:var(--pc-shadow-2); }
.app-shell .toast > span { display:grid; place-items:center; width:28px; height:28px; border-radius:50%; background:var(--green-soft); color:var(--green); font-weight:800; }
.app-shell .toast.error { border-color:var(--red); }
.app-shell .toast.error > span { background:var(--red-soft); color:var(--red); }
.login-page,.system-state-page {
  min-height:100vh;
  color:#272128;
  font-family:"Segoe UI Variable Text","Noto Sans Arabic","Segoe UI",Tahoma,sans-serif;
  text-rendering:optimizeLegibility;
  -webkit-font-smoothing:antialiased;
}
.login-page {
  position:relative;
  display:grid;
  grid-template-columns:minmax(480px,1.08fr) minmax(430px,.92fr);
  overflow:hidden;
  direction:rtl;
  background:#f6f2ef;
}
.login-page::before {
  content:"";
  position:absolute;
  inset:0;
  z-index:0;
  pointer-events:none;
  background:
    linear-gradient(rgba(73,47,67,.035) 1px,transparent 1px),
    linear-gradient(90deg,rgba(73,47,67,.035) 1px,transparent 1px);
  background-size:36px 36px;
  mask-image:linear-gradient(90deg,transparent 38%,#000 100%);
}
.login-panel {
  position:relative;
  isolation:isolate;
  z-index:1;
  display:flex;
  flex-direction:column;
  min-height:100vh;
  padding:clamp(34px,5vw,78px) clamp(34px,7vw,112px);
  overflow:hidden;
  color:#fffaf8;
  background:
    radial-gradient(circle at 14% 86%,rgba(244,115,73,.25) 0 7%,transparent 30%),
    radial-gradient(circle at 92% 12%,rgba(120,184,165,.17) 0 8%,transparent 32%),
    linear-gradient(145deg,#2d1932 0%,#3e1e42 48%,#182c2b 125%);
}
.login-panel::before {
  content:"";
  position:absolute;
  inset:22px;
  z-index:-1;
  border:1px solid rgba(255,255,255,.11);
  border-radius:32px;
  pointer-events:none;
}
.login-panel::after {
  content:"";
  position:absolute;
  inset-inline-start:-160px;
  bottom:-190px;
  z-index:-1;
  width:520px;
  height:520px;
  border:108px solid rgba(255,255,255,.035);
  border-radius:50%;
  box-shadow:0 0 0 1px rgba(255,255,255,.035),0 0 0 72px rgba(255,255,255,.018);
}
.login-panel > .brand { position:relative; z-index:1; width:max-content; color:#fff; }
.login-panel > .brand .brand-mark { width:54px; height:54px; border-radius:17px; box-shadow:0 16px 34px rgba(10,4,12,.32); }
.login-panel > .brand strong { font-size:1.18rem; }
.login-panel > .brand small { color:rgba(255,250,248,.68); letter-spacing:.15em; }
.login-copy {
  position:relative;
  z-index:1;
  width:min(650px,100%);
  margin:auto 0;
}
.login-copy .eyebrow {
  display:inline-flex;
  align-items:center;
  gap:8px;
  margin-bottom:18px;
  color:#ff9b79;
  font-size:.76rem;
  font-weight:850;
  letter-spacing:.02em;
}
.login-copy .eyebrow::before { content:""; width:28px; height:2px; border-radius:2px; background:#ff7c52; }
.login-copy h1 {
  margin:0;
  max-width:680px;
  color:#fffaf8;
  font-family:"Segoe UI Variable Display","Noto Sans Arabic","Segoe UI",Tahoma,sans-serif;
  font-size:clamp(3.15rem,5.2vw,5.9rem);
  font-weight:720;
  line-height:1.04;
  letter-spacing:-.055em;
  text-wrap:balance;
}
.login-copy p {
  max-width:520px;
  margin:25px 0 0;
  color:rgba(255,250,248,.72);
  font-size:clamp(.98rem,1.15vw,1.14rem);
  line-height:1.9;
}
.login-highlights {
  position:relative;
  z-index:1;
  display:flex;
  flex-wrap:wrap;
  gap:9px;
  padding-top:28px;
  border-top:1px solid rgba(255,255,255,.11);
}
.login-highlights span {
  padding:9px 12px;
  border:1px solid rgba(255,255,255,.11);
  border-radius:999px;
  background:rgba(255,255,255,.055);
  color:rgba(255,250,248,.84);
  font-size:.77rem;
  backdrop-filter:blur(8px);
}
.login-card-wrap {
  position:relative;
  z-index:1;
  display:grid;
  place-items:center;
  min-height:100vh;
  padding:clamp(28px,5vw,72px);
  background:
    radial-gradient(circle at 84% 12%,rgba(114,169,153,.17),transparent 21rem),
    radial-gradient(circle at 14% 90%,rgba(237,104,65,.11),transparent 22rem),
    rgba(255,253,251,.78);
}
.login-card-wrap::before {
  content:"PARTNER CARE  /  OPERATIONS";
  position:absolute;
  inset-inline-end:clamp(24px,4vw,64px);
  bottom:clamp(20px,3vw,44px);
  color:rgba(75,52,70,.28);
  font:750 .62rem/1 "Cascadia Mono",Consolas,monospace;
  letter-spacing:.18em;
}
.login-card {
  position:relative;
  width:min(450px,100%);
  padding:clamp(32px,4vw,52px);
  overflow:hidden;
  border:1px solid #ded4db;
  border-radius:30px;
  background:rgba(255,254,253,.94);
  box-shadow:0 34px 100px rgba(48,29,45,.14),0 2px 8px rgba(48,29,45,.04);
  text-align:center;
  backdrop-filter:blur(18px);
}
.login-card::before {
  content:"";
  position:absolute;
  inset:0 0 auto;
  height:5px;
  background:linear-gradient(90deg,#ed6841 0 43%,#8a557f 43% 72%,#5d9d8b 72%);
}
.login-language { position:absolute; top:22px; inset-inline-end:22px; z-index:3; }
.login-card .language-button {
  min-width:44px;
  min-height:40px;
  border:1px solid #d9ced6;
  border-radius:11px;
  background:#fff;
  color:#4d2d52;
  box-shadow:none;
}
.login-card .language-button:hover { border-color:#ed6841; color:#b74929; background:#fff8f4; }
.mini-logo { display:flex; justify-content:center; margin:2px 0 24px; color:#fff; }
.mini-logo .brand > div:last-child { display:none; }
.mini-logo .brand-mark { width:60px; height:60px; border-radius:18px; box-shadow:0 15px 32px rgba(48,24,51,.22); }
.login-card h2 {
  margin:0;
  color:#2d2530;
  font-family:"Segoe UI Variable Display","Noto Sans Arabic","Segoe UI",Tahoma,sans-serif;
  font-size:2rem;
  font-weight:720;
  letter-spacing:-.035em;
}
.login-card > p { margin:8px 0 25px; color:#716871; font-size:.96rem; }
.google-button {
  width:100%;
  min-height:54px;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:12px;
  padding:12px 17px;
  border:1px solid #d8cfd6;
  border-radius:14px;
  background:#fff;
  color:#2c242d;
  font-weight:760;
  text-decoration:none;
  box-shadow:0 6px 18px rgba(45,27,43,.045);
  transition:transform .16s ease,border-color .16s ease,box-shadow .16s ease;
}
.google-button:hover { transform:translateY(-1px); border-color:#9f7a9e; box-shadow:0 10px 24px rgba(45,27,43,.09); }
.google-button:focus-visible,.login-card :where(button,a,input):focus-visible { outline:3px solid rgba(237,104,65,.24); outline-offset:3px; }
.google-g { color:#4285f4; font-size:1.2rem; font-weight:900; }
.login-card > small { display:block; margin-top:17px; color:#756b75; font-size:.76rem; }
.login-error { margin:0 0 15px; padding:11px 13px; border:1px solid #edc8ce; border-radius:11px; background:#fae9eb; color:#a23f4c; font-size:.76rem; font-weight:760; line-height:1.65; }
.demo-note { margin-top:23px; padding:11px 13px; border:1px solid #f4d6ca; border-radius:11px; background:#fff0e9; color:#8b3b26; font-size:.7rem; line-height:1.6; }
.employee-activation { border-color:#e4d9df; background:linear-gradient(145deg,#fffaf7,#fcf8fb); box-shadow:none; }
.system-state-page {
  display:grid;
  place-items:center;
  padding:24px;
  background:radial-gradient(circle at 12% 8%,#e6eee9,transparent 34rem),radial-gradient(circle at 88% 92%,#f3e7e4,transparent 30rem),#f7f4f1;
}
.system-state-card { width:min(500px,100%); padding:40px; border:1px solid #e0d8de; border-radius:28px; background:#fffefd; box-shadow:0 30px 90px rgba(47,29,45,.14); }

/* ---------- Mobile and accessibility ---------- */
.app-shell .mobile-primary-nav { display:none; }
.app-shell .scrim { display:none; }
@media (max-width:1120px) {
  .app-shell .sidebar { width:218px; }
  .app-shell .workspace { margin-inline-start:218px; }
  body[data-locale="ar"] .app-shell .workspace { margin-inline-start:0; margin-right:218px; }
  .app-shell .topbar { grid-template-columns:auto minmax(140px,1fr) auto; }
  .app-shell .beta-notice small { display:none; }
  .app-shell .dashboard-grid,.app-shell .profile-overview { grid-template-columns:1fr; }
  .app-shell .team-roster-grid { grid-template-columns:1fr; }
}
@media (max-width:820px) {
  .login-page { grid-template-columns:1fr; overflow:auto; background:#f7f3f0; }
  .login-panel { min-height:42vh; padding:30px 24px 78px; }
  .login-panel::before { inset:12px; border-radius:22px; }
  .login-panel > .brand .brand-mark { width:46px; height:46px; border-radius:14px; }
  .login-copy { margin:46px 0 18px; }
  .login-copy .eyebrow { margin-bottom:12px; }
  .login-copy h1 { max-width:480px; font-size:clamp(2.45rem,10vw,3.8rem); letter-spacing:-.045em; }
  .login-copy p { margin-top:17px; font-size:.9rem; line-height:1.75; }
  .login-highlights { display:none; }
  .login-card-wrap { min-height:58vh; padding:0 16px 40px; background:#f7f3f0; }
  .login-card-wrap::before { display:none; }
  .login-card { margin-top:-50px; padding:34px 22px 28px; border-radius:24px; }
  .login-language { top:16px; inset-inline-end:16px; }
  .mini-logo .brand-mark { width:52px; height:52px; }
  .app-shell { padding-bottom:72px; }
  .app-shell .sidebar { width:min(292px,86vw); transform:translateX(-110%); transition:transform .22s ease; }
  body[data-locale="ar"] .app-shell .sidebar { transform:translateX(110%); }
  .app-shell .sidebar.open { transform:translateX(0); }
  .app-shell .workspace,body[data-locale="ar"] .app-shell .workspace { margin:0; }
  .app-shell .scrim { position:fixed; inset:0; z-index:45; display:block; border:0; background:rgba(10,14,15,.56); backdrop-filter:blur(3px); }
  .app-shell .menu-button { display:grid; place-items:center; }
  .app-shell .topbar { grid-template-columns:42px minmax(0,1fr) auto; min-height:64px; padding:9px 12px; }
  .app-shell .topbar-title small,.app-shell .beta-notice,.app-shell .role-demo,.app-shell .account-anchor { display:none; }
  .app-shell .content { padding:24px 14px 40px; }
  .app-shell .page-heading { align-items:flex-start; flex-direction:column; gap:12px; }
  .app-shell .page-heading h1 { font-size:2.08rem; }
  .app-shell .welcome-row { grid-template-columns:1fr; }
  .app-shell .stats-grid,.app-shell .metrics-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .app-shell .requests-list,.app-shell .settings-grid,.app-shell .reports-grid { grid-template-columns:1fr; }
  .app-shell .employee-toolbar { grid-template-columns:1fr; }
  .app-shell .schedule-matrix-header { grid-template-columns:1fr; align-items:start; padding:17px 15px 14px; }
  .app-shell .schedule-legend { justify-content:flex-start; }
  .app-shell .mobile-primary-nav { position:fixed; inset-inline:0; bottom:0; z-index:80; display:grid; grid-template-columns:repeat(4,1fr); padding:7px max(8px,env(safe-area-inset-right)) calc(7px + env(safe-area-inset-bottom)) max(8px,env(safe-area-inset-left)); border-top:1px solid var(--line); background:color-mix(in srgb,var(--surface) 97%,transparent); box-shadow:0 -10px 26px rgba(15,12,16,.12); backdrop-filter:blur(12px); }
  .app-shell .mobile-primary-nav button { position:relative; display:grid; place-items:center; gap:2px; min-height:48px; border:0; border-radius:var(--pc-r2); background:transparent; color:var(--muted); }
  .app-shell .mobile-primary-nav button.active { background:var(--purple-soft); color:var(--purple-2); }
  .app-shell .mobile-primary-nav em { position:absolute; top:0; inset-inline-end:18%; min-width:18px; border-radius:10px; background:var(--orange); color:#fff; font-size:.6rem; font-style:normal; }
  .app-shell .modal-backdrop { align-items:end; padding:0; }
  .app-shell .modal { width:100%; max-height:92vh; border-radius:22px 22px 0 0; }
  .app-shell .coverage-strip { grid-template-columns:repeat(7,minmax(175px,1fr)); }
}
@media (max-width:520px) {
  .app-shell .top-actions { gap:4px; }
  .app-shell .top-actions > button,.app-shell .language-switch button { min-width:36px; min-height:36px; }
  .app-shell .stats-grid,.app-shell .metrics-grid { grid-template-columns:1fr 1fr; gap:8px; }
  .app-shell .stat { min-height:98px; padding:13px; }
  .app-shell .daily-inspiration { padding:21px 18px; }
  .app-shell .profile-data-grid,.app-shell .profile-metrics { grid-template-columns:1fr; }
  .app-shell .employee-profile-page { border:0; border-radius:0; padding:13px; }
}
@media (prefers-reduced-motion:reduce) {
  .app-shell *, .app-shell *::before, .app-shell *::after { scroll-behavior:auto!important; animation-duration:.01ms!important; animation-iteration-count:1!important; transition-duration:.01ms!important; }
}
@media print {
  .app-shell .sidebar,.app-shell .topbar,.app-shell .mobile-primary-nav,.app-shell .concept-credit,.app-shell button { display:none!important; }
  .app-shell .workspace,body[data-locale="ar"] .app-shell .workspace { margin:0!important; }
  .app-shell .content { width:100%; padding:0; }
  .app-shell { background:#fff; color:#000; }
}

/* Partner Care visual system: quiet surfaces, high-contrast semantics, and
   one intentional accent family. This block is the final token authority for
   the application and keeps the light/dark themes visually related. */
.app-shell {
  --canvas: #f6f8f7;
  --surface: #ffffff;
  --surface-2: #edf3f1;
  --surface-3: #e2ebe8;
  --ink: #1c292d;
  --muted: #607277;
  --line: #d6e2df;
  --line-strong: #adbfbb;
  --purple: #5b3c60;
  --purple-2: #44294a;
  --purple-soft: #efe7ef;
  --orange: #f26732;
  --orange-text: #a94324;
  --orange-soft: #fff0e9;
  --green: #20766d;
  --green-soft: #dff1ed;
  --red: #b94954;
  --red-soft: #fae7ea;
  --warning: #8a641a;
  --warning-soft: #fff1d2;
  --blue: #3f7380;
  --blue-soft: #e4f0f2;
  --pc-rail: #1c292d;
  --pc-rail-2: #132023;
  --pc-rail-ink: #f7fbfa;
  --pc-rail-muted: #c2d2cf;
  --pc-nav-active: #e9dfeb;
  --pc-nav-active-ink: #44294a;
  --pc-shadow-1: 0 1px 2px rgba(28, 41, 45, .05), 0 18px 42px rgba(28, 41, 45, .08);
  --pc-shadow-2: 0 24px 72px rgba(28, 41, 45, .14);
}

.app-shell[data-theme="dark"] {
  --canvas: #0d1416;
  --surface: #151e21;
  --surface-2: #1b292d;
  --surface-3: #23353a;
  --ink: #f3f8f7;
  --muted: #b0c2bf;
  --line: #30474c;
  --line-strong: #4a6368;
  --purple: #d1a9d1;
  --purple-2: #e9cfe8;
  --purple-soft: #3a293c;
  --orange: #ff8a61;
  --orange-text: #ffd0be;
  --orange-soft: #472d28;
  --green: #6bcabd;
  --green-soft: #173e3b;
  --red: #f4a0aa;
  --red-soft: #462b31;
  --warning: #e9c77b;
  --warning-soft: #43351f;
  --blue: #95ced7;
  --blue-soft: #203b42;
  --pc-rail: #091215;
  --pc-rail-2: #060d0f;
  --pc-rail-ink: #f8fbfa;
  --pc-rail-muted: #c5d4d1;
  --pc-nav-active: #3a293c;
  --pc-nav-active-ink: #f0d6ef;
  --pc-shadow-1: 0 1px 2px rgba(0, 0, 0, .3), 0 18px 44px rgba(0, 0, 0, .2);
  --pc-shadow-2: 0 26px 80px rgba(0, 0, 0, .45);
}

.app-shell .content { max-width: 1540px; padding: clamp(22px, 3vw, 42px); }
.app-shell .topbar { border-bottom-color: var(--line); background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(16px); }
.app-shell .sidebar { border-inline-end: 1px solid color-mix(in srgb, var(--line) 60%, transparent); box-shadow: var(--pc-shadow-2); }
.app-shell .page-heading { padding: clamp(18px, 2.2vw, 28px); border: 1px solid var(--line); border-radius: var(--pc-r4); background: linear-gradient(135deg, color-mix(in srgb, var(--surface) 94%, transparent), color-mix(in srgb, var(--surface-2) 55%, transparent)); box-shadow: var(--pc-shadow-1); }
.app-shell .page-heading h1 { font-size: clamp(2rem, 3.3vw, 3.1rem); letter-spacing: -.025em; }
.app-shell :where(.card, .toolbar, .schedule-wrap, .coverage-board, .stat, .setting-card, .request-card, .modal) { border-color: var(--line); box-shadow: var(--pc-shadow-1); }
.app-shell :where(button, .primary-button, .secondary, .ghost) { min-height: 42px; border-radius: 12px; transition: transform var(--pc-fast), box-shadow var(--pc-fast), background var(--pc-fast), border-color var(--pc-fast); }
.app-shell :where(button, .primary-button, .secondary, .ghost):hover:not(:disabled) { transform: translateY(-1px); }
.app-shell .schedule-wrap, .app-shell .leave-calendar, .app-shell .coverage-board { overflow: hidden; }
.app-shell .schedule-scroll, .app-shell .leave-calendar { overflow: auto; overscroll-behavior-x: contain; scrollbar-color: var(--line-strong) transparent; }
.app-shell .schedule-table { min-width: 880px; }
.app-shell .schedule-table thead th, .app-shell .schedule-table tbody th { background: var(--surface-2); }
.app-shell .leave-calendar table { min-width: 1060px; }
.app-shell .leave-calendar th:nth-child(3), .app-shell .leave-calendar td:nth-child(3) { min-width: 170px; }
.app-shell .coverage-strip { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.app-shell .coverage-strip > * { min-height: 94px; padding: 16px; }
.app-shell :where(.employee-table, .log-table) { font-size: .88rem; }
.app-shell :where(.employee-table, .log-table) td, .app-shell :where(.employee-table, .log-table) th { padding: 13px 14px; }
.app-shell :where(input, select, textarea):focus-visible { border-color: var(--orange); box-shadow: 0 0 0 4px color-mix(in srgb, var(--orange) 18%, transparent); }

@media (max-width: 820px) {
  .app-shell .content { padding: 18px 12px 86px; }
  .app-shell .page-heading { padding: 18px 16px; }
  .app-shell .coverage-strip { grid-template-columns: repeat(5, minmax(150px, 1fr)); }
  .app-shell .schedule-table { min-width: 760px; }
  .app-shell .leave-calendar table { min-width: 860px; }
  .app-shell .employee-table, .app-shell .log-table { min-width: 700px; }
}

@media (max-width: 520px) {
  .app-shell .page-heading h1 { font-size: 1.85rem; }
  .app-shell .coverage-strip { grid-template-columns: repeat(5, minmax(138px, 1fr)); }
  .app-shell .schedule-table { min-width: 720px; }
}
