/* ============================================================================
 * TIVA FTTH Corporate Platform - Design System (Light & Dark Themes, RTL, PWA)
 * Zero Emojis | Self-Hosted Vazirmatn Typography | Responsive Desktop & Mobile
 * ============================================================================ */

@font-face {
  font-family: 'Vazirmatn';
  src: url('../fonts/Vazirmatn-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Vazirmatn';
  src: url('../fonts/Vazirmatn-Medium.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Vazirmatn';
  src: url('../fonts/Vazirmatn-SemiBold.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Vazirmatn';
  src: url('../fonts/Vazirmatn-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Vazirmatn';
  src: url('../fonts/Vazirmatn-ExtraBold.woff2') format('woff2');
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Vazirmatn';
  src: url('../fonts/Vazirmatn-Black.woff2') format('woff2');
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #f3f6fb;
  --surface: #ffffff;
  --surface-alt: #f8fafc;
  --surface-hover: #f1f5f9;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  --text: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;

  --navy: #0b1933;
  --navy-light: #152a50;
  --primary: #0ea5a4;
  --primary-hover: #0d9488;
  --primary-soft: rgba(14, 165, 164, 0.12);
  --accent: #0284c7;
  --accent-soft: rgba(2, 132, 199, 0.12);

  --success: #059669;
  --success-soft: rgba(5, 150, 105, 0.12);
  --warning: #d97706;
  --warning-soft: rgba(217, 119, 6, 0.13);
  --danger: #dc2626;
  --danger-soft: rgba(220, 38, 38, 0.11);

  --sidebar-bg: #ffffff;
  --sidebar-text: #334155;
  --sidebar-text-strong: #0f172a;
  --sidebar-muted: #64748b;
  --sidebar-border: #e2e8f0;
  --sidebar-hover: #f1f5f9;
  --sidebar-active: rgba(14, 165, 164, 0.12);
  --sidebar-active-border: rgba(14, 165, 164, 0.35);
  --sidebar-active-text: #0f766e;
  --sidebar-active-icon: #0ea5a4;
  --sidebar-pill-bg: #f8fafc;
  --sidebar-pill-border: #e2e8f0;
  --sidebar-ghost-bg: #f8fafc;
  --sidebar-ghost-border: #e2e8f0;
  --sidebar-ghost-hover: #f1f5f9;
  --sidebar-logout-color: #dc2626;

  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 6px 20px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 18px 46px rgba(11, 22, 44, 0.18);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --sidebar-w: 272px;
  --topbar-h: 66px;
}

[data-theme="dark"] {
  --bg: #070d19;
  --surface: #0f192d;
  --surface-alt: #14213a;
  --surface-hover: #1b2b49;
  --border: #1e3050;
  --border-strong: #2c436b;
  --text: #f1f5f9;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;

  --primary: #14b8a6;
  --primary-hover: #2dd4bf;
  --primary-soft: rgba(20, 184, 166, 0.16);
  --accent: #38bdf8;
  --accent-soft: rgba(56, 189, 248, 0.15);

  --success: #10b981;
  --success-soft: rgba(16, 185, 129, 0.16);
  --warning: #f59e0b;
  --warning-soft: rgba(245, 158, 11, 0.16);
  --danger: #f87171;
  --danger-soft: rgba(248, 113, 113, 0.15);

  --sidebar-bg: #091224;
  --sidebar-text: #cbd5e1;
  --sidebar-text-strong: #f1f5f9;
  --sidebar-muted: #94a3b8;
  --sidebar-border: rgba(148, 163, 184, 0.12);
  --sidebar-hover: rgba(255, 255, 255, 0.06);
  --sidebar-active: rgba(14, 165, 164, 0.18);
  --sidebar-active-border: rgba(20, 184, 166, 0.35);
  --sidebar-active-text: #ffffff;
  --sidebar-active-icon: #2dd4bf;
  --sidebar-pill-bg: rgba(255, 255, 255, 0.045);
  --sidebar-pill-border: rgba(255, 255, 255, 0.08);
  --sidebar-ghost-bg: rgba(255, 255, 255, 0.06);
  --sidebar-ghost-border: rgba(255, 255, 255, 0.1);
  --sidebar-ghost-hover: rgba(255, 255, 255, 0.12);
  --sidebar-logout-color: #fca5a5;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.42);
  --shadow-lg: 0 22px 54px rgba(0, 0, 0, 0.65);
}

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

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  max-width: 100%;
  overflow-x: hidden;
  font-family: 'Vazirmatn', Tahoma, sans-serif;
  background: var(--bg);
  color: var(--text);
  direction: rtl;
  font-size: 14px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

button, input, select, textarea {
  font-family: inherit;
  color: inherit;
}

a { color: var(--primary); text-decoration: none; }

.tiva-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  display: inline-block;
  vertical-align: middle;
}

.ltr { direction: ltr; unicode-bidi: isolate; display: inline-block; }
.mono { font-variant-numeric: tabular-nums; }
.hidden { display: none !important; }
.text-muted { color: var(--text-muted); }
.text-danger { color: var(--danger); }
.text-success { color: var(--success); }
.text-primary { color: var(--primary); }
.fw-700 { font-weight: 700; }
.fw-800 { font-weight: 800; }

/* ================= BRAND WORDMARK ================= */
.brand-lockup {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand-logo-img {
  width: 44px;
  height: 44px;
  display: block;
  flex-shrink: 0;
  filter: drop-shadow(0 4px 10px rgba(14, 165, 164, 0.25));
}
.brand-words {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}
.brand-name-fa {
  font-size: 20px;
  font-weight: 900;
  letter-spacing: -0.3px;
  background: linear-gradient(135deg, #ffffff 0%, #67e8f9 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.brand-name-en {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2.4px;
  color: #38bdf8;
  text-transform: uppercase;
  margin-top: 2px;
}

/* ================= LOGIN SCREEN ================= */
.login-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  background: var(--bg);
}

.login-hero {
  background: radial-gradient(circle at 20% 20%, #153564 0%, #0b162c 62%, #060d1b 100%);
  color: #f8fafc;
  padding: 48px 52px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}
.login-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(rgba(34, 211, 238, 0.14) 1px, transparent 1px);
  background-size: 26px 26px;
  opacity: 0.45;
  pointer-events: none;
}
.login-hero-content { position: relative; z-index: 2; max-width: 480px; }
.login-hero h1 {
  font-size: 30px;
  font-weight: 900;
  line-height: 1.45;
  margin: 28px 0 14px;
}
.login-hero p {
  color: #cbd5e1;
  font-size: 14.5px;
  line-height: 1.85;
  margin-bottom: 28px;
}
.hero-features {
  display: grid;
  gap: 12px;
}
.hero-feat-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(103, 232, 249, 0.16);
  border-radius: 12px;
  padding: 12px 15px;
  font-size: 13px;
  color: #e2e8f0;
}
.hero-feat-item .tiva-icon { color: #22d3ee; width: 20px; height: 20px; }
.login-hero-footer {
  position: relative;
  z-index: 2;
  font-size: 12px;
  color: #94a3b8;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
  padding-top: 18px;
}

.login-form-side {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 36px 24px;
  position: relative;
}
.login-theme-btn {
  position: absolute;
  top: 20px;
  left: 20px;
}
.login-card {
  width: 100%;
  max-width: 430px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 34px 30px;
  box-shadow: var(--shadow-lg);
}
.login-card-head {
  margin-bottom: 24px;
}
.login-card-head h2 {
  font-size: 21px;
  font-weight: 800;
  margin: 0 0 6px;
}
.login-card-head p {
  margin: 0;
  color: var(--text-muted);
  font-size: 13px;
}

.demo-shortcuts {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px dashed var(--border-strong);
}
.demo-shortcuts-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.demo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.demo-btn {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 9px 8px;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s ease;
}
.demo-btn:hover {
  border-color: var(--primary);
  background: var(--primary-soft);
}
.demo-btn strong { display: block; font-size: 12px; color: var(--text); }
.demo-btn span { display: block; font-size: 10.5px; color: var(--text-muted); margin-top: 2px; }

/* ================= APP SHELL (DESKTOP + MOBILE) ================= */
.app-shell {
  min-height: 100vh;
  display: flex;
}

.sidebar {
  width: var(--sidebar-w);
  background: var(--sidebar-bg);
  color: var(--sidebar-text);
  border-left: 1px solid var(--sidebar-border);
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, visibility 0.25s ease, background-color 0.2s ease;
}

.sidebar .brand-name-fa {
  background: linear-gradient(135deg, #0b1933 0%, #0ea5a4 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.sidebar .brand-name-en {
  color: #0284c7;
}
[data-theme="dark"] .sidebar .brand-name-fa {
  background: linear-gradient(135deg, #ffffff 0%, #67e8f9 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
[data-theme="dark"] .sidebar .brand-name-en {
  color: #38bdf8;
}

.sidebar-header {
  padding: 20px 20px 18px;
  border-bottom: 1px solid var(--sidebar-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sidebar-close-btn {
  color: var(--sidebar-text) !important;
}
.sidebar-close-btn:hover {
  background: var(--sidebar-hover) !important;
  color: var(--sidebar-text-strong) !important;
}

.sidebar-role-pill {
  margin: 10px 14px 4px;
  background: var(--sidebar-pill-bg);
  border: 1px solid var(--sidebar-pill-border);
  border-radius: 10px;
  padding: 8px 11px;
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}
.role-avatar {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: linear-gradient(135deg, #0ea5a4, #0284c7);
  color: #ffffff;
  font-weight: 800;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.role-meta {
  min-width: 0;
  flex: 1;
}
.role-meta strong {
  display: block;
  font-size: 12.5px;
  color: var(--sidebar-text-strong);
  font-weight: 700;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-item {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--sidebar-text);
  padding: 11px 14px;
  border-radius: 11px;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  text-align: right;
  transition: all 0.18s ease;
}
.nav-item-left {
  display: flex;
  align-items: center;
  gap: 11px;
}
.nav-item:hover {
  background: var(--sidebar-hover);
  color: var(--sidebar-text-strong);
}
.nav-item.active {
  background: var(--sidebar-active);
  border-color: var(--sidebar-active-border);
  color: var(--sidebar-active-text);
}
.nav-item.active .tiva-icon { color: var(--sidebar-active-icon); }

.nav-badge {
  background: #dc2626;
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
  min-width: 22px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.sidebar-footer {
  padding: 14px 16px;
  border-top: 1px solid var(--sidebar-border);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.main-wrap {
  flex: 1;
  margin-right: var(--sidebar-w);
  min-width: 0;
  max-width: 100%;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  transition: margin-right 0.25s ease;
}

/* Desktop Collapsible Sidebar (toggle via menu or close button) */
@media (min-width: 1025px) {
  .sidebar-overlay {
    display: none !important;
  }
  .app-shell.sidebar-collapsed .sidebar {
    transform: translateX(105%);
    visibility: hidden;
    pointer-events: none;
  }
  .app-shell.sidebar-collapsed .main-wrap {
    margin-right: 0;
  }
}

.topbar {
  height: var(--topbar-h);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  position: sticky;
  top: 0;
  z-index: 30;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.sidebar-toggle-btn { display: inline-flex; }
.topbar-title-group h1 {
  margin: 0;
  font-size: 16.5px;
  font-weight: 800;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.topbar-subtitle {
  font-size: 11.5px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--success);
  background: var(--success-soft);
  padding: 5px 11px;
  border-radius: 999px;
}
.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
  animation: pulseDot 1.8s infinite;
}
@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(1.35); }
}

.content-area {
  padding: 22px 26px 40px;
  max-width: 1440px;
  width: 100%;
  margin: 0 auto;
  flex: 1;
}

/* ================= CARDS, BUTTONS, BADGES ================= */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.card-title {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 8px;
}
.card-body { padding: 20px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid transparent;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  padding: 9px 16px;
  cursor: pointer;
  transition: all 0.18s ease;
  white-space: nowrap;
}
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn-sm { padding: 5px 10px; font-size: 11.5px; border-radius: 8px; gap: 5px; }
.btn-sm .tiva-icon { width: 14px; height: 14px; }
.btn-lg { padding: 12px 22px; font-size: 14px; }
.btn-icon { padding: 8px; width: 38px; height: 38px; border-radius: 10px; }

.btn-primary {
  background: linear-gradient(135deg, #0ea5a4, #0284c7);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(14, 165, 164, 0.25);
}
.btn-primary:hover:not(:disabled) { filter: brightness(1.07); transform: translateY(-1px); }

.btn-success { background: var(--success); color: #ffffff; }
.btn-success:hover:not(:disabled) { filter: brightness(1.08); }

.btn-danger { background: var(--danger); color: #ffffff; }
.btn-danger:hover:not(:disabled) { filter: brightness(1.08); }

.btn-warning { background: var(--warning); color: #ffffff; }

.btn-outline {
  background: var(--surface);
  border-color: var(--border-strong);
  color: var(--text);
}
.btn-outline:hover:not(:disabled) {
  background: var(--surface-hover);
  border-color: var(--primary);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}
.btn-ghost:hover:not(:disabled) { background: var(--surface-hover); color: var(--text); }

.btn-sidebar-ghost {
  background: var(--sidebar-ghost-bg);
  border: 1px solid var(--sidebar-ghost-border);
  color: var(--sidebar-text-strong);
  width: 100%;
}
.btn-sidebar-ghost:hover { background: var(--sidebar-ghost-hover); }
.btn-sidebar-logout { color: var(--sidebar-logout-color) !important; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}
.badge .tiva-icon { width: 12px; height: 12px; }
.badge-pending { background: var(--warning-soft); color: var(--warning); }
.badge-approved, .badge-success { background: var(--success-soft); color: var(--success); }
.badge-forwarded, .badge-info { background: var(--accent-soft); color: var(--accent); }
.badge-rejected, .badge-danger { background: var(--danger-soft); color: var(--danger); }
.badge-warning { background: var(--warning-soft); color: var(--warning); }
.badge-neutral { background: var(--surface-hover); color: var(--text-secondary); }

/* ================= SUB-TABS (CLEAN SEPARATION PER SECTION) ================= */
.subtabs-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 6px;
  border-radius: 13px;
  margin-bottom: 18px;
}
.subtab-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 700;
  padding: 8px 15px;
  border-radius: 9px;
  cursor: pointer;
  transition: all 0.18s ease;
}
.subtab-btn:hover { background: var(--surface-hover); color: var(--text); }
.subtab-btn.active {
  background: var(--navy);
  color: #ffffff;
}
[data-theme="dark"] .subtab-btn.active {
  background: var(--primary);
  color: #06131c;
}
.subtab-count {
  font-size: 11px;
  padding: 1px 7px;
  border-radius: 999px;
  background: rgba(128, 128, 128, 0.18);
}

/* ================= KPI STAT CARDS ================= */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(195px, 1fr));
  gap: 13px;
  margin-bottom: 16px;
}
.kpi-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-shadow: var(--shadow-sm);
}
.kpi-label { font-size: 11.5px; font-weight: 600; color: var(--text-muted); margin-bottom: 4px; }
.kpi-value { font-size: 20px; font-weight: 900; line-height: 1.25; color: var(--text); }
.kpi-sub { font-size: 11px; color: var(--text-muted); margin-top: 3px; }
.kpi-icon-box {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.kpi-icon-box .tiva-icon { width: 20px; height: 20px; }
.kpi-primary { background: var(--primary-soft); color: var(--primary); }
.kpi-warning { background: var(--warning-soft); color: var(--warning); }
.kpi-success { background: var(--success-soft); color: var(--success); }
.kpi-accent { background: var(--accent-soft); color: var(--accent); }
.kpi-danger { background: var(--danger-soft); color: var(--danger); }

/* ================= FORMS & INPUTS ================= */
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.form-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.col-span-full { grid-column: 1 / -1; }

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  max-width: 100%;
}
.form-label {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 5px;
}
.req-star { color: var(--danger); font-weight: 800; }

.form-control {
  width: 100%;
  background: var(--surface-alt);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 10px 13px;
  font-size: 13.5px;
  color: var(--text);
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
  background: var(--surface);
}
textarea.form-control { min-height: 82px; resize: vertical; }

.date-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.date-input-wrap .form-control {
  padding-left: 42px;
  cursor: pointer;
}
.date-trigger-btn {
  position: absolute;
  left: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 8px;
  background: var(--primary-soft);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.form-section-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 18px;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}
.form-section-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 12px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.step-num {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--navy);
  color: #ffffff;
  font-size: 13px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
[data-theme="dark"] .step-num { background: var(--primary); color: #04131c; }
.form-section-head h3 { margin: 0; font-size: 14.5px; font-weight: 800; }

/* ================= PREPAYMENT PLAN SELECTOR CARDS ================= */
.plans-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}
.plan-card {
  border: 2px solid var(--border);
  background: var(--surface-alt);
  border-radius: 14px;
  padding: 15px 16px;
  cursor: pointer;
  transition: all 0.18s ease;
  position: relative;
}
.plan-card:hover { border-color: var(--primary); }
.plan-card.selected {
  border-color: var(--primary);
  background: var(--primary-soft);
  box-shadow: 0 4px 16px rgba(14, 165, 164, 0.18);
}
.plan-card input[type="radio"] { display: none; }
.plan-speed {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 2px 9px;
  border-radius: 999px;
  margin-bottom: 8px;
}
.plan-title { font-size: 13.5px; font-weight: 800; margin-bottom: 6px; }
.plan-price { font-size: 17px; font-weight: 900; color: var(--primary); }
.plan-desc { font-size: 11.5px; color: var(--text-muted); margin-top: 6px; line-height: 1.5; }

/* ================= TIMESTAMP CAMERA UPLOAD BOXES ================= */
.camera-upload-box {
  border: 2px dashed var(--border-strong);
  background: var(--surface-alt);
  border-radius: 14px;
  padding: 18px;
  text-align: center;
  transition: all 0.2s ease;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}
.camera-upload-box:hover { border-color: var(--primary); }
.cam-box-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 10px;
  border-radius: 14px;
  background: var(--primary-soft);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
}
.cam-box-icon .tiva-icon { width: 24px; height: 24px; }
.cam-box-title { font-size: 14px; font-weight: 800; margin-bottom: 4px; }
.cam-box-sub { font-size: 12px; color: var(--text-muted); margin-bottom: 12px; }
.cam-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}
.cam-return-banner {
  margin-top: 12px;
  background: var(--accent-soft);
  border: 1px solid var(--accent);
  border-radius: 10px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
}

.ai-verify-card {
  margin-top: 12px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  text-align: right;
  max-width: 100%;
  overflow: hidden;
}
.ai-verify-card.ai-state-verified { border-color: var(--success); }
.ai-verify-card.ai-state-failed { border-color: var(--danger); }
.ai-verify-top { display: flex; gap: 12px; align-items: flex-start; min-width: 0; }
.ai-thumb {
  width: 86px;
  height: 86px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--border);
  cursor: zoom-in;
  flex-shrink: 0;
  background: var(--surface-alt);
}
.ai-verify-info { flex: 1; min-width: 0; max-width: 100%; }
.ai-verify-card .badge {
  white-space: normal;
  text-align: right;
  line-height: 1.5;
  border-radius: 10px;
  max-width: 100%;
  align-items: flex-start;
}
.ai-verify-card .badge .tiva-icon { margin-top: 3px; }
.ai-summary { font-size: 12px; color: var(--text-secondary); margin: 7px 0; word-break: break-word; }
.ai-pills { display: flex; flex-wrap: wrap; gap: 6px; max-width: 100%; }
.ai-check-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: 8px;
  max-width: 100%;
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
  line-height: 1.45;
  text-align: right;
}
.ai-check-pill .tiva-icon { width: 12px; height: 12px; }
.ai-check-pill.ok { background: var(--success-soft); color: var(--success); }
.ai-check-pill.fail { background: var(--danger-soft); color: var(--danger); }

/* ================= DATA TABLES ================= */
.toolbar-filters {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.search-box {
  position: relative;
  flex: 1;
  min-width: 220px;
}
.search-box .form-control { padding-right: 38px; }
.search-box .tiva-icon {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  border-radius: 10px;
}
.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 12.5px;
}
.data-table thead th {
  background: var(--surface-alt);
  color: var(--text-muted);
  font-weight: 800;
  font-size: 11.5px;
  text-align: right;
  padding: 11px 14px;
  border-bottom: 1.5px solid var(--border-strong);
  white-space: nowrap;
  position: sticky;
  top: 0;
  z-index: 2;
}
.data-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  text-align: right;
}
.data-table tbody tr {
  transition: background 0.14s ease;
}
.data-table tbody tr.expandable-row:nth-of-type(4n+3) {
  background: rgba(148, 163, 184, 0.035);
}
.data-table tbody tr:hover {
  background: var(--surface-hover);
}

/* Slim Expandable Row System */
.data-table tbody tr.expandable-row {
  cursor: pointer;
}
.data-table tbody tr.expandable-row.is-expanded {
  background: var(--primary-soft);
}
.data-table tbody tr.expandable-row.is-expanded td {
  border-bottom-color: rgba(15, 118, 110, 0.18);
}
.row-chevron {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  color: var(--text-muted);
  transition: transform 0.2s ease, color 0.15s ease, background 0.15s ease;
  flex-shrink: 0;
}
.expandable-row:hover .row-chevron {
  background: var(--border);
  color: var(--text);
}
.expandable-row.is-expanded .row-chevron {
  transform: rotate(180deg);
  background: var(--primary);
  color: #ffffff;
}
.code-cell-wrap {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
}
.code-chip {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 7px;
  background: var(--surface-alt);
  border: 1px solid var(--border-strong);
  font-size: 12px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: 0.3px;
  direction: ltr;
  unicode-bidi: isolate;
  white-space: nowrap;
}
.cell-ellipsis {
  display: block;
  max-width: 230px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cell-nowrap {
  white-space: nowrap;
}
.data-table tbody tr.expand-detail-row {
  background: var(--surface-alt);
}
.data-table tbody tr.expand-detail-row:hover {
  background: var(--surface-alt);
}
.data-table tbody tr.expand-detail-row > td {
  padding: 0;
  border-bottom: 1.5px solid var(--border-strong);
}
.expand-detail-box {
  padding: 14px 18px 16px;
  border-top: 1px solid rgba(15, 118, 110, 0.14);
  background: linear-gradient(180deg, rgba(15, 118, 110, 0.03) 0%, var(--surface-alt) 100%);
  animation: fadeSlideDown 0.16s ease;
}
@keyframes fadeSlideDown {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}
.expand-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
  gap: 10px;
  align-items: stretch;
}
.expand-meta-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 4px;
  padding: 9px 12px;
  border-radius: 9px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
  font-size: 12px;
  min-width: 0;
  text-align: right;
}
.expand-meta-item > span {
  display: block;
  width: 100%;
  font-size: 10.5px;
  color: var(--text-muted);
  font-weight: 700;
  text-align: right;
  line-height: 1.35;
}
.expand-meta-item > strong {
  display: block;
  font-size: 12.5px;
  color: var(--text);
  font-weight: 700;
  line-height: 1.5;
  text-align: right;
  max-width: 100%;
  word-break: break-word;
}
/* Fix RTL/LTR visual drift: keep LTR numbers/codes neatly right-aligned under their Persian label */
.expand-meta-item > strong.ltr,
.expand-meta-item .ltr,
.detail-item > strong.ltr,
.detail-item .ltr {
  direction: ltr;
  unicode-bidi: isolate;
  display: inline-block;
  text-align: right;
  align-self: flex-start;
  max-width: 100%;
}
.expand-meta-full {
  grid-column: 1 / -1;
}
.expand-ai-row {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  width: 100%;
  justify-content: flex-start;
}

.clickable-user-link {
  color: var(--primary);
  font-weight: 700;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  font-size: inherit;
  text-align: right;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}
.clickable-user-link:hover { text-decoration: underline; }

.actions-row {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: nowrap;
}
.req-card .actions-row,
.drop-bulk-bar .actions-row,
.card-header .actions-row {
  flex-wrap: wrap;
}

/* ================= PERMISSION SWITCHES ================= */
.perm-list { display: grid; gap: 10px; }
.perm-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-alt);
}
.perm-info strong { display: block; font-size: 13.5px; margin-bottom: 3px; }
.perm-info span { display: block; font-size: 12px; color: var(--text-muted); }

.switch {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 26px;
  flex-shrink: 0;
}
.switch input { opacity: 0; width: 0; height: 0; }
.slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: var(--border-strong);
  border-radius: 999px;
  transition: 0.22s;
}
.slider::before {
  content: '';
  position: absolute;
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background: #ffffff;
  border-radius: 50%;
  transition: 0.22s;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}
.switch input:checked + .slider { background: var(--primary); }
.switch input:checked + .slider::before { transform: translateX(22px); }

/* ================= MODALS & LIGHTBOX ================= */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(5, 11, 24, 0.68);
  backdrop-filter: blur(4px);
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
}
.modal-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  width: 100%;
  max-width: 780px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.modal-box.modal-lg { max-width: 960px; }
