/* ==========================================================================
   FrontTerrain Scout — Dashboard & Auth Portal Design System
   ========================================================================== */

:root {
  /* Color Palette */
  --bg-dark: #080b11;
  --bg-panel: rgba(18, 24, 38, 0.75);
  --bg-card: rgba(26, 34, 52, 0.6);
  --bg-input: rgba(15, 22, 36, 0.85);
  
  --border-light: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(99, 102, 241, 0.35);
  
  --primary: #6366f1;
  --primary-hover: #4f46e5;
  --primary-glow: rgba(99, 102, 241, 0.4);
  
  --secondary: #8b5cf6;
  --secondary-glow: rgba(139, 92, 246, 0.35);
  
  --accent-cyan: #06b6d4;
  --accent-emerald: #10b981;
  --accent-amber: #f59e0b;
  --accent-rose: #f43f5e;
  
  --text-bright: #f8fafc;
  --text-main: #e2e8f0;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  
  --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'Fira Code', 'Cascadia Code', Consolas, monospace;
  
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-pill: 9999px;
  
  --shadow-panel: 0 20px 40px -15px rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 0 25px rgba(99, 102, 241, 0.25);
  
  --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  -webkit-font-smoothing: antialiased;
}

/* Ambient Background Glow Blobs */
.bg-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.4;
  animation: pulseGlow 12s infinite alternate ease-in-out;
}

.bg-glow-1 {
  width: 450px;
  height: 450px;
  background: var(--primary);
  top: -100px;
  left: -100px;
}

.bg-glow-2 {
  width: 500px;
  height: 500px;
  background: var(--secondary);
  bottom: -150px;
  right: -150px;
  animation-delay: -4s;
}

.bg-glow-3 {
  width: 350px;
  height: 350px;
  background: var(--accent-cyan);
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
  opacity: 0.15;
}

@keyframes pulseGlow {
  0% { transform: scale(1) translate(0, 0); opacity: 0.3; }
  100% { transform: scale(1.15) translate(30px, 30px); opacity: 0.5; }
}

/* Glassmorphism Panel */
.glass-panel {
  background: var(--bg-panel);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-panel);
}

/* App Wrapper Layout */
.app-wrapper {
  position: relative;
  z-index: 1;
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Typography Helpers */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--text-bright);
  font-weight: 600;
  letter-spacing: -0.02em;
}

.text-gradient {
  background: linear-gradient(135deg, #a5b4fc 0%, #c084fc 50%, #6366f1 100%);
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.text-muted { color: var(--text-muted); }
.text-danger { color: var(--accent-rose) !important; }
.text-primary { color: var(--primary) !important; }
.block { display: block; }
.hidden { display: none !important; }

/* Navigation Bar */
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0;
  border-bottom: 1px solid var(--border-light);
  margin-bottom: 32px;
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-icon {
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 20px;
  box-shadow: var(--shadow-glow);
}

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

.brand-title {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--text-bright);
}

.brand-subtitle {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
}

.version-badge {
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.3);
  color: var(--primary);
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
}

/* Nav Links & Buttons */
.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(15, 22, 36, 0.6);
  padding: 6px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-light);
}

.nav-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  padding: 8px 18px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition-fast);
}

.nav-btn:hover {
  color: var(--text-bright);
  background: rgba(255, 255, 255, 0.05);
}

.nav-btn.active {
  background: var(--primary);
  color: white;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

/* Nav Right & User Menu */
.nav-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.auth-status-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: var(--accent-emerald);
  font-size: 12px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background: var(--accent-emerald);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--accent-emerald);
  animation: pulseDot 2s infinite;
}

@keyframes pulseDot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.3); opacity: 0.6; }
}

.user-menu {
  position: relative;
}

.user-menu-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-light);
  color: var(--text-bright);
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: var(--transition-fast);
}

.user-menu-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

.avatar {
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, var(--accent-cyan), var(--primary));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  color: white;
}

