/* ========================================================================
   FIAT CRM - Settings Hub Premium Stylesheet
   Modern Glassmorphic Dark Design System
   ======================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;600;700;800;900&family=Outfit:wght@300;400;600;700;800&display=swap');

:root {
  --bg-main: #060913;
  --bg-gradient: radial-gradient(circle at 50% 0%, #171d33 0%, #080c18 60%, #04060c 100%);
  --panel-bg: rgba(15, 23, 42, 0.72);
  --panel-border: rgba(234, 160, 35, 0.45);
  --panel-border-hover: rgba(251, 191, 36, 0.75);
  
  --fiat-red: #EAA023;
  --fiat-red-glow: rgba(234, 160, 35, 0.4);
  --neon-cyan: #EAA023;
  --neon-cyan-glow: rgba(234, 160, 35, 0.35);
  --neon-amber: #EAA023;
  --neon-amber-glow: rgba(234, 160, 35, 0.35);
  --neon-emerald: #34d399;
  --neon-emerald-glow: rgba(52, 211, 153, 0.35);
  --neon-rose: #f43f5e;
  --neon-rose-glow: rgba(244, 63, 94, 0.35);
  --neon-purple: #EAA023;
  
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-subtle: #64748b;
  
  --header-height: 68px;
  --font-cairo: 'Cairo', system-ui, -apple-system, sans-serif;
  --font-outfit: 'Outfit', sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  scrollbar-width: thin;
  scrollbar-color: #EAA023 rgba(7, 11, 20, 0.5);
}

/* ==========================================================================
   Ultra-sleek Elios Gold Scrollbar
   ========================================================================== */
::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}

::-webkit-scrollbar-track {
  background: rgba(7, 11, 20, 0.45);
  border-radius: 9999px;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #FBBF24 0%, #EAA023 60%, #D97706 100%);
  border-radius: 9999px;
  border: none;
  box-shadow: 0 0 8px rgba(234, 160, 35, 0.6);
  transition: all 0.2s ease;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #FCD34D 0%, #F59E0B 50%, #B45309 100%);
  box-shadow: 0 0 14px rgba(251, 191, 36, 0.85);
}

::-webkit-scrollbar-button {
  display: none;
  width: 0;
  height: 0;
}

::-webkit-scrollbar-corner {
  background: transparent;
}

body {
  background: var(--bg-main);
  background-image: var(--bg-gradient);
  background-attachment: fixed;
  color: var(--text-main);
  font-family: var(--font-cairo);
  min-height: 100vh;
  direction: rtl;
  overflow-x: hidden;
  line-height: 1.5;
}

/* ========================================================================
   Header Bar
   ======================================================================== */
.header-bar {
  height: var(--header-height);
  background: rgba(10, 16, 30, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--panel-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  position: sticky;
  top: 0;
  z-index: 100;
}

.user-header-section {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--panel-border);
  padding: 5px 12px;
  border-radius: 9999px;
  cursor: pointer;
  transition: all 0.25s ease;
}

.user-badge:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(56, 189, 248, 0.4);
}

.user-avatar-sm {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--neon-cyan);
}

.user-meta-text {
  display: flex;
  flex-direction: column;
}

.user-name-text {
  font-size: 0.82rem;
  font-weight: 700;
  color: #fff;
}

.user-role-pill {
  font-size: 0.65rem;
  font-family: var(--font-outfit);
  font-weight: 700;
  padding: 0 6px;
  border-radius: 6px;
  display: inline-block;
  width: fit-content;
}

.role-admin {
  background: rgba(56, 189, 248, 0.15);
  color: var(--neon-cyan);
  border: 1px solid rgba(56, 189, 248, 0.35);
}

.role-manager {
  background: rgba(52, 211, 153, 0.15);
  color: var(--neon-emerald);
  border: 1px solid rgba(52, 211, 153, 0.35);
}

.role-team-leader {
  background: rgba(251, 191, 36, 0.15);
  color: var(--neon-amber);
  border: 1px solid rgba(251, 191, 36, 0.35);
}