.modal-box.modal-sm { max-width: 500px; }
.modal-head {
  padding: 16px 22px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.modal-head h3 { margin: 0; font-size: 16px; font-weight: 800; display: flex; align-items: center; gap: 8px; }
.modal-body {
  padding: 20px 22px;
  overflow-y: auto;
  flex: 1;
}
.modal-foot {
  padding: 14px 22px;
  border-top: 1px solid var(--border);
  background: var(--surface-alt);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 16px;
  margin-bottom: 18px;
}
.detail-item {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 13px;
}
.detail-item span { display: block; font-size: 11px; color: var(--text-muted); margin-bottom: 3px; }
.detail-item strong { font-size: 13.5px; word-break: break-word; }

.evidence-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 14px;
}
.evidence-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  background: var(--surface-alt);
}
.evidence-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 9px;
  border: 1px solid var(--border);
  cursor: zoom-in;
  display: block;
  margin: 8px 0;
}

.lightbox-backdrop {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(2, 6, 16, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  cursor: zoom-out;
}
.lightbox-backdrop img {
  max-width: 95vw;
  max-height: 90vh;
  border-radius: 10px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}

/* ================= ALERT BANNERS ================= */
.alert-box {
  border-radius: 12px;
  padding: 13px 16px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  margin-bottom: 16px;
}
.alert-danger { background: var(--danger-soft); border: 1px solid rgba(220, 38, 38, 0.35); color: var(--danger); }
.alert-warning { background: var(--warning-soft); border: 1px solid rgba(217, 119, 6, 0.35); color: var(--warning); }
.alert-info { background: var(--accent-soft); border: 1px solid rgba(2, 132, 199, 0.35); color: var(--accent); }
.alert-success { background: var(--success-soft); border: 1px solid rgba(5, 150, 105, 0.35); color: var(--success); }

/* ================= PERSIAN JALALI CALENDAR POPUP ================= */
.jp-backdrop {
  position: fixed;
  inset: 0;
  z-index: 140;
  display: none;
  background: rgba(5, 11, 24, 0.25);
}
.jp-backdrop.open { display: block; }

.jp-popup {
  position: fixed;
  z-index: 150;
  width: 308px;
  background: var(--surface);
  border: 1.5px solid var(--border-strong);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  padding: 14px;
  display: none;
}
.jp-popup.open { display: block; }
.jp-popup.jp-mobile {
  left: 50% !important;
  top: 50% !important;
  transform: translate(-50%, -50%);
  width: calc(100vw - 28px);
  max-width: 340px;
}
.jp-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}
.jp-nav {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--surface-alt);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.jp-nav:hover { border-color: var(--primary); color: var(--primary); }
.jp-selects { display: flex; gap: 6px; flex: 1; }
.jp-select {
  flex: 1;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 6px 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  cursor: pointer;
}
.jp-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.jp-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}
.jp-day {
  height: 35px;
  border-radius: 9px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.14s ease;
}
.jp-day:not(.jp-empty):hover { background: var(--primary-soft); color: var(--primary); }
.jp-friday { color: var(--danger) !important; }
.jp-today { border-color: var(--primary); color: var(--primary); font-weight: 800; }
.jp-selected {
  background: linear-gradient(135deg, #0ea5a4, #0284c7) !important;
  color: #ffffff !important;
  font-weight: 800;
}
.jp-footer {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}
.jp-foot-btn {
  border: 1px solid var(--border);
  background: var(--surface-alt);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
}
.jp-today-btn { color: var(--primary); border-color: var(--primary-soft); background: var(--primary-soft); }

/* ================= TOAST NOTIFICATIONS ================= */
.toast-container {
  position: fixed;
  bottom: 20px;
  left: 20px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 390px;
  width: calc(100vw - 32px);
}
.tiva-toast {
  background: var(--surface);
  border: 1px solid var(--border);
  border-right: 4px solid var(--primary);
  border-radius: 12px;
  padding: 13px 14px;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  animation: toastIn 0.22s ease;
}
.tiva-toast.toast-success { border-right-color: var(--success); }
.tiva-toast.toast-danger { border-right-color: var(--danger); }
.tiva-toast.toast-warning { border-right-color: var(--warning); }
.tiva-toast.toast-info { border-right-color: var(--accent); }
.toast-icon { color: var(--primary); margin-top: 1px; }
.toast-success .toast-icon { color: var(--success); }
.toast-danger .toast-icon { color: var(--danger); }
.toast-warning .toast-icon { color: var(--warning); }
.toast-body { flex: 1; line-height: 1.55; }
.toast-close {
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  padding: 2px;
}
.toast-leave { opacity: 0; transform: translateY(8px); transition: all 0.22s ease; }
@keyframes toastIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ================= MOBILE BOTTOM BAR & RESPONSIVE ================= */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  right: 0;
  left: 0;
  z-index: 45;
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 6px 8px calc(6px + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -4px 18px rgba(15, 23, 42, 0.08);
}
.mobile-bottom-nav-inner {
  display: flex;
  justify-content: space-around;
  align-items: center;
  gap: 4px;
}
.mob-tab-btn {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--text-muted);
  padding: 6px 4px;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  position: relative;
}
.mob-tab-btn.active { color: var(--primary); background: var(--primary-soft); }
.mob-tab-btn .nav-badge {
  position: absolute;
  top: 2px;
  left: 14%;
  height: 17px;
  min-width: 17px;
  font-size: 10px;
}

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(5, 11, 24, 0.55);
  z-index: 35;
}
.sidebar-overlay.open { display: block; }

