/* ECUKORE Portal & Owner Command Center — Dynamic Full-Screen Dark/Light + 3-Language RTL Stylesheet (v6) */
:root {
  --bg-deep: #070b14;
  --bg-panel: #0d1424;
  --bg-card: #121c31;
  --bg-card-hover: #17243f;
  --bg-input: #09101d;
  --border: #1e2d4a;
  --border-bright: #2e4775;
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --accent: #0ea5e9;
  --accent-glow: rgba(14, 165, 233, 0.25);
  --emerald: #39b58b;
  --emerald-bg: rgba(57, 181, 139, 0.14);
  --gold: #f59e0b;
  --gold-bg: rgba(245, 158, 11, 0.14);
  --danger: #f43f5e;
  --danger-bg: rgba(244, 63, 94, 0.14);
  --paypal: #0070ba;
  --radius: 12px;
  --radius-sm: 8px;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  word-break: normal;
  overflow-wrap: normal;
  hyphens: none;
}

html {
  font-size: clamp(13.2px, 0.86vw, 15px);
}

html, body {
  width: 100%;
  min-height: 100dvh;
  overflow-x: hidden;
}

body {
  font-family: "Segoe UI", Inter, "Noto Sans Arabic", "Cairo", Tahoma, system-ui, -apple-system, sans-serif;
  background: radial-gradient(circle at 15% 0%, #0f1d38 0%, var(--bg-deep) 55%);
  color: var(--text-main);
  line-height: 1.5;
  word-break: normal;
  overflow-wrap: normal;
  hyphens: none;
}

html[dir="rtl"] body {
  font-family: "Segoe UI", "Noto Sans Arabic", "Cairo", Tahoma, system-ui, sans-serif;
  line-height: 1.62;
}

html[dir="rtl"] input[type="email"],
html[dir="rtl"] input[type="number"],
html[dir="rtl"] input.mono {
  direction: ltr;
  text-align: start;
}

.hidden {
  display: none !important;
}

a {
  color: var(--accent);
  text-decoration: none;
}

code, .mono {
  font-family: "Cascadia Code", Consolas, monospace;
  direction: ltr;
  unicode-bidi: embed;
}

/* ======================== LANGUAGE & THEME CONTROLS ======================== */
.lang-switch {
  display: inline-flex;
  align-items: center;
  background: var(--bg-input);
  border: 1px solid var(--border-bright);
  border-radius: 8px;
  padding: 2px;
  gap: 2px;
}

.lang-btn {
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.76rem;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: 0.14s;
}

.lang-btn.active {
  background: var(--accent);
  color: #ffffff;
}

/* ======================== TOAST NOTIFICATIONS ======================== */
.toast-stack {
  position: fixed;
  top: 18px;
  inset-inline-end: 18px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 430px;
}

.toast {
  padding: 13px 16px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border-bright);
  border-inline-start: 4px solid var(--accent);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
  font-size: 0.9rem;
  color: var(--text-main);
  animation: slideIn 0.2s ease-out;
}
.toast.ok { border-inline-start-color: var(--emerald); }
.toast.err { border-inline-start-color: var(--danger); }
.toast.warn { border-inline-start-color: var(--gold); }

@keyframes slideIn {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ======================== AUTHENTICATION VIEW (DYNAMIC FULL SCREEN) ======================== */
.auth-shell {
  min-height: 100dvh;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(16px, 2.5vw, 36px);
}

.auth-grid {
  display: grid;
  grid-template-columns: 1.08fr 1fr;
  max-width: 1280px;
  width: 100%;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
}

@media (max-width: 920px) {
  .auth-grid { grid-template-columns: 1fr; }
}

.auth-hero {
  padding: clamp(24px, 3vw, 44px);
  background: linear-gradient(155deg, #0b1933 0%, #070d1b 100%);
  border-inline-end: 1px solid var(--border);
  color: #f1f5f9;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 11px;
}

.brand-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), #2563eb);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.12rem;
  color: #fff;
  box-shadow: 0 0 18px var(--accent-glow);
  flex-shrink: 0;
  overflow: hidden;
}
.brand-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.auth-hero h1 {
  font-size: clamp(1.4rem, 2vw, 1.85rem);
  line-height: 1.25;
  margin: 14px 0 12px;
  color: #ffffff;
}

.feature-list {
  list-style: none;
  margin-top: 18px;
  display: grid;
  gap: 11px;
}

.feature-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.9rem;
  color: #cbd5e1;
}

.feature-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--emerald);
  margin-top: 7px;
  flex-shrink: 0;
}

.auth-form-pane {
  padding: clamp(22px, 2.6vw, 36px);
}

.auth-tabs {
  display: flex;
  gap: 8px;
  background: var(--bg-input);
  padding: 5px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  margin-bottom: 18px;
}

.auth-tab {
  flex: 1;
  padding: 9px 12px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--text-muted);
  font-weight: 700;
  cursor: pointer;
  transition: 0.15s;
}

.auth-tab.active {
  background: var(--accent);
  color: #fff;
}

/* ======================== 2-LAYER INTERACTIVE CAPTCHA ======================== */
.captcha-box {
  background: #08101f;
  border: 1px solid var(--border-bright);
  border-radius: 10px;
  padding: 12px;
  margin: 12px 0 16px;
  direction: ltr;
}

.captcha-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.captcha-q {
  font-size: 0.82rem;
  font-weight: 600;
  color: #7dd3fc;
}

.captcha-tiles {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 11px;
}

