:root {
  /* Dark premium enterprise palette */
  --bg-primary: #0f1219;
  --bg-secondary: #151923;
  --surface: #1c212c;
  --surface-elevated: #242a38;
  --border: rgba(226, 232, 240, 0.09);
  --border-strong: rgba(125, 170, 230, 0.38);
  --text-primary: #f1f4f9;
  --text-secondary: #c5cddb;
  --text-muted: #8b95a8;
  --accent: #6ba3e8;
  --accent-hover: #86b6f0;
  --success: #3dce9a;
  --warning: #e0b45a;
  --danger: #e88989;
  --info: #6ba3e8;
  --bg: var(--bg-primary);
  --bg-elev: var(--bg-secondary);
  --bg-soft: var(--surface);
  --panel: var(--surface);
  --panel-2: var(--surface-elevated);
  --text: var(--text-primary);
  --muted: var(--text-muted);
  --cyan: #7eb3e8;
  --blue: #5b8fd4;
  --accent-2: var(--accent-hover);
  --shadow: 0 12px 32px rgba(4, 6, 12, 0.42);
  --radius: 14px;
  --radius-sm: 10px;
  --sidebar-w: 272px;
  --topbar-h: 60px;
  --content-max: clamp(1180px, 92vw, 2200px);
  --page-max: clamp(1400px, 94vw, 2400px);
  --form-max: 52rem;
  --font: "DM Sans", "Cairo", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --external-ad-height: 0px;
  --z-content: 1;
  --z-external-ad: 40;
  --z-sticky-header: 45;
  --z-drawer-backdrop: 60;
  --z-drawer: 70;
  --z-modal: 80;
  --accent-secondary: var(--accent-hover);
  --glow-1: rgba(107, 163, 232, 0.07);
  --glow-2: rgba(91, 143, 212, 0.05);
  --space-1: .25rem;
  --space-2: .5rem;
  --space-3: .75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --transition-fast: .15s ease;
  --focus-ring: 0 0 0 3px rgba(107, 163, 232, 0.22);
  --color-bg: var(--bg-primary);
  --color-surface: var(--surface);
  --color-surface-elevated: var(--surface-elevated);
  --color-text: var(--text-primary);
  --color-text-muted: var(--text-muted);
  --color-border: var(--border);
  --color-primary: var(--accent);
  --color-primary-hover: var(--accent-hover);
  --color-success: var(--success);
  --color-warning: var(--warning);
  --color-danger: var(--danger);
  --input-bg: #181b24;
  --input-bg-focus: #1e2230;
  --input-bg-muted: #161922;
  --input-text: var(--text-primary);
  --input-border: rgba(232, 236, 245, 0.16);
  --input-focus: rgba(110, 184, 255, 0.65);
  --button-primary-bg: var(--accent);
  --button-primary-text: #10131a;
  --button-secondary-bg: var(--surface-elevated);
  --card-bg: var(--surface);
  --card-border: var(--border);
  --sidebar-bg: var(--bg-secondary);
  --topbar-bg: rgba(26, 29, 39, 0.88);
  --shadow-sm: 0 6px 16px rgba(8, 10, 16, 0.22);
  --shadow-md: var(--shadow);
  --radius-md: var(--radius);
  --radius-lg: 20px;
}

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

html {
  -webkit-text-size-adjust: 100%;
  color-scheme: dark;
  /* Prevent scrollbar appear/disappear from shifting layout (continuous jitter root cause) */
  scrollbar-gutter: stable;
  overflow-x: hidden;
  max-width: 100%;
}