.empty-state {
  text-align: center;
  padding: 46px 20px;
  color: var(--text-muted);
}
.empty-state .tiva-icon { width: 42px; height: 42px; opacity: 0.45; margin-bottom: 10px; }
.empty-state p { margin: 4px 0 0; font-size: 13.5px; }

.spinner {
  width: 20px;
  height: 20px;
  border: 2.5px solid var(--border-strong);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* User Cards Grid (Team view) */
.team-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(275px, 1fr));
  gap: 14px;
}
.user-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  cursor: pointer;
  transition: all 0.18s ease;
}
.user-card:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.user-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}
.user-card-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  background: var(--surface-alt);
  border-radius: 10px;
  padding: 10px;
  text-align: center;
}
.user-card-stats span { display: block; font-size: 10.5px; color: var(--text-muted); }
.user-card-stats strong { font-size: 14px; font-weight: 800; }

/* Mobile Request Cards (shown neatly inside marketer list) */
.req-mobile-cards { display: grid; gap: 12px; }
.req-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 15px;
}
.req-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 10px;
}

@media (max-width: 1024px) {
  .login-shell { grid-template-columns: 1fr; }
  .login-hero { display: none; }
  .sidebar {
    transform: translateX(105%);
    visibility: hidden;
    pointer-events: none;
  }
  .sidebar.open {
    transform: translateX(0);
    visibility: visible;
    pointer-events: auto;
  }
  .main-wrap { margin-right: 0; width: 100%; }
  .sidebar-toggle-btn { display: inline-flex; }
}