.captcha-tile {
  background: #0b1324;
  border: 2px solid #1e293b;
  border-radius: 8px;
  padding: 3px;
  cursor: pointer;
  transition: 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.captcha-tile:hover { border-color: #475569; }
.captcha-tile.selected {
  border-color: var(--emerald);
  box-shadow: 0 0 0 2px rgba(57, 181, 139, 0.3);
}
.captcha-tile img {
  width: 100%;
  height: auto;
  border-radius: 5px;
  display: block;
  pointer-events: none;
}

.captcha-slider-hint {
  font-size: 0.78rem;
  color: #94a3b8;
  margin-bottom: 6px;
}

.jigsaw-stage {
  position: relative;
  width: 280px;
  height: 92px;
  margin: 0 auto 8px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #263552;
  user-select: none;
}
.jigsaw-bg { width: 280px; height: 92px; display: block; pointer-events: none; }
.jigsaw-piece {
  position: absolute;
  top: 0;
  left: 0;
  width: 52px;
  height: 92px;
  pointer-events: none;
  filter: drop-shadow(0 0 6px rgba(57, 181, 139, 0.65));
}
.slider-track-wrap { width: 280px; margin: 0 auto; }
.jigsaw-range { width: 100%; accent-color: var(--emerald); cursor: grab; height: 24px; }
.captcha-status { font-size: 0.76rem; text-align: center; margin-top: 4px; color: #94a3b8; }
.captcha-status.ready { color: var(--emerald); font-weight: 600; }

/* ======================== DYNAMIC FULL-SCREEN PORTAL SHELL ======================== */
.portal-layout {
  display: grid;
  grid-template-columns: clamp(232px, 15.5vw, 274px) minmax(0, 1fr);
  width: 100%;
  min-height: 100dvh;
}

@media (max-width: 980px) {
  .portal-layout { grid-template-columns: 1fr; }
  .sidebar {
    position: static !important;
    height: auto !important;
    border-inline-end: none !important;
    border-bottom: 1px solid var(--border);
  }
}

.sidebar {
  background: #090f1d;
  border-inline-end: 1px solid var(--border);
  padding: 10px 10px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: sticky;
  top: 0;
  height: 100dvh;
  overflow-y: auto;
  min-width: 0;
}

.nav-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 8px;
}

.nav-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  background: transparent;
  color: #cbd5e1;
  font-size: 0.83rem;
  font-weight: 600;
  text-align: start;
  cursor: pointer;
  transition: 0.14s;
}
.nav-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
}
.nav-btn.active {
  background: linear-gradient(90deg, rgba(14, 165, 233, 0.24), rgba(14, 165, 233, 0.06));
  border-color: rgba(14, 165, 233, 0.5);
  color: #ffffff;
}

.main-column {
  display: flex;
  flex-direction: column;
  min-width: 0;
  width: 100%;
  min-height: 100dvh;
}

.topbar {
  background: rgba(13, 20, 36, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  padding: 10px clamp(14px, 1.8vw, 28px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  position: sticky;
  top: 0;
  z-index: 40;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.credit-pill {
  background: var(--emerald-bg);
  border: 1px solid rgba(57, 181, 139, 0.45);
  color: #6ee7b7;
  padding: 5px 12px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 0.84rem;
  white-space: nowrap;
  flex-shrink: 0;
}

.status-online {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.77rem;
  color: #6ee7b7;
  background: rgba(57, 181, 139, 0.1);
  border: 1px solid rgba(57, 181, 139, 0.25);
  padding: 4px 10px;
  border-radius: 999px;
  white-space: nowrap;
  flex-shrink: 0;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--emerald);
  box-shadow: 0 0 8px var(--emerald);
}

/* FULL-SCREEN DYNAMIC WORKSPACE (Adapts seamlessly from 1366px to 4K!) */
.workspace {
  padding: clamp(14px, 1.6vw, 26px);
  width: 100%;
  max-width: 100%;
  flex: 1;
}

/* ======================== CARDS, GRIDS & INTERACTIVE KPI STATS ======================== */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(195px, 1fr));
  gap: 13px;
  margin-bottom: 18px;
}

.kpi-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 15px 18px;
  text-align: start;
  transition: 0.15s;
}

.kpi-card.clickable {
  cursor: pointer;
  user-select: none;
}
.kpi-card.clickable:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(14, 165, 233, 0.14);
}
.kpi-card.active-drill {
  border-color: var(--gold);
  box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.35);
}

.kpi-label {
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  font-weight: 700;
}

.kpi-val {
  font-size: clamp(1.35rem, 1.7vw, 1.7rem);
  font-weight: 800;
  margin-top: 5px;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(14px, 1.4vw, 20px);
  margin-bottom: 16px;
  min-width: 0;
  max-width: 100%;
  word-break: normal;
  overflow-wrap: normal;
  hyphens: none;
}

.card-title {
  font-size: 1.04rem;
  font-weight: 700;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

/* ======================== FORMS, INPUTS & BUTTONS ======================== */
.field {
  margin-bottom: 12px;
}

.field label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 4px;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
select,
textarea {
  width: 100%;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-input);
  color: var(--text-main);
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.15s;
}