.role-second-line {
  background: rgba(251, 191, 36, 0.15);
  color: var(--neon-amber);
  border: 1px solid rgba(251, 191, 36, 0.35);
}

.role-cs,
.role-customer-service {
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.35);
}

.role-client {
  background: rgba(168, 85, 247, 0.15);
  color: var(--neon-purple);
  border: 1px solid rgba(168, 85, 247, 0.35);
}

/* ==========================================================================
   Section Permissions Matrix Styles
   ========================================================================== */
.permissions-matrix-box {
  background: rgba(10, 16, 30, 0.7);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 14px;
  padding: 1.25rem;
  margin-top: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.permissions-matrix-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(226, 232, 240, 0.1);
}

.matrix-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  font-weight: 800;
  color: #fff;
}

.matrix-quick-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-matrix-action {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
  border-radius: 8px;
  padding: 3px 10px;
  font-size: 0.72rem;
  font-family: var(--font-cairo);
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-matrix-action:hover {
  background: rgba(56, 189, 248, 0.2);
  border-color: var(--neon-cyan);
  color: #fff;
}

.permissions-checkboxes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.perm-checkbox-card {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--panel-border);
  border-radius: 10px;
  padding: 9px 12px;
  cursor: pointer;
  user-select: none;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.perm-checkbox-card:hover {
  background: rgba(30, 41, 59, 0.8);
  border-color: rgba(56, 189, 248, 0.4);
  transform: translateY(-1px);
}

.perm-checkbox-card input[type="checkbox"] {
  width: 17px;
  height: 17px;
  accent-color: #0284c7;
  cursor: pointer;
}

.perm-checkbox-card.checked {
  background: rgba(2, 132, 199, 0.12);
  border-color: rgba(56, 189, 248, 0.5);
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.15);
}

.perm-card-content {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.8rem;
  font-weight: 700;
  color: #e2e8f0;
}

.section-tag {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #94a3b8;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.section-tag.active {
  background: rgba(56, 189, 248, 0.15);
  border-color: rgba(56, 189, 248, 0.35);
  color: #38bdf8;
}

.header-center-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--panel-border);
  padding: 6px 18px;
  border-radius: 12px;
}

.brand-section {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
  direction: ltr;
}