/* User Dropdown */
.dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 220px;
  background: var(--bg-dark);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 8px;
  box-shadow: var(--shadow-panel);
  display: none;
  z-index: 100;
}

.dropdown-menu.show {
  display: block;
  animation: fadeInDown 0.2s ease-out;
}

.dropdown-header {
  padding: 10px;
  display: flex;
  flex-direction: column;
}

.dropdown-header small {
  color: var(--text-dim);
  font-size: 12px;
}

.dropdown-divider {
  border: none;
  border-top: 1px solid var(--border-light);
  margin: 6px 0;
}

.dropdown-item {
  width: 100%;
  background: transparent;
  border: none;
  color: var(--text-main);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  cursor: pointer;
  text-align: left;
  transition: var(--transition-fast);
}

.dropdown-item:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-bright);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14px;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: var(--transition-fast);
  text-decoration: none;
  white-space: nowrap;
}

.btn-lg {
  padding: 14px 28px;
  font-size: 16px;
  border-radius: var(--radius-md);
}

.btn-sm {
  padding: 6px 14px;
  font-size: 13px;
  border-radius: var(--radius-sm);
}

.btn-xs {
  padding: 4px 10px;
  font-size: 12px;
  border-radius: var(--radius-sm);
}

.btn-block {
  width: 100%;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-hover));
  color: white;
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.35);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(99, 102, 241, 0.5);
}

.btn-success {
  background: linear-gradient(135deg, var(--accent-emerald), #059669);
  color: white;
  box-shadow: 0 4px 20px rgba(16, 185, 129, 0.3);
}

.btn-success:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(16, 185, 129, 0.45);
}

.btn-outline {
  background: transparent;
  border-color: var(--border-light);
  color: var(--text-main);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.2);
  color: var(--text-bright);
}

/* ================= AUTH SECTION ================= */
.auth-section {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 0;
  min-height: 70vh;
}

.auth-card {
  width: 100%;
  max-width: 480px;
  padding: 40px;
  position: relative;
  border: 1px solid rgba(99, 102, 241, 0.2);
}

.auth-header {
  text-align: center;
  margin-bottom: 28px;
}

.auth-logo-badge {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: var(--radius-md);
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  color: white;
  box-shadow: var(--shadow-glow);
}

.auth-header h2 {
  font-size: 24px;
  margin-bottom: 8px;
}

.auth-header p {
  color: var(--text-muted);
  font-size: 14px;
}

.auth-tabs {
  display: flex;
  background: rgba(15, 22, 36, 0.8);
  padding: 4px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  margin-bottom: 24px;
}

.auth-tab {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14px;
  padding: 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.auth-tab.active {
  background: var(--primary);
  color: white;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* Form Controls */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
}

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

.input-wrapper input, .input-control {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-light);
  color: var(--text-bright);
  font-family: var(--font-body);
  font-size: 14px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  outline: none;
  transition: var(--transition-fast);
}

.input-wrapper input:focus, .input-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25);
}

.btn-toggle-pwd {
  position: absolute;
  right: 14px;
  background: transparent;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  font-size: 14px;
}

.btn-toggle-pwd:hover {
  color: var(--text-main);
}

.form-row {
  display: flex;
  align-items: center;
}

.flex-between {
  justify-content: space-between;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
  cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
  accent-color: var(--primary);
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.link-muted {
  color: var(--text-muted);
  font-size: 13px;
  text-decoration: none;
}

.link-muted:hover {
  color: var(--primary);
  text-decoration: underline;
}

.tenant-badge-footer {
  margin-top: 10px;
  text-align: center;
  font-size: 12px;
  color: var(--text-dim);
  background: rgba(255, 255, 255, 0.03);
  padding: 8px;
  border-radius: var(--radius-sm);
  border: 1px dashed var(--border-light);
}

.tenant-badge-footer code {
  color: var(--accent-amber);
  font-family: var(--font-mono);
}

.auth-demo-box {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-muted);
}