@media (max-width: 720px) {
  .topbar {
    padding: 0 12px;
    height: 58px;
    gap: 8px;
    max-width: 100%;
    overflow: hidden;
  }
  .topbar-right { gap: 8px; flex: 1; min-width: 0; }
  .topbar-title-group { min-width: 0; overflow: hidden; }
  .topbar-title-group h1 { font-size: 14.5px; }
  .topbar-subtitle { display: none; }
  .topbar-actions { gap: 6px; }
  #desktopNotifBtn { padding: 8px; width: 38px; height: 38px; }
  #desktopNotifBtn .notif-btn-text { display: none; }
  .live-pill { padding: 5px 8px; }
  .live-pill .live-text { display: none; }

  .content-area { padding: 12px 10px 88px; max-width: 100%; overflow-x: hidden; }
  .form-section-box { padding: 14px 12px; border-radius: 14px; }
  .form-section-head { margin-bottom: 12px; }
  .form-section-head h3 { font-size: 13.5px; line-height: 1.5; }
  .card-header { padding: 13px 14px; }
  .card-body { padding: 14px 12px; }

  .form-grid, .form-grid-3, .detail-grid, .evidence-grid, .plans-grid { grid-template-columns: minmax(0, 1fr); }
  .camera-upload-box { padding: 14px 10px; }
  .cam-actions { flex-direction: column; width: 100%; }
  .cam-actions .btn { width: 100%; white-space: normal; text-align: center; }

  .ai-verify-top { flex-direction: column; align-items: stretch; }
  .ai-thumb { width: 100%; height: 170px; object-fit: contain; }
  .ai-pills { flex-direction: column; align-items: flex-start; }

  #submitSubscriptionBtn { width: 100% !important; min-width: 0 !important; }

  .mobile-bottom-nav { display: block; }
  .toast-container { bottom: 78px; left: 10px; right: 10px; width: auto; }
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .kpi-card { padding: 12px; }
  .kpi-value { font-size: 17px; }
}