.brand-logo-card {
  background: #ffffff !important;
  padding: 4px 10px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  box-shadow: 0 0 16px rgba(234, 160, 35, 0.45), 0 2px 10px rgba(0, 0, 0, 0.4);
  border: 1.5px solid #EAA023;
  transition: all 0.3s ease;
  cursor: pointer;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.brand-logo-card:hover {
  background: #ffffff !important;
  box-shadow: 0 0 24px rgba(251, 191, 36, 0.75), 0 2px 12px rgba(0, 0, 0, 0.5);
  border-color: #FBBF24;
  transform: translateY(-1px);
}

.brand-logo-img {
  height: 36px;
  width: auto;
  max-width: 115px;
  object-fit: contain;
  display: block;
}

.brand-info {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.brand-title {
  font-family: var(--font-outfit);
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  background: linear-gradient(135deg, #FFFFFF 0%, #E2E8F0 35%, #FBBF24 65%, #EAA023 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: flex;
  align-items: center;
}

.brand-subtitle {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  font-family: var(--font-outfit);
}

/* ========================================================================
   Workspace Layout & Sidebar Rail
   ======================================================================== */
.workspace-wrapper {
  display: flex;
  min-height: calc(100vh - var(--header-height));
  width: 100%;
}

.side-nav-rail {
  width: 78px;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-left: 1px solid rgba(226, 232, 240, 0.18);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.75rem 0;
  gap: 8px;
  z-index: 90;
  flex-shrink: 0;
  position: sticky;
  top: var(--header-height);
  height: calc(100vh - var(--header-height));
  align-self: flex-start;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
}

.side-nav-rail::-webkit-scrollbar {
  display: none;
}

.nav-rail-item {
  width: 62px;
  height: 54px;
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: #94a3b8;
  text-decoration: none;
  font-size: 0.68rem;
  font-weight: 700;
  border: 1px solid rgba(148, 163, 184, 0.12);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  position: relative;
  user-select: none;
}

.nav-rail-item * {
  pointer-events: none;
}

.nav-rail-item span {
  font-size: 0.62rem;
  font-weight: 700;
  line-height: 1.1;
  text-align: center;
}

.nav-rail-item:hover {
  color: #ffffff;
  background: rgba(148, 163, 184, 0.16);
  border-color: rgba(226, 232, 240, 0.35);
  box-shadow: 0 0 12px rgba(226, 232, 240, 0.2);
  transform: translateY(-2px);
}

.nav-rail-item.active {
  color: #ffffff;
  background: linear-gradient(135deg, rgba(200, 16, 46, 0.45) 0%, rgba(30, 41, 59, 0.85) 100%);
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 0 16px var(--fiat-red-glow), 0 0 8px rgba(255, 255, 255, 0.2);
}

.nav-rail-item.active::before {
  content: '';
  position: absolute;
  right: -10px;
  top: 15%;
  height: 70%;
  width: 4px;
  background: var(--neon-cyan);
  border-radius: 4px 0 0 4px;
  box-shadow: 0 0 10px var(--neon-cyan);
}

.nav-rail-spacer {
  flex: 1;
}

.sidebar-dev-wrapper {
  margin: 4px 0;
}

.sidebar-dev-card {
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: 10px;
  padding: 5px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.dev-credits-title {
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.1;
}

.dev-by-eng {
  font-size: 0.55rem;
  color: #f43f5e;
  font-weight: 800;
}

.dev-name {
  font-size: 0.65rem;
  font-weight: 900;
  font-family: var(--font-outfit);
}

.dev-social-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
}

.dev-social-btn {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.dev-social-btn:hover {
  transform: scale(1.15);
  background: rgba(255, 255, 255, 0.15);
}

.nav-rail-item.logout-item {
  color: var(--neon-rose);
  border: 1px solid rgba(244, 63, 94, 0.25);
  background: rgba(244, 63, 94, 0.06);
}

.nav-rail-item.logout-item:hover {
  background: rgba(244, 63, 94, 0.22);
  border-color: var(--neon-rose);
  box-shadow: 0 0 16px var(--neon-rose-glow);
  color: #fff;
  transform: translateY(-2px);
}

/* ========================================================================
   Main Settings Layout
   ======================================================================== */
.settings-main-area {
  flex: 1;
  padding: 0.85rem 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  max-width: 100%;
  margin: 0;
  width: 100%;
}

.glass-panel {
  background: var(--panel-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--panel-border);
  border-radius: 18px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}

/* Hero Header Card */
.settings-hero-card {
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.7) 0%, rgba(15, 23, 42, 0.85) 100%);
  border: 1px solid rgba(56, 189, 248, 0.25);
  box-shadow: 0 0 25px rgba(56, 189, 248, 0.1);
  position: relative;
  overflow: hidden;
}

.settings-hero-card::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 250px;
  height: 100%;
  background: radial-gradient(circle at top right, rgba(200, 16, 46, 0.2) 0%, transparent 70%);
  pointer-events: none;
}

.settings-hero-title-wrap {
  display: flex;
  align-items: center;
  gap: 15px;
}

.settings-hero-icon {
  width: 50px;
  height: 50px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(200, 16, 46, 0.25) 0%, rgba(56, 189, 248, 0.25) 100%);
  border: 1px solid rgba(56, 189, 248, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.25);
}

.settings-hero-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 2px;
}

.settings-hero-subtitle {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.settings-hero-badges {
  display: flex;
  align-items: center;
  gap: 10px;
}

.hero-badge-item {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--panel-border);
  padding: 6px 14px;
  border-radius: 12px;
  font-size: 0.78rem;
  font-weight: 700;
  color: #cbd5e1;
}

/* Tabs Navigation */
.settings-tabs-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(15, 23, 42, 0.6);
  padding: 6px;
  border-radius: 14px;
  border: 1px solid var(--panel-border);
  overflow-x: auto;
}

.settings-tab-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 10px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  font-family: var(--font-cairo);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
}

.settings-tab-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
}