input:focus, select:focus, textarea:focus {
  border-color: var(--accent);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 0.84rem;
  line-height: 1.3;
  text-align: center;
  white-space: nowrap;
  word-break: keep-all;
  overflow-wrap: normal;
  hyphens: none;
  flex-shrink: 0;
  cursor: pointer;
  transition: 0.15s;
  color: #fff;
  background: var(--accent);
}
.btn:hover { filter: brightness(1.08); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn-full {
  width: 100%;
  max-width: 100%;
  white-space: normal;
  word-break: normal;
  overflow-wrap: normal;
}
.btn-sm {
  padding: 5px 10px;
  font-size: 0.77rem;
  white-space: nowrap;
  word-break: keep-all;
  flex-shrink: 0;
}
.btn-emerald { background: var(--emerald); color: #fff; }
.btn-gold { background: var(--gold); color: #090d16; font-weight: 700; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-paypal { background: var(--paypal); color: #fff; }
.btn-ghost {
  background: rgba(148, 163, 184, 0.08);
  border-color: var(--border-bright);
  color: var(--text-main);
}

/* ======================== UNIFIED FAST 24/7 WORKSPACE (NO CLIPPED SCROLLBAR / NO OVERFLOW!) ======================== */
.service-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.36fr) minmax(0, 1fr);
  gap: clamp(14px, 1.5vw, 22px);
  align-items: start;
  width: 100%;
  max-width: 100%;
}
.service-workspace > * {
  min-width: 0;
  max-width: 100%;
}

@media (max-width: 1120px) {
  .service-workspace { grid-template-columns: 1fr; }
}

.order-panel-sticky {
  position: static;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

.clone-dual-ecu-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 12px;
  width: 100%;
  max-width: 100%;
}
.clone-dual-ecu-grid > * {
  min-width: 0;
  max-width: 100%;
}
@media (max-width: 640px) {
  .clone-dual-ecu-grid {
    grid-template-columns: 1fr;
  }
}
.clone-ecu-col {
  background: rgba(15, 23, 42, 0.55);
  border: 1.5px solid var(--border-bright);
  border-radius: 10px;
  padding: 11px 12px;
  min-width: 0;
  max-width: 100%;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}
.clone-ecu-col.dragover {
  border-color: #00ff41 !important;
  box-shadow: 0 0 0 2px rgba(0, 255, 65, 0.28);
  background: rgba(57, 181, 139, 0.12) !important;
}
.clone-ecu-col.donor-col {
  border-color: rgba(57, 181, 139, 0.48);
  background: rgba(57, 181, 139, 0.05);
}
.clone-ecu-hdr {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  margin-bottom: 9px;
  padding-bottom: 5px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.clone-ecu-col .dropzone {
  padding: 10px 8px;
}
.clone-ecu-col .dropzone-title {
  font-size: 0.80rem;
}
.clone-ecu-col .dropzone-sub {
  font-size: 0.70rem;
}
html[data-theme="light"] .clone-ecu-col {
  background: #f8fafc;
  border-color: #cbd5e1;
}
html[data-theme="light"] .clone-ecu-col.donor-col {
  background: #f0fdf4;
  border-color: #34d399;
}

.service-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
@media (min-width: 1720px) {
  .service-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.svc-card {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 13px 15px;
  cursor: pointer;
  transition: 0.14s;
}
.svc-card:hover {
  border-color: var(--border-bright);
  background: var(--bg-card-hover);
}
.svc-card.selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), 0 8px 20px rgba(14, 165, 233, 0.15);
  background: rgba(14, 165, 233, 0.1);
}
.svc-card.standby-card {
  opacity: 0.86;
  border-style: dashed;
}

.svc-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.svc-title {
  font-weight: 700;
  font-size: 0.94rem;
  color: var(--text-main);
}

.svc-sub {
  font-size: 0.81rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.badge {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
}
.badge-auto { background: var(--emerald-bg); color: #34d399; border: 1px solid rgba(16,185,129,0.35); }
.badge-manual { background: var(--gold-bg); color: #fbbf24; border: 1px solid rgba(245,158,11,0.35); }
.badge-cost { background: rgba(14,165,233,0.16); color: #38bdf8; border: 1px solid rgba(14,165,233,0.4); }
.badge-danger { background: var(--danger-bg); color: #fb7185; border: 1px solid rgba(244,63,94,0.35); }
.badge-standby { background: rgba(168, 85, 247, 0.16); color: #c084fc; border: 1px solid rgba(168, 85, 247, 0.45); }

/* Drag & Drop Zone */
.dropzone {
  border: 2px dashed var(--border-bright);
  border-radius: 10px;
  background: var(--bg-input);
  padding: 14px 10px;
  text-align: center;
  cursor: pointer;
  transition: 0.15s;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
}
.dropzone:hover, .dropzone.dragover {
  border-color: var(--accent);
  background: rgba(14, 165, 233, 0.08);
}
.dropzone.has-file {
  border-style: solid;
  border-color: var(--emerald);
  background: rgba(57, 181, 139, 0.08);
}
.dropzone-title {
  font-size: 0.83rem;
  font-weight: 600;
  color: var(--text-main);
  word-break: normal;
  overflow-wrap: normal;
  max-width: 100%;
}
.dropzone-sub {
  font-size: 0.74rem;
  color: var(--text-muted);
  margin-top: 3px;
  word-break: normal;
  overflow-wrap: normal;
}

.fullbackup-drop-banner {
  border: 1.5px dashed rgba(56, 189, 248, 0.55);
  border-radius: 9px;
  background: rgba(14, 165, 233, 0.07);
  padding: 10px 10px;
  text-align: center;
  cursor: pointer;
  margin-bottom: 10px;
  transition: 0.15s;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
}
.fullbackup-drop-banner .fbk-title-org {
  font-size: 0.8rem;
  font-weight: 700;
  color: #38bdf8;
}
.fullbackup-drop-banner .fbk-title-don {
  font-size: 0.8rem;
  font-weight: 700;
  color: #34d399;
}
.fullbackup-drop-banner.donor-bk {
  border-color: rgba(57, 181, 139, 0.55);
  background: rgba(57, 181, 139, 0.07);
}
.fullbackup-drop-banner:hover,
.fullbackup-drop-banner.dragover {
  border-color: #00ff41;
  background: rgba(0, 255, 65, 0.1);
}
.fullbackup-drop-banner.has-file {
  border-style: solid;
  border-color: var(--emerald);
  background: rgba(57, 181, 139, 0.12);
}

.mcu-required-box {
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.45);
  border-radius: 10px;
  padding: 11px 12px;
  margin-bottom: 12px;
  max-width: 100%;
  min-width: 0;
}
.mcu-required-box label {
  color: #fbbf24;
  font-weight: 700;
  font-size: 0.8rem;
}

.mcu-autoban {
  background: rgba(57, 181, 139, 0.13);
  border: 1px solid rgba(57, 181, 139, 0.4);
  color: var(--emerald);
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 12px;
  max-width: 100%;
  min-width: 0;
  word-break: normal;
  overflow-wrap: normal;
}

.output-filename-pill {
  margin-top: 8px;
  padding: 7px 10px;
  border-radius: 8px;
  background: rgba(14, 165, 233, 0.1);
  border: 1px solid rgba(14, 165, 233, 0.35);
  color: #38bdf8;
  font-size: 0.76rem;
  font-weight: 600;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ======================== PACKAGES, TABLES & STAR RATINGS ======================== */
.pkg-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(215px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.pkg-card {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  cursor: pointer;
  transition: 0.15s;
}
.pkg-card.selected {
  border-color: var(--emerald);
  box-shadow: 0 0 0 1px var(--emerald);
  background: rgba(57, 181, 139, 0.08);
}

.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  width: 100%;
  max-width: 100%;
}

table {
  width: 100%;
  min-width: max-content;
  border-collapse: collapse;
  table-layout: auto !important;
  font-size: 0.84rem;
}

th, td {
  padding: 9px 11px;
  border-bottom: 1px solid var(--border);
  text-align: start;
  vertical-align: middle;
  word-break: normal !important;
  overflow-wrap: normal !important;
  hyphens: none !important;
}

th {
  color: var(--text-muted);
  font-weight: 700;
  font-size: 0.74rem;
  text-transform: uppercase;
  white-space: nowrap !important;
  word-break: keep-all !important;
  background: rgba(15, 23, 42, 0.45);
}

html[dir="rtl"] th {
  text-transform: none;
  font-size: 0.78rem;
}

td.mono,
td.nowrap,
.nowrap {
  white-space: nowrap !important;
}

td.wrap-cell {
  white-space: normal !important;
  min-width: 175px;
  max-width: 380px;
}

button,
.btn,
.btn-sm,
.badge,
.pill-tab,
.lang-btn,
.credit-pill,
.status-online,
.fuel-btn,
.auth-tab,
.news-badge,
.news-close-btn {
  white-space: nowrap !important;
  word-break: keep-all !important;
  overflow-wrap: normal !important;
  hyphens: none !important;
  flex-shrink: 0;
}

.btn-full,
.nav-btn,
.hub-service-card {
  white-space: normal !important;
  word-break: normal !important;
  overflow-wrap: normal !important;
}

.pkg-admin-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.68fr) minmax(320px, 1fr);
  gap: 16px;
  align-items: start;
}
@media (max-width: 1380px) {
  .pkg-admin-grid {
    grid-template-columns: 1fr;
  }
}

.admin-two-col-wide {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(410px, 1fr));
  gap: 16px;
}
@media (max-width: 920px) {
  .admin-two-col-wide {
    grid-template-columns: 1fr;
  }
}

.resp-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
  align-items: end;
}

/* ======================== ADMIN VOICE-COMMAND AI AGENT CONSOLE ======================== */
.voice-agent-drawer {
  position: fixed;
  bottom: 18px;
  inset-inline-end: 18px;
  width: min(470px, calc(100vw - 28px));
  background: var(--bg-panel);
  border: 1.5px solid var(--emerald);
  border-radius: 14px;
  box-shadow: 0 22px 58px rgba(0, 0, 0, 0.72), 0 0 28px rgba(57, 181, 139, 0.22);
  z-index: 8800;
  padding: 15px 16px;
}

.voice-mic-btn {
  width: 54px;
  height: 54px;
  border-radius: 50% !important;
  border: 2px solid var(--emerald);
  background: rgba(57, 181, 139, 0.16);
  color: var(--emerald);
  font-size: 1.35rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: 0.18s ease;
  flex-shrink: 0;
}

.voice-mic-btn.listening {
  background: var(--danger);
  border-color: #fda4af;
  color: #ffffff;
  animation: voicePulseRing 1.15s infinite;
}

@keyframes voicePulseRing {
  0% { box-shadow: 0 0 0 0 rgba(244, 63, 94, 0.65); transform: scale(1); }
  70% { box-shadow: 0 0 0 14px rgba(244, 63, 94, 0); transform: scale(1.06); }
  100% { box-shadow: 0 0 0 0 rgba(244, 63, 94, 0); transform: scale(1); }
}

.inline-ctrl-group {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
  white-space: nowrap;
}

.mono-ellipsis {
  display: inline-block;
  max-width: 240px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: bottom;
}

/* Admin Main Dashboard Context Search & Daily Quantities */
.ctx-search-hero {
  background: linear-gradient(145deg, rgba(14, 165, 233, 0.11) 0%, rgba(57, 181, 139, 0.08) 100%);
  border: 1.5px solid rgba(14, 165, 233, 0.45);
  border-radius: var(--radius);
  padding: 15px 18px;
  margin-bottom: 16px;
}

.ctx-search-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
}

.ctx-search-bar input[type="text"] {
  font-size: 0.94rem;
  padding: 10px 14px;
  border-color: var(--border-bright);
}

.daily-qty-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  align-items: end;
}

.daily-qty-box {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 9px 11px;
}

.daily-qty-box label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  white-space: nowrap;
  margin-bottom: 5px;
}

