/* ═══════════════════════════════════════════════════════════════════════════
   IndoHalal.id — design system
   Palette derived from the mark: deep emerald crescent resolving into a
   turquoise check. Green carries the Islamic and growth reading described in
   filosofi_logo.txt; the turquoise edge carries the digital, forward one.
   ═══════════════════════════════════════════════════════════════════════════ */

:root {
  /* Brand */
  --brand-900: #063D28;
  --brand-800: #0A5C3D;
  --brand-700: #0E7A52;
  --brand-600: #12946A;
  --brand-500: #17A67A;
  --brand-400: #2BC194;
  --brand-300: #5AD8B4;
  --brand-200: #9CE9D3;
  --brand-100: #D3F7EC;
  --brand-50:  #EDFCF7;

  --teal-600: #0FA894;
  --teal-500: #17C4AC;
  --teal-400: #23D6AE;
  --teal-300: #4FE7D4;

  --gradient-brand: linear-gradient(135deg, var(--brand-800) 0%, var(--brand-600) 45%, var(--teal-400) 100%);
  --gradient-soft: linear-gradient(135deg, var(--brand-50) 0%, #F2FDFA 100%);
  --gradient-shine: linear-gradient(120deg, transparent 20%, rgba(79, 231, 212, .28) 50%, transparent 80%);

  /* Neutrals — cool, faintly green-biased so they sit with the brand */
  --ink-900: #0C1A16;
  --ink-800: #14241F;
  --ink-700: #1F332C;
  --ink-600: #33463F;
  --ink-500: #4E635B;
  --ink-400: #6E837B;
  --ink-300: #98A9A2;
  --ink-200: #C4D0CB;
  --ink-100: #E3EAE7;
  --ink-50:  #F2F6F4;

  --surface: #FFFFFF;
  --surface-2: #F7FAF9;
  --surface-3: #EFF4F2;
  --surface-inset: #FBFDFC;
  --border: #E2EAE7;
  --border-strong: #CBD9D4;

  /* Semantic */
  --success: #17A67A;
  --success-bg: #E7F8F1;
  --warning: #B7791F;
  --warning-bg: #FDF6E3;
  --danger: #C0392B;
  --danger-bg: #FDECEA;
  --info: #1B6E9C;
  --info-bg: #E8F3FA;

  /* Type */
  --font-sans: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-arabic: 'Noto Naskh Arabic', 'Amiri', var(--font-sans);
  --font-cjk: 'Noto Sans SC', var(--font-sans);
  --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  --text-xs: .75rem;
  --text-sm: .875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: 2.25rem;
  --text-5xl: 3rem;
  --text-6xl: 3.75rem;

  /* Space */
  --sp-1: .25rem;  --sp-2: .5rem;   --sp-3: .75rem;  --sp-4: 1rem;
  --sp-5: 1.25rem; --sp-6: 1.5rem;  --sp-8: 2rem;    --sp-10: 2.5rem;
  --sp-12: 3rem;   --sp-16: 4rem;   --sp-20: 5rem;   --sp-24: 6rem;

  /* Radius & shadow */
  --r-sm: 6px;  --r-md: 10px;  --r-lg: 14px;  --r-xl: 20px;  --r-2xl: 28px;  --r-full: 999px;

  --shadow-xs: 0 1px 2px rgba(12, 26, 22, .05);
  --shadow-sm: 0 1px 3px rgba(12, 26, 22, .08), 0 1px 2px rgba(12, 26, 22, .04);
  --shadow-md: 0 4px 12px rgba(12, 26, 22, .08), 0 2px 4px rgba(12, 26, 22, .04);
  --shadow-lg: 0 12px 32px rgba(12, 26, 22, .10), 0 4px 8px rgba(12, 26, 22, .04);
  --shadow-xl: 0 24px 56px rgba(12, 26, 22, .14), 0 8px 16px rgba(12, 26, 22, .06);
  --shadow-brand: 0 12px 32px rgba(14, 122, 82, .22);

  --header-h: 72px;
  --container: 1200px;
  --transition: 180ms cubic-bezier(.4, 0, .2, 1);
}

[data-theme="dark"] {
  --surface: #0E1A16;
  --surface-2: #13221D;
  --surface-3: #1A2C26;
  --surface-inset: #101C18;
  --border: #22352E;
  --border-strong: #2E463D;

  --ink-900: #ECF3F0;
  --ink-800: #DDE8E4;
  --ink-700: #C6D5CF;
  --ink-600: #A7BAB3;
  --ink-500: #8B9F98;
  --ink-400: #71857E;
  --ink-300: #566862;
  --ink-200: #3A4B45;
  --ink-100: #26372F;
  --ink-50:  #1A2A24;

  --brand-50: #0F241C;
  --brand-100: #123024;
  --success-bg: #0F2C22;
  --warning-bg: #2C2411;
  --danger-bg: #2C1613;
  --info-bg: #10242F;

  --gradient-soft: linear-gradient(135deg, #0F241C 0%, #10262B 100%);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, .4);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, .45);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, .5);
  --shadow-xl: 0 24px 56px rgba(0, 0, 0, .55);
}

/* ── Reset ─────────────────────────────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; }

* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: 1.65;
  color: var(--ink-700);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

html[lang="ar"] body { font-family: var(--font-arabic); line-height: 1.9; }
html[lang="zh"] body { font-family: var(--font-cjk); }

img, svg, video, canvas { display: block; max-width: 100%; height: auto; }

h1, h2, h3, h4, h5, h6 {
  color: var(--ink-900);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.018em;
  text-wrap: balance;
}

h1 { font-size: clamp(2rem, 1.4rem + 2.6vw, var(--text-5xl)); font-weight: 800; }
h2 { font-size: clamp(1.5rem, 1.15rem + 1.6vw, var(--text-4xl)); }
h3 { font-size: clamp(1.25rem, 1.1rem + .7vw, var(--text-2xl)); }
h4 { font-size: var(--text-xl); }
h5 { font-size: var(--text-lg); }

p { text-wrap: pretty; }

a { color: var(--brand-700); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--brand-600); }

:focus-visible {
  outline: 2px solid var(--brand-500);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: none; padding: 0; }

ul, ol { padding-inline-start: 1.25rem; }

hr { border: 0; border-top: 1px solid var(--border); margin: var(--sp-8) 0; }

::selection { background: var(--brand-200); color: var(--brand-900); }

/* ── Layout ────────────────────────────────────────────────────────────── */

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--sp-5);
}
.container-narrow { max-width: 820px; }
.container-wide { max-width: 1400px; }

