/* ==========================================================================
   AuditAI - Modern Dark Design System
   Color Palette: Deep Slate (#090d16 / #0f172a / #1e293b),
   Electric Blue (#3b82f6), Neon Violet (#8b5cf6), Cyber Emerald (#10b981),
   Warning Amber (#f59e0b), Rose Red (#f43f5e)
   ========================================================================== */

:root {
  --bg-main: #090d16;
  --bg-surface: #0f172a;
  --bg-card: rgba(30, 41, 59, 0.7);
  --bg-card-hover: rgba(51, 65, 85, 0.7);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-light: rgba(255, 255, 255, 0.15);
  
  --primary: #3b82f6;
  --primary-glow: rgba(59, 130, 246, 0.35);
  --secondary: #8b5cf6;
  --accent: #6366f1;
  
  --success: #10b981;
  --success-glow: rgba(16, 185, 129, 0.25);
  --warning: #f59e0b;
  --warning-glow: rgba(245, 158, 11, 0.25);
  --danger: #f43f5e;
  --danger-glow: rgba(244, 63, 94, 0.3);

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  --sidebar-width: 260px;
  --sidebar-collapsed-width: 78px;
  --header-height: 70px;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --transition-fast: 0.2s ease;
  --transition-smooth: 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Base Reset & Typography */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg-main);
  color: var(--text-main);
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-main);
}
::-webkit-scrollbar-thumb {
  background: #334155;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #475569;
}

/* Glassmorphism Utility */
.glass-panel {
  background: var(--bg-card);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  transition: transform var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.glass-panel:hover {
  border-color: var(--border-light);
}

/* Typography Helpers */
h1, h2, h3, h4, h5, h6 {
  color: var(--text-main);
  font-weight: 700;
  line-height: 1.25;
}

.text-gradient {
  background: linear-gradient(135deg, #60a5fa 0%, #a78bfa 50%, #f472b6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.text-primary { color: var(--primary); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-danger { color: var(--danger); }
.text-muted { color: var(--text-muted); }
.font-mono { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; }

/* Global Loading Spinner */
#global-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: transparent;
  z-index: 9999;
  pointer-events: none;
}
#global-loader.active {
  background: linear-gradient(90deg, #3b82f6, #8b5cf6, #3b82f6);
  background-size: 200% 100%;
  animation: loadingBar 1.2s infinite linear;
}
@keyframes loadingBar {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 400px;
}
.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  background: #1e293b;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  box-shadow: 0 10px 25px rgba(0,0,0,0.4);
  color: #fff;
  font-size: 0.9rem;
  animation: slideInRight 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.toast.toast-success { border-left: 4px solid var(--success); }
.toast.toast-error { border-left: 4px solid var(--danger); }
.toast.toast-warning { border-left: 4px solid var(--warning); }
.toast.toast-info { border-left: 4px solid var(--primary); }
.toast.fade-out {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}
.toast-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.2rem;
  cursor: pointer;
  margin-left: auto;
}
@keyframes slideInRight {
  from { opacity: 0; transform: translateX(30px); }
  to { opacity: 1; transform: translateX(0); }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: all var(--transition-fast);
}
.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: #fff;
  box-shadow: 0 4px 16px var(--primary-glow);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.45);
}
.btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-main);
  border: 1px solid var(--border-color);
}
.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--border-light);
}
.btn-sm {
  padding: 6px 12px;
  font-size: 0.82rem;
}
.btn-outline-danger {
  background: transparent;
  border: 1px solid rgba(244, 63, 94, 0.4);
  color: var(--danger);
  border-radius: var(--radius-sm);
}
.btn-outline-danger:hover {
  background: rgba(244, 63, 94, 0.15);
}
.btn-outline-success {
  background: transparent;
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: var(--success);
  border-radius: var(--radius-sm);
}
.btn-outline-success:hover {
  background: rgba(16, 185, 129, 0.15);
}

/* ==========================================================================
   LANDING PAGE STYLES (index.html)
   ========================================================================== */

/* Navbar */
.landing-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 74px;
  background: rgba(9, 13, 22, 0.8);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 5%;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  font-size: 1.35rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.5px;
}
.brand-icon-box {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 0 15px var(--primary-glow);
}
.brand-badge {
  font-size: 0.7rem;
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.3);
  padding: 2px 7px;
  border-radius: 20px;
  margin-left: 4px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
}
.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: color var(--transition-fast);
}
.nav-links a:hover {
  color: #fff;
}

/* Hero Section */
.hero-section {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 130px 5% 70px;
  overflow: hidden;
  background: radial-gradient(circle at 50% 20%, rgba(59, 130, 246, 0.15) 0%, rgba(139, 92, 246, 0.08) 40%, transparent 70%);
}