/* ================= BUILT-IN LIVE TIMESTAMP CAMERA OVERLAY ================= */
.tcam-overlay {
  position: fixed;
  inset: 0;
  z-index: 250;
  background: #020611;
  color: #f8fafc;
  display: flex;
  flex-direction: column;
}
.tcam-topbar {
  padding: 12px 16px;
  background: rgba(11, 22, 44, 0.92);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.tcam-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
}
.tcam-title .tiva-icon { color: #22d3ee; }
.tcam-top-actions { display: flex; gap: 8px; }
.tcam-icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.tcam-stage {
  flex: 1;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000000;
}
.tcam-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.tcam-error {
  position: absolute;
  inset: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: rgba(11, 22, 44, 0.92);
  border: 1px solid rgba(248, 113, 113, 0.45);
  border-radius: 16px;
  padding: 22px;
}
.tcam-error p { color: #cbd5e1; font-size: 13px; margin: 8px 0 14px; }

.tcam-hud {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 12px 16px;
  background: linear-gradient(180deg, rgba(2, 6, 17, 0) 0%, rgba(2, 6, 17, 0.82) 30%, rgba(2, 6, 17, 0.92) 100%);
  direction: ltr;
  text-align: left;
  pointer-events: none;
}
.tcam-hud-line { line-height: 1.45; text-shadow: 0 1px 3px rgba(0, 0, 0, 0.85); }
.tcam-hud-time { font-size: 14px; font-weight: 800; color: #fde047; }
.tcam-hud-loc { font-size: 12.5px; font-weight: 600; color: #ffffff; direction: rtl; text-align: left; }
.tcam-hud-coords { font-size: 11px; font-weight: 600; color: #67e8f9; margin-top: 2px; }

.tcam-bottombar {
  padding: 16px 24px calc(18px + env(safe-area-inset-bottom, 0px));
  background: #070d19;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: 16px;
}
.tcam-shutter {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  border: 4px solid #ffffff;
  background: transparent;
  padding: 5px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.12s ease;
}
.tcam-shutter:active { transform: scale(0.92); }
.tcam-shutter-inner {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: linear-gradient(135deg, #22d3ee, #0ea5a4);
  display: block;
}
.tcam-side-btn {
  min-width: 72px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #e2e8f0;
  border-radius: 12px;
  padding: 9px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

/* ================= STAGE 2: DROP-PULLING UNIT UI STYLES ================= */
.drop-bulk-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 16px;
  margin-bottom: 16px;
  border-radius: var(--radius);
  border: 1px dashed var(--border);
  background: var(--surface);
  transition: all 0.2s ease;
}
.drop-bulk-bar.has-selection {
  border-style: solid;
  border-color: var(--primary);
  background: var(--primary-soft);
  box-shadow: var(--shadow-sm);
}
.drop-bulk-info {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
  color: var(--text);
}
.drop-chk {
  width: 17px;
  height: 17px;
  accent-color: var(--primary);
  cursor: pointer;
}
.data-table tbody tr.row-selected {
  background: var(--primary-soft);
}
.tech-card-address {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  padding: 9px 11px;
  border-radius: var(--radius-sm);
  background: var(--surface-alt);
  border: 1px solid var(--border);
  font-size: 12.5px;
  line-height: 1.65;
  margin-bottom: 10px;
}
.tech-card-address .tiva-icon {
  color: var(--primary);
  flex-shrink: 0;
  margin-top: 2px;
}
.demo-grid {
  grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
}
.demo-btn-drop {
  border-color: rgba(14, 165, 164, 0.45);
}
.demo-btn-drop strong {
  color: var(--accent, #0ea5a4);
}
.demo-btn-fusion {
  border-color: rgba(124, 58, 237, 0.45);
}
.demo-btn-fusion strong {
  color: #7c3aed;
}
[data-theme="dark"] .demo-btn-fusion strong {
  color: #a78bfa;
}
.demo-btn-delivery {
  border-color: rgba(16, 185, 129, 0.48);
}
.demo-btn-delivery strong {
  color: #059669;
}
[data-theme="dark"] .demo-btn-delivery strong {
  color: #34d399;
}
.demo-btn-docs {
  border-color: rgba(217, 119, 6, 0.48);
}
.demo-btn-docs strong {
  color: #b45309;
}
[data-theme="dark"] .demo-btn-docs strong {
  color: #fbbf24;
}

/* ================= STAGE 5 DOCS: 5-STAGE PIPELINE & DOSSIER SECTIONS ================= */
.pipeline-5-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}
.pipeline-step-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 12px 13px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font-family: inherit;
  text-align: right;
  cursor: pointer;
  transition: transform 0.14s ease, border-color 0.14s ease, box-shadow 0.14s ease;
}
.pipeline-step-card:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}
.pipeline-step-card.pipeline-step-final {
  border-color: rgba(16, 185, 129, 0.45);
  background: linear-gradient(180deg, rgba(16, 185, 129, 0.08), var(--surface-2));
}
.pipeline-step-head {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11.5px;
  font-weight: 800;
  color: var(--text-muted);
}
.pipeline-step-head svg {
  width: 16px;
  height: 16px;
  color: var(--primary);
}
.pipeline-step-card.pipeline-step-final .pipeline-step-head svg {
  color: var(--success);
}
.pipeline-step-card strong {
  font-size: 22px;
  font-weight: 900;
  line-height: 1.2;
}
.pipeline-step-card small {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
}
.docs-stage-section {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin-bottom: 12px;
  background: var(--surface-2);
}
.docs-stage-title {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 10px;
  padding-bottom: 7px;
  border-bottom: 1px solid var(--border);
}
.docs-stage-title svg {
  width: 16px;
  height: 16px;
  color: var(--primary);
}
@media (max-width: 980px) {
  .pipeline-5-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 520px) {
  .pipeline-5-grid {
    grid-template-columns: 1fr;
  }
}

/* ================= STAGE 4 DELIVERY: SPEEDTEST STRIP & HANDOVER CHECKLIST ================= */
.speedtest-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.speedtest-pill {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.speedtest-pill span {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 700;
}
.speedtest-pill strong {
  font-size: 16px;
  font-weight: 900;
}
.delivery-checklist-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 8px;
}
.delivery-check-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 11px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.delivery-check-item:hover {
  border-color: var(--primary);
}
.delivery-check-item input:checked + span {
  color: var(--text);
  font-weight: 700;
}
@media (max-width: 600px) {
  .speedtest-strip {
    grid-template-columns: 1fr;
  }
}

/* ================= DROP TECHNICIAN MULTI-PHOTO SQUARE GRID (MIN 5 PHOTOS + ADD TILE) ================= */
.drop-photos-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin: 16px 0 10px;
}
.drop-photos-header h4 {
  margin: 0;
  font-size: 13.5px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.drop-photo-counter {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--warning-soft);
  color: var(--warning);
  border: 1px solid rgba(217, 119, 6, 0.25);
}
.drop-photo-counter.ready {
  background: var(--success-soft);
  color: var(--success);
  border-color: rgba(5, 150, 105, 0.28);
}

.drop-photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 112px));
  gap: 10px;
}