/* ================= DASHBOARD SECTION ================= */
.dashboard-section {
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding-bottom: 40px;
}

/* Welcome Banner */
.welcome-banner {
  padding: 32px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.8), rgba(15, 23, 42, 0.9));
  border: 1px solid rgba(99, 102, 241, 0.25);
  position: relative;
  overflow: hidden;
}

.banner-content {
  max-width: 650px;
}

.banner-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-emerald);
  font-size: 12px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  margin-bottom: 12px;
}

.banner-content h1 {
  font-size: 28px;
  margin-bottom: 8px;
}

.banner-content p {
  color: var(--text-muted);
  font-size: 15px;
}

.banner-actions {
  display: flex;
  gap: 12px;
}

/* Metrics Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

.stat-card {
  padding: 24px;
  display: flex;
  align-items: flex-start;
  gap: 18px;
  transition: var(--transition-normal);
}

.stat-card:hover {
  transform: translateY(-4px);
  border-color: rgba(99, 102, 241, 0.3);
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: white;
  flex-shrink: 0;
}

.icon-primary { background: linear-gradient(135deg, var(--primary), var(--primary-hover)); }
.icon-secondary { background: linear-gradient(135deg, var(--secondary), #7c3aed); }
.icon-warning { background: linear-gradient(135deg, var(--accent-amber), #d97706); }
.icon-success { background: linear-gradient(135deg, var(--accent-emerald), #059669); }

.stat-details {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
}

.stat-label {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
}

.stat-value-group {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.stat-value {
  font-family: var(--font-heading);
  font-size: 28px;
  font-weight: 700;
  color: var(--text-bright);
}

.stat-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
}

.stat-badge.positive { background: rgba(16, 185, 129, 0.15); color: var(--accent-emerald); }
.stat-badge.warning { background: rgba(245, 158, 11, 0.15); color: var(--accent-amber); }
.stat-badge.info { background: rgba(6, 182, 212, 0.15); color: var(--accent-cyan); }

.stat-sub {
  font-size: 12px;
  color: var(--text-dim);
}

/* Tab Panels & Cards */
.tab-pane {
  display: none;
}

.tab-pane.active {
  display: block;
  animation: fadeIn 0.3s ease-in-out;
}

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

.grid-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

@media (max-width: 900px) {
  .grid-2col { grid-template-columns: 1fr; }
}

.card {
  padding: 28px;
}

.card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-light);
}

.card-header h3 {
  font-size: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.card-header .subtitle {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: normal;
  margin-top: 4px;
}

/* Badges */
.badge {
  font-size: 12px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
}

.badge-accent { background: rgba(99, 102, 241, 0.15); color: var(--primary); }
.badge-success { background: rgba(16, 185, 129, 0.15); color: var(--accent-emerald); }
.badge-warning { background: rgba(245, 158, 11, 0.15); color: var(--accent-amber); }
.badge-info { background: rgba(6, 182, 212, 0.15); color: var(--accent-cyan); }

/* Health Bars */
.health-item {
  margin-bottom: 20px;
}

.health-meta {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  margin-bottom: 8px;
}

.repo-name {
  font-weight: 600;
  color: var(--text-bright);
}

.health-score { font-weight: 600; font-size: 13px; }
.score-high { color: var(--accent-emerald); }
.score-med { color: var(--accent-cyan); }
.score-warn { color: var(--accent-amber); }

.progress-bar {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-pill);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: var(--radius-pill);
  transition: width 0.6s ease-out;
}

.bg-success { background: var(--accent-emerald); }
.bg-info { background: var(--accent-cyan); }
.bg-warning { background: var(--accent-amber); }

/* Quick Actions Bar */
.quick-actions-bar {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px dashed var(--border-light);
}

.quick-actions-bar h4 {
  font-size: 14px;
  margin-bottom: 12px;
  color: var(--text-muted);
}