.hero-glow-blob {
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  opacity: 0.35;
  animation: floatSlow 12s infinite alternate ease-in-out;
}
.hero-glow-1 {
  top: -100px;
  right: -100px;
  background: var(--primary);
}
.hero-glow-2 {
  bottom: 0px;
  left: -150px;
  background: var(--secondary);
}

@keyframes floatSlow {
  0% { transform: translateY(0) scale(1); }
  100% { transform: translateY(40px) scale(1.1); }
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 50px;
  align-items: center;
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
}

.hero-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: 30px;
  color: #a5b4fc;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 24px;
}

.hero-title {
  font-size: 3.4rem;
  font-weight: 800;
  letter-spacing: -1.5px;
  line-height: 1.12;
  margin-bottom: 22px;
}

.hero-description {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 560px;
  margin-bottom: 34px;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 40px;
}

.hero-stats-row {
  display: flex;
  gap: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border-color);
}
.hero-stat-item h4 {
  font-size: 1.6rem;
  color: #fff;
  font-weight: 700;
}
.hero-stat-item p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Hero Floating Demo Card */
.hero-preview-card {
  padding: 24px;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid var(--border-color);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5);
  animation: cardFloat 6s ease-in-out infinite;
}
@keyframes cardFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.preview-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 18px;
}
.preview-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.pulse-dot {
  width: 9px;
  height: 9px;
  background: var(--danger);
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 0 rgba(244, 63, 94, 0.7);
  animation: pulseDot 1.8s infinite;
}
@keyframes pulseDot {
  0% { box-shadow: 0 0 0 0 rgba(244, 63, 94, 0.7); }
  70% { box-shadow: 0 0 0 10px rgba(244, 63, 94, 0); }
  100% { box-shadow: 0 0 0 0 rgba(244, 63, 94, 0); }
}

.preview-simulation {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.preview-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.04);
}
.preview-row:hover {
  background: rgba(255, 255, 255, 0.06);
}

/* Feature Cards Grid */
.section-wrapper {
  padding: 90px 5%;
  max-width: 1280px;
  margin: 0 auto;
}
.section-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 50px;
}
.section-tag {
  color: var(--primary);
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 10px;
}
.section-title {
  font-size: 2.3rem;
  margin-bottom: 16px;
}
.section-sub {
  color: var(--text-muted);
  font-size: 1.05rem;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 28px;
}
.feature-card {
  padding: 32px 28px;
  position: relative;
  overflow: hidden;
}
.feature-icon-wrapper {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: 1.35rem;
  margin-bottom: 22px;
}
.feature-card h3 {
  font-size: 1.25rem;
  margin-bottom: 12px;
}
.feature-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* Workflow Steps */
.workflow-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
  margin-top: 40px;
}
.step-card {
  padding: 26px 22px;
  text-align: center;
  position: relative;
}
.step-number {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: #fff;
  margin: 0 auto 18px;
  box-shadow: 0 0 15px var(--primary-glow);
}
.step-card h4 {
  font-size: 1.1rem;
  margin-bottom: 8px;
}
.step-card p {
  font-size: 0.88rem;
  color: var(--text-muted);
}

/* Rules Breakdown Section */
.rules-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-top: 35px;
}
.rule-item {
  padding: 20px;
  border-left: 3px solid var(--primary);
}
.rule-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.rule-points {
  font-size: 0.8rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  background: rgba(244, 63, 94, 0.15);
  color: #fda4af;
  border: 1px solid rgba(244, 63, 94, 0.3);
}

/* Landing CTA & Footer */
.landing-cta-banner {
  text-align: center;
  padding: 60px 30px;
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.8), rgba(15, 23, 42, 0.95));
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  margin-top: 60px;
}
.landing-footer {
  border-top: 1px solid var(--border-color);
  padding: 40px 5%;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}
.footer-badges {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 15px;
  flex-wrap: wrap;
}
.tech-tag {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.78rem;
  color: var(--text-dim);
}

/* ==========================================================================
   DASHBOARD LAYOUT (dashboard.html)
   ========================================================================== */

.dashboard-container {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  width: var(--sidebar-width);
  background: #0b1120;
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 100;
  transition: width var(--transition-smooth);
}
.sidebar-header {
  height: var(--header-height);
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-color);
}
.sidebar-nav {
  padding: 24px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}