.daily-qty-box input[type="number"] {
  padding: 6px 9px;
  font-weight: 700;
  font-size: 0.88rem;
}

.star-row {
  display: inline-flex;
  gap: 2px;
  direction: ltr;
}
.star-btn {
  background: transparent;
  border: none;
  font-size: 1.05rem;
  cursor: pointer;
  color: var(--text-dim);
  padding: 0 2px;
  line-height: 1;
}
.star-btn.lit {
  color: #f59e0b;
}

.report-pre {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 11px 12px;
  font-size: 0.84rem;
  font-weight: 600;
  white-space: pre-wrap;
  word-break: normal;
  overflow-wrap: break-word;
  overflow-x: auto;
  max-width: 100%;
  min-width: 0;
  color: var(--emerald);
}

.ticket-msg {
  padding: 10px 13px;
  border-radius: 8px;
  margin-bottom: 8px;
  font-size: 0.86rem;
}
.ticket-msg.user { background: rgba(14, 165, 233, 0.1); border-inline-start: 3px solid var(--accent); }
.ticket-msg.admin { background: rgba(57, 181, 139, 0.1); border-inline-start: 3px solid var(--emerald); }

/* ======================== DYNAMIC RESOLUTION DCF TUNING GRID ======================== */
.dcf-section-title {
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--text-main);
  margin: 16px 0 11px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.dcf-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(272px, 1fr));
  gap: 13px 15px;
}

.dcf-card {
  position: relative;
  background: var(--bg-panel);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 17px 13px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
  transition: all 0.14s ease;
  min-height: 66px;
  user-select: none;
}
.dcf-card:hover {
  border-color: var(--accent);
  background: var(--bg-card-hover);
}
.dcf-card.checked {
  border-color: var(--accent);
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.16), rgba(57, 181, 139, 0.08));
  box-shadow: 0 0 0 1px var(--accent);
}

.dcf-top-pills {
  position: absolute;
  top: -10px;
  inset-inline-end: 10px;
  display: flex;
  gap: 5px;
  align-items: center;
}

