/* DAR web: DAR design tokens (packages/theme/tokens.json) with the company's colour as the accent (brand.js sets
   --accent, --on-accent, --accent-pressed, --accent-soft). IBM Plex Sans (Arabic) when installed, system font otherwise. */
:root {
  --accent: #0866FF; --on-accent: #FFFFFF; --accent-pressed: #004CCB; --accent-soft: #EAF2FF;
  --bg: #F3F8FD; --surface: #FFFFFF; --surface-alt: #F0F4F8; --text: #102638; --muted: #52647A; --line: #D8E2ED; --border: #7A8AA0;
  --ok: #087443; --ok-soft: #E8F7EF; --warn: #855400; --warn-soft: #FFF4DC; --bad: #B42318; --bad-soft: #FDECEA;
  --r-sm: 8px; --r-md: 12px; --r-lg: 16px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--text); font: 15px/1.55 "IBM Plex Sans Arabic", "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Tahoma, sans-serif; }
h1 { font-size: 24px; line-height: 32px; margin: 0; font-weight: 600; overflow-wrap: anywhere; }
h2 { font-size: 18px; margin: 0; font-weight: 600; }
p { margin: 0; }
a { color: var(--accent); }
.muted { color: var(--muted); } .small { font-size: 13px; }
.ltr { direction: ltr; unicode-bidi: isolate; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.between { justify-content: space-between; }
.grow { flex: 1; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px; }
input, select { font: inherit; padding: 10px 12px; border-radius: var(--r-sm); border: 1px solid var(--border); background: var(--surface); color: var(--text); min-height: 44px; }
input:focus-visible, button:focus-visible, a:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
input[type="color"] { padding: 4px; width: 88px; }
input[type="checkbox"] { width: 20px; height: 20px; min-height: 0; accent-color: var(--accent); }
label { font-size: 13px; color: var(--muted); }
button { font: inherit; cursor: pointer; border-radius: var(--r-sm); min-height: 44px; padding: 8px 16px; border: 1px solid transparent; background: var(--accent); color: var(--on-accent); }
button:hover { background: var(--accent-pressed); }
button:disabled { opacity: .5; cursor: default; }
button.secondary { background: var(--surface); color: var(--accent); border-color: var(--accent); }
button.secondary:hover { background: var(--accent-soft); }
button.danger { background: var(--bad); color: #fff; }
button.link { background: none; color: var(--accent); padding: 4px 6px; min-height: 0; border: 0; }
button.row-button { width: 100%; display: flex; justify-content: space-between; background: var(--surface); color: var(--text); border: 1px solid var(--line); text-align: start; }
button.row-button:hover { background: var(--accent-soft); }
.msg { padding: 10px 12px; border-radius: var(--r-sm); }
.msg.error { background: var(--bad-soft); color: var(--bad); }
.msg.ok { background: var(--ok-soft); color: var(--ok); }
.msg.warn { background: var(--warn-soft); color: var(--warn); }
.pill { display: inline-block; padding: 2px 10px; border-radius: 999px; background: var(--ok-soft); color: var(--ok); font-size: 12px; margin-inline-start: 6px; }
.pill.bad { background: var(--bad-soft); color: var(--bad); }
.list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.list > li { padding: 12px 0; border-bottom: 1px solid var(--line); }
.list > li:last-child { border-bottom: 0; }

/* sign in */
.login { max-width: 420px; margin: 8vh auto; padding: 0 16px; }
.login form { gap: 6px; }
.login form button[type="submit"] { margin-top: 10px; }
.mark { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: var(--r-md); background: var(--accent); color: var(--on-accent); font-weight: 700; }
.or { text-align: center; }

/* shell */
.shell { display: grid; grid-template-columns: 260px 1fr; min-height: 100vh; }
.side { min-width: 0; overflow-x: hidden; background: var(--surface); border-inline-end: 1px solid var(--line); padding: 20px 14px; display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.brand { display: flex; gap: 10px; align-items: center; padding: 4px 8px 16px; min-width: 0; }
.brand > div { min-width: 0; overflow-wrap: anywhere; }
.logo { flex: none; width: 44px; height: 44px; border-radius: var(--r-md); object-fit: contain; background: var(--surface-alt); }
.logo.initial { display: inline-grid; place-items: center; background: var(--accent); color: var(--on-accent); font-weight: 700; font-size: 18px; }
.nav { display: block; padding: 10px 12px; border-radius: var(--r-sm); color: var(--text); text-decoration: none; }
.nav:hover { background: var(--accent-soft); }
.nav.active { background: var(--accent); color: var(--on-accent); }
.nav-title { font-size: 12px; color: var(--muted); padding: 14px 12px 4px; }
.content { padding: 28px; max-width: 1100px; width: 100%; display: flex; flex-direction: column; gap: 16px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px; }
.big { font-size: 32px; font-weight: 600; color: var(--accent); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { padding: 8px 14px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); text-decoration: none; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.tab { padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); color: var(--text); text-decoration: none; background: var(--surface); }
.tab.active { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.scroll { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th, td { padding: 10px 8px; border-bottom: 1px solid var(--line); text-align: start; vertical-align: middle; }
th { color: var(--muted); font-weight: 500; }
td.num { text-align: end; font-variant-numeric: tabular-nums; direction: ltr; }
table.matrix td { text-align: center; }

/* phone: the menu goes on top */
@media (max-width: 760px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; border-inline-end: 0; border-bottom: 1px solid var(--line); padding: 10px; }
  .brand { width: 100%; padding-bottom: 6px; }
  .nav-title, .grow { display: none; }
  .content { padding: 16px; }
}