.sidebar-link {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  transition: all var(--transition-fast);
}
.sidebar-link:hover, .sidebar-link.active {
  color: #fff;
  background: rgba(59, 130, 246, 0.12);
  border-left: 3px solid var(--primary);
}
.sidebar-link i {
  font-size: 1.1rem;
  width: 20px;
  text-align: center;
}
.sidebar-footer {
  padding: 18px;
  border-top: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Status Pill */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  font-size: 0.78rem;
  color: var(--text-muted);
}
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}
.status-dot.online { background: var(--success); box-shadow: 0 0 8px var(--success-glow); }
.status-dot.offline { background: var(--danger); box-shadow: 0 0 8px var(--danger-glow); }

/* Main Content Area */
.main-wrapper {
  margin-left: var(--sidebar-width);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  transition: margin-left var(--transition-smooth);
}

/* Topbar */
.topbar {
  height: var(--header-height);
  background: rgba(11, 17, 32, 0.85);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  position: sticky;
  top: 0;
  z-index: 90;
}
.topbar-left {
  display: flex;
  align-items: center;
  gap: 16px;
}
.toggle-sidebar-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.25rem;
  cursor: pointer;
  padding: 6px;
}
.topbar-search-box {
  position: relative;
  width: 320px;
}
.topbar-search-box i {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
}
.topbar-search-box input {
  width: 100%;
  padding: 9px 14px 9px 38px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  border-radius: 30px;
  color: #fff;
  font-size: 0.88rem;
  outline: none;
  transition: all var(--transition-fast);
}
.topbar-search-box input:focus {
  border-color: var(--primary);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 10px var(--primary-glow);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 18px;
}
.user-profile-badge {
  display: flex;
  align-items: center;
  gap: 10px;
}
.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
}

/* Dashboard Body */
.dashboard-content {
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

/* 4 Animated KPI Stat Cards */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 20px;
}
.stat-card {
  padding: 22px;
  position: relative;
  overflow: hidden;
}
.stat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.stat-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.stat-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}
.icon-blue { background: rgba(59, 130, 246, 0.15); color: #60a5fa; }
.icon-green { background: rgba(16, 185, 129, 0.15); color: #34d399; }
.icon-rose { background: rgba(244, 63, 94, 0.15); color: #fb7185; }
.icon-amber { background: rgba(245, 158, 11, 0.15); color: #fbbf24; }

.stat-value {
  font-size: 1.85rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.5px;
}
.stat-sub {
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-top: 6px;
}
.progress-bar-bg {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  margin-top: 10px;
  overflow: hidden;
}
.progress-bar-fill {
  height: 100%;
  background: var(--primary);
  border-radius: 4px;
  transition: width 1s ease;
}

/* Charts Grid */
.charts-grid {
  display: grid;
  grid-template-columns: 1.8fr 1.2fr;
  gap: 22px;
}
.chart-card {
  padding: 24px;
  display: flex;
  flex-direction: column;
}
.chart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}
.chart-container-box {
  position: relative;
  flex: 1;
  min-height: 280px;
}

/* Audit Form & Gauge Section */
.audit-section-grid {
  display: grid;
  grid-template-columns: 1.25fr 0.95fr;
  gap: 24px;
}

.audit-form-card {
  padding: 26px;
}
.form-header-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  padding: 3px 10px;
  background: rgba(139, 92, 246, 0.15);
  color: #c4b5fd;
  border-radius: 20px;
  margin-bottom: 14px;
}

/* Presets Bar */
.presets-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.btn-preset {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 0.78rem;
  padding: 5px 11px;
  border-radius: 6px;
  cursor: pointer;
  transition: all var(--transition-fast);
}
.btn-preset:hover {
  background: rgba(59, 130, 246, 0.15);
  border-color: var(--primary);
  color: #fff;
}

/* Form Grid */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.form-group.col-span-2 {
  grid-column: span 2;
}
.form-group label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
}
.form-control {
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: #fff;
  font-size: 0.9rem;
  outline: none;
  transition: border-color var(--transition-fast);
}
.form-control:focus {
  border-color: var(--primary);
  background: rgba(255, 255, 255, 0.07);
}

/* Circular SVG Gauge Component */
.audit-result-panel {
  padding: 26px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
}
.gauge-wrapper {
  position: relative;
  width: 140px;
  height: 140px;
  margin: 10px 0 16px;
}
.gauge-svg {
  transform: rotate(-90deg);
  width: 140px;
  height: 140px;
}
.gauge-bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.06);
  stroke-width: 10;
}
.gauge-circle {
  fill: none;
  stroke: var(--success);
  stroke-width: 10;
  stroke-linecap: round;
  stroke-dasharray: 339.292;
  stroke-dashoffset: 339.292;
  transition: stroke-dashoffset 1.2s cubic-bezier(0.16, 1, 0.3, 1), stroke 0.4s ease;
}
.gauge-inner-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
}
.gauge-score {
  font-size: 2.2rem;
  font-weight: 800;
  color: #fff;
  line-height: 1;
}
.gauge-label {
  font-size: 0.72rem;
  color: var(--text-dim);
  text-transform: uppercase;
  margin-top: 4px;
}