.main { flex: 1 0 auto; }

.section { padding-block: clamp(3rem, 2rem + 5vw, var(--sp-24)); }
.section-sm { padding-block: clamp(2rem, 1.5rem + 3vw, var(--sp-16)); }
.section-tint { background: var(--surface-2); }
.section-soft { background: var(--gradient-soft); }

.stack { display: flex; flex-direction: column; }
.stack-1 { gap: var(--sp-1); } .stack-2 { gap: var(--sp-2); }
.stack-3 { gap: var(--sp-3); } .stack-4 { gap: var(--sp-4); }
.stack-5 { gap: var(--sp-5); } .stack-6 { gap: var(--sp-6); }
.stack-8 { gap: var(--sp-8); } .stack-10 { gap: var(--sp-10); }
.stack-12 { gap: var(--sp-12); }

.row { display: flex; align-items: center; gap: var(--sp-3); flex-wrap: wrap; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4); flex-wrap: wrap; }
.row-tight { gap: var(--sp-2); }
.row-nowrap { flex-wrap: nowrap; }

.grid { display: grid; gap: var(--sp-6); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.grid-sidebar { grid-template-columns: minmax(0, 1fr) 320px; }

@media (max-width: 960px) {
  .grid-sidebar { grid-template-columns: 1fr; }
}

.spacer { flex: 1; }
.text-center { text-align: center; }
.mx-auto { margin-inline: auto; }
.hide { display: none !important; }

@media (max-width: 768px) { .hide-mobile { display: none !important; } }
@media (min-width: 769px) { .hide-desktop { display: none !important; } }

/* ── Type helpers ──────────────────────────────────────────────────────── */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--brand-600);
}

.lead { font-size: clamp(1.0625rem, 1rem + .35vw, var(--text-xl)); color: var(--ink-500); line-height: 1.6; }
.muted { color: var(--ink-400); }
.small { font-size: var(--text-sm); }
.tiny { font-size: var(--text-xs); }
.strong { font-weight: 700; color: var(--ink-900); }
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.nums { font-variant-numeric: tabular-nums; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.clamp-3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

.gradient-text {
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.section-head { max-width: 720px; margin-bottom: var(--sp-10); }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head h2 { margin-block: var(--sp-3) var(--sp-3); }

/* ── Buttons ───────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  padding: .7rem 1.35rem;
  border-radius: var(--r-full);
  font-size: var(--text-sm);
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  border: 1.5px solid transparent;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.btn:disabled, .btn[aria-disabled="true"] { opacity: .55; pointer-events: none; }
.btn:active { transform: translateY(0) scale(.985); }

.btn-primary {
  background: var(--gradient-brand);
  color: #fff;
  box-shadow: var(--shadow-brand);
}
.btn-primary:hover { color: #fff; transform: translateY(-1px); box-shadow: 0 16px 36px rgba(14, 122, 82, .3); }
.btn-primary:active { transform: translateY(0); }

.btn-solid { background: var(--brand-700); color: #fff; }
.btn-solid:hover { background: var(--brand-800); color: #fff; }

.btn-outline { border-color: var(--border-strong); color: var(--ink-700); background: var(--surface); }
.btn-outline:hover { border-color: var(--brand-500); color: var(--brand-700); background: var(--brand-50); }

.btn-ghost { color: var(--ink-600); }
.btn-ghost:hover { background: var(--surface-3); color: var(--ink-900); }

.btn-light { background: rgba(255, 255, 255, .16); color: #fff; border-color: rgba(255, 255, 255, .3); backdrop-filter: blur(8px); }
.btn-light:hover { background: rgba(255, 255, 255, .26); color: #fff; }

.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #A93226; color: #fff; }

.btn-sm { padding: .45rem .9rem; font-size: var(--text-xs); }
.btn-lg { padding: .95rem 1.9rem; font-size: var(--text-base); }
.btn-block { width: 100%; }
.btn-icon { padding: .55rem; width: 2.4rem; height: 2.4rem; border-radius: var(--r-full); }

/* ── Cards ─────────────────────────────────────────────────────────────── */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--sp-6);
}

