/* ==========================================================================
   ميقات — نظام التصميم  (RTL أولًا · داكن افتراضي · فاتح اختياري)
   ========================================================================== */
:root {
  --font: 'Readex Pro', 'Segoe UI', Tahoma, system-ui, sans-serif;
  --grad: linear-gradient(135deg, #22d3ee 0%, #2f8cff 52%, #3b5bff 100%);
  --grad-soft: linear-gradient(135deg, rgba(34, 211, 238, 0.16), rgba(59, 91, 255, 0.16));
  --ok: #34d399;
  --warn: #fbbf24;
  --bad: #fb7185;
  --info: #7aa2ff;
  --r-xl: 26px;
  --r-lg: 20px;
  --r-md: 14px;
  --r-sm: 10px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  color-scheme: dark;
}
:root,
:root[data-theme='dark'] {
  --bg: #060b16;
  --bg-2: #0a1226;
  --surface: rgba(255, 255, 255, 0.045);
  --surface-2: rgba(255, 255, 255, 0.075);
  --surface-solid: #0e1830;
  --line: rgba(255, 255, 255, 0.09);
  --line-2: rgba(255, 255, 255, 0.16);
  --text: #eaf1ff;
  --muted: #93a6c9;
  --faint: #62759b;
  --brand: #4d9bff;
  --brand-ink: #fff;
  --shadow: 0 18px 50px -18px rgba(0, 0, 0, 0.65);
  --glow:
    radial-gradient(60% 50% at 85% -5%, rgba(47, 140, 255, 0.26), transparent 70%),
    radial-gradient(50% 45% at 0% 8%, rgba(34, 211, 238, 0.14), transparent 70%),
    radial-gradient(60% 40% at 50% 110%, rgba(59, 91, 255, 0.16), transparent 70%);
}
:root[data-theme='light'] {
  color-scheme: light;
  --bg: #eef3fb;
  --bg-2: #e6edf8;
  --surface: rgba(255, 255, 255, 0.82);
  --surface-2: #fff;
  --surface-solid: #fff;
  --line: rgba(15, 35, 80, 0.1);
  --line-2: rgba(15, 35, 80, 0.2);
  --text: #0b1736;
  --muted: #566a8f;
  --faint: #8a9bba;
  --brand: #1f66e5;
  --shadow: 0 14px 40px -16px rgba(20, 50, 110, 0.28);
  --glow:
    radial-gradient(60% 45% at 90% -5%, rgba(47, 140, 255, 0.2), transparent 70%),
    radial-gradient(50% 40% at 0% 5%, rgba(34, 211, 238, 0.16), transparent 70%);
  --ok: #0f9f6e;
  --warn: #c98a00;
  --bad: #e0405a;
  --info: #3b6fe0;
}
* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}
html {
  scroll-padding-top: calc(var(--safe-t) + 80px);
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font: 400 15px/1.75 var(--font);
  overscroll-behavior-y: none;
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: var(--glow);
  pointer-events: none;
  z-index: 0;
}
body.no-scroll {
  overflow: hidden;
}
#app,
#toasts,
.overlay {
  position: relative;
  z-index: 1;
}
h1,
h2,
h3,
h4 {
  margin: 0;
  font-weight: 600;
  line-height: 1.35;
}
p {
  margin: 0 0 10px;
}
a {
  color: var(--brand);
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
.ic {
  flex-shrink: 0;
  display: inline-block;
  vertical-align: middle;
}
.muted {
  color: var(--muted);
}
.faint {
  color: var(--faint);
}
.sm {
  font-size: 13px;
}
.xs {
  font-size: 12px;
}
.num {
  font-variant-numeric: tabular-nums;
  direction: ltr;
  unicode-bidi: isolate;
  display: inline-block;
}
td.num,
th.num {
  display: table-cell;
  text-align: center;
}
.hint {
  font-size: 12px;
  color: var(--faint);
  font-weight: 400;
  line-height: 1.7;
}
.row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.row > * {
  flex: 1;
  min-width: 140px;
}
.stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.grow {
  flex: 1;
}
.center {
  text-align: center;
}
.hidden {
  display: none !important;
}
[hidden] {
  display: none !important;
}