.cli-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.cli-chip {
  background: rgba(15, 22, 36, 0.9);
  border: 1px solid var(--border-light);
  color: var(--accent-cyan);
  font-family: var(--font-mono);
  font-size: 13px;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition-fast);
}

.cli-chip:hover {
  border-color: var(--primary);
  color: white;
  background: rgba(99, 102, 241, 0.2);
}

/* Timeline Activity */
.activity-timeline {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: relative;
}

.timeline-item {
  display: flex;
  gap: 16px;
  position: relative;
}

.timeline-dot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 14px;
  flex-shrink: 0;
}

.timeline-content {
  display: flex;
  flex-direction: column;
}

.timeline-content strong {
  color: var(--text-bright);
  font-size: 14px;
}

.timeline-content p {
  color: var(--text-muted);
  font-size: 13px;
}

.time-ago {
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 4px;
}

/* Token Management Box */
.token-display-box {
  background: rgba(15, 22, 36, 0.9);
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 32px;
}

.token-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  font-size: 14px;
  font-weight: 600;
}

.token-code-row {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}

.token-input {
  flex: 1;
  background: var(--bg-dark);
  border: 1px solid var(--border-light);
  color: var(--accent-amber);
  font-family: var(--font-mono);
  font-size: 13px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  outline: none;
}

.token-cli-example {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.03);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
}

.token-cli-example code {
  color: var(--accent-cyan);
  font-family: var(--font-mono);
  flex: 1;
}

/* Table Styles */
.session-table-wrapper {
  margin-top: 24px;
}

.session-table-wrapper h4 {
  font-size: 16px;
  margin-bottom: 16px;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.data-table th, .data-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-light);
  font-size: 14px;
}

.data-table th {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

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

/* Audit Section */
.audit-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}

.audit-metric-box {
  background: rgba(15, 22, 36, 0.6);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 20px;
  text-align: center;
}

.metric-num {
  font-family: var(--font-heading);
  font-size: 32px;
  font-weight: 700;
  display: block;
}

.metric-title {
  font-size: 13px;
  color: var(--text-muted);
}

.audit-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.audit-card-item {
  background: rgba(15, 22, 36, 0.7);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 18px;
}

.audit-item-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.audit-file-path {
  display: flex;
  align-items: center;
  gap: 10px;
}

.audit-file-path code {
  font-family: var(--font-mono);
  color: var(--text-bright);
  font-size: 14px;
}

.audit-desc {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.audit-item-actions {
  display: flex;
  gap: 8px;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 1000;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  background: var(--bg-dark);
  border: 1px solid var(--border-light);
  color: var(--text-bright);
  padding: 12px 20px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-panel);
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  animation: slideInRight 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  min-width: 280px;
}

.toast.toast-success { border-left: 4px solid var(--accent-emerald); }
.toast.toast-error { border-left: 4px solid var(--accent-rose); }
.toast.toast-info { border-left: 4px solid var(--primary); }

@keyframes slideInRight {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* Footer */
.footer {
  margin-top: auto;
  padding: 24px 0;
  border-top: 1px solid var(--border-light);
}

.footer-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-dim);
}

.footer-links {
  display: flex;
  gap: 20px;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  transition: var(--transition-fast);
}

.footer-links a:hover {
  color: var(--primary);
}

/* ==========================================================================
   Mobile Gate Overlay
   ========================================================================== */
.mobile-gate-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(8, 12, 22, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: fadeIn 0.3s ease-out;
}

.mobile-gate-card {
  max-width: 480px;
  width: 100%;
  text-align: center;
  padding: 36px 28px;
  border: 1px solid rgba(244, 63, 94, 0.3);
  box-shadow: 0 0 50px rgba(244, 63, 94, 0.15);
}

.mobile-gate-icon {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-size: 38px;
  color: var(--accent-rose);
  margin-bottom: 20px;
}