.settings-tab-btn.active {
  color: #fff;
  background: linear-gradient(135deg, rgba(200, 16, 46, 0.35) 0%, rgba(14, 165, 233, 0.35) 100%);
  border: 1px solid rgba(56, 189, 248, 0.4);
  box-shadow: 0 0 15px rgba(56, 189, 248, 0.2);
}

.tab-counter {
  background: rgba(56, 189, 248, 0.2);
  color: var(--neon-cyan);
  padding: 1px 7px;
  border-radius: 8px;
  font-size: 0.72rem;
  font-family: var(--font-outfit);
}

/* Settings Content Card */
.settings-content-card {
  padding: 1.5rem;
}

.settings-tab-pane {
  display: none;
  animation: fadeInPane 0.3s ease-in-out;
}

.settings-tab-pane.active {
  display: block;
}

@keyframes fadeInPane {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Section Header */
.section-header-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--panel-border);
}

.section-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: #fff;
}

.section-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* Forms & Inputs */
.settings-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 700;
  color: #cbd5e1;
}

.input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.form-input {
  width: 100%;
  height: 42px;
  background: rgba(10, 16, 30, 0.8);
  border: 1px solid var(--panel-border);
  border-radius: 10px;
  padding: 0 12px;
  color: #fff;
  font-family: var(--font-cairo);
  font-size: 0.85rem;
  transition: all 0.25s ease;
  outline: none;
}

.form-input:focus {
  border-color: var(--neon-cyan);
  box-shadow: 0 0 12px var(--neon-cyan-glow);
  background: rgba(15, 23, 42, 0.95);
}