.dcf-pill-auto {
  background: #0d3327;
  color: #6ee7b7;
  border: 1px solid #10b981;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 1px 8px;
  border-radius: 999px;
}

.dcf-pill-cr {
  background: #0c2b45;
  color: #7dd3fc;
  border: 1px solid #0ea5e9;
  font-size: 0.69rem;
  font-weight: 700;
  padding: 1px 8px;
  border-radius: 999px;
}

.dcf-left {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.dcf-box {
  width: 18px;
  height: 18px;
  border-radius: 5px;
  border: 2px solid #475569;
  background: var(--bg-input);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 0.76rem;
  color: transparent;
  font-weight: 900;
}
.dcf-card.checked .dcf-box {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.dcf-label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.3;
}

.dcf-info {
  position: relative;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(56, 189, 248, 0.16);
  color: var(--accent);
  font-size: 0.74rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.dcf-info:hover::after {
  content: attr(data-tip);
  position: absolute;
  bottom: 26px;
  inset-inline-end: -6px;
  width: 250px;
  background: #070d19;
  color: #e2e8f0;
  border: 1px solid #38bdf8;
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.35;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.7);
  z-index: 60;
  pointer-events: none;
}

/* Sidebar Quick Upload Box */
.quick-upload-box {
  margin-top: 12px;
  border: 1.5px dashed #2e4775;
  border-radius: 10px;
  background: rgba(14, 165, 233, 0.06);
  padding: 11px 8px;
  text-align: center;
  cursor: pointer;
  transition: 0.15s;
}
.quick-upload-box:hover, .quick-upload-box.dragover {
  border-color: #0ea5e9;
  background: rgba(14, 165, 233, 0.14);
}

/* Sticky Checkout Bar */
.dcf-checkout-bar {
  position: sticky;
  bottom: 12px;
  margin-top: 20px;
  background: var(--bg-panel);
  border: 1.5px solid var(--accent);
  border-radius: 12px;
  padding: 15px 18px;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.45);
  z-index: 30;
}

.already-applied-card {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.15), rgba(14, 165, 233, 0.12));
  border: 1.5px solid #f59e0b;
  border-radius: 12px;
  padding: 15px 18px;
  margin-top: 14px;
}

/* Modals */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(3, 7, 15, 0.8);
  backdrop-filter: blur(5px);
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-card {
  background: var(--bg-panel);
  border: 1px solid var(--border-bright);
  border-radius: 14px;
  max-width: 880px;
  width: 100%;
  max-height: 90dvh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.65);
}

.modal-header {
  padding: 15px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.modal-body {
  padding: 18px 20px;
  overflow-y: auto;
  font-size: 0.88rem;
  color: var(--text-main);
  line-height: 1.6;
}
.modal-body h4 {
  color: var(--accent);
  margin: 14px 0 5px;
  font-size: 0.95rem;
}

.waiver-check-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 8px;
  padding: 10px 12px;
  margin: 12px 0;
  font-size: 0.81rem;
  color: var(--text-main);
}
.waiver-check-row input[type="checkbox"] {
  margin-top: 3px;
  width: 17px;
  height: 17px;
  accent-color: var(--emerald);
  flex-shrink: 0;
}

/* ======================== CLICKABLE NEWS TICKER & QUOTA STRIP ======================== */
.news-ticker-bar {
  display: flex;
  align-items: center;
  background: linear-gradient(90deg, #0b1c36 0%, #092429 50%, #0b1c36 100%);
  border-bottom: 1px solid #1e3a5f;
  height: 36px;
  overflow: hidden;
  padding: 0 12px;
  gap: 10px;
}

.news-badge {
  background: var(--gold);
  color: #090d16;
  border: none;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 5px;
  letter-spacing: 0.03em;
  flex-shrink: 0;
  cursor: pointer;
  transition: 0.15s;
}
.news-badge:hover {
  filter: brightness(1.12);
  transform: scale(1.03);
}

.news-marquee-viewport {
  flex: 1;
  overflow: hidden;
  white-space: nowrap;
  position: relative;
  direction: ltr;
}

.news-marquee-track {
  display: inline-block;
  padding-left: 100%;
  font-size: 0.84rem;
  font-weight: 600;
  color: #e0f2fe;
  animation: ecukoreTicker 52s linear infinite;
}
.news-marquee-viewport:hover .news-marquee-track { animation-play-state: paused; }

@keyframes ecukoreTicker {
  0% { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}

.news-close-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #cbd5e1;
  border-radius: 5px;
  padding: 2px 8px;
  font-size: 0.73rem;
  cursor: pointer;
  flex-shrink: 0;
}
.news-close-btn:hover { background: var(--danger); color: #fff; border-color: var(--danger); }

.quota-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding: 7px clamp(14px, 1.8vw, 28px);
  background: rgba(9, 15, 29, 0.75);
  border-bottom: 1px solid var(--border);
  font-size: 0.78rem;
}

.special-offer-banner {
  background: linear-gradient(90deg, rgba(245, 158, 11, 0.2), rgba(57, 181, 139, 0.18));
  border-bottom: 1px solid rgba(245, 158, 11, 0.5);
  padding: 7px clamp(14px, 1.8vw, 28px);
  font-size: 0.84rem;
  font-weight: 700;
  color: #fde68a;
}

.ecukore-footer {
  margin-top: 28px;
  padding: 16px 20px;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 0.78rem;
  color: var(--text-dim);
}

/* Fuel Selector Bar */
.fuel-selector-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  background: rgba(14, 165, 233, 0.08);
  border: 1.5px solid var(--border-bright);
  border-radius: 12px;
  padding: 11px 15px;
  margin-bottom: 14px;
}