.drop-photo-tile {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface-alt);
  border: 1.5px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.drop-photo-tile.ai-verified { border-color: var(--success); }
.drop-photo-tile.ai-failed { border-color: var(--danger); }
.drop-photo-tile.ai-skipped { border-color: var(--warning); }

.drop-photo-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  cursor: zoom-in;
}

.drop-photo-num {
  position: absolute;
  top: 5px;
  right: 5px;
  min-width: 21px;
  height: 21px;
  padding: 0 5px;
  border-radius: 7px;
  background: rgba(11, 22, 44, 0.78);
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.drop-photo-remove {
  position: absolute;
  top: 5px;
  left: 5px;
  width: 23px;
  height: 23px;
  border-radius: 7px;
  border: none;
  background: rgba(220, 38, 38, 0.88);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  transition: transform 0.15s ease, background-color 0.15s ease;
}
.drop-photo-remove:hover {
  background: #b91c1c;
  transform: scale(1.06);
}
.drop-photo-remove .tiva-icon {
  width: 13px;
  height: 13px;
}

.drop-photo-status {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 3px 6px;
  font-size: 10px;
  font-weight: 800;
  text-align: center;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.78);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.drop-photo-status.st-verified { background: rgba(5, 150, 105, 0.92); }
.drop-photo-status.st-failed { background: rgba(220, 38, 38, 0.94); }
.drop-photo-status.st-skipped { background: rgba(217, 119, 6, 0.92); }
.drop-photo-status.st-loading { background: rgba(2, 132, 199, 0.92); }
.drop-photo-status .spinner {
  width: 11px;
  height: 11px;
  border-width: 2px;
  border-color: rgba(255, 255, 255, 0.35);
  border-top-color: #ffffff;
}
.drop-photo-status .tiva-icon {
  width: 11px;
  height: 11px;
  flex-shrink: 0;
}

.drop-photo-add-tile {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  border: 2px dashed var(--primary);
  background: var(--primary-soft);
  color: var(--primary);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  transition: all 0.18s ease;
  padding: 8px;
}
.drop-photo-add-tile:hover {
  background: rgba(14, 165, 164, 0.18);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}
.drop-photo-add-tile .tiva-icon {
  width: 28px;
  height: 28px;
  stroke-width: 2.3;
}
.drop-photo-add-tile span {
  font-size: 11px;
  font-weight: 800;
}

.drop-photo-chooser {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--surface-alt);
  border: 1px solid var(--primary);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  animation: dropChooserFade 0.16s ease;
}
@keyframes dropChooserFade {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}
.drop-photo-chooser-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.drop-photo-hint {
  margin-top: 8px;
  font-size: 11.5px;
  color: var(--text-muted);
}