.result-reasons-container {
  width: 100%;
  margin-top: 16px;
  text-align: left;
}
.reasons-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}
.reason-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.85rem;
  background: rgba(255, 255, 255, 0.03);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  color: #cbd5e1;
}

/* Badges */
.risk-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 700;
}
.badge-low {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}
.badge-medium {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}
.badge-high {
  background: rgba(244, 63, 94, 0.18);
  color: #fb7185;
  border: 1px solid rgba(244, 63, 94, 0.35);
}

.status-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.status-approved { background: rgba(16, 185, 129, 0.15); color: #34d399; }
.status-rejected { background: rgba(244, 63, 94, 0.15); color: #fb7185; }
.status-flagged { background: rgba(245, 158, 11, 0.18); color: #fbbf24; }
.status-pending { background: rgba(148, 163, 184, 0.15); color: #94a3b8; }

/* Alerts Panel */
.alerts-card {
  padding: 24px;
}
.alerts-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 380px;
  overflow-y: auto;
  padding-right: 6px;
}
.alert-item {
  padding: 14px 16px;
  background: rgba(244, 63, 94, 0.06);
  border: 1px solid rgba(244, 63, 94, 0.2);
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.alert-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.alert-amount {
  font-weight: 700;
  color: #fff;
}
.alert-body {
  font-size: 0.88rem;
}
.alert-reason {
  font-size: 0.82rem;
  color: #fca5a5;
  margin-top: 3px;
}
.alert-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 4px;
}

/* Transactions Table Card */
.table-card {
  padding: 24px;
}
.table-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 20px;
}
.table-filters {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.filter-select {
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: #fff;
  font-size: 0.85rem;
  outline: none;
}
.filter-search-box {
  position: relative;
  min-width: 240px;
}
.filter-search-box i {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
}
.filter-search-box input {
  width: 100%;
  padding: 8px 12px 8px 34px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: #fff;
  font-size: 0.85rem;
  outline: none;
}

/* Responsive Table */
.table-responsive {
  overflow-x: auto;
}
.custom-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}
.custom-table th {
  text-align: left;
  padding: 12px 14px;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border-color);
}
.custom-table td {
  padding: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  vertical-align: middle;
}
.custom-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.id-tag {
  font-family: monospace;
  font-size: 0.8rem;
  color: #94a3b8;
  background: rgba(255, 255, 255, 0.04);
  padding: 2px 6px;
  border-radius: 4px;
}
.category-pill {
  font-size: 0.8rem;
  background: rgba(59, 130, 246, 0.1);
  color: #93c5fd;
  padding: 3px 8px;
  border-radius: 6px;
}
.risk-bar-mini {
  width: 50px;
  height: 4px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 2px;
  margin-bottom: 4px;
  overflow: hidden;
}
.risk-bar-fill {
  height: 100%;
}
.risk-bar-fill.badge-low { background: var(--success); }
.risk-bar-fill.badge-medium { background: var(--warning); }
.risk-bar-fill.badge-high { background: var(--danger); }

.action-buttons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.btn-action {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}
.btn-approve {
  background: rgba(16, 185, 129, 0.15);
  color: var(--success);
}
.btn-approve:hover:not(:disabled) {
  background: var(--success);
  color: #fff;
}
.btn-reject {
  background: rgba(244, 63, 94, 0.15);
  color: var(--danger);
}
.btn-reject:hover:not(:disabled) {
  background: var(--danger);
  color: #fff;
}
.btn-action:disabled {
  opacity: 0.25;
  cursor: not-allowed;
}

/* Animations */
.rotating {
  animation: spin 0.6s linear;
}
@keyframes spin {
  100% { transform: rotate(360deg); }
}

/* Scroll reveal helper */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive Media Queries */
@media (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero-description {
    margin: 0 auto 30px;
  }
  .hero-actions {
    justify-content: center;
  }
  .hero-stats-row {
    justify-content: center;
  }
  .charts-grid {
    grid-template-columns: 1fr;
  }
  .audit-section-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    width: 260px;
  }
  .sidebar.mobile-open {
    transform: translateX(0);
  }
  .main-wrapper {
    margin-left: 0;
  }
  .sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 95;
  }
  .sidebar-overlay.active {
    display: block;
  }
  .topbar-search-box {
    display: none;
  }
  .hero-title {
    font-size: 2.4rem;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   MULTI-LEVEL APPROVAL STEPPER
   ========================================================================== */
.approval-stepper {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.step-pill {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.step-done {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}
.step-current {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.4);
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.2);
}
.step-pending {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-dim);
  border: 1px solid var(--border-color);
}
.step-arrow {
  color: var(--text-dim);
  font-size: 0.75rem;
}