.mobile-ban-badge {
  position: absolute;
  top: -8px;
  right: -12px;
  font-size: 22px;
  color: var(--accent-rose);
  background: var(--bg-dark);
  border-radius: 50%;
}

.mobile-gate-title {
  font-family: var(--font-title);
  font-size: 24px;
  font-weight: 700;
  color: var(--text-bright);
  margin-bottom: 12px;
}

.mobile-gate-notice {
  background: rgba(244, 63, 94, 0.12);
  border: 1px dashed rgba(244, 63, 94, 0.4);
  color: #fca5a5;
  font-weight: 700;
  font-size: 15px;
  padding: 14px 18px;
  border-radius: var(--radius-md);
  margin-bottom: 16px;
  box-shadow: 0 4px 12px rgba(244, 63, 94, 0.1);
}

.mobile-gate-desc {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 24px;
}

.mobile-gate-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

@media (max-width: 768px) {
  .mobile-gate-overlay {
    display: flex !important;
  }
}

/* ==========================================================================
   Embedded Scout CLI Shell UI
   ========================================================================== */
.terminal-card {
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(99, 102, 241, 0.3);
}

.terminal-card .card-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-light);
  background: rgba(15, 23, 42, 0.6);
}

.terminal-meta-pills {
  display: flex;
  align-items: center;
  gap: 10px;
}

.terminal-quick-chips {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 14px 20px;
  background: rgba(10, 15, 26, 0.6);
  border-bottom: 1px solid var(--border-light);
}

.quick-chip-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  margin-right: 6px;
}

.btn-chip {
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid var(--border-light);
  color: var(--text-main);
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-chip:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  transform: translateY(-1px);
}

.terminal-window {
  background: #090d16;
  font-family: var(--font-mono), 'Fira Code', 'Courier New', monospace;
  display: flex;
  flex-direction: column;
  min-height: 480px;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.terminal-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #111827;
  padding: 10px 16px;
  border-bottom: 1px solid #1f2937;
}

.window-controls {
  display: flex;
  gap: 8px;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
}

.dot-red { background: #ef4444; }
.dot-yellow { background: #f59e0b; }
.dot-green { background: #10b981; }

.terminal-title {
  font-size: 12px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.terminal-top-actions {
  display: flex;
  gap: 8px;
}

.btn-term-icon {
  background: transparent;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  transition: var(--transition-fast);
}

.btn-term-icon:hover {
  color: var(--text-bright);
  background: #1f2937;
}

.terminal-body {
  padding: 18px 20px;
  height: 380px;
  overflow-y: auto;
  color: #e2e8f0;
  font-size: 13px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
}

.term-line {
  margin-bottom: 4px;
}

.term-welcome {
  color: #a5b4fc;
  font-weight: 600;
}

.term-brand {
  color: #818cf8;
  font-weight: 700;
}

.term-info {
  color: #94a3b8;
}

.term-code {
  background: #1e293b;
  color: #38bdf8;
  padding: 2px 6px;
  border-radius: 4px;
}

.term-dim {
  color: #475569;
}

.term-cmd-entry {
  color: #38bdf8;
  font-weight: 600;
  margin-top: 12px;
}

.term-output-text {
  color: #cbd5e1;
  padding-left: 8px;
  border-left: 2px solid #3b82f6;
  margin-bottom: 12px;
}

.terminal-input-row {
  display: flex;
  align-items: center;
  background: #0f172a;
  border-top: 1px solid #1e293b;
  padding: 10px 16px;
  gap: 12px;
}

.terminal-prompt-symbol {
  color: #10b981;
  font-weight: 700;
  font-size: 14px;
  user-select: none;
}

.terminal-input {
  flex: 1;
  background: transparent;
  border: none;
  color: #f8fafc;
  font-family: var(--font-mono);
  font-size: 14px;
  outline: none;
}

.terminal-input::placeholder {
  color: #475569;
}

.btn-terminal-run {
  padding: 6px 14px;
}