.card-flat { border-radius: var(--r-lg); background: var(--surface-2); padding: var(--sp-6); }

/* The plan a pricing table wants to nudge someone toward (billing.ejs). */
.card-highlight { border-color: var(--brand-400); box-shadow: 0 0 0 1px var(--brand-400); }

.card-hover { transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition); }
.card-hover:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--brand-200); }

.card-media { padding: 0; overflow: hidden; }
.card-media img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.card-media .card-body { padding: var(--sp-5); }

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.panel-head {
  padding: var(--sp-4) var(--sp-5);
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); flex-wrap: wrap;
}
.panel-head h3, .panel-head h2 { font-size: var(--text-base); margin: 0; }
.panel-body { padding: var(--sp-5); }
.panel-foot { padding: var(--sp-4) var(--sp-5); border-top: 1px solid var(--border); background: var(--surface-2); }

/* ── Badges & chips ────────────────────────────────────────────────────── */

.badge {
  display: inline-flex;
  align-items: center;
  gap: .35em;
  padding: .22em .7em;
  border-radius: var(--r-full);
  font-size: var(--text-xs);
  font-weight: 700;
  line-height: 1.5;
  background: var(--surface-3);
  color: var(--ink-600);
  white-space: nowrap;
}
.badge-brand { background: var(--brand-100); color: var(--brand-800); }
.badge-success { background: var(--success-bg); color: var(--success); }
.badge-warning { background: var(--warning-bg); color: var(--warning); }
.badge-danger { background: var(--danger-bg); color: var(--danger); }
.badge-info { background: var(--info-bg); color: var(--info); }
.badge-outline { background: transparent; border: 1px solid var(--border-strong); }
.badge-dot::before { content: ''; width: .45em; height: .45em; border-radius: 50%; background: currentColor; }

.chip {
  display: inline-flex; align-items: center; gap: var(--sp-2);
  padding: .4rem .85rem;
  border: 1.5px solid var(--border-strong);
  border-radius: var(--r-full);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--ink-600);
  background: var(--surface);
  transition: all var(--transition);
}
.chip:hover { border-color: var(--brand-400); color: var(--brand-700); }
.chip.is-active { background: var(--brand-700); border-color: var(--brand-700); color: #fff; }

/* A chip wrapping a radio/checkbox — e.g. topic pickers, rating pills.
   The whole pill highlights when selected instead of relying on a bare
   native control to carry the state. */
.chip input[type="checkbox"], .chip input[type="radio"] { width: 1rem; height: 1rem; }
.chip:has(input:checked) { background: var(--brand-50); border-color: var(--brand-600); color: var(--brand-800); }
.chip:has(input:disabled) { opacity: .5; cursor: not-allowed; }

/* A full-width row wrapping a radio/checkbox — e.g. payment method picker. */
.option-row {
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  border: 1.5px solid var(--border-strong);
  border-radius: var(--r-md);
  cursor: pointer;
  transition: all var(--transition);
}
.option-row:hover { border-color: var(--brand-400); }
.option-row:has(input:checked) { border-color: var(--brand-600); background: var(--brand-50); }
.option-row:has(input:disabled) { opacity: .45; cursor: not-allowed; }

/* ── Forms ─────────────────────────────────────────────────────────────── */

.field { display: flex; flex-direction: column; gap: var(--sp-2); }

.label {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--ink-700);
  display: flex; align-items: center; gap: var(--sp-2);
}
.label .req { color: var(--danger); }
.label .opt { color: var(--ink-400); font-weight: 500; font-size: var(--text-xs); }

.input, .select, .textarea {
  width: 100%;
  padding: .7rem .9rem;
  border: 1.5px solid var(--border-strong);
  border-radius: var(--r-md);
  background: var(--surface);
  color: var(--ink-800);
  font-size: var(--text-sm);
  box-shadow: 0 1px 2px rgba(12, 26, 22, .04);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.input::placeholder, .textarea::placeholder { color: var(--ink-300); }

.input:hover, .select:hover, .textarea:hover { border-color: var(--ink-300); }

.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--brand-500);
  box-shadow: 0 0 0 3px var(--brand-100);
}
.input:disabled, .select:disabled, .textarea:disabled {
  background: var(--surface-3);
  border-color: var(--border);
  color: var(--ink-400);
  box-shadow: none;
  cursor: not-allowed;
}

.textarea { resize: vertical; min-height: 7rem; line-height: 1.6; }

.select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236E837B' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right .8rem center;
  padding-inline-end: 2.4rem;
}
[dir="rtl"] .select { background-position: left .8rem center; padding-inline-end: .9rem; padding-inline-start: 2.4rem; }

.hint { font-size: var(--text-xs); color: var(--ink-400); }
.error-text { font-size: var(--text-xs); color: var(--danger); font-weight: 600; }

/* Custom checkbox/radio — consistent look across browsers, everywhere in the
   app (not just inside .check), since accent-color alone renders too
   differently between Chrome/Firefox/Safari to read as "one design". */