html.nav-lock,
html.nav-lock body { overflow: hidden; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  color: var(--text-primary);
  background:
    radial-gradient(900px 420px at 6% -10%, var(--glow-1), transparent 55%),
    linear-gradient(180deg, var(--bg-primary) 0%, #12161f 48%, var(--bg-secondary) 100%);
  line-height: 1.55;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
html[dir="rtl"] { --font: "Cairo", "DM Sans", system-ui, sans-serif; }

img, svg { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: #7dd3fc; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
input, select, textarea, button {
  color-scheme: inherit;
}
h1, h2, h3, h4 { margin: 0 0 .5rem; line-height: 1.25; font-weight: 700; letter-spacing: -0.02em; }
p { margin: 0 0 1rem; color: var(--muted); }
small { color: var(--muted); }

.icon { width: 1.15rem; height: 1.15rem; flex: 0 0 auto; }
.mono { font-family: var(--mono); font-size: .92em; }

/* Shell */
.app-shell { display: flex; min-height: 100vh; width: 100%; }
.sidebar {
  width: var(--sidebar-w);
  flex: 0 0 var(--sidebar-w);
  background: var(--sidebar-bg);
  border-inline-end: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-x: hidden;
  z-index: var(--z-drawer);
}
.sidebar-brand {
  display: flex; gap: .85rem; align-items: center;
  padding: 1.15rem 1.1rem; border-bottom: 1px solid var(--border);
}
.brand-mark, .brand-lockup .brand-mark {
  width: 42px; height: 42px; border-radius: 11px;
  display: grid; place-items: center;
  background: linear-gradient(145deg, var(--cyan), var(--blue));
  color: #04111f; font-weight: 800; letter-spacing: -0.04em;
  box-shadow: 0 6px 16px rgba(74, 127, 196, 0.22);
}
.sidebar-brand strong, .brand-lockup strong { display: block; font-size: .98rem; }
.sidebar-brand small, .brand-lockup small { display: block; font-size: .75rem; }
.sidebar-nav {
  padding: .85rem .7rem;
  display: flex; flex-direction: column; gap: .25rem;
  overflow-x: hidden; overflow-y: auto; flex: 1;
}
.nav-link {
  display: flex; align-items: center; gap: .7rem;
  padding: .72rem .8rem; border-radius: 12px;
  color: var(--muted); border: 1px solid transparent;
  background: transparent; width: 100%; text-align: start;
}
.nav-link:hover { background: rgba(107, 163, 232, 0.08); color: var(--text); }
.nav-link.is-active {
  background: rgba(107, 163, 232, 0.12);
  border-color: rgba(107, 163, 232, 0.28); color: var(--text);
  box-shadow: inset 3px 0 0 var(--accent);
}
html[dir="rtl"] .nav-link.is-active {
  box-shadow: inset -3px 0 0 var(--accent);
}
.sidebar-foot {
  flex-shrink: 0;
  padding: .75rem;
  padding-bottom: calc(.75rem + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--border);
}
.nav-logout { color: #fda4af; }
.sidebar-overlay {
  position: fixed; inset: 0; background: rgba(2, 8, 23, 0.62);
  backdrop-filter: blur(2px); z-index: var(--z-drawer-backdrop);
}
.topbar-logout { display: none; margin: 0; }
.topbar-logout-btn {
  color: #fda4af;
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  width: auto;
  font-size: .82rem;
}
.lp-logout-form { margin: 0; display: grid; }
.app-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: var(--topbar-h);
  display: flex; align-items: center; gap: .75rem;
  padding: 0 1rem; border-bottom: 1px solid var(--border);
  background: var(--topbar-bg); backdrop-filter: blur(12px);
  position: sticky; top: 0; z-index: var(--z-sticky-header);
}
.topbar-title { flex: 1; min-width: 0; }
.topbar-title h1 { font-size: 1.1rem; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-meta { display: flex; align-items: center; gap: .5rem; flex-shrink: 0; }
.topbar-search {
  display: flex; align-items: center; gap: .35rem;
  flex: 1 1 280px; max-width: 420px; min-width: 0;
}
.topbar-search input[type="search"] {
  width: 100%; min-width: 0;
  height: 38px; border-radius: 12px;
  border: 1px solid var(--input-border);
  background: var(--input-bg);
  color: var(--input-text); padding: 0 .85rem;
  font: inherit;
}
.topbar-search input[type="search"]::placeholder { color: var(--muted); }
.topbar-search-btn { flex-shrink: 0; width: 38px; height: 38px; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

.global-search-form { margin-top: .5rem; }
.global-search-field {
  display: flex; align-items: center; gap: .55rem;
  border: 1px solid var(--border); border-radius: 14px;
  padding: .45rem .55rem .45rem .85rem;
  background: var(--color-surface);
}
.global-search-field input[type="search"] {
  flex: 1; min-width: 0; border: 0;
  background: var(--input-bg) !important;
  color: var(--input-text) !important;
  -webkit-text-fill-color: var(--input-text);
  font: inherit; height: 36px;
}
.global-search-icon { opacity: .7; }
.search-group-head {
  display: flex; align-items: center; justify-content: space-between; gap: .75rem;
  margin-bottom: .65rem;
}
.search-result-list { display: grid; gap: .65rem; }
.search-result-card {
  display: grid; gap: .35rem;
  padding: .85rem 1rem; border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(8, 15, 28, 0.35);
  color: var(--text); text-decoration: none;
}
.search-result-card:hover { border-color: var(--border-strong); background: rgba(56, 189, 248, 0.08); }
.search-result-main { display: flex; flex-wrap: wrap; gap: .35rem .75rem; align-items: baseline; }
.search-result-meta { font-size: .82rem; word-break: break-word; }

.topbar-user {
  font-size: .85rem; color: var(--muted);
  padding: .4rem .7rem; border-radius: 999px;
  background: rgba(56, 189, 248, 0.08); border: 1px solid var(--border);
  max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.page-content { padding: 1.15rem; width: 100%; max-width: var(--page-max); margin: 0 auto; }

.menu-toggle { display: none; }
.icon-btn {
  width: 40px; height: 40px; border-radius: 12px;
  border: 1px solid var(--border); background: var(--bg-soft);
  display: inline-grid; place-items: center; color: var(--text);
}
.icon-btn:hover { border-color: var(--border-strong); }

/* Cards / panels */
.card, .stat-card, .panel {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card, .panel { padding: 1.15rem; }
.card + .card, .panel + .panel { margin-top: 1rem; }
.card-header, .panel-header {
  display: flex; align-items: center; justify-content: space-between;
  gap: .75rem; margin-bottom: 1rem; flex-wrap: wrap;
}
.card-header h2, .panel-header h2, .section-title { font-size: 1.05rem; margin: 0; }

.grid { display: grid; gap: 1rem; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stats-grid { display: grid; gap: 1rem; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stat-card { padding: 1rem 1.1rem; }
.stat-card .label { color: var(--muted); font-size: .82rem; margin-bottom: .35rem; }
.stat-card .value { font-size: 1.45rem; font-weight: 700; font-family: var(--mono); letter-spacing: -0.03em; }
.stat-card .hint { margin-top: .35rem; font-size: .78rem; color: var(--muted); }

/* Forms ? CANONICAL dark form control theme (single source; do not duplicate blocks) */
.form-grid { display: grid; gap: 1rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid .full { grid-column: 1 / -1; }
.form-group { display: flex; flex-direction: column; gap: .4rem; }
.form-group label { font-size: .88rem; color: var(--text-primary); font-weight: 600; }

.form-control,
input:not([type]),
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="url"],
input[type="search"],
input[type="tel"],
input[type="date"],
input[type="time"],
input[type="datetime-local"],
input[type="month"],
input[type="week"],
input[type="color"],
input[type="file"],
select,
textarea,
.form-group input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="submit"]):not([type="button"]),
.form-group select,
.form-group textarea,
.stack input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
.stack select,
.stack textarea,
.auth-card input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
.auth-card select,
.auth-card textarea,
.panel input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="submit"]):not([type="button"]),
.panel select,
.panel textarea,
.card input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
.card select,
.card textarea,
.modal-panel input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="submit"]):not([type="button"]),
.modal-panel select,
.modal-panel textarea,
.modal-backdrop input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
.modal-backdrop select,
.modal-backdrop textarea,
.theme-landing input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
.theme-landing select,
.theme-landing textarea,
.topbar-search input[type="search"],
.global-search-field input[type="search"],
input.form-control,
select.form-control,
textarea.form-control,
input[readonly],
input:disabled,
select:disabled,
textarea:disabled,
input.is-invalid,
select.is-invalid,
textarea.is-invalid,
.was-validated input:invalid,
.was-validated select:invalid,
.was-validated textarea:invalid {
  width: 100%; max-width: 100%;
  background-color: var(--input-bg) !important;
  background: var(--input-bg) !important;
  background-image: none !important;
  color: var(--input-text) !important;
  border: 1px solid var(--input-border) !important;
  border-radius: var(--radius-sm, 12px) !important;
  padding: .72rem .85rem;
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
  -webkit-text-fill-color: var(--input-text) !important;
  caret-color: var(--input-text);
  color-scheme: inherit;
}
input[type="file"] {
  padding: .55rem .75rem;
  color: var(--text) !important;
}
input[type="color"] {
  min-height: 2.6rem;
  padding: .35rem .5rem;
}
textarea { min-height: 110px; resize: vertical; }
.form-control::placeholder,
input::placeholder,
textarea::placeholder {
  color: var(--muted);
  opacity: 1;
  -webkit-text-fill-color: var(--muted);
}
.form-control:hover,
input:hover:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="submit"]):not([type="button"]),
select:hover,
textarea:hover {
  border-color: var(--border-strong) !important;
}
.form-control:focus,
input:focus:not([type="checkbox"]):not([type="radio"]),
select:focus,
textarea:focus,
.form-control:active,
input:active:not([type="checkbox"]):not([type="radio"]),
select:active,
textarea:active {
  border-color: var(--input-focus) !important;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.12);
  background-color: var(--input-bg-focus) !important;
  background: var(--input-bg-focus) !important;
  color: var(--input-text) !important;
  -webkit-text-fill-color: var(--input-text) !important;
}
select option,
select optgroup {
  background-color: var(--color-surface);
  color: var(--color-text);
}
/* Chrome/Edge autofill: solid inset (rgba is often ignored by the autofill painter). */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active,
textarea:-webkit-autofill,
textarea:-webkit-autofill:hover,
textarea:-webkit-autofill:focus,
textarea:-webkit-autofill:active,
select:-webkit-autofill,
select:-webkit-autofill:hover,
select:-webkit-autofill:focus,
select:-webkit-autofill:active {
  -webkit-text-fill-color: var(--input-text) !important;
  caret-color: var(--input-text);
  box-shadow: 0 0 0 1000px var(--input-bg-focus) inset !important;
  -webkit-box-shadow: 0 0 0 1000px var(--input-bg-focus) inset !important;
  background-color: var(--input-bg-focus) !important;
  background: var(--input-bg-focus) !important;
  color: var(--input-text) !important;
  border: 1px solid var(--input-border) !important;
  transition: background-color 99999s ease-in-out 0s;
}
/* Filled values must stay readable (never white-on-white). */
input:not([type="checkbox"]):not([type="radio"]):not(:placeholder-shown),
textarea:not(:placeholder-shown),
select:not([value=""]) {
  color: var(--input-text) !important;
  -webkit-text-fill-color: var(--text) !important;
  background-color: var(--input-bg) !important;
}
input.is-invalid,
select.is-invalid,
textarea.is-invalid,
.was-validated input:invalid,
.was-validated select:invalid,
.was-validated textarea:invalid {
  border-color: rgba(248, 113, 113, 0.55) !important;
  box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.12) !important;
  background-color: var(--input-bg) !important;
}
input[readonly],
textarea[readonly] {
  opacity: 0.92;
  background-color: var(--input-bg-muted) !important;
}
input[type="file"]::file-selector-button,
input[type="file"]::-webkit-file-upload-button {
  background: rgba(56, 189, 248, 0.12);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: .35rem .7rem;
  margin-inline-end: .65rem;
  cursor: pointer;
}
select,
.form-group select,
.panel select,
.auth-card select,
.modal-panel select,
.theme-landing select,
select.form-control {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-color: var(--input-bg) !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%2393a4c3' d='M1 1l5 5 5-5'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right .85rem center !important;
  background-size: 12px 8px !important;
  padding-inline-end: 2.2rem !important;
  color: var(--input-text) !important;
  -webkit-text-fill-color: var(--input-text) !important;
}
select:focus,
select:active,
select:required:valid,
select option:checked {
  background-color: var(--input-bg-focus) !important;
  color: var(--input-text) !important;
}
input[type="date"],
input[type="time"],
input[type="datetime-local"],
input[type="month"],
input[type="week"] {
  color-scheme: inherit;
  background-color: var(--input-bg) !important;
  color: var(--input-text) !important;
  -webkit-text-fill-color: var(--input-text) !important;
}
input[type="date"]::-webkit-calendar-picker-indicator,
input[type="time"]::-webkit-calendar-picker-indicator,
input[type="datetime-local"]::-webkit-calendar-picker-indicator {
  filter: invert(0.85);
  opacity: 0.85;
  cursor: pointer;
}
/* Do not paint checkbox/radio as full-width text inputs */
input[type="checkbox"],
input[type="radio"] {
  width: auto !important;
  max-width: none !important;
  background: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
  -webkit-box-shadow: none !important;
  border-radius: 4px !important;
  padding: 0 !important;
  -webkit-text-fill-color: unset;
  color-scheme: inherit;
}
/* Dark Mode: keep canonical contrast literals (Light Mode overrides via data-resolved-mode). */
html:not([data-resolved-mode="light"]) .form-group input,
html:not([data-resolved-mode="light"]) input[readonly] {
  background-color: rgba(8, 15, 28, 0.92) !important;
}
html:not([data-resolved-mode="light"]) select option,
html:not([data-resolved-mode="light"]) select optgroup {
  background-color: #0b1220;
  color: #e8eefc;
}
html:not([data-resolved-mode="light"]) input:-webkit-autofill,
html:not([data-resolved-mode="light"]) input:-webkit-autofill:hover,
html:not([data-resolved-mode="light"]) input:-webkit-autofill:focus,
html:not([data-resolved-mode="light"]) input:-webkit-autofill:active,
html:not([data-resolved-mode="light"]) textarea:-webkit-autofill,
html:not([data-resolved-mode="light"]) textarea:-webkit-autofill:hover,
html:not([data-resolved-mode="light"]) textarea:-webkit-autofill:focus,
html:not([data-resolved-mode="light"]) textarea:-webkit-autofill:active,
html:not([data-resolved-mode="light"]) select:-webkit-autofill,
html:not([data-resolved-mode="light"]) select:-webkit-autofill:hover,
html:not([data-resolved-mode="light"]) select:-webkit-autofill:focus,
html:not([data-resolved-mode="light"]) select:-webkit-autofill:active {
  box-shadow: 0 0 0 1000px #080f1c inset !important;
  -webkit-box-shadow: 0 0 0 1000px #080f1c inset !important;
  -webkit-text-fill-color: var(--text) !important;
  caret-color: var(--text);
  background-color: #080f1c !important;
}
.help { font-size: .78rem; color: var(--muted); }
.field-error { font-size: .78rem; color: #fecaca; margin-top: .2rem; }
.checkbox-row { display: flex; align-items: center; gap: .55rem; }

.captcha-box {
  display: flex; align-items: center; gap: .75rem; flex-wrap: wrap;
  background: var(--input-bg);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: .65rem .85rem;
}
.captcha-box img,
.captcha-box .captcha-svg {
  display: block;
  height: 48px;
  width: auto;
  max-width: 100%;
  border-radius: 8px;
  background: #0a1220;
}
.captcha-refresh {
  font-size: .85rem;
}

.btn, .btn-primary, .btn-ghost, .btn-danger, .btn-success, .btn-secondary, .btn-warning {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  border-radius: 12px; padding: .68rem 1.05rem; border: 1px solid transparent;
  font-weight: 600; white-space: nowrap; text-decoration: none;
  transition: background-color .15s ease, border-color .15s ease, filter .15s ease, color .15s ease;
}
.btn:focus-visible, .icon-btn:focus-visible, .nav-link:focus-visible, .settings-nav-item:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.btn-primary {
  background: var(--accent);
  color: var(--button-primary-text); border-color: transparent;
}
.btn-primary:hover { filter: brightness(1.06); color: var(--button-primary-text); }
.btn-secondary {
  background: var(--button-secondary-bg);
  border-color: var(--border); color: var(--text-primary);
}
.btn-ghost {
  background: transparent;
  border-color: var(--border); color: var(--text-primary);
}
.btn-ghost:hover { border-color: var(--border-strong); color: var(--text-primary); background: var(--surface-elevated); }
.btn-danger { background: rgba(239, 123, 123, 0.14); border-color: rgba(239, 123, 123, 0.38); color: var(--danger); }
.btn-success { background: rgba(61, 206, 154, 0.14); border-color: rgba(61, 206, 154, 0.38); color: var(--success); }
.btn-warning { background: rgba(230, 184, 77, 0.16); border-color: rgba(230, 184, 77, 0.4); color: var(--warning); }
.btn-sm { padding: .42rem .7rem; border-radius: 10px; font-size: .85rem; }
.btn-lg { padding: .82rem 1.25rem; border-radius: 14px; font-size: 1rem; }
.btn-block { width: 100%; }
.actions { display: flex; flex-wrap: wrap; gap: .55rem; align-items: center; }

/* Tables */
.table-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.data-table { width: 100%; border-collapse: collapse; min-width: 640px; }
.data-table th, .data-table td {
  padding: .75rem .7rem; text-align: start;
  border-bottom: 1px solid var(--border); vertical-align: top;
}
.data-table th { color: var(--muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; font-weight: 600; }
.data-table tr:hover td { background: rgba(56, 189, 248, 0.04); }
.empty {
  padding: 2rem 1rem; text-align: center; color: var(--muted);
  border: 1px dashed var(--border); border-radius: var(--radius-sm);
}

/* Badges */
.badge {
  display: inline-flex; align-items: center; gap: .3rem;
  padding: .2rem .55rem; border-radius: 999px;
  font-size: .75rem; font-weight: 600; border: 1px solid transparent;
  text-transform: capitalize;
}
.badge-pending, .badge-processing { background: rgba(251, 191, 36, 0.12); color: #fde68a; border-color: rgba(251, 191, 36, 0.3); }
.badge-completed, .badge-active, .badge-success, .badge-paid { background: rgba(52, 211, 153, 0.12); color: #a7f3d0; border-color: rgba(52, 211, 153, 0.3); }
.badge-rejected, .badge-cancelled, .badge-banned, .badge-failed, .badge-inactive { background: rgba(248, 113, 113, 0.12); color: #fecaca; border-color: rgba(248, 113, 113, 0.3); }
.badge-refunded, .badge-info { background: rgba(56, 189, 248, 0.12); color: #bae6fd; border-color: rgba(56, 189, 248, 0.3); }

.alert {
  padding: .85rem 1rem; border-radius: 12px; margin-bottom: 1rem;
  border: 1px solid transparent;
}
.alert-success { background: rgba(52, 211, 153, 0.1); border-color: rgba(52, 211, 153, 0.28); color: #bbf7d0; }
.alert-danger { background: rgba(248, 113, 113, 0.1); border-color: rgba(248, 113, 113, 0.28); color: #fecaca; }
.alert-list { margin: 0; padding-left: 1.1rem; }

.filters {
  display: flex; flex-wrap: wrap; gap: .65rem; align-items: end;
  margin-bottom: 1rem;
}
.filters .form-group { min-width: min(100%, 180px); flex: 1; }
.filters .form-group.search { flex: 2; min-width: min(100%, 220px); }

.pagination {
  display: flex; flex-wrap: wrap; gap: .75rem;
  align-items: center; justify-content: space-between;
  margin-top: 1rem;
}
.pagination-links { display: flex; flex-wrap: wrap; gap: .35rem; }
.pagination-meta { color: var(--muted); font-size: .85rem; }

/* Services layout */
.services-page { display: grid; gap: 1rem; min-width: 0; }
.services-hero .section-title { margin-bottom: .25rem; }
.services-search-form { margin-top: .75rem; }
.service-type-grid {
  display: grid;
  gap: .85rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.service-type-card {
  display: flex; flex-direction: column; gap: .4rem;
  padding: 1.05rem 1.1rem;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(24, 38, 66, 0.9), rgba(12, 20, 36, 0.95));
  color: var(--text);
  text-decoration: none;
  min-width: 0;
  transition: border-color .15s ease, transform .15s ease;
}
.service-type-card:hover {
  border-color: var(--border-strong);
  color: var(--text);
  transform: translateY(-1px);
}
.service-type-card__label {
  font-weight: 700; letter-spacing: .02em; font-size: .98rem;
}
.service-type-card.is-active {
  border-color: var(--accent, #3b82f6);
  box-shadow: 0 0 0 1px rgba(59, 130, 246, .25);
}
.panel-nested {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1rem 1.1rem;
  background: rgba(255,255,255,.02);
  min-width: 0;
}
.api-hub .api-nav-grid,
.api-add-page,
.api-edit-page { min-width: 0; }
.service-card-meta { font-size: .82rem; margin: .35rem 0 .5rem; }
.service-type-card__sub { font-size: .82rem; }
.service-type-card__count {
  margin-top: .35rem; color: var(--cyan); font-weight: 600; font-size: .95rem;
}
.service-type-card__cta {
  margin-top: .45rem; font-size: .85rem; color: var(--muted);
}
.service-type-card:hover .service-type-card__cta { color: var(--cyan); }

.services-layout {
  display: grid; gap: 1rem;
  grid-template-columns: minmax(0, 1fr);
}
.category-side { display: none; }
.service-cards {
  display: grid; gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
}
.service-card { padding: 1rem; display: flex; flex-direction: column; gap: .65rem; min-width: 0; }
.service-card h3 { font-size: 1rem; margin: 0; word-break: break-word; }
.service-card .price { font-family: var(--mono); color: var(--cyan); font-weight: 600; }
.service-card .meta { font-size: .82rem; color: var(--muted); }

.type-tabs { display: none; }

.quick-actions { display: grid; gap: .75rem; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.quick-action {
  display: flex; flex-direction: column; gap: .35rem;
  padding: 1rem; border-radius: var(--radius); border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(24, 38, 66, 0.9), rgba(18, 28, 49, 0.95));
  color: var(--text);
}
.quick-action:hover { border-color: var(--border-strong); color: var(--text); }
.quick-action span { color: var(--muted); font-size: .82rem; }

.field-row {
  display: grid; gap: .75rem; padding: .85rem;
  border: 1px solid var(--border); border-radius: 12px; margin-bottom: .75rem;
  background: rgba(8, 15, 28, 0.35);
}
.req-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; }
.req-item {
  display: flex; align-items: center; justify-content: space-between; gap: .75rem;
  padding: .7rem .85rem; border-radius: 12px; border: 1px solid var(--border);
  background: rgba(8, 15, 28, 0.35);
}
.req-ok { color: var(--success); font-weight: 700; }
.req-fail { color: var(--danger); font-weight: 700; }

/* Auth / errors / install */
.auth-shell, .error-shell, .install-shell {
  min-height: 100vh; display: grid; place-items: center;
  padding: 1.25rem; width: 100%;
}
.auth-card, .error-card, .install-card {
  width: min(100%, 460px);
  background: linear-gradient(180deg, #1e2431 0%, #181d28 100%);
  border: 1px solid var(--border); border-radius: 16px;
  box-shadow: var(--shadow); padding: 1.5rem;
}
.install-shell { place-items: start center; max-width: 920px; margin: 0 auto; gap: 1rem; }
.install-header, .brand-lockup { display: flex; align-items: center; gap: .85rem; width: 100%; }
.install-card { width: min(100%, 720px); }
.install-steps {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: .45rem; width: min(100%, 720px);
}
.install-steps li {
  display: flex; align-items: center; gap: .4rem;
  padding: .4rem .65rem; border-radius: 999px;
  border: 1px solid var(--border); color: var(--muted); font-size: .78rem;
  background: rgba(17, 26, 46, 0.7);
}
.install-steps .step-num {
  width: 1.35rem; height: 1.35rem; border-radius: 999px;
  display: grid; place-items: center; background: rgba(56, 189, 248, 0.12); font-family: var(--mono);
}
.install-steps .is-current { color: var(--text); border-color: var(--border-strong); }
.install-steps .is-done { color: #a7f3d0; }
.auth-card h1, .error-card h1 { font-size: 1.55rem; }
.auth-card .brand-row, .error-card .brand-row {
  display: flex; align-items: center; gap: .75rem; margin-bottom: 1.1rem;
}
.error-code {
  font-family: var(--mono); font-size: 2.4rem; color: var(--cyan); margin: 0 0 .4rem;
}

.split-2 { display: grid; gap: 1rem; grid-template-columns: 1.2fr .8fr; }
.kv { display: grid; gap: .55rem; }
.kv-row {
  display: flex; justify-content: space-between; gap: 1rem;
  padding: .55rem 0; border-bottom: 1px solid var(--border); font-size: .92rem;
}
.kv-row span:first-child { color: var(--muted); }
.stack { display: grid; gap: 1rem; }
.muted { color: var(--muted); }
.text-right { text-align: end; }
.mt-1 { margin-top: .5rem; }
.mt-2 { margin-top: 1rem; }
.mb-0 { margin-bottom: 0; }
.mb-2 { margin-bottom: 1rem; }

/* Responsive */
@media (max-width: 1200px) {
  .stats-grid, .quick-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 992px) {
  .services-layout { grid-template-columns: 1fr; }
  .service-type-grid { grid-template-columns: 1fr; }
  .split-2 { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .menu-toggle { display: inline-grid; }
  .sidebar-close { display: inline-grid !important; }
  .sidebar {
    position: fixed;
    inset-inline-start: 0;
    inset-inline-end: auto;
    top: 0; bottom: 0;
    transform: translateX(-105%);
    transition: transform .22s ease;
    box-shadow: var(--shadow);
    z-index: var(--z-drawer);
  }
  [dir="rtl"] .sidebar {
    transform: translateX(105%);
  }
  .app-shell.sidebar-open .sidebar { transform: translateX(0); }
  .topbar-logout { display: block; }
  .page-content { padding: .9rem; }
  .form-grid, .grid-2, .grid-3, .grid-4, .stats-grid, .quick-actions {
    grid-template-columns: 1fr;
  }
  .topbar-user { max-width: 120px; }
  .topbar-search { flex: 1 1 140px; max-width: none; }
  .topbar-search input[type="search"] { font-size: .85rem; }
  .topbar-title { display: none; }
  .install-steps .step-label { display: none; }
  .data-table { min-width: 560px; }
}

@media (max-width: 480px) {
  .auth-card, .error-card, .install-card { padding: 1.1rem; border-radius: 16px; }
  .stat-card .value { font-size: 1.25rem; }
  .auth-card .btn,
  .error-card .btn,
  .install-card .btn,
  .panel > form > .btn[type="submit"],
  .settings-section > form > .btn[type="submit"] { width: 100%; }
  .actions .btn,
  .btn-group .btn,
  .topbar .btn,
  .icon-btn,
  .appearance-switcher .btn,
  .settings-hub__tab { width: auto; }
  .settings-layout .settings-hub__tab { width: 100%; }
  .topbar { padding: 0 .7rem; }
}

@media (max-width: 320px) {
  .page-content { padding: .7rem; }
  .brand-mark { width: 36px; height: 36px; font-size: .85rem; }
  .sidebar { width: min(calc(100% - 40px), var(--sidebar-w)); }
}

@media (min-width: 1100px) {
  .service-type-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* Supplier admin helpers */
.hidden { display: none !important; }
.text-danger { color: #fecaca; }
.code-block {
  margin: 0; padding: 1rem; overflow: auto;
  border-radius: 12px; border: 1px solid var(--border);
  background: rgba(8, 15, 28, 0.45); font-size: .82rem; white-space: pre-wrap;
}
.mobile-cards { display: none; gap: .85rem; }
.mobile-cards .service-card { margin: 0; }
.desktop-only { display: block; }
.mobile-only { display: none; }
.modal-backdrop {
  position: fixed; inset: 0; z-index: 80;
  display: grid; place-items: center;
  padding: 1rem; background: rgba(2, 8, 20, 0.72);
}
.modal-backdrop[hidden] { display: none !important; }
.modal-panel { width: min(100%, 520px); max-height: min(90vh, 720px); overflow: auto; background: var(--card-bg); color: var(--color-text); border: 1px solid var(--card-border); border-radius: var(--radius); }

@media (max-width: 768px) {
  .desktop-only { display: none !important; }
  .mobile-only, .mobile-cards { display: grid !important; }
}

/* Deposit UX */
.deposit-page {
  width: 100%;
  max-width: 920px;
  margin: 0 auto;
  padding: 0 .25rem 1.5rem;
  overflow-x: hidden;
}
.deposit-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
  padding: 1.25rem 1.35rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background:
    linear-gradient(135deg, rgba(56, 189, 248, 0.12), transparent 55%),
    var(--panel);
}
.deposit-balance-label {
  display: block;
  color: var(--muted);
  font-size: .85rem;
  margin-bottom: .35rem;
}
.deposit-balance-value {
  font-size: clamp(1.5rem, 4vw, 2.1rem);
  letter-spacing: -0.03em;
}
.deposit-section-title {
  margin: 0 0 .85rem;
  font-size: 1.05rem;
}
.payment-method-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .85rem;
  margin-bottom: 1.25rem;
}
.payment-method-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .25rem;
  width: 100%;
  min-width: 0;
  text-align: left;
  padding: 1rem 1.05rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  transition: border-color .2s ease, transform .2s ease, background .2s ease;
}
.payment-method-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-1px);
}
.payment-method-card.is-selected {
  border-color: var(--accent);
  background: linear-gradient(180deg, rgba(56, 189, 248, 0.12), var(--panel));
  box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.25);
}
.payment-method-name { font-weight: 700; font-size: 1.02rem; }
.payment-method-meta { color: var(--accent); font-size: .86rem; }
.payment-method-hint,
.payment-method-desc { color: var(--muted); font-size: .84rem; word-break: break-word; }
.payment-method-select {
  margin-top: .55rem;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--cyan);
}
.deposit-amount-panel { max-width: 100%; }
.deposit-totals { margin: .75rem 0 1rem; }
.btn-block { width: 100%; justify-content: center; }
.manual-instructions {
  padding: .9rem 1rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(8, 15, 28, 0.35);
  color: var(--text);
  word-break: break-word;
}

@media (max-width: 640px) {
  .payment-method-grid { grid-template-columns: 1fr; }
  .deposit-hero { align-items: flex-start; }
}

@media (min-width: 1024px) {
  .payment-method-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.landing-carousel__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(8, 15, 28, 0.75);
  color: var(--text);
  cursor: pointer;
}
.landing-carousel__nav--prev { left: .65rem; }
.landing-carousel__nav--next { right: .65rem; }
.landing-carousel__dot {
  width: .55rem;
  height: .55rem;
  border-radius: 999px;
  border: 0;
  background: rgba(148, 163, 184, 0.45);
  padding: 0;
  cursor: pointer;
}
.landing-carousel__dot.is-active { background: #38bdf8; }
.landing-ad-stack { display: grid; gap: .85rem; }
.landing-ad-image { width: 100%; height: auto; display: block; border-radius: 12px; }
.landing-ad-band { margin-bottom: 1.25rem; }

/* Prevent announcement marquee from causing page overflow / horizontal jitter (avoid 100vw) */
.announcement-marquee { max-width: 100%; width: 100%; overflow: hidden; }
@media (prefers-reduced-motion: reduce) {
  .announcement-marquee__track { animation: none !important; transform: none !important; }
}

/* ==========================================================================
   Global responsive hardening (tables, images, modals, grids)
   ========================================================================== */
img { max-width: 100%; height: auto; }
.table-wrap { max-width: 100%; }
.landing-ad-script { max-width: 100%; overflow-x: auto; }
.landing-ad-script img, .landing-ad-script iframe { max-width: 100%; }
.modal-panel { max-width: calc(100% - 1.5rem); }

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

/* ==========================================================================
   Admin ? tabbed settings nav + inline media preview (Landing Page console)
   ========================================================================== */
.tabs-nav {
  display: flex; flex-wrap: wrap; gap: .4rem;
  margin-top: 1rem; padding-top: 1rem;
  border-top: 1px solid var(--border);
}
.tabs-nav__link {
  padding: .55rem .95rem; border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--muted); font-size: .88rem; font-weight: 600;
  background: rgba(8, 15, 28, 0.35);
  white-space: nowrap;
}
.tabs-nav__link:hover { color: var(--text); border-color: var(--border-strong); }
.tabs-nav__link.is-active {
  color: #04111f;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  border-color: transparent;
}
.admin-media-preview {
  display: flex; align-items: center; gap: .85rem; flex-wrap: wrap;
  margin-top: .65rem; padding: .65rem .75rem;
  border: 1px solid var(--border); border-radius: 12px;
  background: rgba(8, 15, 28, 0.35);
}
.admin-media-preview img {
  width: auto;
  height: auto;
  max-width: min(280px, 70vw);
  max-height: 96px;
  object-fit: contain;
  object-position: center;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #0a1220;
}

/* ==========================================================================
   Public Landing Page ? premium dark navy theme (lp-*)
   Scoped to .theme-landing; driven by --landing-primary/secondary/accent.
   ========================================================================== */
.landing-main {
  width: min(var(--content-max), 100%);
  margin: 0 auto;
  padding: clamp(1.25rem, 4vw, 2.5rem) clamp(1rem, 4vw, 2.5rem) 3rem;
  min-width: 0;
}

/* Navbar */
.lp-nav {
  position: sticky; top: 0; z-index: var(--z-sticky-header);
  border-bottom: 1px solid var(--landing-line);
  background: rgba(7, 11, 18, 0.78);
  backdrop-filter: blur(12px);
}
.lp-nav__bar {
  width: min(var(--content-max), 100%); margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.25rem; padding: .85rem clamp(1rem, 4vw, 2.5rem);
}
.lp-nav__brand { display: flex; align-items: center; gap: .65rem; color: var(--landing-ink); text-decoration: none; min-width: 0; }
.lp-nav__brand strong { font-size: 1.02rem; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lp-nav__logo {
  width: auto !important;
  height: auto !important;
  max-width: min(420px, 58vw);
  max-height: clamp(64px, 9vh, 110px);
  border-radius: 0;
  object-fit: contain !important;
  object-position: center;
  flex: 0 1 auto;
  display: block;
  aspect-ratio: auto;
}
.lp-nav__name {
  font-size: 1.02rem;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.brand-lockup--logo {
  display: flex;
  align-items: center;
  min-width: 0;
  max-width: 100%;
}
.sidebar-brand {
  align-items: center;
}
/* PROMPT 84: preserve original logo ratio ? container caps size, image never stretches. */
.brand-logo-img {
  width: auto !important;
  height: auto !important;
  max-width: min(420px, 82%);
  max-height: clamp(64px, 8.5vh, 110px);
  object-fit: contain !important;
  object-position: center;
  display: block;
  flex: 0 1 auto;
  aspect-ratio: auto;
}
.invoice-logo {
  max-height: clamp(64px, 9vh, 100px);
  max-width: min(360px, 78vw);
}
.invoice-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}
.invoice-brand {
  display: flex;
  align-items: center;
  gap: .65rem;
  min-width: 0;
}
html[dir="rtl"] .brand-logo-img,
html[dir="rtl"] .lp-nav__logo {
  transform: none;
}
@media (max-width: 1024px) {
  .brand-logo-img { max-height: clamp(56px, 7.5vh, 92px); max-width: min(360px, 70vw); }
  .lp-nav__logo { max-height: clamp(56px, 7.2vh, 96px); max-width: min(340px, 56vw); }
}
@media (max-width: 768px) {
  .brand-logo-img { max-height: clamp(48px, 6.8vh, 76px); max-width: min(300px, 72vw); }
  .lp-nav__logo { max-height: clamp(46px, 6.5vh, 72px); max-width: min(280px, 58vw); }
}
@media (max-width: 430px) {
  .brand-logo-img { max-height: clamp(42px, 6vh, 64px); max-width: min(240px, 74vw); }
  .lp-nav__logo { max-height: clamp(40px, 5.8vh, 60px); max-width: min(220px, 62vw); }
}
.lp-nav__links { display: flex; align-items: center; gap: 1.5rem; flex: 1; justify-content: center; min-width: 0; }
.lp-nav__links a { color: var(--landing-muted); font-weight: 500; font-size: .92rem; white-space: nowrap; }
.lp-nav__links a:hover { color: var(--landing-ink); }
.lp-nav__actions { display: flex; align-items: center; gap: .55rem; flex: 0 0 auto; }

/* Mobile-first three-dot drawer */
html.lp-drawer-lock, html.lp-drawer-lock body { overflow: hidden; }
.lp-nav__dots {
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; border-radius: 12px; flex: 0 0 auto;
  border: 1px solid rgba(56, 189, 248, 0.28);
  background: radial-gradient(circle at 30% 20%, rgba(56,189,248,.18), rgba(8,15,28,.92));
  color: #e2e8f0; font-size: 1.35rem; line-height: 1; cursor: pointer;
  box-shadow: 0 0 18px rgba(56, 189, 248, 0.18);
}
.lp-nav__dots:focus-visible { outline: 2px solid var(--landing-primary); outline-offset: 2px; }
.lp-nav__spacer { width: 42px; flex: 0 0 auto; }
.lp-nav__links--desktop, .lp-nav__actions--desktop { display: none; }
.lp-nav__bar { justify-content: space-between; }
.lp-nav__brand { flex: 1; justify-content: center; }
.lp-drawer-backdrop {
  position: fixed; inset: 0; z-index: var(--z-drawer-backdrop);
  background: rgba(2, 8, 23, 0.62); backdrop-filter: blur(2px);
  opacity: 0; transition: opacity .22s ease;
}
.lp-drawer-backdrop.is-open { opacity: 1; }
.lp-drawer {
  position: fixed; top: 0; bottom: 0; inset-inline-start: 0; z-index: var(--z-drawer);
  width: min(88%, 340px); max-width: 100%;
  background: linear-gradient(180deg, #0b1526 0%, #070b12 100%);
  border-inline-end: 1px solid var(--landing-line);
  box-shadow: 0 0 40px rgba(2, 8, 23, 0.55);
  transform: translateX(-105%);
  transition: transform .28s cubic-bezier(.2,.8,.2,1);
  display: flex; flex-direction: column; padding: 1rem 1rem 1.25rem;
}
[dir="rtl"] .lp-drawer { transform: translateX(105%); }
.lp-drawer.is-open { transform: translateX(0); }
.lp-drawer__head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: 1rem; }
.lp-drawer__head strong { color: #f8fafc; }
.lp-drawer__close {
  width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--landing-line);
  background: rgba(15,23,42,.7); color: #e2e8f0; font-size: 1.4rem; cursor: pointer;
}
.lp-drawer__nav { display: flex; flex-direction: column; gap: .25rem; overflow-y: auto; flex: 1; }
.lp-drawer__link {
  display: flex; align-items: center; gap: .75rem;
  padding: .85rem .9rem; border-radius: 12px; color: #cbd5e1; text-decoration: none;
  border: 1px solid transparent;
}
.lp-drawer__link:hover, .lp-drawer__link:focus-visible {
  background: rgba(56,189,248,.08); border-color: rgba(56,189,248,.22); color: #f8fafc;
}
.lp-drawer__icon { width: 22px; display: inline-flex; color: var(--landing-primary); }
.lp-drawer__actions { display: grid; gap: .6rem; margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--landing-line); }
.lp-nav-item--desktop-only { display: none !important; }
/* Site chrome around raw external ads ? never rewrite script_content */
.external-ad-container {
  position: relative;
  z-index: var(--z-external-ad);
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin: 0;
  overflow-x: auto;
  overflow-y: visible;
  contain: none;
}
.external-ad-container.ad-slot {
  margin: 0;
  contain: none;
}
html.has-fixed-external-ad .lp-nav,
html.has-fixed-external-ad .lp-nav--sticky,
html.has-fixed-external-ad .topbar {
  top: var(--external-ad-height, 0px);
}
/* Stable ad containment without rewriting trusted script_content */
.ad-slot {
  width: 100%;
  max-width: 100%;
  margin: .75rem 0;
  overflow-x: auto;
  overflow-y: visible;
  min-width: 0;
  contain: inline-size;
}
.ad-slot__item { max-width: 100%; min-width: 0; }
.ad-slot__script, .landing-ad-script { max-width: 100%; overflow-x: auto; }
.ad-slot__image, .ad-slot img, .ad-slot iframe, .ad-slot video,
.landing-ad-script img, .landing-ad-script iframe, .landing-ad-script video {
  max-width: 100%;
  height: auto;
}
.ad-slot__item--desktop { }
.lp-card__cta { margin-top: auto; align-self: flex-start; }
.lp-cta__actions { display: flex; flex-wrap: wrap; gap: .75rem; justify-content: center; }

@media (min-width: 900px) {
  .lp-nav__dots, .lp-nav__spacer, .lp-drawer, .lp-drawer-backdrop { display: none !important; }
  .lp-nav__brand { flex: 0 1 auto; justify-content: flex-start; }
  .lp-nav__links--desktop { display: flex; }
  .lp-nav__actions--desktop { display: flex; }
  .lp-nav-item--mobile-only { display: none !important; }
  .lp-nav-item--desktop-only { display: inline-flex !important; }
  .ad-slot__item:not(.ad-slot__item--desktop) { display: none; }
}
@media (max-width: 899px) {
  .ad-slot__item:not(.ad-slot__item--mobile) { display: none; }
  .lp-hero { grid-template-columns: 1fr; min-height: auto; }
  .lp-hero__media { order: 3; }
  .lp-service-grid, .lp-features__grid { grid-template-columns: 1fr; }
}
@media (min-width: 640px) and (max-width: 899px) {
  .lp-service-grid, .lp-features__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1100px) {
  .lp-service-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .lp-features__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* Hero */
.lp-hero {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
  min-height: calc(100vh - 8rem);
  padding-top: 1rem;
}
.lp-hero__copy { min-width: 0; max-width: min(46rem, 100%); }
.lp-hero--full { grid-template-columns: 1fr; text-align: center; min-height: auto; padding: 3rem 0; }
.lp-hero--full .lp-hero__copy { max-width: 720px; margin: 0 auto; }
.lp-hero--full .lp-hero__cta { justify-content: center; }
.lp-hero__kicker {
  margin: 0 0 .75rem;
}
.lp-hero__badge {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .35rem .75rem; border-radius: 999px;
  border: 1px solid rgba(56, 189, 248, 0.35);
  background: rgba(56, 189, 248, 0.10);
  color: var(--landing-accent);
  text-transform: uppercase; letter-spacing: .14em; font-size: .7rem; font-weight: 700;
}
.lp-hero__heading {
  margin: 0; font-size: clamp(2.4rem, 6vw, 4.2rem);
  line-height: 1.05; letter-spacing: -0.035em; color: #f8fafc;
}
.lp-hero__highlight {
  background: linear-gradient(135deg, var(--landing-primary), var(--landing-accent));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lp-hero__lead { margin: 1rem 0 1.5rem; max-width: 42ch; color: var(--landing-muted); font-size: 1.05rem; line-height: 1.65; }
.lp-hero--full .lp-hero__lead { max-width: 60ch; margin-inline: auto; }
.lp-hero__cta { display: flex; flex-wrap: wrap; gap: .75rem; }
.lp-hero__trust {
  list-style: none; margin: 1.35rem 0 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: .85rem 1.25rem;
  color: var(--landing-muted); font-size: .9rem;
}
.lp-hero__trust li { display: inline-flex; align-items: center; gap: .45rem; }
.lp-hero__trust-dot {
  width: .55rem; height: .55rem; border-radius: 50%;
  background: var(--landing-primary);
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.75);
}
.lp-hero__media { position: relative; min-height: 280px; }
.lp-hero__glow {
  position: absolute; inset: 8% 6%; z-index: 0; border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, rgba(56,189,248,.35), rgba(99,102,241,.18), transparent 70%);
  filter: blur(8px); pointer-events: none;
}
.lp-hero__image {
  position: relative; z-index: 1;
  display: block; width: 100%; height: 100%; min-height: 280px; max-height: 460px;
  object-fit: cover; border-radius: 24px; border: 1px solid var(--landing-line);
  box-shadow: 0 0 0 1px rgba(56,189,248,.12), 0 24px 60px rgba(2, 8, 23, 0.55);
}
.lp-hero__placeholder { position: relative; z-index: 1; min-height: 280px; }

/* Section shell */
.lp-section-head { max-width: 640px; margin: 0 auto 2rem; text-align: center; }
.lp-section-head h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); color: #f1f5f9; margin: 0 0 .5rem; }
.lp-section-head p { margin: 0; color: var(--landing-muted); line-height: 1.65; }

/* Service / feature cards */
.lp-service-grid, .lp-features__grid {
  display: grid; gap: 1.1rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.lp-card, .lp-feature {
  display: flex; flex-direction: column; gap: .6rem;
  padding: 1.5rem 1.35rem; border-radius: 18px;
  border: 1px solid var(--landing-line);
  background: linear-gradient(180deg, rgba(24, 38, 66, 0.55), rgba(10, 16, 28, 0.65));
  color: var(--landing-ink); text-decoration: none;
  transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease;
  min-width: 0; position: relative; overflow: hidden;
}
.lp-card::after, .lp-feature::after {
  content: ""; position: absolute; left: 12%; right: 12%; bottom: -28%;
  height: 55%; border-radius: 50%; filter: blur(18px); opacity: .55; pointer-events: none;
}
.lp-card--blue::after, .lp-feature--blue::after { background: rgba(56,189,248,.45); }
.lp-card--purple::after, .lp-feature--purple::after { background: rgba(167,139,250,.45); }
.lp-card--green::after, .lp-feature--green::after { background: rgba(52,211,153,.4); }
.lp-card--orange::after, .lp-feature--orange::after { background: rgba(251,146,60,.4); }
.lp-card:hover, .lp-feature:hover {
  border-color: rgba(56, 189, 248, 0.45);
  transform: translateY(-3px);
  box-shadow: 0 18px 40px rgba(2, 8, 23, 0.45);
}
.lp-card__icon, .lp-feature__icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 48px; height: 48px; border-radius: 14px;
  background: rgba(56, 189, 248, 0.12);
  color: var(--landing-primary);
  box-shadow: 0 0 0 1px var(--landing-line) inset;
  position: relative; z-index: 1;
}
.lp-card--purple .lp-card__icon, .lp-feature--purple .lp-feature__icon { color: #c4b5fd; background: rgba(167,139,250,.14); }
.lp-card--green .lp-card__icon, .lp-feature--green .lp-feature__icon { color: #6ee7b7; background: rgba(52,211,153,.14); }
.lp-card--orange .lp-card__icon, .lp-feature--orange .lp-feature__icon { color: #fdba74; background: rgba(251,146,60,.14); }
.lp-card__icon .icon, .lp-feature__icon .icon { width: 1.4rem; height: 1.4rem; }
.lp-card h3, .lp-feature h3 { margin: 0; font-size: 1.05rem; color: #f1f5f9; position: relative; z-index: 1; }
.lp-card p, .lp-feature p { margin: 0; color: var(--landing-muted); font-size: .92rem; line-height: 1.6; position: relative; z-index: 1; }
.lp-card__link {
  margin-top: auto; align-self: flex-start; position: relative; z-index: 1;
  color: var(--landing-primary); text-decoration: none; font-weight: 600; font-size: .92rem;
}
.lp-card__link:hover { color: #e0f2fe; }

/* Statistics */
.lp-stats__grid, .lp-stats__bar {
  display: grid; gap: 1.25rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  text-align: center;
}
.lp-stats__bar {
  padding: 1.25rem 1rem;
  border-radius: 20px;
  border: 1px solid var(--landing-line);
  background:
    linear-gradient(90deg, rgba(37,99,235,.18), rgba(99,102,241,.14), rgba(14,165,233,.12));
}
.lp-stat {
  display: flex; flex-direction: column; gap: .35rem; align-items: center;
  padding: 1.25rem 1rem; border-radius: 16px;
  border: 1px solid transparent;
  background: transparent;
}
.lp-stats__bar .lp-stat { padding: .5rem; }
.lp-stat__icon { color: var(--landing-primary); opacity: .9; }
.lp-stat__icon .icon { width: 1.25rem; height: 1.25rem; }
.lp-stat__value {
  font-family: var(--mono); font-weight: 800;
  font-size: clamp(1.7rem, 4vw, 2.5rem); letter-spacing: -0.03em;
  background: linear-gradient(135deg, var(--landing-primary), var(--landing-accent));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lp-stat__label { color: var(--landing-muted); font-size: .85rem; }

/* CTA banner */
.lp-cta { margin-top: 3rem; }
.lp-cta__box {
  display: grid; grid-template-columns: 1.2fr .8fr; gap: 1.5rem; align-items: center;
  padding: clamp(2rem, 5vw, 3.25rem) clamp(1.5rem, 5vw, 3rem);
  border-radius: 26px;
  border: 1px solid rgba(129, 140, 248, 0.35);
  background:
    radial-gradient(600px 260px at 85% 20%, rgba(168, 85, 247, 0.28), transparent 55%),
    radial-gradient(500px 220px at 15% -10%, rgba(56, 189, 248, 0.22), transparent 55%),
    linear-gradient(135deg, rgba(30, 27, 75, 0.92), rgba(15, 23, 42, 0.95));
  overflow: hidden;
}
.lp-cta__copy { text-align: start; }
.lp-cta__box h2 { margin: 0 0 .6rem; font-size: clamp(1.5rem, 3.5vw, 2.2rem); color: #f8fafc; }
.lp-cta__box p { margin: 0 0 1.35rem; max-width: 52ch; color: var(--landing-muted); }
.lp-cta__visual {
  min-height: 140px; border-radius: 50%;
  background:
    radial-gradient(circle at 40% 40%, rgba(250,250,250,.25), transparent 28%),
    linear-gradient(160deg, rgba(192,132,252,.55), rgba(56,189,248,.15), transparent 70%);
  filter: blur(2px); opacity: .85;
}
.lp-cta__actions { display: flex; flex-wrap: wrap; gap: .75rem; justify-content: flex-start; }

/* Footer */
.lp-footer {
  margin-top: 3.5rem; border-top: 1px solid var(--landing-line);
  padding: 2.5rem clamp(1rem, 4vw, 2.5rem) 1.5rem;
}
.lp-footer__top {
  width: min(var(--content-max), 100%); margin: 0 auto;
  display: grid; grid-template-columns: 1.1fr 2fr; gap: 2.5rem;
}
.lp-footer__brand p { margin: .85rem 0; color: var(--landing-muted); max-width: 34ch; line-height: 1.6; }
.lp-footer__contact { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; gap: .45rem; color: var(--landing-muted); font-size: .9rem; }
.lp-footer__contact a { color: var(--landing-muted); }
.lp-footer__contact a:hover { color: var(--landing-ink); }
.lp-footer__social { display: flex; flex-wrap: wrap; gap: .55rem; }
.lp-footer__social a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 10px;
  border: 1px solid var(--landing-line); color: var(--landing-muted);
}
.lp-footer__social a:hover { color: var(--landing-primary); border-color: color-mix(in srgb, var(--landing-primary) 45%, var(--landing-line)); }
.lp-footer__columns { display: grid; gap: 1.5rem; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.lp-footer__column h4 { margin: 0 0 .85rem; font-size: .92rem; color: #f1f5f9; text-transform: uppercase; letter-spacing: .04em; }
.lp-footer__column ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.lp-footer__column a { color: var(--landing-muted); font-size: .9rem; }
.lp-footer__column a:hover { color: var(--landing-ink); }
.lp-footer__bottom {
  width: min(var(--content-max), 100%); margin: 2rem auto 0;
  padding-top: 1.25rem; border-top: 1px solid var(--landing-line);
  color: #64748b; font-size: .85rem; text-align: center;
}

/* ==========================================================================
   Landing responsive breakpoints (320 ? 2560)
   ========================================================================== */
@media (min-width: 1440px) {
  .lp-service-grid, .lp-features__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .lp-stats__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (min-width: 1920px) {
  .lp-service-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .lp-features__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (min-width: 2560px) {
  .lp-service-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .lp-features__grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

@media (min-width: 1024px) and (max-width: 1439px) {
  .lp-service-grid, .lp-features__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .lp-stats__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 992px) {
  .lp-footer__top { grid-template-columns: 1fr; }
  .lp-footer__columns { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
  .lp-hero { grid-template-columns: 1fr; min-height: auto; }
  .lp-hero__media { order: -1; }
  .lp-cta__box { grid-template-columns: 1fr; }
  .lp-cta__copy { text-align: center; }
  .lp-cta__actions { justify-content: center; }
  .lp-cta__visual { display: none; }
}

@media (max-width: 768px) {
  .lp-nav__actions .btn { padding: .55rem .75rem; font-size: .85rem; }
  .lp-service-grid, .lp-features__grid, .lp-stats__grid, .lp-stats__bar { grid-template-columns: 1fr; }
  .lp-footer__columns { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-media-preview { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 640px) {
  .lp-footer__columns { grid-template-columns: 1fr; }
  .lp-cta__box { border-radius: 20px; }
}

@media (max-width: 480px) {
  .lp-nav__brand strong { max-width: 34vw; }
  .lp-stats__grid, .lp-stats__bar { grid-template-columns: 1fr 1fr; gap: .75rem; }
}

@media (max-width: 375px) {
  .lp-hero__heading { font-size: 2.1rem; }
  .lp-nav__bar { padding: .65rem 1rem; gap: .6rem; }
}

@media (max-width: 320px) {
  .lp-nav__logo { max-height: clamp(40px, 5.5vh, 56px); max-width: min(200px, 68vw); }
  .lp-stats__grid { grid-template-columns: 1fr; }
}

.api-access-panel { max-width: 640px; width: 100%; min-width: 0; }
.api-access-panel input { max-width: 100%; }
.api-access-status {
  display: flex; align-items: center; gap: .55rem;
  margin-bottom: 1.1rem; color: #cbd5e1;
}
.api-access-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 10px rgba(52, 211, 153, .7);
}
.api-access-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin: .35rem 0 0; }
.api-info-block { margin: .75rem 0 1rem; min-width: 0; }
.api-info-block input { width: 100%; max-width: 100%; }
.api-key-row { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; min-width: 0; }
.api-key-row input { flex: 1; min-width: 0; }
.api-key-row .btn { flex: 0 0 auto; white-space: nowrap; }
.api-key-error { color: #f87171; margin-top: .35rem; }
.api-whitelist-block { min-width: 0; }
.api-clear-whitelist { margin-top: .6rem; }
.custom-fields-table { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.custom-fields-table .field-row { min-width: 0; }
.api-ip-list { list-style: none; margin: .4rem 0 .75rem; padding: 0; }
.api-ip-list li { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .35rem 0; border-bottom: 1px solid rgba(148,163,184,.15); }
.api-ip-add { display: flex; gap: .5rem; flex-wrap: wrap; }
.api-ip-add input { flex: 1; min-width: 140px; }
.topbar-api-btn { flex-shrink: 0; }

.sync-progress-overlay {
  position: fixed; inset: 0; z-index: var(--z-modal, 80);
  display: grid; place-items: center;
  padding: 1rem;
  background: rgba(2, 8, 23, 0.72);
  backdrop-filter: blur(6px);
}
.sync-progress-overlay[hidden] { display: none !important; }
.sync-progress-card {
  width: min(560px, calc(100% - 2rem));
  max-width: 100%;
  min-width: 0;
  max-height: min(92vh, 900px);
  overflow-x: hidden;
  overflow-y: auto;
  box-sizing: border-box;
  padding: 1.35rem 1.25rem 1.2rem;
  border-radius: 18px;
  border: 1px solid rgba(56, 189, 248, 0.28);
  background: linear-gradient(180deg, rgba(17, 26, 46, 0.98), rgba(8, 15, 28, 0.98));
  box-shadow: 0 18px 50px rgba(2, 8, 23, 0.55);
}
.sync-progress-card h2 { text-align: center; margin-bottom: .35rem; overflow-wrap: anywhere; }
.sync-progress-provider {
  text-align: center;
  margin: 0 0 .5rem;
  color: #cbd5e1;
  overflow-wrap: anywhere;
  min-height: 1.25em;
}
.sync-progress-percent {
  text-align: center;
  font-size: 2rem;
  font-weight: 700;
  font-family: var(--mono);
  color: #7dd3fc;
  text-shadow: 0 0 18px rgba(56, 189, 248, .35);
}
.sync-progress-bar {
  width: 100%;
  height: 8px; border-radius: 999px;
  background: rgba(148, 163, 184, 0.16);
  overflow: hidden; margin: .65rem 0 1rem;
}
.sync-progress-bar__fill {
  display: block; height: 100%; width: 0;
  max-width: 100%;
  background: linear-gradient(90deg, #22d3ee, #3b82f6);
  box-shadow: 0 0 12px rgba(34, 211, 238, .45);
  transition: width .35s ease;
}
@media (prefers-reduced-motion: reduce) {
  .sync-progress-bar__fill { transition: none; }
}
.sync-progress-message, .sync-progress-counts {
  text-align: center; margin: 0 0 .35rem; min-height: 1.25em;
  overflow-wrap: anywhere;
}
.sync-progress-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .5rem .75rem;
  margin: .35rem 0 .75rem;
}
.sync-progress-meta div {
  min-width: 0;
  overflow-wrap: anywhere;
}
.sync-progress-meta span { display: block; font-size: .75rem; }
.sync-progress-meta strong {
  display: block;
  min-height: 1.25em;
  font-family: var(--mono);
}
.sync-progress-log-wrap { min-width: 0; margin: .75rem 0 0; }
.sync-progress-log {
  margin: .35rem 0 0;
  max-height: 10rem;
  overflow-x: hidden;
  overflow-y: auto;
  padding: .6rem .7rem;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(2, 8, 23, 0.55);
  color: #cbd5e1;
  font-family: var(--mono);
  font-size: .75rem;
  line-height: 1.45;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.sync-progress-result { min-height: 4.5rem; }
.sync-timeline {
  list-style: none; margin: 1rem 0 0; padding: 0 0 0 1.1rem;
  border-left: 2px solid rgba(56, 189, 248, 0.2);
  overflow-wrap: anywhere;
}
.sync-timeline li {
  position: relative;
  margin: 0 0 .7rem;
  padding-left: .85rem;
  color: var(--muted);
}
.sync-timeline li::before {
  content: "?";
  position: absolute; left: -1.22rem; top: 0;
  color: #64748b;
}
.sync-timeline li.is-current { color: #e2e8f0; }
.sync-timeline li.is-current::before { content: "?"; color: #38bdf8; }
.sync-timeline li.is-done { color: #86efac; }
.sync-timeline li.is-done::before { content: "?"; color: #34d399; }
.sync-progress-result {
  margin-top: 1rem; padding: .85rem .9rem;
  border-radius: 12px;
  border: 1px solid rgba(56, 189, 248, 0.2);
  background: rgba(8, 15, 28, 0.55);
  overflow-wrap: anywhere;
  white-space: pre-wrap;
  min-width: 0;
}
.sync-progress-result ul { margin: .5rem 0 0; padding-left: 1.1rem; color: #cbd5e1; }
.sync-progress-hint { text-align: center; margin-top: .75rem; }
.sync-progress-actions { justify-content: center; margin-top: .85rem; }

@media (max-width: 480px) {
  .sync-progress-percent { font-size: 1.55rem; }
  .sync-progress-meta { grid-template-columns: 1fr; }
  .sync-progress-card { padding: 1rem .85rem 1rem; }
  .api-access-panel { padding: 1rem; }
  .api-access-actions .btn { width: 100%; }
  .api-info-block input { width: 100%; }
  .api-key-row { flex-direction: column; align-items: stretch; }
  .api-key-row .btn { width: 100%; }
  .api-ip-list li { flex-wrap: wrap; }
  .api-ip-add { flex-direction: column; }
  .api-ip-add .btn, .api-clear-whitelist .btn { width: 100%; }
}

/* ===== Appearance: themes, mode, RTL ===== */
[data-theme="neon"] {
  --bg-primary: #1a1224;
  --bg-secondary: #221530;
  --surface: #2c1a3c;
  --surface-elevated: #382248;
  --text-primary: #f7f4fb;
  --text-muted: #c3b4d4;
  --accent: #f0abfc;
  --accent-hover: #22d3ee;
  --input-bg: #180e22;
  --input-text: var(--text-primary);
  --sidebar-bg: var(--bg-secondary);
  --topbar-bg: rgba(34, 21, 48, 0.9);
  --bg: var(--bg-primary);
  --bg-elev: #12061c;
  --bg-soft: #1c0a2e;
  --panel: #160824;
  --panel-2: #221036;
  --border: rgba(236, 72, 153, 0.28);
  --border-strong: rgba(34, 211, 238, 0.55);
  --text: #f5fbff;
  --muted: #b7c4e0;
  --cyan: #22f3ff;
  --blue: #7c3aed;
  --accent: #f0abfc;
  --accent-2: #22d3ee;
  --glow-1: rgba(240, 171, 252, 0.28);
  --glow-2: rgba(34, 211, 238, 0.22);
}
[data-theme="neon"] .brand-mark {
  box-shadow: 0 0 22px rgba(34, 211, 238, 0.55), 0 0 40px rgba(240, 171, 252, 0.35);
}
[data-theme="midnight"] {
  --bg-primary: #16181f;
  --bg-secondary: #1c1f28;
  --surface: #252833;
  --surface-elevated: #2e3240;
  --text-primary: #eef1f7;
  --text-muted: #9aa6bb;
  --accent: #7dd3fc;
  --accent-hover: #67e8f9;
  --input-bg: #12141b;
  --input-text: var(--text-primary);
  --sidebar-bg: var(--bg-secondary);
  --topbar-bg: rgba(28, 31, 40, 0.9);
  --bg: var(--bg-primary);
  --bg-elev: #0a1018;
  --bg-soft: #101820;
  --panel: #0c121c;
  --panel-2: #121a26;
  --border: rgba(148, 163, 184, 0.12);
  --border-strong: rgba(148, 163, 184, 0.22);
  --text: #e6edf7;
  --muted: #8b9bb3;
  --cyan: #67e8f9;
  --blue: #60a5fa;
  --accent: #7dd3fc;
  --accent-2: #64748b;
  --glow-1: rgba(100, 116, 139, 0.12);
  --glow-2: rgba(14, 165, 233, 0.08);
}
[data-theme="light"] {
  --bg: #f4f7fb;
  --bg-elev: #ffffff;
  --bg-soft: #e8eef6;
  --panel: #ffffff;
  --panel-2: #f8fafc;
  --border: rgba(15, 23, 42, 0.12);
  --border-strong: rgba(37, 99, 235, 0.28);
  --text: #0f172a;
  --muted: #475569;
  --cyan: #0284c7;
  --blue: #2563eb;
  --accent: #0369a1;
  --accent-2: #1d4ed8;
  --glow-1: rgba(14, 165, 233, 0.10);
  --glow-2: rgba(37, 99, 235, 0.08);
  --shadow: 0 18px 50px rgba(15, 23, 42, 0.08);
  --input-bg: #ffffff;
  --input-bg-focus: #ffffff;
  --input-bg-muted: #f1f5f9;
  --input-text: #0f172a;
  --input-border: rgba(15, 23, 42, 0.16);
  --input-focus: rgba(3, 105, 161, 0.55);
  --card-bg: #ffffff;
  --card-border: rgba(15, 23, 42, 0.12);
  --button-primary-text: #ffffff;
  --sidebar-bg: #ffffff;
  --topbar-bg: rgba(255, 255, 255, 0.92);
}
html[data-resolved-mode="light"] {
  color-scheme: light;
  --bg-primary: #eef1f6;
  --bg-secondary: #f6f7fb;
  --surface: #ffffff;
  --surface-elevated: #f3f5f9;
  --border: rgba(28, 32, 44, 0.10);
  --border-strong: rgba(21, 101, 192, 0.38);
  --text-primary: #1c2030;
  --text-secondary: #3a4154;
  --text-muted: #5b6478;
  --accent: #1565c0;
  --accent-hover: #0d47a1;
  --success: #1b8a5a;
  --warning: #b8860b;
  --danger: #c62828;
  --info: #1565c0;
  --bg: var(--bg-primary);
  --bg-elev: var(--surface);
  --bg-soft: var(--surface-elevated);
  --panel: var(--surface);
  --panel-2: var(--surface-elevated);
  --text: var(--text-primary);
  --muted: var(--text-muted);
  --cyan: #1565c0;
  --blue: #0d47a1;
  --accent-2: var(--accent-hover);
  --glow-1: rgba(21, 101, 192, 0.06);
  --glow-2: rgba(13, 71, 161, 0.05);
  --shadow: 0 14px 36px rgba(28, 32, 44, 0.08);
  --input-bg: #ffffff;
  --input-bg-focus: #ffffff;
  --input-bg-muted: #f3f5f9;
  --input-text: #1c2030;
  --input-border: rgba(28, 32, 44, 0.16);
  --input-focus: rgba(21, 101, 192, 0.45);
  --card-bg: #ffffff;
  --card-border: rgba(28, 32, 44, 0.10);
  --button-primary-text: #ffffff;
  --button-secondary-bg: #eef1f6;
  --sidebar-bg: #ffffff;
  --topbar-bg: rgba(255, 255, 255, 0.92);
  --color-bg: var(--bg-primary);
  --color-surface: var(--surface);
  --color-surface-elevated: var(--surface-elevated);
  --color-text: var(--text-primary);
  --color-text-muted: var(--text-muted);
  --color-border: var(--border);
  --color-primary: var(--accent);
}
html[data-resolved-mode="light"] input,
html[data-resolved-mode="light"] select,
html[data-resolved-mode="light"] textarea,
html[data-resolved-mode="light"] button {
  color-scheme: light;
}
html[data-resolved-mode="light"] select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23475569' d='M1 1l5 5 5-5'/%3E%3C/svg%3E") !important;
}
html[data-resolved-mode="light"] input[type="date"]::-webkit-calendar-picker-indicator,
html[data-resolved-mode="light"] input[type="time"]::-webkit-calendar-picker-indicator,
html[data-resolved-mode="light"] input[type="datetime-local"]::-webkit-calendar-picker-indicator {
  filter: none;
}
html[data-resolved-mode="light"] input:-webkit-autofill,
html[data-resolved-mode="light"] input:-webkit-autofill:hover,
html[data-resolved-mode="light"] input:-webkit-autofill:focus,
html[data-resolved-mode="light"] input:-webkit-autofill:active,
html[data-resolved-mode="light"] textarea:-webkit-autofill,
html[data-resolved-mode="light"] textarea:-webkit-autofill:hover,
html[data-resolved-mode="light"] textarea:-webkit-autofill:focus,
html[data-resolved-mode="light"] textarea:-webkit-autofill:active,
html[data-resolved-mode="light"] select:-webkit-autofill {
  box-shadow: 0 0 0 1000px var(--input-bg) inset !important;
  -webkit-box-shadow: 0 0 0 1000px var(--input-bg) inset !important;
  -webkit-text-fill-color: var(--text) !important;
  caret-color: var(--text);
  background-color: var(--input-bg) !important;
}
html[data-resolved-mode="light"] select option,
html[data-resolved-mode="light"] select optgroup {
  background-color: var(--input-bg);
  color: var(--text);
}
html[data-resolved-mode="dark"] {
  color-scheme: dark;
}
html[data-theme="light"][data-resolved-mode="dark"] {
  --bg-primary: #14161e;
  --bg-secondary: #1a1d27;
  --surface: #22252f;
  --surface-elevated: #2a2e3a;
  --text-primary: #f3f5fa;
  --text-muted: #9aa3b8;
  --accent: #6eb8ff;
  --input-bg: #181b24;
  --input-text: var(--text-primary);
  --sidebar-bg: var(--bg-secondary);
  --topbar-bg: rgba(26, 29, 39, 0.88);
  --bg: var(--bg-primary);
  --bg-elev: #111a2e;
  --bg-soft: #16233b;
  --panel: #121c31;
  --panel-2: #182642;
  --border: rgba(148, 163, 184, 0.16);
  --text: #e8eef9;
  --muted: #93a4c3;
  --shadow: 0 18px 50px rgba(2, 8, 23, 0.45);
  --input-bg: rgba(8, 15, 28, 0.92);
  --input-bg-focus: #080f1c;
  --input-bg-muted: rgba(8, 15, 28, 0.75);
  --input-text: #e8eef9;
  --button-primary-text: #04111f;
  --card-bg: linear-gradient(180deg, rgba(24, 38, 66, 0.92), rgba(18, 28, 49, 0.96));
  --sidebar-bg: linear-gradient(180deg, rgba(17, 26, 46, 0.98), rgba(11, 18, 32, 0.98));
  --topbar-bg: rgba(11, 18, 32, 0.72);
}

.appearance-switcher {
  display: flex;
  align-items: center;
  gap: .4rem;
  flex-wrap: wrap;
  min-width: 0;
}
.appearance-switcher__form { margin: 0; min-width: 0; }
.appearance-switcher select {
  max-width: 8.2rem;
  padding: .32rem .5rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  font-size: .78rem;
}
.appearance-theme-grid { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.appearance-theme-card {
  display: flex; flex-direction: column; gap: .2rem;
  padding: .85rem .9rem; border-radius: 12px;
  border: 1px solid var(--border); background: var(--panel); cursor: pointer;
}
.appearance-theme-card.is-selected { border-color: var(--border-strong); }
.appearance-check { display: flex; align-items: center; gap: .5rem; margin: .35rem 0; color: var(--text); }
.appearance-lang-list { display: grid; gap: .25rem; }

.ltr-tech,
.mono,
code,
pre,
.api-key-row input,
.api-ip-list code,
input[name="ip"],
input[type="url"],
input[inputmode="numeric"] {
  direction: ltr;
  unicode-bidi: isolate;
  text-align: left;
}

[dir="rtl"] .sidebar { border-inline-end: 0; border-inline-start: 1px solid var(--border); }
[dir="rtl"] .sync-timeline {
  padding-inline-start: 0;
  padding-inline-end: 1.1rem;
  border-inline-start: 0;
  border-inline-end: 2px solid rgba(56, 189, 248, 0.2);
}
[dir="rtl"] .sync-timeline li { padding-inline-start: 0; padding-inline-end: .85rem; }
[dir="rtl"] .sync-timeline li::before { inset-inline-start: auto; inset-inline-end: -1.22rem; }
[dir="rtl"] select,
[dir="rtl"] .form-group select,
[dir="rtl"] .panel select {
  background-position: left .85rem center !important;
}

.settings-hub {
  margin: 0;
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: .85rem;
}
.settings-hub__lead { margin: 0 .35rem .7rem; font-size: .92rem; }
.settings-hub__tabs {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  min-width: 0;
}
.settings-layout .settings-hub__tabs {
  display: grid;
  flex-wrap: wrap;
  gap: .4rem;
}
.settings-hub__tab {
  display: grid;
  grid-template-columns: 1.6rem minmax(0, 1fr);
  align-items: start;
  gap: .65rem;
  padding: .8rem .75rem;
  border-radius: 14px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-primary);
  font-size: .92rem;
  white-space: normal;
  width: 100%;
}
.settings-nav-copy strong { display: block; font-size: .92rem; }
.settings-nav-copy small { display: block; margin-top: .15rem; font-size: .75rem; line-height: 1.4; color: var(--text-muted); }
.settings-hub__tab:hover { background: var(--surface-elevated); }
.settings-hub__tab.is-active {
  border-color: var(--border-strong);
  color: var(--text-primary);
  background: var(--surface-elevated);
}
.settings-section { min-width: 0; }
.settings-quick-keys { background: var(--color-surface-elevated, var(--panel-2)); }
.settings-system-grid { align-items: stretch; }
.settings-system-card { padding: 1rem; min-width: 0; }
.settings-system-card .actions { margin-top: .75rem; }
.api-endpoint,
.api-key-row input,
code, .mono {
  overflow-wrap: anywhere;
  word-break: break-word;
  min-width: 0;
  max-width: 100%;
}
html[data-resolved-mode="light"] .theme-landing {
  --landing-base: var(--bg);
}
html[data-resolved-mode="light"] .theme-landing {
  --landing-base: var(--bg);
}
html[data-resolved-mode="light"] .lp-nav {
  background: rgba(255, 255, 255, 0.86);
}
html[data-resolved-mode="light"] .lp-drawer {
  background: linear-gradient(180deg, var(--panel) 0%, var(--bg) 100%);
}
html[data-resolved-mode="light"] .lp-drawer__head strong { color: var(--text); }

.tg-card { max-width: 720px; }
.tg-client-card { width: 100%; }
.tg-status-row {
  display: flex; align-items: center; gap: .65rem; flex-wrap: wrap;
  margin-bottom: .85rem;
}
.tg-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: #94a3b8;
  box-shadow: 0 0 8px rgba(148, 163, 184, .45);
  flex: 0 0 auto;
}
.tg-status-row.is-ok .tg-dot { background: #34d399; box-shadow: 0 0 10px rgba(52, 211, 153, .7); }
.tg-status-row.is-bad .tg-dot { background: #f87171; box-shadow: 0 0 10px rgba(248, 113, 113, .55); }
.tg-status-row.is-pending .tg-dot { background: #fbbf24; box-shadow: 0 0 10px rgba(251, 191, 36, .55); }
.tg-setup-flags { display: flex; flex-wrap: wrap; gap: .75rem 1.1rem; color: var(--muted, #94a3b8); font-size: .92rem; }
.tg-steps { margin: 0; padding-inline-start: 1.2rem; }
.tg-steps li { margin: .35rem 0; }
.tg-pref-list { display: grid; gap: .35rem; }
.tg-pref-row {
  display: flex; align-items: center; justify-content: space-between; gap: .75rem;
  padding: .55rem .15rem; border-bottom: 1px solid rgba(148,163,184,.14);
}
.tg-toggle { display: inline-flex; align-items: center; gap: .4rem; white-space: nowrap; }
.tg-actions { display: flex; flex-wrap: wrap; gap: .55rem; margin-top: .85rem; }
.tg-success { color: #34d399; margin: .35rem 0 .75rem; }
.tg-error { color: #f87171; }
html[data-resolved-mode="light"] .tg-success { color: #047857; }
html[data-resolved-mode="light"] .tg-error { color: #b91c1c; }
@media (max-width: 640px) {
  .tg-pref-row { align-items: flex-start; }
  .tg-actions .btn { width: 100%; justify-content: center; }
}

/* ===== TEST 61 design system: layout, settings, chrome ===== */
h1 { font-size: 1.35rem; color: var(--text-primary); }
h2 { font-size: 1.12rem; color: var(--text-primary); }
h3, .section-title { font-size: 1rem; color: var(--text-primary); }
p, small, .muted { color: var(--text-muted); }
.sidebar-close {
  display: none;
  width: 36px; height: 36px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--surface);
  color: var(--text-primary);
}
.sidebar-brand { justify-content: space-between; }
.sidebar-brand > div:first-of-type, .sidebar-brand-copy { min-width: 0; }
.nav-group {
  border: 0;
  margin: .15rem 0 .45rem;
  padding: 0;
}
.nav-group > summary {
  list-style: none;
  cursor: pointer;
  color: var(--text-muted);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: .55rem .8rem .35rem;
  user-select: none;
}
.nav-group > summary::-webkit-details-marker { display: none; }
.nav-group > summary::after {
  content: "";
  float: inline-end;
  width: .45rem; height: .45rem;
  border-inline-end: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  margin-top: .15rem;
  opacity: .7;
}
.nav-group[open] > summary::after { transform: rotate(-135deg); margin-top: .4rem; }
.nav-group .nav-link { margin-top: .12rem; }
.nav-link.is-active {
  background: var(--surface-elevated);
  border-color: var(--border-strong);
  color: var(--text-primary);
  box-shadow: inset 3px 0 0 var(--accent);
}
[dir="rtl"] .nav-link.is-active { box-shadow: inset -3px 0 0 var(--accent); }

.chrome-tools { display: flex; align-items: center; gap: .45rem; flex-wrap: wrap; }
.seg-control {
  display: inline-flex;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 999px;
  padding: .15rem;
  gap: .1rem;
}
.seg-control button {
  border: 0;
  background: transparent;
  color: var(--text-muted);
  border-radius: 999px;
  padding: .32rem .7rem;
  font-size: .78rem;
  font-weight: 600;
}
.seg-control button.is-active {
  background: var(--surface-elevated);
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
}
.appearance-switcher select { background: var(--input-bg); color: var(--input-text); }

.settings-layout {
  display: grid;
  grid-template-columns: minmax(230px, 280px) minmax(0, 1fr);
  gap: 1.25rem;
  align-items: start;
}
.settings-layout .settings-hub {
  position: sticky;
  top: calc(var(--topbar-h) + .75rem);
}
.settings-nav {
  position: sticky; top: calc(var(--topbar-h) + .75rem);
  display: grid; gap: .4rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: .85rem;
}
.settings-nav__lead { margin: 0 .35rem .55rem; font-size: .92rem; }
.settings-nav-item {
  display: grid;
  grid-template-columns: 1.6rem minmax(0, 1fr);
  gap: .65rem;
  align-items: start;
  padding: .8rem .75rem;
  border-radius: 14px;
  color: var(--text-primary);
  border: 1px solid transparent;
}
.settings-nav-item:hover { background: var(--surface-elevated); }
.settings-nav-item.is-active {
  background: var(--surface-elevated);
  border-color: var(--border-strong);
}
.settings-nav-item strong { display: block; font-size: .92rem; }
.settings-nav-item small { display: block; margin-top: .15rem; font-size: .75rem; line-height: 1.4; }
.settings-main { min-width: 0; display: grid; gap: 1rem; }
.settings-card .panel-header { align-items: flex-start; }
.settings-card .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.settings-actions { display: flex; justify-content: flex-end; margin-top: 1rem; }
.field-help { margin: .2rem 0 .45rem; font-size: .78rem; color: var(--text-muted); }
.settings-group-card { padding-bottom: .35rem; }

* { scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--surface-elevated); border-radius: 99px; border: 2px solid transparent; }

@media (max-width: 1024px) {
  .settings-layout { grid-template-columns: 1fr; }
  .settings-nav, .settings-layout .settings-hub { position: static; }
  .settings-layout .settings-hub__tabs { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
}
@media (max-width: 768px) {
  .settings-card .form-grid { grid-template-columns: 1fr; }
  .settings-actions { justify-content: stretch; }
  .settings-actions .btn { width: 100%; }
  .topbar-search { display: none; }
  .chrome-tools .seg-control button { padding: .32rem .5rem; }
  .seg-label { display: none; }
}
@media (max-width: 414px) {
  .page-content { padding: .75rem; }
  .topbar-user { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .sidebar, .btn, .nav-link, .settings-hub__tab, .seg-control button, .overlay {
    transition-duration: .01ms;
    animation-duration: .01ms;
  }
}
html[data-resolved-mode="light"] .btn-primary:hover { color: #fff; }
html[data-resolved-mode="light"] .nav-link.is-active {
  background: #eaf2fb;
}

/* TEST 63: service descriptions, group pricing, client identity, mobile catalog */
.sidebar-brand-copy {
  min-width: 0;
  flex: 1;
  overflow: hidden;
}
.client-identity-name,
.sidebar-brand-copy strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}
.service-cards {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr));
}
.service-card .actions { min-width: 0; }
.service-card .actions form { margin: 0; }
.service-desc-card {
  margin: 0 0 1.1rem;
  padding: .9rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text-primary);
  min-width: 0;
}
.service-desc-card__title {
  margin: 0 0 .65rem;
  font-size: .95rem;
  color: var(--text-primary);
}
.service-desc-card__body {
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
  color: var(--text-primary);
  line-height: 1.55;
}
.service-desc-card__body a { color: var(--accent); }
.group-pricing-table { min-width: 0; }
.group-price-input {
  display: flex;
  align-items: center;
  gap: .5rem;
  min-width: 0;
  flex-wrap: wrap;
}
.group-price-input input {
  width: 100%;
  min-width: 0;
  max-width: 12rem;
}
.theme-client .page-content,
.theme-client .panel,
.theme-client .service-card {
  min-width: 0;
}
@media (max-width: 768px) {
  .theme-client .split-2 { grid-template-columns: 1fr; }
  .theme-client table.data-table { min-width: 520px; }
  [data-order-form] .btn[type="submit"] { width: 100%; }
  .service-card .actions { display: flex; flex-wrap: wrap; gap: .45rem; }
  .service-card .actions .btn { flex: 1 1 auto; min-width: 0; }
}
@media (max-width: 480px) {
  .service-cards { grid-template-columns: minmax(0, 1fr); }
  .group-price-input input { max-width: none; }
  .theme-client .topbar-meta { min-width: 0; }
  .theme-client .chrome-tools { flex-wrap: wrap; justify-content: flex-end; }
}
@media (max-width: 390px) {
  .theme-client .page-content { padding: .75rem; }
}
@media (max-width: 320px) {
  .theme-client .page-content { padding: .65rem; }
  .sidebar-brand { gap: .55rem; padding: .9rem .75rem; }
}

.i18n-panel {
  grid-column: 1 / -1;
  margin-top: .35rem;
  padding: .9rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-soft);
  min-width: 0;
}
.i18n-panel .section-title { margin-bottom: .35rem; }
.i18n-field { margin-top: .85rem; min-width: 0; }
.i18n-field__label { font-size: .82rem; margin-bottom: .35rem; }
.i18n-original { font-size: .85rem; margin-bottom: .45rem; word-break: break-word; }
.i18n-grid {
  display: grid;
  gap: .75rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
}
.service-card .actions { display: flex; flex-wrap: wrap; gap: .45rem; min-width: 0; }
.topbar-api-btn { white-space: nowrap; }

.admin-hub {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .65rem 1rem;
  margin-bottom: 1rem;
  min-width: 0;
}
.admin-hub__title {
  font-weight: 700;
  font-size: 1.05rem;
}
.admin-hub__tabs {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  min-width: 0;
  width: 100%;
}
.admin-hub__tab {
  display: inline-flex;
  align-items: center;
  padding: .45rem .8rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-soft);
  color: inherit;
  text-decoration: none;
  min-width: 0;
  max-width: 100%;
}
.admin-hub__tab.is-active {
  background: var(--accent, var(--primary));
  color: var(--accent-contrast, #fff);
  border-color: transparent;
}
.user-stat-grid { margin-bottom: 1rem; }
.credit-debit { display: flex; flex-wrap: wrap; gap: .5rem; }
.api-key-row { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.api-key-row input { flex: 1 1 12rem; min-width: 0; }
.field-row { min-width: 0; }

@media (min-width: 1600px) {
  .stats-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .service-cards { grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); }
  .settings-card { max-width: 72rem; }
}
@media (min-width: 1920px) {
  .page-content { padding-inline: 1.75rem; }
  .service-cards { grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
  .quick-actions { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (min-width: 2560px) {
  .service-cards { grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
}

@media (max-width: 768px) {
  .i18n-grid { grid-template-columns: minmax(0, 1fr); }
  .topbar-meta { min-width: 0; }
  .topbar-logout-btn span { display: none; }
  .admin-hub__tabs { flex-direction: column; }
  .admin-hub__tab { width: 100%; justify-content: center; }
}

@media (max-width: 414px) {
  .page-head { flex-wrap: wrap; gap: .5rem; }
  .data-table { font-size: .85rem; }
}

@media (max-width: 375px) {
  .admin-hub__tab { padding: .4rem .65rem; }
}

@media (max-width: 320px) {
  .page-content { padding-inline: .7rem; }
  .panel { padding: .75rem; }
}

/* TEST69: admin typography balance (does not change client portal) */
.theme-admin {
  --admin-fs-page: 1.12rem;
  --admin-fs-page: 1.12rem;
  --admin-fs-section: .95rem;
  --admin-fs-th: .7rem;
  --admin-fs-td: .8rem;
  --admin-fs-label: .78rem;
  --admin-fs-muted: .75rem;
  --admin-fs-btn: .8rem;
  --admin-row-pad-y: .42rem;
  --admin-row-pad-x: .65rem;
}
.theme-admin .topbar-title h1,
.theme-admin .page-head h1 { font-size: var(--admin-fs-page); line-height: 1.25; }
.theme-admin .panel-header h2,
.theme-admin .section-title { font-size: var(--admin-fs-section); line-height: 1.3; }
.theme-admin .data-table th,
.theme-admin table.data-table th { font-size: var(--admin-fs-th); padding: var(--admin-row-pad-y) var(--admin-row-pad-x); }
.theme-admin .data-table td,
.theme-admin table.data-table td { font-size: var(--admin-fs-td); padding: var(--admin-row-pad-y) var(--admin-row-pad-x); line-height: 1.35; }
.theme-admin .form-group { gap: .28rem; }
.theme-admin .form-group label { font-size: var(--admin-fs-label); }
.theme-admin .help,
.theme-admin .muted { font-size: var(--admin-fs-muted); }
.theme-admin .btn { font-size: var(--admin-fs-btn); padding: .4rem .75rem; }
.theme-admin .btn-sm { font-size: .75rem; padding: .32rem .58rem; }
.theme-admin .panel { padding: .9rem 1rem; }
.theme-admin .filters.panel { gap: .65rem; padding: .75rem .9rem; }
.theme-admin .sidebar-brand strong { font-size: .9rem; }
.theme-admin .sidebar-brand small { font-size: .7rem; }
.theme-admin .nav-link { font-size: .82rem; }
.pricing-matrix-wrap,
.pricing-matrix-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; }
.pricing-matrix { min-width: 1100px; border-collapse: separate; border-spacing: 0; table-layout: auto; }
.pricing-matrix .pricing-group-input { width: 7.25rem; min-width: 7.25rem; max-width: none; padding: .28rem .4rem; font-size: .9rem; }
.pricing-matrix th,
.pricing-matrix td { white-space: nowrap; vertical-align: top; }
.pricing-matrix .pricing-sticky-name,
.pricing-matrix td.pricing-sticky-name,
.pricing-matrix th.pricing-sticky-name {
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
  line-height: 1.35;
  min-width: 14rem;
  max-width: 22rem;
}
.pricing-matrix .pricing-sticky-name,
.pricing-matrix .pricing-sticky-cost { position: sticky; z-index: 2; background: var(--surface, #fff); }
.pricing-matrix .pricing-sticky-name { left: 0; min-width: 14rem; }
.pricing-matrix .pricing-sticky-cost { left: 14rem; min-width: 8.5rem; }
html[dir="rtl"] .pricing-matrix .pricing-sticky-name { left: auto; right: 0; }
html[dir="rtl"] .pricing-matrix .pricing-sticky-cost { left: auto; right: 14rem; }
.price-below-cost,
input.price-below-cost,
.pricing-group-input.price-below-cost { border-color: #c62828 !important; background: #ffebee; color: #b71c1c; }
.theme-dark .price-below-cost,
.theme-dark input.price-below-cost,
.theme-dark .pricing-group-input.price-below-cost { background: #4a1515; color: #ffcdd2; }
.price-below-cost-msg { color: #c62828; font-weight: 600; }
.pricing-hierarchy { max-width: 70rem; }
.admin-media-preview img { max-height: 96px; width: auto; height: auto; object-fit: contain; }
.client-pricing-group { display: block; color: var(--muted); font-size: .75rem; }
html[dir="rtl"] .pricing-matrix-wrap { direction: rtl; }

/* TEST100 — Pricing UI module (presentation only) */
.pricing-module {
  display: grid;
  gap: 1rem;
  min-width: 0;
}
.pricing-page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: .85rem 1.25rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-elevated, var(--surface));
}
.pricing-page-head__title {
  margin: 0 0 .35rem;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
}
.pricing-page-head__desc {
  margin: 0;
  max-width: 44rem;
  color: var(--muted);
  font-size: .88rem;
  line-height: 1.45;
}
.pricing-page-head__actions {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  align-items: center;
}
.pricing-module-nav {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  padding: .2rem 0;
}
.pricing-module-nav__link {
  display: inline-flex;
  align-items: center;
  padding: .42rem .85rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-soft, var(--surface));
  color: inherit;
  text-decoration: none;
  font-size: .82rem;
  font-weight: 600;
}
.pricing-module-nav__link:hover {
  border-color: var(--border-strong, var(--border));
  background: var(--surface-elevated);
}
.pricing-module-nav__link.is-active {
  background: var(--accent);
  border-color: transparent;
  color: var(--accent-contrast, #fff);
}
.pricing-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .75rem;
  min-width: 0;
}
.pricing-summary-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pricing-summary-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pricing-summary-card {
  padding: .85rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  min-width: 0;
  box-shadow: 0 1px 0 rgba(0, 0, 0, .04);
}
.pricing-summary-card__label {
  color: var(--muted);
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .02em;
  text-transform: uppercase;
  margin-bottom: .35rem;
}
.pricing-summary-card__value {
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.03em;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .4rem;
}
.pricing-summary-card__hint {
  margin-top: .3rem;
  font-size: .74rem;
  color: var(--muted);
}
.pricing-help-panel { padding: .75rem 1rem; }
.pricing-filters {
  display: grid;
  grid-template-columns: minmax(10rem, 1.4fr) repeat(3, minmax(7rem, 1fr)) auto;
  gap: .65rem .75rem;
  align-items: end;
}
.pricing-filters__actions {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  align-items: center;
}
.pricing-matrix-toolbar {
  align-items: flex-start;
  gap: .75rem;
}
.pricing-matrix-toolbar__hint {
  margin-top: .25rem;
  font-size: .8rem;
}
.pricing-service-link {
  font-weight: 600;
  color: inherit;
}
.pricing-service-link:hover { color: var(--accent); }
.pricing-row-actions { white-space: nowrap; }
.pricing-custom__row { line-height: 1.4; }
.pricing-matrix-footer {
  display: flex;
  flex-wrap: wrap;
  gap: .65rem;
  align-items: center;
  margin-top: .85rem;
  padding-top: .75rem;
  border-top: 1px solid var(--border);
}
.pricing-empty {
  display: grid;
  gap: .75rem;
  justify-items: start;
  padding: 1.5rem 0.5rem;
}
.pricing-group-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
  gap: .85rem;
  min-width: 0;
}
.pricing-group-card {
  display: grid;
  gap: .7rem;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-elevated, var(--surface));
  min-width: 0;
}
.pricing-group-card.is-default {
  border-color: var(--accent);
}
.pricing-group-card__head {
  display: flex;
  justify-content: space-between;
  gap: .75rem;
  align-items: flex-start;
}
.pricing-group-card__name {
  margin: 0 0 .4rem;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.3;
}
.pricing-group-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
}
.pricing-group-card__users {
  text-align: end;
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.2;
}
.pricing-group-card__users .muted {
  display: block;
  font-size: .72rem;
  font-weight: 500;
}
html[dir="rtl"] .pricing-group-card__users { text-align: start; }
.pricing-group-card__desc {
  margin: 0;
  font-size: .86rem;
  color: var(--text-primary);
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.pricing-group-card__actions {
  margin: 0;
  padding-top: .55rem;
  border-top: 1px solid var(--border);
}
.pricing-group-card__actions form { margin: 0; display: inline; }
.pricing-group-delete-form {
  margin-top: .85rem;
  padding-top: .75rem;
  border-top: 1px solid var(--border);
}
.pricing-form .form-group label { font-weight: 600; }
.pricing-service-section {
  margin-top: .35rem;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}
.pricing-service-section__head { margin-bottom: .75rem; }
.pricing-service-section__footer {
  margin: .85rem 0 0;
  font-size: .82rem;
}
.theme-dark .pricing-matrix .pricing-sticky-name,
.theme-dark .pricing-matrix .pricing-sticky-cost,
.theme-admin .pricing-matrix .pricing-sticky-name,
.theme-admin .pricing-matrix .pricing-sticky-cost {
  background: var(--surface, #1c212c);
}
@media (max-width: 1100px) {
  .pricing-summary-grid,
  .pricing-summary-grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pricing-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pricing-filters__actions { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .pricing-summary-grid,
  .pricing-summary-grid--3,
  .pricing-summary-grid--2 { grid-template-columns: 1fr; }
  .pricing-filters { grid-template-columns: 1fr; }
  .pricing-page-head__title { font-size: 1.2rem; }
  .pricing-module-nav__link { flex: 1 1 auto; justify-content: center; }
}

.admin-media-preview img {
  width: auto;
  height: auto;
  max-width: 280px;
  max-height: 96px;
  object-fit: contain;
}

.service-order { display: grid; gap: 1rem; max-width: 960px; }
.service-order__header { display: flex; gap: 1rem; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; }
.service-order__title-row { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
.service-order__title { margin: 0; font-size: 1.35rem; line-height: 1.3; }
.service-order__kicker { margin: 0 0 .35rem; font-size: .75rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.service-order__desc { margin-top: .75rem; }
.service-order__meta { display: flex; gap: .75rem; align-items: stretch; }
.service-order__price { background: var(--surface-2, rgba(0,0,0,.04)); border-radius: 10px; padding: .65rem .9rem; min-width: 7rem; }
.service-order__price strong { display: block; font-size: 1.15rem; }
.service-order__price span, .service-order__avail { font-size: .75rem; color: var(--muted); }
.service-order__card { background: var(--surface, #fff); border: 1px solid var(--border, rgba(0,0,0,.08)); border-radius: 12px; padding: 1rem 1.1rem; }
.theme-dark .service-order__card { background: var(--surface, #1b1d24); border-color: rgba(255,255,255,.08); }
.service-order__card-title { margin: 0 0 .85rem; font-size: .95rem; font-weight: 650; }
.service-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .75rem 1rem;
}
.service-field { display: flex; flex-direction: column; gap: .28rem; min-width: 0; }
.service-field--wide, .service-field--textarea { grid-column: 1 / -1; }
.service-field__label { font-size: .82rem; font-weight: 600; }
.service-field__req { color: #c62828; font-weight: 700; margin-inline-start: .15rem; }
.service-field__control, .service-field input, .service-field select, .service-field textarea {
  width: 100%;
  max-width: 100%;
  min-height: 2.4rem;
  border: 1px solid var(--border, #d5d8e0);
  border-radius: 8px;
  padding: .45rem .65rem;
  background: var(--input-bg, #fff);
  color: inherit;
}
.theme-dark .service-field__control,
.theme-dark .service-field input,
.theme-dark .service-field select,
.theme-dark .service-field textarea { background: #12141a; border-color: rgba(255,255,255,.14); color: #f3f5f8; }
.service-field__control:focus, .service-field input:focus, .service-field select:focus, .service-field textarea:focus {
  outline: 2px solid rgba(37, 99, 235, .45); border-color: #2563eb;
}
.service-field__control.is-invalid { border-color: #c62828; }
.service-field__help { margin: 0; font-size: .75rem; color: var(--muted); }
.service-field__error { margin: 0; font-size: .8rem; color: #c62828; }
.theme-dark .service-field__error { color: #ff8a80; }
.service-field__check { display: flex; gap: .4rem; align-items: center; font-size: .85rem; }
.order-summary { margin: 0; display: grid; gap: .45rem; }
.order-summary > div { display: flex; justify-content: space-between; gap: 1rem; font-size: .9rem; }
.order-summary__total { font-weight: 700; }
.service-order__actions { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; }
html[dir="rtl"] .service-fields { direction: rtl; }
html[dir="rtl"] .service-field__label, html[dir="rtl"] .service-field__help, html[dir="rtl"] .service-field__error { text-align: right; }
html[dir="ltr"] .service-field__label, html[dir="ltr"] .service-field__help, html[dir="ltr"] .service-field__error { text-align: left; }

@media (max-width: 768px) {
  .service-fields { grid-template-columns: 1fr; }
  .service-order__header { flex-direction: column; }
}
@media (max-width: 414px) {
  .service-order__card { padding: .85rem; }
  .service-order__title { font-size: 1.15rem; }
}
@media (max-width: 320px) {
  .service-order__actions .btn { width: 100%; }
}

/* TEST74 ? Payment Modules minimal list (desktop + mobile cards) */
.payment-modules-panel .payment-modules-upload {
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border, rgba(127, 127, 127, 0.25));
}
.payment-modules-table .payment-module-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  align-items: center;
}
.payment-modules-table .payment-module-actions form {
  display: inline;
  margin: 0;
}
.theme-light .payment-modules-panel,
html:not(.theme-dark) .payment-modules-panel {
  color: inherit;
}
.theme-dark .payment-modules-panel .data-table th,
.theme-dark .payment-modules-panel .data-table td {
  border-color: rgba(255, 255, 255, 0.1);
}
@media (max-width: 768px) {
  .payment-modules-table-wrap {
    overflow: visible;
  }
  .payment-modules-table {
    min-width: 0 !important;
    width: 100%;
  }
  .payment-modules-table thead {
    display: none;
  }
  .payment-modules-table tbody,
  .payment-modules-table tr.payment-module-row {
    display: block;
    width: 100%;
  }
  .payment-modules-table tr.payment-module-row {
    margin-bottom: .75rem;
    padding: .75rem;
    border: 1px solid var(--border, rgba(127, 127, 127, 0.3));
    border-radius: .5rem;
    background: var(--surface, transparent);
  }
  .payment-modules-table tr.payment-module-row td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: .75rem;
    border: 0;
    padding: .35rem 0;
    text-align: start;
  }
  .payment-modules-table tr.payment-module-row td::before {
    content: attr(data-label);
    font-size: .75rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--muted);
    flex: 0 0 auto;
  }
  .payment-modules-table tr.payment-module-row td[data-label="Actions"] {
    flex-wrap: wrap;
    justify-content: flex-start;
  }
  .payment-modules-table tr.payment-module-row td[data-label="Actions"]::before {
    width: 100%;
    margin-bottom: .25rem;
  }
  .payment-modules-table .payment-module-actions {
    width: 100%;
  }
  .payment-modules-table .payment-module-actions .btn {
    flex: 1 1 auto;
    min-width: 5.5rem;
  }
  [dir="rtl"] .payment-modules-table tr.payment-module-row td {
    text-align: start;
  }
}

.service-order__heading { flex: 1; min-width: 0; }
.service-order__title-row { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
.service-order__avail { font-size: .75rem; color: var(--muted); }
.service-order__card-title { margin: 0 0 .85rem; font-size: .95rem; font-weight: 650; }
.service-field--short { }
.order-summary { margin: 0; display: grid; gap: .45rem; }
.order-summary > div { display: flex; justify-content: space-between; gap: 1rem; font-size: .9rem; }
.order-summary__total { font-weight: 700; }
.theme-dark .service-order__card { background: var(--surface, #1b1d24); border-color: rgba(255,255,255,.08); }
.theme-dark .service-field__control { background: #12141a; border-color: rgba(255,255,255,.14); color: #f3f5f8; }

@media (max-width: 768px) {
  .theme-admin .topbar-title h1 { font-size: 1rem; }
  .pricing-matrix { min-width: 960px; }
}

/* TEST76 ? Admin Management */
.admin-management-panel .admin-management-actions {
  display: flex; flex-wrap: wrap; gap: .4rem; align-items: center;
}
.admin-management-panel .admin-management-actions form { display: inline; margin: 0; }
.admin-permissions-toolbar {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: .75rem;
  align-items: center; margin-bottom: .75rem;
}
.admin-permission-groups { display: grid; gap: .75rem; }
.admin-permission-group {
  border: 1px solid var(--border, rgba(127,127,127,.28));
  border-radius: .5rem;
  padding: .35rem .75rem .75rem;
  background: var(--surface, transparent);
}
.admin-permission-group > summary {
  cursor: pointer; font-weight: 650; padding: .45rem 0; list-style: none;
}
.admin-permission-group > summary::-webkit-details-marker { display: none; }
.admin-permission-list { display: grid; gap: .55rem; }
.admin-permission-item {
  display: flex; gap: .65rem; align-items: flex-start;
  padding: .35rem .25rem; border-radius: .35rem;
}
.admin-permission-item input[type="checkbox"] {
  margin-top: .2rem; flex: 0 0 auto; width: 1rem; height: 1rem;
  accent-color: var(--primary, #0ea5e9);
}
.admin-permission-item span { display: grid; gap: .15rem; min-width: 0; }
.admin-permission-item strong { font-size: .92rem; }
.theme-dark .admin-permission-group {
  border-color: rgba(255,255,255,.12);
  background: rgba(255,255,255,.03);
}
.theme-dark .admin-permission-item:hover { background: rgba(255,255,255,.04); }
@media (max-width: 768px) {
  .admin-management-table-wrap { overflow: visible; }
  .admin-management-table { min-width: 0 !important; width: 100%; }
  .admin-management-table thead { display: none; }
  .admin-management-table tbody,
  .admin-management-table tr.admin-management-row { display: block; width: 100%; }
  .admin-management-table tr.admin-management-row {
    margin-bottom: .75rem; padding: .75rem;
    border: 1px solid var(--border, rgba(127,127,127,.3));
    border-radius: .5rem;
  }
  .admin-management-table tr.admin-management-row td {
    display: flex; justify-content: space-between; gap: .75rem;
    border: 0; padding: .35rem 0; text-align: start;
  }
  .admin-management-table tr.admin-management-row td::before {
    content: attr(data-label);
    font-size: .75rem; text-transform: uppercase; letter-spacing: .04em;
    color: var(--muted); flex: 0 0 auto;
  }
  .admin-management-actions { width: 100%; }
  .admin-management-actions .btn { flex: 1 1 auto; min-width: 5.5rem; }
  [dir="rtl"] .admin-management-table tr.admin-management-row td { text-align: start; }
}


/* TEST80 ? ALMGWAR Smart Assistant floating robot */

/* Flash Announcement (PROMPT 82) */
.flash-card-overlay{position:fixed;inset:0;z-index:1200;display:flex;align-items:center;justify-content:center;background:rgba(15,23,42,.45);padding:1rem;}
.flash-card-overlay--preview{position:absolute;background:rgba(15,23,42,.2);}
.flash-card-overlay--top{align-items:flex-start;}
.flash-card-overlay--bottom{align-items:flex-end;}
.flash-card-overlay--left{justify-content:flex-start;}
.flash-card-overlay--right{justify-content:flex-end;}
.flash-card{position:relative;background:#fff;color:#0f172a;border-radius:16px;padding:1.5rem;max-width:94vw;box-shadow:0 20px 50px rgba(0,0,0,.25);}
.flash-card__title{margin:0 0 .5rem;font-size:1.35rem;}
.flash-card__desc{margin:0 0 1rem;white-space:pre-wrap;}
.flash-card__image{display:block;max-width:100%;height:auto;margin:0 auto .75rem;border-radius:12px;}
.flash-card__html{margin:.5rem 0 1rem;overflow-wrap:anywhere;word-break:break-word;max-width:100%;overflow-x:auto;}
.flash-card__html img{display:block;max-width:100%;height:auto;object-fit:contain;margin:.5rem auto;}
.flash-card__html a{color:inherit;text-decoration:underline;}
.flash-card__html button{display:inline-flex;align-items:center;justify-content:center;min-height:40px;padding:.5rem 1rem;border-radius:10px;border:0;background:#0f172a;color:#fff;cursor:pointer;max-width:100%;}
.flash-card__html table{max-width:100%;border-collapse:collapse;}
.flash-card__html *{max-width:100%;box-sizing:border-box;}
.flash-card__btn{display:inline-flex;margin-top:.25rem;}
.flash-card__close{position:absolute;border:0;background:rgba(15,23,42,.08);border-radius:999px;cursor:pointer;line-height:1;}
.flash-card__close--top-right{top:.6rem;inset-inline-end:.6rem;}
.flash-card__close--top-left{top:.6rem;inset-inline-start:.6rem;}
.flash-card__close--sm{width:28px;height:28px;font-size:1rem;}
.flash-card__close--md{width:34px;height:34px;font-size:1.2rem;}
.flash-card__close--lg{width:42px;height:42px;font-size:1.4rem;}
.flash-card--fade{animation:flashFade .35s ease;}
.flash-card--zoom,.flash-card--scale{animation:flashZoom .35s ease;}
.flash-card--slide{animation:flashSlide .35s ease;}
.flash-card--neon{box-shadow:0 0 0 2px #22d3ee,0 0 24px rgba(34,211,238,.55);}
.flash-card--noanim{animation:none;}
@keyframes flashFade{from{opacity:0}to{opacity:1}}
@keyframes flashZoom{from{opacity:0;transform:scale(.92)}to{opacity:1;transform:scale(1)}}
@keyframes flashSlide{from{opacity:0;transform:translateY(16px)}to{opacity:1;transform:translateY(0)}}
@media (prefers-reduced-motion:reduce){.flash-card--fade,.flash-card--zoom,.flash-card--scale,.flash-card--slide{animation:none;}}

/* PROMPT 83 ? invoice success + pricing readability */
.invoice-panel--paid { box-shadow: 0 0 0 1px rgba(34,197,94,.35); }
.invoice-paid-banner { margin: .75rem 0 1rem; }
@media (max-width: 768px) {
  .pricing-matrix { min-width: 960px; }
  .pricing-matrix .pricing-sticky-name,
  .pricing-matrix td.pricing-sticky-name { min-width: 12rem; max-width: 18rem; font-size: .92rem; }
}

/* PROMPT 85 ? Customer PWA install */
.pwa-install { margin: 0 0 1rem; max-width: 100%; }
.pwa-install__banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .75rem 1rem;
  padding: .85rem 1rem;
  border: 1px solid var(--border, rgba(255,255,255,.1));
  border-radius: 12px;
  background: var(--surface, #22252f);
}
.pwa-install__copy { flex: 1 1 12rem; min-width: 0; }
.pwa-install__title { display: block; font-size: .95rem; margin: 0 0 .2rem; }
.pwa-install__hint { margin: 0; color: var(--muted, #9aa3b5); font-size: .82rem; line-height: 1.4; }
.pwa-install__actions { display: flex; align-items: center; gap: .45rem; flex: 0 0 auto; }
.pwa-install__btn {
  min-height: 44px;
  min-width: 44px;
  padding: .55rem 1rem;
  white-space: nowrap;
}
.pwa-install__dismiss {
  min-width: 44px;
  min-height: 44px;
  font-size: 1.25rem;
  line-height: 1;
}
.pwa-install__status { margin: .35rem 0; }
.pwa-install__ios { margin-top: .75rem; }
.pwa-install__steps { margin: .5rem 0 0; padding-inline-start: 1.25rem; line-height: 1.55; }
html[dir="rtl"] .pwa-install__banner { text-align: right; }
html[dir="ltr"] .pwa-install__banner { text-align: left; }
@media (max-width: 430px) {
  .pwa-install__banner { padding: .75rem; }
  .pwa-install__actions { width: 100%; justify-content: flex-end; }
}

/* ============================================================
   ENTERPRISE UI POLISH ? visual layer only (no logic changes)
   ============================================================ */

/* Shell / sidebar / nav */
.sidebar {
  background: linear-gradient(180deg, #161b26 0%, #12161f 100%);
  border-inline-end-color: rgba(226, 232, 240, 0.07);
}
.sidebar-brand {
  padding: 1rem 1.05rem;
  background: rgba(255, 255, 255, 0.015);
}
.brand-mark, .brand-lockup .brand-mark {
  background: linear-gradient(145deg, #6ba3e8, #4a7fc4);
  color: #0a1018;
  box-shadow: 0 6px 16px rgba(74, 127, 196, 0.22);
}
.nav-link {
  border-radius: 10px;
  padding: .68rem .78rem;
  transition: background-color var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast);
}
.nav-link:hover {
  background: rgba(107, 163, 232, 0.07);
  color: var(--text-primary);
}
.nav-link.is-active {
  background: rgba(107, 163, 232, 0.12);
  border-color: rgba(107, 163, 232, 0.28);
  color: var(--text-primary);
  box-shadow: inset 3px 0 0 var(--accent);
}
html[dir="rtl"] .nav-link.is-active {
  box-shadow: inset -3px 0 0 var(--accent);
}
.nav-group > summary {
  letter-spacing: .06em;
  color: #7a8498;
}
.nav-group > summary:hover { color: var(--text-secondary); }

.topbar {
  background: rgba(18, 22, 31, 0.9);
  border-bottom-color: rgba(226, 232, 240, 0.07);
  height: var(--topbar-h);
}
.topbar-title h1 {
  font-size: 1.05rem;
  font-weight: 650;
  letter-spacing: -0.015em;
}
.topbar-user {
  border-radius: 10px;
  background: rgba(107, 163, 232, 0.06);
}

.page-content {
  padding: 1.25rem 1.35rem 2rem;
}

/* Cards / panels / stats */
.card, .stat-card, .panel {
  background: linear-gradient(180deg, rgba(32, 38, 52, 0.92) 0%, rgba(24, 29, 40, 0.98) 100%);
  border-color: rgba(226, 232, 240, 0.08);
  box-shadow: 0 8px 24px rgba(4, 6, 12, 0.28);
  border-radius: var(--radius);
}
.card, .panel { padding: 1.2rem 1.25rem; }
.card-header, .panel-header {
  margin-bottom: 1.05rem;
  padding-bottom: .65rem;
  border-bottom: 1px solid rgba(226, 232, 240, 0.06);
}
.card-header h2, .panel-header h2, .section-title {
  font-size: 1.02rem;
  font-weight: 650;
  letter-spacing: -0.01em;
}
.stat-card {
  position: relative;
  overflow: hidden;
  padding: 1.1rem 1.15rem;
}
.stat-card::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--accent), transparent);
  opacity: .75;
}
.stat-card .label {
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  font-weight: 600;
}
.stat-card .value {
  font-size: 1.5rem;
  margin-top: .15rem;
}

/* Buttons */
.btn, .btn-primary, .btn-ghost, .btn-danger, .btn-success, .btn-secondary, .btn-warning {
  border-radius: 10px;
  min-height: 40px;
  letter-spacing: 0.01em;
  transition: background-color var(--transition-fast), border-color var(--transition-fast),
    color var(--transition-fast), filter var(--transition-fast), box-shadow var(--transition-fast), transform .12s ease;
}
.btn:active:not(:disabled), .btn-primary:active:not(:disabled) {
  transform: translateY(1px);
}
.btn-primary {
  background: linear-gradient(180deg, #78adea 0%, #5d94d4 100%);
  color: #0b1220;
  box-shadow: 0 4px 12px rgba(93, 148, 212, 0.22);
}
.btn-primary:hover {
  filter: brightness(1.05);
  box-shadow: 0 6px 16px rgba(93, 148, 212, 0.28);
}
.btn-ghost:hover {
  background: rgba(107, 163, 232, 0.08);
}
.btn:disabled, .btn[disabled] {
  opacity: .55;
  cursor: not-allowed;
  transform: none;
  filter: none;
}
.btn-sm { min-height: 34px; }
.icon-btn {
  border-radius: 10px;
  transition: border-color var(--transition-fast), background-color var(--transition-fast);
}
.icon-btn:hover {
  background: rgba(107, 163, 232, 0.08);
}

/* Forms */
.form-group label {
  font-size: .84rem;
  color: var(--text-secondary);
  font-weight: 600;
}
.filters {
  padding: 1rem 1.1rem;
  background: rgba(28, 33, 44, 0.65);
  border: 1px solid rgba(226, 232, 240, 0.07);
  border-radius: var(--radius);
  gap: .75rem;
}
.filters.panel { margin-bottom: 1rem; }

/* Tables */
.table-wrap {
  border-radius: 12px;
  border: 1px solid rgba(226, 232, 240, 0.07);
  background: rgba(12, 15, 22, 0.35);
}
table.data-table { min-width: 640px; }
.data-table thead th {
  background: rgba(18, 22, 31, 0.92);
  position: sticky;
  top: 0;
  z-index: 1;
  padding: .85rem .75rem;
  border-bottom-color: rgba(226, 232, 240, 0.1);
}
.data-table td { padding: .8rem .75rem; }
.data-table tbody tr:nth-child(even) td {
  background: rgba(255, 255, 255, 0.015);
}
.data-table tr:hover td {
  background: rgba(107, 163, 232, 0.05) !important;
}
.data-table .actions {
  gap: .4rem;
  flex-wrap: wrap;
}

/* Badges / alerts / empty */
.badge {
  border-radius: 8px;
  padding: .22rem .55rem;
  letter-spacing: .02em;
  text-transform: none;
}
.alert {
  border-radius: 12px;
  padding: .9rem 1.05rem;
  display: flex;
  flex-direction: column;
  gap: .25rem;
}
.alert-warning {
  background: rgba(224, 180, 90, 0.1);
  border-color: rgba(224, 180, 90, 0.28);
  color: #f0d9a0;
}
.alert-info {
  background: rgba(107, 163, 232, 0.1);
  border-color: rgba(107, 163, 232, 0.28);
  color: #c5dbf5;
}
.alert-list {
  padding-inline-start: 1.1rem;
  padding-left: unset;
}
.empty {
  padding: 2.25rem 1.25rem;
  border-style: dashed;
  border-color: rgba(226, 232, 240, 0.12);
  background: rgba(255, 255, 255, 0.015);
  border-radius: 12px;
}

/* Auth / login / register */
.auth-shell, .error-shell {
  background:
    radial-gradient(700px 360px at 50% -20%, rgba(107, 163, 232, 0.1), transparent 60%),
    linear-gradient(165deg, #0f1219 0%, #151923 55%, #12161f 100%);
}
.auth-card, .error-card, .install-card {
  width: min(100%, 440px);
  background: linear-gradient(180deg, #1e2431 0%, #181d28 100%);
  border: 1px solid rgba(226, 232, 240, 0.1);
  border-radius: 16px;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.45);
  padding: 1.65rem 1.55rem;
}
.auth-card h1, .error-card h1 {
  font-size: 1.45rem;
  letter-spacing: -0.02em;
  margin-bottom: .35rem;
}
.auth-card > p {
  margin-bottom: 1.15rem;
  font-size: .92rem;
}
.auth-footer-link {
  margin-top: 1.1rem;
  color: var(--muted);
  font-size: .9rem;
  text-align: center;
}
.auth-card .stack .btn-primary {
  margin-top: .25rem;
  min-height: 44px;
}

/* Payment / checkout presentation */
.payment-method-card {
  border-radius: 12px;
  border: 1px solid rgba(226, 232, 240, 0.1);
  background: linear-gradient(180deg, rgba(32, 38, 52, 0.9), rgba(22, 27, 38, 0.95));
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast), transform .12s ease;
}
.payment-method-card:hover {
  border-color: rgba(107, 163, 232, 0.35);
  transform: translateY(-1px);
}
.payment-method-card.is-selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(107, 163, 232, 0.35), 0 8px 20px rgba(4, 6, 12, 0.3);
}
.kv-row {
  padding: .65rem 0;
  font-size: .93rem;
}
.kv-row:last-child { border-bottom: 0; }

/* Service type cards */
.service-type-card {
  background: linear-gradient(180deg, rgba(30, 36, 48, 0.95), rgba(18, 22, 31, 0.98));
  border-radius: 12px;
}
.service-type-card:hover {
  border-color: rgba(107, 163, 232, 0.4);
}
.service-type-card.is-active {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(107, 163, 232, 0.28);
}

/* Landing visual polish (presentation only) */
.theme-landing .lp-hero__highlight {
  background: linear-gradient(135deg, var(--landing-primary, #6ba3e8), var(--landing-accent, #5b8fd4));
  -webkit-background-clip: text;
  background-clip: text;
}
.theme-landing .lp-card,
.theme-landing .lp-feature,
.theme-landing .lp-stat {
  border-radius: 14px;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast), transform .12s ease;
}
.theme-landing .lp-card:hover,
.theme-landing .lp-feature:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.2);
}
.theme-landing .lp-nav {
  backdrop-filter: blur(14px);
}
.theme-landing .lp-section-head h2 {
  letter-spacing: -0.02em;
}

/* Modal / dialog appearance */
.modal-backdrop {
  backdrop-filter: blur(4px);
}
.modal-panel {
  border-radius: 14px;
  border: 1px solid rgba(226, 232, 240, 0.1);
  box-shadow: 0 24px 56px rgba(0, 0, 0, 0.5);
  background: linear-gradient(180deg, #1e2431, #171c27);
}

/* Pagination */
.pagination-links .btn,
.pagination-links a {
  min-height: 36px;
  border-radius: 8px;
}

/* Checkbox rows in admin tables */
.checkbox-row {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  cursor: pointer;
  user-select: none;
}
.checkbox-row input[type="checkbox"] {
  width: 1rem;
  height: 1rem;
  accent-color: var(--accent);
}

/* Soften neon flash option for enterprise look */
.flash-card--neon {
  box-shadow: 0 0 0 1px rgba(107, 163, 232, 0.45), 0 12px 32px rgba(0, 0, 0, 0.25);
}

/* Loading / skeleton (visual only) */
.ui-skeleton {
  background: linear-gradient(90deg, rgba(255,255,255,.04) 25%, rgba(255,255,255,.08) 37%, rgba(255,255,255,.04) 63%);
  background-size: 400% 100%;
  animation: uiSkeleton 1.2s ease infinite;
  border-radius: 8px;
  min-height: 1rem;
}
@keyframes uiSkeleton {
  0% { background-position: 100% 0; }
  100% { background-position: 0 0; }
}
@media (prefers-reduced-motion: reduce) {
  .ui-skeleton { animation: none; }
  .btn:active:not(:disabled),
  .payment-method-card:hover,
  .theme-landing .lp-card:hover,
  .theme-landing .lp-feature:hover,
  .service-type-card:hover {
    transform: none;
  }
}

/* RTL refinements */
html[dir="rtl"] .data-table th,
html[dir="rtl"] .data-table td { text-align: start; }
html[dir="rtl"] .alert-list { padding-inline-start: 1.1rem; }
html[dir="rtl"] .nav-group > summary::after {
  float: inline-start;
  margin-inline-end: 0;
  margin-inline-start: .35rem;
}
html[dir="rtl"] .sidebar-nav .nav-link .icon { margin-inline-end: 0; }

/* Responsive polish ? target key breakpoints */
@media (max-width: 1280px) {
  .page-content { padding: 1.1rem 1.15rem 1.75rem; }
}
@media (max-width: 1024px) {
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filters { padding: .85rem; }
}
@media (max-width: 768px) {
  .page-content { padding: .85rem .85rem 1.5rem; }
  .card, .panel { padding: 1rem; }
  .card-header, .panel-header {
    padding-bottom: .5rem;
    margin-bottom: .85rem;
  }
  .topbar { padding: 0 .75rem; gap: .5rem; }
  .auth-card, .error-card {
    padding: 1.35rem 1.15rem;
    border-radius: 14px;
  }
  .table-wrap { border-radius: 10px; }
  .data-table { min-width: 540px; }
  .actions .btn { flex: 1 1 auto; justify-content: center; }
}
@media (max-width: 414px) {
  .stats-grid, .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .stat-card .value { font-size: 1.3rem; }
  .btn, .btn-primary, .btn-ghost, .btn-danger, .btn-success {
    white-space: normal;
    text-align: center;
  }
  .panel-header, .card-header {
    flex-direction: column;
    align-items: stretch;
  }
  .panel-header .actions, .card-header .actions {
    width: 100%;
  }
}
@media (max-width: 375px) {
  .page-content { padding: .7rem .7rem 1.25rem; }
  .auth-shell { padding: .85rem; }
  .topbar-user { display: none; }
}
@media (max-width: 320px) {
  body { font-size: 14px; }
  .brand-mark { width: 36px; height: 36px; font-size: .85rem; }
  .btn-sm { padding: .38rem .55rem; font-size: .8rem; }
}

/* Large desktop breathing room */
@media (min-width: 1440px) {
  .page-content { padding: 1.4rem 1.6rem 2.25rem; }
}
@media (min-width: 1920px) {
  .page-content { padding: 1.55rem 1.85rem 2.5rem; }
}

/* Focus accessibility */
a:focus-visible,
button:focus-visible,
.btn:focus-visible,
.nav-link:focus-visible,
.icon-btn:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Scrollbar (WebKit) ? subtle enterprise */
.sidebar-nav::-webkit-scrollbar,
.table-wrap::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
.sidebar-nav::-webkit-scrollbar-thumb,
.table-wrap::-webkit-scrollbar-thumb {
  background: rgba(226, 232, 240, 0.14);
  border-radius: 999px;
}
.sidebar-nav::-webkit-scrollbar-track,
.table-wrap::-webkit-scrollbar-track {
  background: transparent;
}

.alert-preline { white-space: pre-line; }