.drop-ai-checklist {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 10px;
}
.drop-ai-row {
  padding: 8px 11px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface-alt);
  font-size: 11.5px;
}
.drop-ai-row.row-verified {
  border-color: rgba(5, 150, 105, 0.35);
  background: var(--success-soft);
}
.drop-ai-row.row-failed {
  border-color: rgba(220, 38, 38, 0.4);
  background: var(--danger-soft);
}
.drop-ai-row.row-skipped {
  border-color: rgba(217, 119, 6, 0.35);
  background: var(--warning-soft);
}
.drop-ai-row-head {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.drop-ai-row-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 6px;
}
.drop-ai-row-msg {
  margin-top: 5px;
  color: var(--text-secondary);
  line-height: 1.55;
}

@media screen and (max-width: 640px) {
  .drop-photo-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }
}

/* ================= UNIFIED PAGINATION BAR (10 / 15 ROWS PER PAGE) ================= */
.pagination-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 11px 16px;
  border-top: 1px solid var(--border);
  background: var(--surface-alt);
  border-bottom-left-radius: var(--radius);
  border-bottom-right-radius: var(--radius);
  font-size: 12px;
}
.card-body .pagination-bar {
  margin-top: 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
}
.pg-info {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  color: var(--text-muted);
}
.pg-info strong {
  color: var(--text);
  font-weight: 800;
}
.pg-size-wrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  font-size: 11.5px;
}
.pg-size-sel {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border-strong);
  border-radius: 7px;
  padding: 3px 8px;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  outline: none;
}
.pg-size-sel:focus {
  border-color: var(--primary);
}
.pg-controls {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}
.pg-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 30px;
  height: 30px;
  padding: 0 9px;
  border-radius: 7px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}