input[type="checkbox"], input[type="radio"] {
  appearance: none; -webkit-appearance: none;
  width: 1.15rem; height: 1.15rem; flex-shrink: 0; margin: 0;
  border: 1.5px solid var(--border-strong);
  border-radius: 5px;
  background-color: var(--surface);
  background-repeat: no-repeat;
  background-position: center;
  background-size: 62%;
  cursor: pointer;
  transition: background-color var(--transition), border-color var(--transition), box-shadow var(--transition);
}
input[type="radio"] { border-radius: var(--r-full); }
input[type="checkbox"]:hover, input[type="radio"]:hover { border-color: var(--brand-500); }
input[type="checkbox"]:checked, input[type="radio"]:checked {
  border-color: var(--brand-700);
  background-color: var(--brand-700);
}
input[type="checkbox"]:checked:hover, input[type="radio"]:checked:hover { background-color: var(--brand-800); border-color: var(--brand-800); }
input[type="checkbox"]:checked {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='white' stroke-width='2.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3.5 8.3l3 3 6-6.6'/%3E%3C/svg%3E");
}
input[type="radio"]:checked { background-image: radial-gradient(circle, #fff 32%, transparent 34%); }
input[type="checkbox"]:disabled, input[type="radio"]:disabled { opacity: .5; cursor: not-allowed; }
input[type="checkbox"]:focus-visible, input[type="radio"]:focus-visible { outline: 2px solid var(--brand-500); outline-offset: 2px; }

.check {
  display: flex; align-items: flex-start; gap: var(--sp-3);
  font-size: var(--text-sm); cursor: pointer; line-height: 1.5;
}
.check input[type="checkbox"], .check input[type="radio"] { margin-top: .18rem; }

.switch { display: inline-flex; align-items: center; gap: var(--sp-3); cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch-track {
  width: 2.6rem; height: 1.45rem; border-radius: var(--r-full);
  background: var(--ink-200); position: relative; transition: background var(--transition); flex-shrink: 0;
}
.switch-track::after {
  content: ''; position: absolute; inset-inline-start: 3px; top: 3px;
  width: 1.05rem; height: 1.05rem; border-radius: 50%; background: #fff;
  transition: transform var(--transition); box-shadow: var(--shadow-xs);
}
.switch input:checked + .switch-track { background: var(--brand-600); }
.switch input:checked + .switch-track::after { transform: translateX(1.15rem); }
[dir="rtl"] .switch input:checked + .switch-track::after { transform: translateX(-1.15rem); }
.switch input:focus-visible + .switch-track { outline: 2px solid var(--brand-500); outline-offset: 2px; }

.input-group { display: flex; }
.input-group .input { border-start-end-radius: 0; border-end-end-radius: 0; }
.input-group .btn { border-start-start-radius: 0; border-end-start-radius: 0; }

.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--sp-5); }

/* ── Tables ────────────────────────────────────────────────────────────── */

.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface); }

.table { width: 100%; border-collapse: collapse; font-size: var(--text-sm); }
.table th, .table td { padding: .8rem 1rem; text-align: start; vertical-align: middle; }
.table thead th {
  background: var(--surface-2);
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--ink-500);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.table tbody tr { border-bottom: 1px solid var(--border); }
.table tbody tr:last-child { border-bottom: 0; }
.table tbody tr:hover { background: var(--surface-2); }
.table td.nums, .table th.nums { text-align: end; font-variant-numeric: tabular-nums; }

/* ── Alerts ────────────────────────────────────────────────────────────── */