/* ==========================================================================
   RECEIPT UPLOAD & OCR PROGRESS
   ========================================================================== */
.receipt-upload-box {
  border: 2px dashed var(--border-color);
  border-radius: var(--radius-sm);
  padding: 14px;
  text-align: center;
  background: rgba(255, 255, 255, 0.02);
  transition: all var(--transition-fast);
  cursor: pointer;
}
.receipt-upload-box:hover {
  border-color: var(--primary);
  background: rgba(59, 130, 246, 0.05);
}
.receipt-preview-img {
  max-width: 100%;
  max-height: 140px;
  border-radius: 6px;
  border: 1px solid var(--border-color);
  display: block;
  margin: 8px auto;
}
.ocr-progress-container {
  width: 100%;
  background: rgba(255, 255, 255, 0.08);
  height: 6px;
  border-radius: 3px;
  margin: 8px 0;
  overflow: hidden;
}
.ocr-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  transition: width 0.3s ease;
}

/* ==========================================================================
   MODAL DIALOGS
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(4, 8, 16, 0.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: fadeInModal 0.2s ease-out;
}

@keyframes fadeInModal {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-card {
  width: 100%;
  max-width: 620px;
  max-height: 88vh;
  overflow-y: auto;
  padding: 30px;
  position: relative;
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.7), 0 0 40px rgba(59, 130, 246, 0.15);
  animation: scaleInModal 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes scaleInModal {
  from { transform: scale(0.95); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.modal-close-btn {
  position: absolute;
  top: 18px;
  right: 18px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.modal-close-btn:hover {
  background: rgba(244, 63, 94, 0.2);
  border-color: #f43f5e;
  color: #fff;
}

/* ==========================================================================
   "ASK AUDITAI" FLOATING CHAT WIDGET
   ========================================================================== */
.assistant-fab {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border: none;
  color: #fff;
  font-size: 1.35rem;
  box-shadow: 0 8px 24px var(--primary-glow);
  cursor: pointer;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}
.assistant-fab:hover {
  transform: scale(1.08);
  box-shadow: 0 12px 30px rgba(99, 102, 241, 0.6);
}

.assistant-panel {
  position: fixed;
  bottom: 90px;
  right: 24px;
  width: 380px;
  height: 520px;
  max-height: calc(100vh - 120px);
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  z-index: 1001;
  display: none;
  flex-direction: column;
  overflow: hidden;
  animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.assistant-panel.active {
  display: flex;
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.assistant-header {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.02);
}
.assistant-messages {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.chat-message {
  display: flex;
  gap: 10px;
  font-size: 0.88rem;
}
.chat-message.user {
  justify-content: flex-end;
}
.msg-bubble {
  padding: 10px 14px;
  border-radius: 12px;
  max-width: 85%;
  line-height: 1.5;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: #e2e8f0;
}
.user-bubble {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  border: none;
}
.chat-message.typing {
  color: #93c5fd;
  font-size: 0.8rem;
}

.assistant-chips {
  padding: 8px 14px;
  display: flex;
  gap: 6px;
  overflow-x: auto;
  border-top: 1px solid var(--border-color);
  background: rgba(0, 0, 0, 0.2);
}
.assistant-chip {
  white-space: nowrap;
  font-size: 0.72rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 4px 8px;
  border-radius: 14px;
  cursor: pointer;
}
.assistant-chip:hover {
  background: rgba(59, 130, 246, 0.15);
  color: #93c5fd;
  border-color: var(--primary);
}

.assistant-input-box {
  padding: 12px 14px;
  border-top: 1px solid var(--border-color);
  display: flex;
  gap: 8px;
  align-items: center;
}
.assistant-input-box input {
  flex: 1;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 8px 14px;
  color: #fff;
  font-size: 0.85rem;
  outline: none;
}
.assistant-input-box input:focus {
  border-color: var(--primary);
}
.btn-send {
  background: var(--primary);
  border: none;
  color: #fff;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (max-width: 480px) {
  .assistant-panel {
    width: calc(100vw - 32px);
    right: 16px;
    bottom: 80px;
  }
}