.pg-btn .tiva-icon {
  width: 14px;
  height: 14px;
}
.pg-btn:hover:not(:disabled) {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-soft);
}
.pg-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
}
.pg-btn:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}
.pg-dots {
  padding: 0 4px;
  color: var(--text-muted);
  font-weight: 700;
}
@media screen and (max-width: 640px) {
  .pagination-bar {
    flex-direction: column;
    align-items: stretch;
    padding: 10px 12px;
  }
  .pg-info {
    justify-content: space-between;
  }
  .pg-controls {
    justify-content: center;
  }
}

/* ==================== STAGE 6: INDEPENDENT SUPPORT & FAULT REPAIR UNIT ==================== */
.demo-btn-support {
  border-color: rgba(220, 38, 38, 0.35);
  background: rgba(220, 38, 38, 0.06);
}
.demo-btn-support:hover {
  border-color: #dc2626;
  background: rgba(220, 38, 38, 0.14);
}
.demo-btn-support strong {
  color: #dc2626;
}
[data-theme="dark"] .demo-btn-support strong {
  color: #f87171;
}

.support-banner-card {
  margin-top: 14px;
  padding: 13px 16px;
  border-radius: 12px;
  border: 1px dashed rgba(220, 38, 38, 0.35);
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.05), rgba(37, 99, 235, 0.04));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}
.support-banner-info {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 240px;
}
.support-banner-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(220, 38, 38, 0.12);
  color: #dc2626;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
[data-theme="dark"] .support-banner-icon {
  color: #f87171;
}
.support-banner-title {
  font-size: 13px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 3px;
}
.support-banner-stats {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--text-muted);
}

.support-lookup-box {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin-bottom: 14px;
}
.support-lookup-results {
  margin-top: 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  max-height: 210px;
  overflow-y: auto;
  box-shadow: var(--shadow-sm);
}
.support-lookup-item {
  width: 100%;
  text-align: right;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border);
  padding: 9px 12px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 3px;
  color: var(--text);
  transition: background 0.14s ease;
}
.support-lookup-item:last-child {
  border-bottom: none;
}
.support-lookup-item:hover {
  background: var(--primary-soft);
}

/* ==================== V15: OPTIONAL PREPAYMENT & FUSION POWER/SUPPORT BOXES ==================== */
.prepay-toggle-card,
.fusion-fault-box {
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  background: var(--surface-alt);
  margin-bottom: 14px;
  transition: border-color 0.16s ease, background 0.16s ease;
}
.prepay-toggle-card.is-paid {
  border-color: rgba(37, 99, 235, 0.35);
  background: rgba(37, 99, 235, 0.05);
}
.prepay-toggle-card.is-unpaid {
  border-color: rgba(245, 158, 11, 0.45);
  background: rgba(245, 158, 11, 0.07);
}
.fusion-fault-box {
  margin-bottom: 0;
}
.fusion-fault-box.is-active {
  border-color: rgba(220, 38, 38, 0.55);
  background: rgba(220, 38, 38, 0.06);
}
.fusion-support-box.is-active {
  border-color: rgba(217, 119, 6, 0.55);
  background: rgba(217, 119, 6, 0.07);
}
.fusion-check-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  margin: 0;
}
.fusion-check-row input[type="checkbox"] {
  margin-top: 3px;
  flex-shrink: 0;
}
.fusion-check-row strong {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  color: var(--text);
}
.power-radio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(175px, 1fr));
  gap: 8px;
}
.power-radio-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 11px;
  border-radius: 8px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  cursor: pointer;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text);
  transition: border-color 0.14s ease, background 0.14s ease;
}
.power-radio-pill:has(input:checked) {
  border-color: var(--danger);
  background: var(--danger-soft);
  color: var(--danger);
}