.alert {
  display: flex; gap: var(--sp-3); align-items: flex-start;
  padding: var(--sp-4);
  border-radius: var(--r-md);
  font-size: var(--text-sm);
  border-inline-start: 3px solid;
  line-height: 1.55;
}
.alert-success { background: var(--success-bg); border-color: var(--success); color: #0B5A40; }
.alert-warning { background: var(--warning-bg); border-color: var(--warning); color: #7A5410; }
.alert-danger { background: var(--danger-bg); border-color: var(--danger); color: #8E2B20; }
.alert-info { background: var(--info-bg); border-color: var(--info); color: #14536F; }

[data-theme="dark"] .alert-success { color: var(--brand-300); }
[data-theme="dark"] .alert-warning { color: #E5C67C; }
[data-theme="dark"] .alert-danger { color: #E89A90; }
[data-theme="dark"] .alert-info { color: #8FC5E0; }

.flash-stack {
  position: fixed;
  top: calc(var(--header-h) + var(--sp-4));
  inset-inline-end: var(--sp-4);
  z-index: 200;
  display: flex; flex-direction: column; gap: var(--sp-3);
  max-width: min(420px, calc(100vw - 2rem));
}
.flash-stack .alert { box-shadow: var(--shadow-lg); background-color: var(--surface); }

/* ── Header ────────────────────────────────────────────────────────────── */

.site-header {
  position: sticky; top: 0; z-index: 100;
  height: var(--header-h);
  background: rgba(255, 255, 255, .86);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow var(--transition), border-color var(--transition);
}
.site-header.is-scrolled { box-shadow: var(--shadow-md); border-bottom-color: transparent; }
[data-theme="dark"] .site-header { background: rgba(14, 26, 22, .88); }

.site-header .container { height: 100%; display: flex; align-items: center; gap: var(--sp-6); }

.brand { display: flex; align-items: center; gap: var(--sp-3); flex-shrink: 0; }
.brand img { width: 38px; height: 38px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-weight: 800; font-size: 1.075rem; color: var(--ink-900); letter-spacing: -.02em; }
.brand-tag { font-size: .65rem; color: var(--ink-400); font-weight: 600; letter-spacing: .04em; }

/* Logo chip — the transparent mark sits on a light tile so it stays legible
   on dark or gradient surfaces (sidebar, footer, auth aside, dark mode). */
.logo-chip {
  display: inline-grid; place-items: center; flex-shrink: 0;
  background: #fff;
  padding: 4px;
  border-radius: var(--r-md);
  box-shadow: 0 0 0 1px rgba(12, 26, 22, .07), var(--shadow-xs);
}
.logo-chip > img { display: block; }
.logo-chip-lg { padding: 10px; border-radius: var(--r-lg); }
.logo-chip-xl { padding: var(--sp-4); border-radius: var(--r-2xl); }

.nav { display: flex; align-items: center; gap: var(--sp-1); }
.nav a {
  padding: .5rem .8rem;
  border-radius: var(--r-md);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--ink-600);
  transition: all var(--transition);
  white-space: nowrap;
}
.nav a:hover { background: var(--surface-3); color: var(--ink-900); }
.nav a.is-active { color: var(--brand-700); background: var(--brand-50); }

.header-actions { display: flex; align-items: center; gap: var(--sp-2); margin-inline-start: auto; }

.nav-toggle { display: none; }
@media (max-width: 1080px) {
  .nav { display: none; }
  .nav-toggle { display: inline-flex; }
}

.mobile-nav {
  position: fixed; inset: var(--header-h) 0 0 0; z-index: 99;
  background: var(--surface);
  padding: var(--sp-6) var(--sp-5) var(--sp-12);
  overflow-y: auto;
  transform: translateY(-8px);
  opacity: 0; pointer-events: none;
  transition: opacity var(--transition), transform var(--transition);
}
.mobile-nav.is-open { opacity: 1; transform: none; pointer-events: auto; }
.mobile-nav a {
  display: block; padding: var(--sp-4) var(--sp-2);
  border-bottom: 1px solid var(--border);
  font-weight: 600; color: var(--ink-700); font-size: var(--text-lg);
}
.mobile-nav a:hover { color: var(--brand-700); }

/* ── Language switcher ─────────────────────────────────────────────────── */

.lang { position: relative; }
.lang-btn {
  display: inline-flex; align-items: center; gap: var(--sp-2);
  padding: .45rem .7rem;
  border: 1px solid var(--border);
  border-radius: var(--r-full);
  font-size: var(--text-sm); font-weight: 600; color: var(--ink-600);
  background: var(--surface);
  transition: all var(--transition);
}
.lang-btn:hover { border-color: var(--brand-400); color: var(--brand-700); }

.lang-menu {
  position: absolute; top: calc(100% + 8px); inset-inline-end: 0;
  min-width: 190px; padding: var(--sp-2);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-lg);
  display: none; z-index: 120;
}
.lang-menu.is-open { display: block; }
.lang-menu a {
  display: flex; align-items: center; gap: var(--sp-3);
  padding: .55rem .7rem; border-radius: var(--r-sm);
  font-size: var(--text-sm); font-weight: 600; color: var(--ink-700);
}
.lang-menu a:hover { background: var(--surface-3); }
.lang-menu a.is-active { background: var(--brand-50); color: var(--brand-700); }
.lang-menu .flag { font-size: 1.05rem; }

/* ── Hero ──────────────────────────────────────────────────────────────── */

.hero {
  position: relative;
  padding-block: clamp(3rem, 2rem + 6vw, 6.5rem);
  background: var(--gradient-soft);
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; inset-inline-end: -12%; top: -30%;
  width: 60vw; height: 60vw; max-width: 780px; max-height: 780px;
  background: radial-gradient(circle, rgba(35, 214, 174, .18) 0%, transparent 65%);
  pointer-events: none;
}
.hero .container { position: relative; }

.hero-grid { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); gap: var(--sp-12); align-items: center; }
@media (max-width: 960px) { .hero-grid { grid-template-columns: 1fr; gap: var(--sp-8); } }

.hero h1 { margin-block: var(--sp-4) var(--sp-5); }
.hero .lead { margin-bottom: var(--sp-8); max-width: 56ch; }

.hero-actions { display: flex; gap: var(--sp-3); flex-wrap: wrap; align-items: center; }
.hero-note { margin-top: var(--sp-5); font-size: var(--text-sm); color: var(--ink-400); display: flex; align-items: center; gap: var(--sp-2); }

.hero-visual { position: relative; display: grid; place-items: center; }
.hero-visual .logo-chip {
  width: min(100%, 412px);
  padding: var(--sp-4);
  border-radius: var(--r-2xl);
  filter: drop-shadow(0 24px 48px rgba(14, 122, 82, .22));
}
.hero-visual img { width: 100%; height: auto; }

/* ── Countdown ─────────────────────────────────────────────────────────── */

.countdown {
  display: inline-flex; gap: var(--sp-3); flex-wrap: wrap;
  padding: var(--sp-4) var(--sp-5);
  background: var(--surface);
  border: 1px solid var(--brand-200);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
}
.countdown-unit { text-align: center; min-width: 54px; }
.countdown-value {
  font-size: var(--text-2xl); font-weight: 800; color: var(--brand-700);
  font-variant-numeric: tabular-nums; line-height: 1.1;
}
.countdown-label { font-size: var(--text-xs); color: var(--ink-400); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }

/* ── Stats ─────────────────────────────────────────────────────────────── */

.stat-strip {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: var(--sp-6);
  padding: var(--sp-8);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-md);
}
.stat { text-align: center; }
.stat-value {
  font-size: clamp(1.75rem, 1.4rem + 1.4vw, var(--text-4xl));
  font-weight: 800; line-height: 1.1;
  background: var(--gradient-brand);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  font-variant-numeric: tabular-nums;
}
.stat-label { font-size: var(--text-sm); color: var(--ink-400); font-weight: 600; margin-top: var(--sp-1); }

/* ── Feature / service cards ───────────────────────────────────────────── */

.feature-card {
  display: flex; flex-direction: column; gap: var(--sp-4);
  padding: var(--sp-6);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  transition: all var(--transition);
  height: 100%;
}
.feature-card:hover { border-color: var(--brand-300); box-shadow: var(--shadow-lg); transform: translateY(-3px); }

.feature-icon {
  width: 48px; height: 48px;
  display: grid; place-items: center;
  border-radius: var(--r-md);
  background: var(--brand-50);
  color: var(--brand-700);
  flex-shrink: 0;
}
.feature-card h3 { font-size: var(--text-lg); }
.feature-card p { color: var(--ink-500); font-size: var(--text-sm); flex: 1; }

.feature-link { display: inline-flex; align-items: center; gap: var(--sp-2); font-weight: 700; font-size: var(--text-sm); }
.feature-link svg { transition: transform var(--transition); }
.feature-card:hover .feature-link svg { transform: translateX(3px); }
[dir="rtl"] .feature-card:hover .feature-link svg { transform: translateX(-3px) scaleX(-1); }
[dir="rtl"] .feature-link svg { transform: scaleX(-1); }

/* ── Process steps ─────────────────────────────────────────────────────── */

.steps { counter-reset: step; display: grid; gap: var(--sp-6); grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.step { position: relative; padding-top: var(--sp-8); }
.step::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  position: absolute; top: 0; inset-inline-start: 0;
  font-size: var(--text-sm); font-weight: 800;
  color: var(--brand-500); font-variant-numeric: tabular-nums;
  letter-spacing: .06em;
}
.step::after {
  content: ''; position: absolute; top: 10px; inset-inline-start: 34px; inset-inline-end: 0;
  height: 1px; background: linear-gradient(90deg, var(--brand-200), transparent);
}
.step:last-child::after { display: none; }
.step h3 { font-size: var(--text-base); margin-bottom: var(--sp-2); }
.step p { font-size: var(--text-sm); color: var(--ink-500); }

/* ── Article cards ─────────────────────────────────────────────────────── */

.article-card {
  display: flex; flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: all var(--transition);
  height: 100%;
}
.article-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--brand-200); }

.article-thumb {
  aspect-ratio: 16 / 9;
  background: var(--gradient-brand);
  position: relative;
  display: grid; place-items: center;
  overflow: hidden;
}
.article-thumb img { width: 100%; height: 100%; object-fit: cover; }
.article-thumb .placeholder { opacity: .25; }

.article-body { padding: var(--sp-5); display: flex; flex-direction: column; gap: var(--sp-3); flex: 1; }
.article-body h3 { font-size: var(--text-lg); line-height: 1.35; }
.article-body h3 a { color: var(--ink-900); }
.article-body h3 a:hover { color: var(--brand-700); }
.article-meta { display: flex; align-items: center; gap: var(--sp-3); font-size: var(--text-xs); color: var(--ink-400); margin-top: auto; }

/* ── Prose ─────────────────────────────────────────────────────────────── */

.prose { font-size: 1.0625rem; line-height: 1.8; color: var(--ink-600); max-width: 72ch; }
.prose > * + * { margin-top: var(--sp-5); }
.prose h2 { font-size: var(--text-2xl); margin-top: var(--sp-10); color: var(--ink-900); }
.prose h3 { font-size: var(--text-xl); margin-top: var(--sp-8); color: var(--ink-900); }
.prose h4 { font-size: var(--text-lg); margin-top: var(--sp-6); }
.prose ul, .prose ol { padding-inline-start: 1.4rem; }
.prose li + li { margin-top: var(--sp-2); }
.prose a { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1.5px; }
.prose strong { color: var(--ink-900); font-weight: 700; }
.prose blockquote {
  border-inline-start: 3px solid var(--brand-400);
  padding-inline-start: var(--sp-5);
  color: var(--ink-500); font-style: italic;
}
.prose code {
  font-family: var(--font-mono); font-size: .875em;
  background: var(--surface-3); padding: .15em .4em; border-radius: var(--r-sm);
}
.prose pre { background: var(--ink-900); color: var(--ink-50); padding: var(--sp-5); border-radius: var(--r-md); overflow-x: auto; }
.prose pre code { background: none; padding: 0; }
.prose img { border-radius: var(--r-md); }
.prose table { width: 100%; border-collapse: collapse; font-size: var(--text-sm); }
.prose th, .prose td { padding: .65rem .8rem; border: 1px solid var(--border); text-align: start; }
.prose thead th { background: var(--surface-2); font-weight: 700; color: var(--ink-800); }
.prose hr { margin-block: var(--sp-8); }

.prose-wrap { overflow-x: auto; }

/* ── Accordion ─────────────────────────────────────────────────────────── */

.accordion { border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; background: var(--surface); }
.accordion details { border-bottom: 1px solid var(--border); }
.accordion details:last-child { border-bottom: 0; }
.accordion summary {
  padding: var(--sp-5);
  font-weight: 700; color: var(--ink-900); cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4);
  list-style: none; transition: background var(--transition);
}
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary:hover { background: var(--surface-2); }
.accordion summary::after {
  content: ''; width: 10px; height: 10px; flex-shrink: 0;
  border-inline-end: 2px solid var(--ink-400); border-block-end: 2px solid var(--ink-400);
  transform: rotate(45deg); transition: transform var(--transition); margin-top: -4px;
}
.accordion details[open] summary::after { transform: rotate(-135deg); margin-top: 4px; }
.accordion .accordion-body { padding: 0 var(--sp-5) var(--sp-5); color: var(--ink-500); font-size: var(--text-sm); line-height: 1.75; }