.input-icon-btn {
  position: absolute;
  left: 10px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.input-icon-btn:hover {
  color: var(--neon-cyan);
}

.form-input.has-icon {
  padding-left: 36px;
}

/* Callout Info Boxes */
.info-callout {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 1.5rem;
}

.info-callout.warning {
  border-color: rgba(251, 191, 36, 0.35);
  background: rgba(251, 191, 36, 0.05);
}

.callout-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(56, 189, 248, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.callout-text {
  font-size: 0.82rem;
  color: #e2e8f0;
  line-height: 1.6;
}

/* Table Styles */
.settings-table-wrapper {
  overflow-x: auto;
  border-radius: 12px;
  border: 1px solid var(--panel-border);
  background: rgba(10, 16, 30, 0.5);
}

.settings-table {
  width: 100%;
  border-collapse: collapse;
  text-align: right;
  font-size: 0.82rem;
}

.settings-table th {
  background: rgba(30, 41, 59, 0.8);
  padding: 12px 16px;
  color: #cbd5e1;
  font-weight: 700;
  border-bottom: 1px solid var(--panel-border);
}

.settings-table td {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(226, 232, 240, 0.06);
  color: #e2e8f0;
}

.settings-table tr:hover td {
  background: rgba(56, 189, 248, 0.04);
}

.settings-table tr:last-child td {
  border-bottom: none;
}

/* Action Buttons */
.btn-primary {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  border: 1px solid var(--neon-cyan);
  color: #fff;
  font-family: var(--font-cairo);
  font-size: 0.85rem;
  font-weight: 700;
  padding: 9px 20px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.25s ease;
}

.btn-primary:hover {
  box-shadow: 0 0 16px var(--neon-cyan-glow);
  transform: translateY(-1px);
}

.btn-gold {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  border: 1px solid var(--neon-amber);
  color: #fff;
  font-family: var(--font-cairo);
  font-size: 0.85rem;
  font-weight: 700;
  padding: 9px 20px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.25s ease;
}

.btn-gold:hover {
  box-shadow: 0 0 16px var(--neon-amber-glow);
  transform: translateY(-1px);
}

.btn-danger-sm {
  background: rgba(244, 63, 94, 0.15);
  border: 1px solid rgba(244, 63, 94, 0.35);
  color: var(--neon-rose);
  padding: 5px 10px;
  border-radius: 8px;
  font-size: 0.75rem;
  font-family: var(--font-cairo);
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-danger-sm:hover {
  background: rgba(244, 63, 94, 0.3);
  border-color: var(--neon-rose);
  box-shadow: 0 0 10px var(--neon-rose-glow);
}

/* Diagnostic Stats Grid */
.diagnostic-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 1.5rem;
}

.diag-card {
  background: rgba(10, 16, 30, 0.6);
  border: 1px solid var(--panel-border);
  border-radius: 14px;
  padding: 1.2rem;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: all 0.25s ease;
}

.diag-card:hover {
  border-color: rgba(56, 189, 248, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.diag-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.diag-info {
  display: flex;
  flex-direction: column;
}

.diag-label {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.diag-value {
  font-size: 1.25rem;
  font-weight: 800;
  font-family: var(--font-outfit);
  color: #fff;
}

/* Admin Auth Challenge Overlay Card */
.admin-lock-card {
  max-width: 480px;
  margin: 3rem auto;
  padding: 2rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.2rem;
  border: 1px solid rgba(244, 63, 94, 0.35);
  box-shadow: 0 0 35px rgba(244, 63, 94, 0.15);
}

.lock-icon-wrap {
  width: 65px;
  height: 65px;
  border-radius: 20px;
  background: rgba(244, 63, 94, 0.15);
  border: 1px solid rgba(244, 63, 94, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 20px rgba(244, 63, 94, 0.25);
}

/* Toasts */
#settings-toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.custom-toast {
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(15px);
  border: 1px solid var(--neon-cyan);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6);
  border-radius: 12px;
  padding: 12px 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  animation: slideInToast 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  pointer-events: auto;
}

.custom-toast.success {
  border-color: var(--neon-emerald);
  box-shadow: 0 0 15px var(--neon-emerald-glow);
}

.custom-toast.error {
  border-color: var(--neon-rose);
  box-shadow: 0 0 15px var(--neon-rose-glow);
}

@keyframes slideInToast {
  from {
    opacity: 0;
    transform: translateX(40px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* ========================================================================
   No Answer Hub & Data Table Enhancements
   ======================================================================== */
.no-answer-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid var(--panel-border);
  padding: 12px 16px;
  border-radius: 14px;
  margin-bottom: 1rem;
}

.filter-inputs-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  flex: 1;
}

.filter-search-box {
  min-width: 220px;
  flex: 1;
  position: relative;
}

.filter-select {
  height: 40px;
  background: rgba(10, 16, 30, 0.85);
  border: 1px solid var(--panel-border);
  border-radius: 10px;
  padding: 0 10px;
  color: #f1f5f9;
  font-family: var(--font-cairo);
  font-size: 0.82rem;
  outline: none;
  cursor: pointer;
  transition: all 0.25s ease;
}

.filter-select:focus {
  border-color: var(--neon-rose);
  box-shadow: 0 0 12px rgba(244, 63, 94, 0.35);
}

.filter-date-input {
  height: 40px;
  background: rgba(10, 16, 30, 0.85);
  border: 1px solid var(--panel-border);
  border-radius: 10px;
  padding: 0 10px;
  color: #cbd5e1;
  font-family: var(--font-outfit);
  font-size: 0.82rem;
  outline: none;
  cursor: pointer;
}

.filter-date-input:focus {
  border-color: var(--neon-cyan);
}

.filter-actions-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-export-excel {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  border-radius: 10px;
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  border: 1px solid #10b981;
  color: #fff;
  font-size: 0.82rem;
  font-weight: 700;
  font-family: var(--font-cairo);
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 0 14px rgba(16, 185, 129, 0.3);
}

.btn-export-excel:hover {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.55);
  transform: translateY(-1px);
}

.btn-add-primary {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  border-radius: 10px;
  background: linear-gradient(135deg, #e11d48 0%, #be123c 100%);
  border: 1px solid #f43f5e;
  color: #fff;
  font-size: 0.82rem;
  font-weight: 700;
  font-family: var(--font-cairo);
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 0 14px rgba(244, 63, 94, 0.35);
}

.btn-add-primary:hover {
  background: linear-gradient(135deg, #f43f5e 0%, #e11d48 100%);
  box-shadow: 0 0 20px rgba(244, 63, 94, 0.6);
  transform: translateY(-1px);
}

.btn-clear-filter {
  padding: 8px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--panel-border);
  color: var(--text-muted);
  font-size: 0.8rem;
  font-family: var(--font-cairo);
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-clear-filter:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

/* Badges & Tables */
.source-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.74rem;
  font-weight: 700;
  font-family: var(--font-outfit);
  letter-spacing: 0.3px;
  white-space: nowrap;
}

.table-action-icon-btn {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  text-decoration: none;
}

.table-action-icon-btn:hover {
  transform: scale(1.15);
  background: rgba(255, 255, 255, 0.18);
}

.btn-table-action {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid var(--panel-border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-table-action:hover {
  transform: translateY(-1px);
  border-color: var(--neon-cyan);
  background: rgba(56, 189, 248, 0.15);
}

.btn-table-action.btn-table-delete:hover {
  border-color: var(--neon-rose);
  background: rgba(244, 63, 94, 0.15);
}

/* Fixed Layout Ultra-Compact Table */
.no-answer-compact-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  text-align: right;
  font-size: 0.72rem;
}

.no-answer-compact-table th {
  background: rgba(30, 41, 59, 0.9);
  padding: 8px 4px;
  color: #cbd5e1;
  font-weight: 700;
  font-size: 0.72rem;
  border-bottom: 1px solid var(--panel-border);
  white-space: nowrap;
  letter-spacing: 0.2px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.no-answer-compact-table td {
  padding: 6px 4px;
  border-bottom: 1px solid rgba(226, 232, 240, 0.06);
  color: #e2e8f0;
  font-size: 0.71rem;
  vertical-align: middle;
  word-break: break-word;
  overflow: hidden;
}

.no-answer-compact-table tr:hover td {
  background: rgba(56, 189, 248, 0.05);
}

.no-answer-compact-table tr:last-child td {
  border-bottom: none;
}

/* Load More Button for Table Pagination */
.btn-load-more {
  background: linear-gradient(135deg, rgba(200, 16, 46, 0.25), rgba(239, 68, 68, 0.15));
  border: 1px solid rgba(200, 16, 46, 0.45);
  color: #ffffff;
  padding: 0.45rem 1.4rem;
  border-radius: 20px;
  font-size: 0.84rem;
  font-weight: 700;
  font-family: var(--font-cairo), var(--font-outfit);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.btn-load-more:hover {
  background: linear-gradient(135deg, rgba(200, 16, 46, 0.45), rgba(239, 68, 68, 0.3));
  border-color: var(--fiat-red-light);
  color: #ffffff;
  box-shadow: 0 0 16px rgba(200, 16, 46, 0.5);
  transform: translateY(-2px);
}

/* Modal Overlay & Card Styling for Settings */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(5, 9, 20, 0.78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-backdrop .glass-panel {
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(56, 189, 248, 0.3);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 30px rgba(56, 189, 248, 0.15);
  border-radius: 16px;
  padding: 1.5rem;
  color: #f8fafc;
}

.btn-edit-sm {
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: #38bdf8;
  padding: 5px 10px;
  border-radius: 8px;
  font-size: 0.75rem;
  font-family: var(--font-cairo);
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-edit-sm:hover {
  background: rgba(56, 189, 248, 0.28);
  border-color: #38bdf8;
  color: #fff;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.35);
}

/* Excel Import UI Components */
.excel-col-badge {
  background: rgba(200, 16, 46, 0.22);
  border: 1px solid rgba(200, 16, 46, 0.5);
  color: #fecdd3;
  font-size: 0.74rem;
  font-weight: 700;
  font-family: var(--font-cairo);
  padding: 3px 10px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
}

.excel-upload-zone {
  background: rgba(15, 23, 42, 0.5);
  border: 2px dashed rgba(56, 189, 248, 0.4);
  border-radius: 14px;
  padding: 2.2rem 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.25s ease;
}

.excel-upload-zone:hover {
  background: rgba(56, 189, 248, 0.08);
  border-color: var(--neon-cyan);
  box-shadow: 0 0 20px rgba(56, 189, 248, 0.15);
}