.fuel-btn {
  padding: 8px 16px;
  border-radius: 8px;
  border: 1.5px solid var(--border-bright);
  background: var(--bg-input);
  color: var(--text-muted);
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  transition: 0.15s;
}
.fuel-btn.active-petrol {
  background: linear-gradient(135deg, #ea580c, #f59e0b);
  border-color: #fb923c;
  color: #fff;
}
.fuel-btn.active-diesel {
  background: linear-gradient(135deg, #0284c7, #10b981);
  border-color: #38bdf8;
  color: #fff;
}

/* Sub-tabs inside Help / News / Special */
.pill-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}
.pill-tab {
  padding: 7px 13px;
  border-radius: 8px;
  border: 1px solid var(--border-bright);
  background: var(--bg-input);
  color: var(--text-muted);
  font-weight: 700;
  font-size: 0.82rem;
  white-space: nowrap;
  word-break: keep-all;
  flex-shrink: 0;
  cursor: pointer;
}
.pill-tab.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* Profile Media Previews */
.profile-media-box {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 12px;
}
.avatar-preview {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 2px solid var(--accent);
  object-fit: cover;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  overflow: hidden;
}
.logo-preview {
  width: 88px;
  height: 54px;
  border-radius: 8px;
  background: var(--bg-card);
  border: 2px solid var(--gold);
  object-fit: contain;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  overflow: hidden;
}
.avatar-preview img, .logo-preview img { width: 100%; height: 100%; object-fit: cover; }

/* ======================== LIGHT MODE THEME OVERRIDES (CUSTOMER + OWNER) ======================== */
html[data-theme="light"] {
  --bg-deep: #f1f5f9;
  --bg-panel: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #f8fafc;
  --bg-input: #f8fafc;
  --border: #cbd5e1;
  --border-bright: #94a3b8;
  --text-main: #0f172a;
  --text-muted: #475569;
  --text-dim: #64748b;
}

html[data-theme="light"] body {
  background: #f1f5f9;
  color: #0f172a;
}

html[data-theme="light"] .sidebar {
  background: #0f172a;
  color: #f8fafc;
  border-inline-end-color: #1e293b;
}
html[data-theme="light"] .sidebar .nav-btn { color: #cbd5e1; }
html[data-theme="light"] .sidebar .nav-btn.active { color: #ffffff; }
html[data-theme="light"] .sidebar .btn-ghost { color: #e2e8f0; border-color: #334155; }

html[data-theme="light"] .topbar {
  background: rgba(255, 255, 255, 0.96);
  border-bottom-color: #cbd5e1;
}

html[data-theme="light"] .quota-strip {
  background: #e2e8f0;
  border-bottom-color: #cbd5e1;
}

html[data-theme="light"] .dcf-card,
html[data-theme="light"] .svc-card,
html[data-theme="light"] .pkg-card {
  background: #ffffff;
  border-color: #cbd5e1;
}
html[data-theme="light"] .dcf-card.checked,
html[data-theme="light"] .svc-card.selected {
  background: #f0f9ff;
  border-color: #0284c7;
}
html[data-theme="light"] .dcf-pill-auto { background: #dcfce7; color: #047857; border-color: #34d399; }
html[data-theme="light"] .dcf-pill-cr { background: #e0f2fe; color: #0369a1; border-color: #38bdf8; }

html[data-theme="light"] th {
  background: #f1f5f9;
  color: #334155;
}

html[data-theme="light"] .credit-pill { background: #dcfce7; color: #047857; }
html[data-theme="light"] .status-online { background: #dcfce7; color: #047857; }
html[data-theme="light"] .badge-auto { background: #dcfce7; color: #047857; }
html[data-theme="light"] .badge-cost { background: #e0f2fe; color: #0369a1; }
html[data-theme="light"] .badge-manual { background: #fef3c7; color: #b45309; }
html[data-theme="light"] .badge-danger { background: #ffe4e6; color: #be123c; }
html[data-theme="light"] .badge-standby { background: #f3e8ff; color: #7e22ce; }
html[data-theme="light"] .special-offer-banner { background: #fef3c7; color: #92400e; }
html[data-theme="light"] .already-applied-card { background: #fffbeb; color: #92400e; }
html[data-theme="light"] .mcu-autoban { background: #ecfdf5; border-color: #34d399; color: #047857; }
html[data-theme="light"] .mcu-required-box { background: #fffbeb; border-color: #f59e0b; }
html[data-theme="light"] .mcu-required-box label { color: #b45309; }
html[data-theme="light"] .fullbackup-drop-banner { background: #f0f9ff; border-color: #0284c7; }
html[data-theme="light"] .fullbackup-drop-banner.donor-bk { background: #ecfdf5; border-color: #059669; }
html[data-theme="light"] .fullbackup-drop-banner .fbk-title-org { color: #0369a1; }
html[data-theme="light"] .fullbackup-drop-banner .fbk-title-don { color: #047857; }
html[data-theme="light"] .output-filename-pill { background: #f0f9ff; border-color: #38bdf8; color: #0369a1; }
html[data-theme="light"] .report-pre { background: #f0fdf4; border-color: #86efac; color: #047857; }
html[data-theme="light"] .toast { box-shadow: 0 10px 28px rgba(15, 23, 42, 0.14); }


/* ======================== BLACK HOLE CANVAS, COMPACT LOGIN & WIDE LOGO ======================== */
#blackholeCanvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100dvh;
  z-index: 0;
  pointer-events: none;
}

#horizonFlashOverlay {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle, #ffffff 0%, #f0f9ff 60%, #e0f2fe 100%);
  z-index: 9998;
  pointer-events: none;
  opacity: 0;
}

.auth-shell {
  position: relative;
  z-index: 2;
  transition: opacity 0.45s ease;
}

body.bh-warping .auth-shell {
  opacity: 0;
  pointer-events: none;
}

body.matrix-login-active {
  background: #000000 !important;
}

/* ======================== OPTIONAL PER-PORTAL WEBMOD TRANSPARENCY (OFF BY DEFAULT = 100% ORIGINAL USER PORTAL LOOK) ======================== */
body.wm-portal-glass-active #portalShell,
body.wm-portal-glass-active #ownerShell {
  position: relative;
  z-index: 1;
  background: transparent !important;
}

body.wm-portal-glass-active #portalShell .main-column,
body.wm-portal-glass-active #ownerShell .main-column,
body.wm-portal-glass-active #portalShell .view-container,
body.wm-portal-glass-active #ownerShell .view-container {
  background: transparent !important;
}

body.wm-portal-glass-active #portalShell .sidebar,
body.wm-portal-glass-active #ownerShell .sidebar {
  background: rgba(9, 15, 29, var(--portal-sidebar-alpha, 1)) !important;
}

body.wm-portal-glass-active #portalShell .topbar,
body.wm-portal-glass-active #ownerShell .topbar {
  background: rgba(13, 20, 36, var(--portal-topbar-alpha, 0.92)) !important;
}

body.wm-portal-glass-active #portalShell .card,
body.wm-portal-glass-active #portalShell .kpi-card,
body.wm-portal-glass-active #portalShell .svc-card,
body.wm-portal-glass-active #portalShell .dcf-card,
body.wm-portal-glass-active #portalShell .hub-card,
body.wm-portal-glass-active #portalShell .pkg-card,
body.wm-portal-glass-active #portalShell .table-wrap,
body.wm-portal-glass-active #ownerShell .card,
body.wm-portal-glass-active #ownerShell .kpi-card,
body.wm-portal-glass-active #ownerShell .svc-card,
body.wm-portal-glass-active #ownerShell .ctx-search-hero,
body.wm-portal-glass-active #ownerShell .table-wrap {
  background: rgba(12, 20, 36, var(--portal-glass-alpha, 1)) !important;
}

/* Instant Anti-Duplicate & Tactile Reactivity */
.btn, .nav-btn, .svc-card, .dcf-card, .pill-tab {
  transition: transform 0.08s ease, background-color 0.09s ease, border-color 0.09s ease, opacity 0.09s ease;
}

.btn:active:not(:disabled) {
  transform: scale(0.985);
}

.btn.is-busy-locked {
  opacity: 0.72;
  cursor: wait !important;
}

.auth-compact-card {
  max-width: 218px;
  width: 100%;
  background: rgba(0, 8, 3, 0.22);
  backdrop-filter: blur(2px);
  border: 1px solid rgba(0, 255, 65, 0.28);
  border-radius: 11px;
  padding: 9px 10px;
  box-shadow: 0 6px 26px rgba(0, 0, 0, 0.65), 0 0 18px rgba(0, 255, 65, 0.08);
  font-size: 0.72rem;
}

.auth-compact-card .field {
  margin-bottom: 5px;
}
.auth-compact-card input[type="text"],
.auth-compact-card input[type="email"],
.auth-compact-card input[type="password"] {
  height: 27px;
  padding: 3px 8px;
  font-size: 0.72rem;
  border-radius: 7px;
  background: rgba(0, 10, 4, 0.35);
  border: 1px solid rgba(0, 255, 65, 0.30);
  color: #eafff0;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.95);
}
.auth-compact-card input[type="text"]:focus,
.auth-compact-card input[type="email"]:focus,
.auth-compact-card input[type="password"]:focus {
  background: rgba(0, 16, 6, 0.50);
  border-color: #00ff41;
  box-shadow: 0 0 8px rgba(0, 255, 65, 0.25);
  outline: none;
}
.auth-compact-card input::placeholder {
  color: rgba(187, 247, 208, 0.68);
  font-size: 0.70rem;
}
.auth-compact-card .btn {
  height: 27px;
  padding: 3px 9px;
  font-size: 0.72rem;
  border-radius: 7px;
}
.auth-glass-btn {
  background: rgba(0, 255, 65, 0.16) !important;
  border: 1px solid rgba(0, 255, 65, 0.48) !important;
  color: #eafff0 !important;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(2px);
}
.auth-glass-btn:hover {
  background: rgba(0, 255, 65, 0.28) !important;
  border-color: #00ff41 !important;
  box-shadow: 0 0 12px rgba(0, 255, 65, 0.30);
}
.auth-min-links {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 6px;
  padding: 0 2px;
  font-size: 0.66rem;
}
.auth-min-links a {
  color: rgba(187, 247, 208, 0.78);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.95);
  transition: color 0.15s ease;
}
.auth-min-links a:hover {
  color: #00ff41;
}

/* Invisible Automatic Human Shield Badge (No Manual Puzzle!) */
.auto-human-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 4px 9px;
  margin: 5px 0 7px;
  border-radius: 999px;
  background: rgba(57, 181, 139, 0.12);
  border: 1px solid rgba(57, 181, 139, 0.34);
  color: #6ee7b7;
  font-size: 0.69rem;
  font-weight: 600;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.85);
}
.hp-trap-field {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* ======================== CLEAN 2-COLUMN SERVICES HUB CARDS (V8) ======================== */
.services-hub-header {
  margin-bottom: 18px;
}
.services-hub-header h2 {
  font-size: clamp(1.35rem, 1.9vw, 1.72rem);
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.01em;
}
.services-hub-header p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 3px;
}

.services-hub-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
@media (max-width: 820px) {
  .services-hub-grid {
    grid-template-columns: 1fr;
  }
}

.hub-service-card {
  background: linear-gradient(145deg, rgba(22, 32, 54, 0.94) 0%, rgba(15, 23, 41, 0.97) 100%);
  border: 1px solid rgba(148, 163, 184, 0.15);
  border-radius: 18px;
  padding: 22px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
  text-align: start;
}
.hub-service-card:hover {
  transform: translateY(-2px);
  border-color: rgba(245, 158, 11, 0.48);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.36), 0 0 24px rgba(14, 165, 233, 0.10);
  background: linear-gradient(145deg, rgba(27, 39, 66, 0.97) 0%, rgba(18, 28, 49, 0.99) 100%);
}

.hub-card-left {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.hub-icon-box {
  width: 56px;
  height: 56px;
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.hub-icon-box svg {
  width: 27px;
  height: 27px;
}
.hub-icon-amber { background: rgba(245, 158, 11, 0.14); color: #fb923c; border-color: rgba(251, 146, 60, 0.28); }
.hub-icon-orange { background: rgba(249, 115, 22, 0.15); color: #f97316; border-color: rgba(249, 115, 22, 0.30); }
.hub-icon-gold { background: rgba(234, 179, 8, 0.15); color: #facc15; border-color: rgba(250, 204, 21, 0.30); }
.hub-icon-cyan { background: rgba(14, 165, 233, 0.15); color: #38bdf8; border-color: rgba(56, 189, 248, 0.30); }
.hub-icon-emerald { background: rgba(57, 181, 139, 0.15); color: #34d399; border-color: rgba(52, 211, 153, 0.30); }
.hub-icon-violet { background: rgba(168, 85, 247, 0.15); color: #c084fc; border-color: rgba(192, 132, 252, 0.30); }
.hub-icon-matrix {
  background: radial-gradient(circle at 50% 50%, #06210e 0%, #020804 100%) !important;
  color: #00ff41 !important;
  border: 1px solid rgba(0, 255, 65, 0.48) !important;
  box-shadow: inset 0 0 12px rgba(0, 255, 65, 0.22), 0 0 14px rgba(0, 255, 65, 0.16);
}
.hub-icon-matrix svg {
  width: 34px;
  height: 34px;
}
.hub-icon-winols3d {
  background: radial-gradient(circle at 50% 50%, #141c30 0%, #090e1a 100%) !important;
  border: 1px solid rgba(251, 146, 60, 0.38) !important;
}
.hub-icon-winols3d svg {
  width: 36px;
  height: 36px;
}
.hub-icon-dualecu svg,
.hub-icon-dashkm svg,
.hub-icon-carkey svg {
  width: 32px;
  height: 32px;
}

/* Interactive Mileage Version Selector Cards */
.km-ver-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(225px, 1fr));
  gap: 10px;
  margin-top: 10px;
}
.km-ver-card {
  background: var(--bg-panel);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  cursor: pointer;
  transition: 0.15s;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.km-ver-card:hover {
  border-color: var(--accent);
}
.km-ver-card.selected {
  border-color: var(--emerald);
  background: rgba(57, 181, 139, 0.10);
  box-shadow: 0 0 0 1px rgba(57, 181, 139, 0.30);
}
.km-disclaimer-banner {
  background: rgba(245, 158, 11, 0.11);
  border: 1px solid rgba(245, 158, 11, 0.45);
  border-inline-start: 4px solid var(--gold);
  border-radius: 10px;
  padding: 11px 14px;
  font-size: 0.84rem;
  color: var(--text-main);
  margin-bottom: 14px;
}

.hub-card-body {
  min-width: 0;
}
.hub-card-title {
  font-size: 1.07rem;
  font-weight: 700;
  color: #f8fafc;
  margin-bottom: 4px;
  line-height: 1.28;
}
.hub-card-desc {
  font-size: 0.84rem;
  color: #94a3b8;
  line-height: 1.42;
}
.hub-arrow {
  color: #f59e0b;
  font-size: 1.22rem;
  font-weight: 700;
  flex-shrink: 0;
  transition: transform 0.18s ease;
}
.hub-service-card:hover .hub-arrow {
  transform: translateX(4px);
}
html[dir="rtl"] .hub-service-card:hover .hub-arrow {
  transform: translateX(-4px);
}

html[data-theme="light"] .hub-service-card {
  background: #ffffff;
  border-color: #cbd5e1;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05);
}
html[data-theme="light"] .hub-service-card:hover {
  background: #f8fafc;
  border-color: #0284c7;
}
html[data-theme="light"] .hub-card-title { color: #0f172a; }
html[data-theme="light"] .hub-card-desc { color: #475569; }

.brand-wide-logo {
  display: block;
  width: 100%;
  max-width: 242px;
  height: auto;
  border-radius: 9px;
}

/* ======================== LIVE 0% -> 100% ECU PROCESSING & DOWNLOAD PROGRESS ======================== */
.ecu-live-progress-card {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(6, 14, 24, 0.92);
  border: 1px solid rgba(57, 181, 139, 0.45);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.38), inset 0 0 18px rgba(57, 181, 139, 0.08);
}

.ecu-prog-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 7px;
}

.ecu-prog-stage {
  font-size: 0.8rem;
  font-weight: 700;
  color: #e2e8f0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ecu-prog-pct {
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 0.98rem;
  font-weight: 900;
  color: #69dfb7;
  white-space: nowrap;
  letter-spacing: 0.5px;
}

.ecu-prog-track {
  width: 100%;
  height: 11px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(57, 181, 139, 0.28);
  overflow: hidden;
  position: relative;
}

.ecu-prog-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, #03593c 0%, #39b58b 55%, #7ef1c9 100%);
  box-shadow: 0 0 12px rgba(105, 223, 183, 0.55);
  transition: width 0.14s ease-out;
}

.ecu-live-progress-card.is-done {
  border-color: #39b58b;
  box-shadow: 0 0 20px rgba(57, 181, 139, 0.28);
}

.ecu-live-progress-card.is-error {
  border-color: var(--danger);
}

.ecu-live-progress-card.is-error .ecu-prog-fill {
  background: var(--danger);
  box-shadow: none;
}

.ecu-live-progress-card.is-error .ecu-prog-pct {
  color: var(--danger);
}

/* Keyboard Navigation & High-Contrast Focus Ring */
:focus-visible {
  outline: 2px solid #38bdf8;
  outline-offset: 2px;
}

/* Cookie Consent Banner (No Dark Patterns — Equal Clear Choices) */
.cookie-banner {
  position: fixed;
  bottom: 14px;
  inset-inline: 16px;
  max-width: 960px;
  margin: 0 auto;
  background: var(--bg-panel);
  border: 1.5px solid var(--border-bright);
  border-radius: 12px;
  padding: 13px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  z-index: 8500;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55);
  font-size: 0.82rem;
}

/* ======================== MOBILE / PHONE RESPONSIVE ADAPTATION ======================== */
@media (max-width: 768px) {
  .topbar {
    padding: 8px 12px;
    gap: 8px;
  }
  .topbar-right {
    width: 100%;
    justify-content: space-between;
  }
  .workspace {
    padding: 12px 10px 36px;
  }
  .kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .kpi-val {
    font-size: 1.15rem;
  }
  .dcf-grid {
    grid-template-columns: 1fr;
  }
  .sidebar {
    padding: 12px 10px;
  }
  .nav-group {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }
  .nav-btn {
    padding: 8px 9px;
    font-size: 0.78rem;
  }
  .auth-compact-card {
    padding: 14px;
  }
}