/* ── Pagination ────────────────────────────────────────────────────────── */

.pagination { display: flex; align-items: center; justify-content: center; gap: var(--sp-2); flex-wrap: wrap; margin-top: var(--sp-10); }
.pagination a, .pagination span {
  min-width: 2.4rem; height: 2.4rem;
  display: inline-flex; align-items: center; justify-content: center;
  padding-inline: .6rem;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  font-size: var(--text-sm); font-weight: 600; color: var(--ink-600);
  font-variant-numeric: tabular-nums;
}
.pagination a:hover { border-color: var(--brand-400); color: var(--brand-700); background: var(--brand-50); }
.pagination .is-active { background: var(--brand-700); border-color: var(--brand-700); color: #fff; }
.pagination .is-disabled { opacity: .4; pointer-events: none; }

/* ── Empty state ───────────────────────────────────────────────────────── */

.empty { text-align: center; padding: var(--sp-16) var(--sp-5); color: var(--ink-400); }
.empty svg { margin: 0 auto var(--sp-4); opacity: .35; }
.empty h3 { color: var(--ink-600); font-size: var(--text-lg); margin-bottom: var(--sp-2); }

/* ── Breadcrumb ────────────────────────────────────────────────────────── */

.crumbs { display: flex; align-items: center; gap: var(--sp-2); font-size: var(--text-xs); color: var(--ink-400); flex-wrap: wrap; margin-bottom: var(--sp-5); }
.crumbs a { color: var(--ink-500); font-weight: 600; }
.crumbs a:hover { color: var(--brand-700); }
.crumbs .sep { opacity: .5; }

/* ── Footer ────────────────────────────────────────────────────────────── */

.site-footer { background: var(--ink-900); color: var(--ink-200); padding-block: var(--sp-16) var(--sp-6); margin-top: auto; }
[data-theme="dark"] .site-footer { background: #08120F; border-top: 1px solid var(--border); }

.footer-grid { display: grid; grid-template-columns: minmax(240px, 1.5fr) repeat(3, minmax(140px, 1fr)); gap: var(--sp-8); }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }

.site-footer h4 { color: #fff; font-size: var(--text-sm); text-transform: uppercase; letter-spacing: .07em; margin-bottom: var(--sp-4); }
.site-footer a { color: var(--ink-300); font-size: var(--text-sm); }
.site-footer a:hover { color: var(--brand-300); }
.site-footer ul { list-style: none; padding: 0; display: flex; flex-direction: column; gap: var(--sp-3); }
.site-footer .brand-name { color: #fff; }
.site-footer .brand-tag { color: var(--ink-400); }

.footer-bottom {
  margin-top: var(--sp-12); padding-top: var(--sp-6);
  border-top: 1px solid rgba(255, 255, 255, .08);
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4); flex-wrap: wrap;
  font-size: var(--text-xs); color: var(--ink-400);
}

.social-row { display: flex; gap: var(--sp-3); }
.social-row a {
  width: 36px; height: 36px; border-radius: var(--r-full);
  display: grid; place-items: center;
  background: rgba(255, 255, 255, .07);
  color: var(--ink-200);
  transition: all var(--transition);
}
.social-row a:hover { background: var(--brand-600); color: #fff; }

/* ── Chat widget ───────────────────────────────────────────────────────── */

.chat-fab {
  position: fixed; inset-block-end: var(--sp-6); inset-inline-end: var(--sp-6); z-index: 90;
  width: 56px; height: 56px; border-radius: var(--r-full);
  background: var(--gradient-brand); color: #fff;
  display: grid; place-items: center;
  box-shadow: var(--shadow-brand);
  transition: transform var(--transition);
}
.chat-fab:hover { transform: scale(1.06); color: #fff; }
.chat-fab .dot {
  position: absolute; top: 2px; inset-inline-end: 2px;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--teal-300); border: 2px solid var(--surface);
}

.chat-panel {
  position: fixed; inset-block-end: calc(var(--sp-6) + 68px); inset-inline-end: var(--sp-6); z-index: 91;
  width: min(380px, calc(100vw - 2rem));
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
  display: none;
}
.chat-panel.is-open { display: block; }
.chat-panel-head { padding: var(--sp-5); background: var(--gradient-brand); color: #fff; }
.chat-panel-head h4 { color: #fff; font-size: var(--text-base); }
.chat-panel-head p { font-size: var(--text-xs); opacity: .88; margin-top: 2px; }
.chat-panel-body { padding: var(--sp-5); max-height: 60vh; overflow-y: auto; }

/* ── Chat thread ───────────────────────────────────────────────────────── */

.thread { display: flex; flex-direction: column; gap: var(--sp-4); padding: var(--sp-5); }

.msg { display: flex; gap: var(--sp-3); max-width: 78%; }
.msg-avatar {
  width: 34px; height: 34px; border-radius: var(--r-full); flex-shrink: 0;
  background: var(--brand-100); color: var(--brand-700);
  display: grid; place-items: center; font-weight: 700; font-size: var(--text-xs);
  overflow: hidden;
}
.msg-avatar img { width: 100%; height: 100%; object-fit: cover; }
.msg-bubble {
  padding: .7rem 1rem;
  border-radius: var(--r-lg);
  background: var(--surface-3);
  font-size: var(--text-sm);
  line-height: 1.6;
  word-break: break-word;
}
.msg-time { font-size: var(--text-xs); color: var(--ink-400); margin-top: var(--sp-1); }

.msg.is-mine { margin-inline-start: auto; flex-direction: row-reverse; }
.msg.is-mine .msg-bubble { background: var(--brand-700); color: #fff; }
.msg.is-mine .msg-time { text-align: end; }
.msg.is-system { max-width: 100%; justify-content: center; }
.msg.is-system .msg-bubble {
  background: var(--warning-bg); color: var(--warning);
  font-size: var(--text-xs); text-align: center; border-radius: var(--r-full);
}
.msg.is-internal .msg-bubble { background: var(--warning-bg); border: 1px dashed var(--warning); color: var(--ink-700); }

.msg-attachment {
  display: flex; align-items: center; gap: var(--sp-2);
  margin-top: var(--sp-2); padding: var(--sp-2) var(--sp-3);
  background: rgba(0, 0, 0, .06); border-radius: var(--r-md);
  font-size: var(--text-xs); font-weight: 600;
}
.msg-attachment img { border-radius: var(--r-sm); max-height: 200px; }

.composer {
  display: flex; gap: var(--sp-3); align-items: flex-end;
  padding: var(--sp-4);
  border-top: 1px solid var(--border);
  background: var(--surface-2);
}
.composer .textarea { min-height: 2.7rem; max-height: 9rem; resize: none; }

.typing { font-size: var(--text-xs); color: var(--brand-600); font-style: italic; padding-inline: var(--sp-5); height: 1.2rem; }

/* ── Price cards ───────────────────────────────────────────────────────── */

.price-card {
  display: flex; flex-direction: column; gap: var(--sp-5);
  padding: var(--sp-6);
  border: 1.5px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--surface);
  position: relative;
  height: 100%;
}
.price-card.is-popular { border-color: var(--brand-500); box-shadow: var(--shadow-lg); }
.price-card .ribbon {
  position: absolute; top: -11px; inset-inline-start: var(--sp-6);
  padding: .2rem .7rem; border-radius: var(--r-full);
  background: var(--gradient-brand); color: #fff;
  font-size: var(--text-xs); font-weight: 700;
}
.price-value { font-size: var(--text-3xl); font-weight: 800; color: var(--ink-900); font-variant-numeric: tabular-nums; line-height: 1.1; }
.price-unit { font-size: var(--text-sm); color: var(--ink-400); font-weight: 600; }
.price-features { list-style: none; padding: 0; display: flex; flex-direction: column; gap: var(--sp-3); flex: 1; font-size: var(--text-sm); }
.price-features li { display: flex; gap: var(--sp-3); align-items: flex-start; color: var(--ink-600); }
.price-features svg { color: var(--brand-600); flex-shrink: 0; margin-top: 3px; }

/* ── Map ───────────────────────────────────────────────────────────────── */

.map { height: 380px; border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--border); background: var(--surface-3); }
.map-sm { height: 220px; }
.map-lg { height: 520px; }
.leaflet-container { font-family: var(--font-sans); }

/* ── Utility ───────────────────────────────────────────────────────────── */

.divider { height: 1px; background: var(--border); }
.avatar {
  width: 40px; height: 40px; border-radius: var(--r-full);
  background: var(--brand-100); color: var(--brand-700);
  display: grid; place-items: center; font-weight: 700; font-size: var(--text-sm);
  overflow: hidden; flex-shrink: 0;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-lg { width: 64px; height: 64px; font-size: var(--text-lg); }
.avatar-sm { width: 30px; height: 30px; font-size: var(--text-xs); }

.dot-online { width: 8px; height: 8px; border-radius: 50%; background: var(--success); display: inline-block; }
.dot-offline { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-300); display: inline-block; }

.skeleton {
  background: linear-gradient(90deg, var(--surface-3) 25%, var(--surface-2) 50%, var(--surface-3) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: var(--r-md);
}
@keyframes shimmer { to { background-position: -200% 0; } }

.skip-link {
  position: absolute; inset-inline-start: -9999px; top: var(--sp-2); z-index: 999;
  padding: var(--sp-3) var(--sp-5); background: var(--brand-700); color: #fff;
  border-radius: var(--r-md); font-weight: 700;
}
.skip-link:focus { inset-inline-start: var(--sp-4); color: #fff; }

/* Print */
@media print {
  .site-header, .site-footer, .chat-fab, .chat-panel, .btn, .flash-stack { display: none !important; }
  body { background: #fff; color: #000; }
  .container { max-width: 100%; }
}
