/* ==========================================================================
   Digital Mobile Shop Requirements Discovery Platform - Design System
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800&family=Inter:wght@300;400;500;600;700&family=Noto+Sans+Tamil:wght@400;500;600;700&display=swap');

:root {
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Inter', 'Noto Sans Tamil', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Colors */
  --bg-main: #090d16;
  --bg-card: rgba(15, 23, 42, 0.75);
  --bg-card-hover: rgba(30, 41, 59, 0.85);
  --bg-input: #131d31;
  --border-color: rgba(255, 255, 255, 0.08);
  --border-focus: #6366f1;

  --primary: #6366f1;
  --primary-hover: #4f46e5;
  --primary-light: rgba(99, 102, 241, 0.15);

  --emerald: #10b981;
  --emerald-light: rgba(16, 185, 129, 0.15);

  --amber: #f59e0b;
  --amber-light: rgba(245, 158, 11, 0.15);

  --rose: #f43f5e;
  --rose-light: rgba(244, 63, 94, 0.15);

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  --shadow-glow: 0 0 25px rgba(99, 102, 241, 0.25);
  --radius-lg: 16px;
  --radius-md: 10px;
  --radius-sm: 6px;
}

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

body {
  font-family: var(--font-body);
  background-color: var(--bg-main);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  background-image: 
    radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.12) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(16, 185, 129, 0.08) 0px, transparent 50%),
    radial-gradient(at 50% 50%, rgba(15, 23, 42, 0.5) 0px, transparent 100%);
  background-attachment: fixed;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* Layout Utilities */
.app-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.main-content {
  flex: 1;
  max-width: 1000px;
  width: 100%;
  margin: 0 auto;
  padding: 24px 16px 48px;
}

.glass-panel {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

/* Top Navigation Bar */
.top-navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(9, 13, 22, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  padding: 12px 24px;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand-logo,
.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: white;
}

.brand-icon,
.brand-logo-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  background: var(--primary-light);
  border: 1px solid rgba(99, 102, 241, 0.3);
  padding: 6px;
  border-radius: var(--radius-md);
  box-shadow: 0 0 15px rgba(99, 102, 241, 0.3);
  color: #818cf8;
  flex-shrink: 0;
}

.brand-title {
  font-size: 16px;
  font-weight: 800;
  background: linear-gradient(135deg, #ffffff 0%, #a5b4fc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-tag {
  font-size: 11px;
  color: var(--text-secondary);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-secondary);
  padding: 8px 16px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

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

.nav-btn.active {
  background: var(--primary-light);
  border-color: rgba(99, 102, 241, 0.4);
  color: #a5b4fc;
}

.nav-btn-start-project {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 2px;
  padding: 5px 14px;
}

.nav-btn-start-project .nav-btn-icon-top {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #818cf8;
  transition: transform 0.2s ease, color 0.2s ease;
}

.nav-btn-start-project .nav-project-icon {
  display: block;
}

.nav-btn-start-project:hover .nav-btn-icon-top {
  color: #a5b4fc;
  transform: translateY(-1px);
}

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

/* Banner for Field Agent Mode */
.field-mode-banner {
  background: linear-gradient(90deg, #312e81 0%, #1e1b4b 100%);
  border-bottom: 1px solid rgba(99, 102, 241, 0.4);
  padding: 8px 24px;
  font-size: 12px;
  text-align: center;
  color: #c7d2fe;
}

/* Form Wizard Container */
.wizard-card {
  padding: 32px;
}

.wizard-header {
  margin-bottom: 28px;
}

.wizard-progress-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.step-badge {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  color: #a5b4fc;
  background: var(--primary-light);
  border: 1px solid rgba(99, 102, 241, 0.3);
  padding: 4px 10px;
  border-radius: 9999px;
}

.progress-pct-label {
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 600;
}

.progress-track {
  height: 6px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 9999px;
  overflow: hidden;
  margin-bottom: 20px;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #6366f1 0%, #10b981 100%);
  border-radius: 9999px;
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.step-indicator-scroll {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  margin-bottom: 24px;
}

.step-indicator-scroll::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 15px;
  right: 15px;
  height: 2px;
  background: rgba(255, 255, 255, 0.06);
  transform: translateY(-50%);
  z-index: 1;
}

.step-dot {
  position: relative;
  z-index: 2;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #1e293b;
  border: 2px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
  transition: all 0.3s ease;
}

.step-dot.active {
  background: var(--primary);
  border-color: #a5b4fc;
  color: white;
  box-shadow: 0 0 15px rgba(99, 102, 241, 0.6);
  transform: scale(1.15);
}

.step-dot.completed {
  background: #064e3b;
  border-color: #10b981;
  color: #34d399;
}

.step-title-box {
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 16px;
}

.step-main-title {
  font-size: 22px;
  color: white;
  margin-bottom: 4px;
}

.step-sub-desc {
  font-size: 13px;
  color: var(--text-secondary);
}

/* Form Controls & Grid */
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-bottom: 24px;
}

.col-span-2 {
  grid-column: span 2;
}

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

.form-label {
  font-size: 13px;
  font-weight: 600;
  color: #cbd5e1;
  margin-bottom: 6px;
}

.form-label.required::after {
  content: ' *';
  color: var(--rose);
}

.field-help {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  color: white;
  font-family: inherit;
  font-size: 14px;
  transition: all 0.2s ease;
  outline: none;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.form-textarea {
  resize: vertical;
}

/* Pill Checkboxes */
.checkbox-pill-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
}

.pill-checkbox {
  cursor: pointer;
  user-select: none;
}

.pill-checkbox input {
  display: none;
}

.pill-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all 0.2s ease;
}

.pill-checkbox input:checked + .pill-badge {
  background: var(--primary-light);
  border-color: var(--primary);
  color: white;
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.2);
}

/* Radio Cards */
.radio-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
}

.radio-card {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.radio-card input {
  display: none;
}

.radio-icon {
  font-size: 24px;
  margin-bottom: 6px;
}

.radio-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
}

.radio-card.active, .radio-card input:checked + .radio-icon + .radio-label, .radio-card:has(input:checked) {
  background: var(--primary-light);
  border-color: var(--primary);
  box-shadow: 0 0 15px rgba(99, 102, 241, 0.25);
}

.radio-card:has(input:checked) .radio-label {
  color: white;
}

/* Toggle Cards */
.toggle-card-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.toggle-card {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.toggle-card input {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
  margin-top: 2px;
}

.toggle-content b {
  display: block;
  font-size: 13px;
  color: white;
}

.toggle-card:has(input:checked) {
  border-color: rgba(99, 102, 241, 0.5);
  background: rgba(99, 102, 241, 0.08);
}

.highlight-toggle {
  border-left: 3px solid var(--primary);
}

.alert-border:has(input:checked) {
  border-color: var(--amber);
  background: rgba(245, 158, 11, 0.08);
}

/* Section Cards & Dividing Blocks */
.section-card {
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-md);
  padding: 16px;
}

.section-divider {
  border-top: 1px solid var(--border-color);
  padding-top: 16px;
}

/* Map Styling */
.map-box {
  width: 100%;
  height: 260px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  overflow: hidden;
  z-index: 10;
}

.coordinates-pill {
  display: flex;
  justify-content: space-between;
  background: #0b1120;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  font-size: 12px;
  font-mono: monospace;
  color: #a5b4fc;
  margin-top: 8px;
}

.pin-marker-pulse {
  font-size: 26px;
  text-shadow: 0 0 10px rgba(0,0,0,0.5);
}

/* Operating Hours Matrix */
.hours-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.day-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}

.day-name {
  width: 110px;
  font-weight: 600;
  color: #cbd5e1;
}

.time-input {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  color: white;
  font-size: 12px;
}

.time-sep {
  color: var(--text-muted);
  font-size: 12px;
}

.checkbox-closed {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-secondary);
  cursor: pointer;
}

/* 9-Stage Sales Workflow Stepper */
.workflow-stepper {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}

.wf-step-item {
  background: var(--bg-input);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.wf-step-num {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.wf-step-text {
  font-size: 11px;
  color: #cbd5e1;
  font-weight: 500;
}

/* Star Priority Requirement Card */
.star-requirement-card {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.1) 0%, rgba(15, 23, 42, 0.7) 100%);
  border: 1px solid rgba(245, 158, 11, 0.4);
  border-radius: var(--radius-md);
  padding: 18px;
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.1);
}

/* Digital Signature Pad */
.signature-container {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
}

.canvas-wrapper {
  background: #ffffff;
  border: 2px dashed #94a3b8;
  border-radius: var(--radius-sm);
  overflow: hidden;
  height: 160px;
  margin-top: 10px;
}

.signature-canvas {
  width: 100%;
  height: 100%;
  cursor: crosshair;
  touch-action: none;
}

/* File Upload Dropzones */
.upload-dropzone {
  background: var(--bg-input);
  border: 2px dashed rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-md);
  padding: 18px 12px;
  text-align: center;
  position: relative;
  cursor: pointer;
  transition: all 0.2s ease;
}

.upload-dropzone input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.upload-icon {
  font-size: 24px;
  display: block;
  margin-bottom: 4px;
}

.upload-label {
  font-size: 12px;
  font-weight: 600;
  color: #cbd5e1;
  display: block;
}

.file-name-preview {
  display: block;
  font-size: 11px;
  color: #34d399;
  margin-top: 4px;
}

/* Consent Box */
.consent-box {
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: var(--radius-md);
  padding: 14px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

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

.btn-primary:hover {
  background: var(--primary-hover);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.6);
  transform: translateY(-1px);
}

.btn-secondary {
  background: #334155;
  color: white;
}

.btn-secondary:hover {
  background: #475569;
}

.btn-success {
  background: var(--emerald);
  color: white;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
}

.btn-danger {
  background: var(--rose);
  color: white;
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.05);
  color: white;
}

.btn-xs {
  font-size: 11px;
  padding: 4px 10px;
}

.btn-sm {
  font-size: 12px;
  padding: 6px 14px;
}

.btn-lg {
  font-size: 16px;
  padding: 14px 28px;
}

.btn-outline-voice {
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.4);
  color: #a5b4fc;
}

.btn-outline-amber {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #fde68a;
}

.listening-active {
  animation: pulseGlow 1.2s infinite alternate;
}

/* Wizard Footer */
.wizard-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--border-color);
  padding-top: 20px;
}

/* Success Step */
.success-icon-badge {
  font-size: 54px;
  margin-bottom: 12px;
}

.qr-result-card {
  background: #0f172a;
  border: 2px solid rgba(99, 102, 241, 0.4);
  border-radius: var(--radius-lg);
  padding: 24px;
  max-width: 380px;
  margin: 0 auto;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.qr-canvas-frame {
  background: white;
  padding: 12px;
  border-radius: var(--radius-md);
  display: inline-block;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

/* Admin Dashboard Styling */
.admin-header-box {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.kpi-card {
  padding: 18px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.kpi-icon {
  font-size: 32px;
}

.kpi-val {
  font-size: 28px;
  font-weight: 800;
  font-family: var(--font-heading);
}

.kpi-label {
  font-size: 12px;
  color: var(--text-secondary);
}

.admin-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 8px;
}

.admin-tab-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
}

.admin-tab-btn.active {
  background: var(--primary-light);
  color: #a5b4fc;
}

.table-filters {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
  border-bottom: 1px solid var(--border-color);
}

.search-input-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 6px 12px;
  flex: 1;
  max-width: 380px;
}

.search-field {
  background: transparent;
  border: none;
  color: white;
  font-size: 13px;
  outline: none;
  width: 100%;
}

.filter-dropdowns {
  display: flex;
  gap: 8px;
}

.filter-select {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 6px 12px;
  color: white;
  font-size: 12px;
  outline: none;
}

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

.data-table th {
  background: rgba(15, 23, 42, 0.9);
  padding: 12px 16px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border-color);
}

.data-table td {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  font-size: 13px;
}

.table-row:hover {
  background: var(--bg-card-hover);
}

/* Status Pills */
.status-pill {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.status-pending, .status-new { background: var(--amber-light); color: #fde68a; border: 1px solid rgba(245, 158, 11, 0.3); }
.status-review, .status-reviewing, .status-contacted { background: var(--primary-light); color: #c7d2fe; border: 1px solid rgba(99, 102, 241, 0.3); }
.status-proposal, .status-negotiation { background: rgba(168, 85, 247, 0.15); color: #e9d5ff; border: 1px solid rgba(168, 85, 247, 0.35); }
.status-verified, .status-accepted, .status-project { background: var(--emerald-light); color: #6ee7b7; border: 1px solid rgba(16, 185, 129, 0.3); }
.status-rejected { background: var(--rose-light); color: #fca5a5; border: 1px solid rgba(244, 63, 94, 0.3); }

/* Analytics Charts */
.analytics-view-grid {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 20px;
}

.chart-card {
  padding: 24px;
}

.chart-title {
  font-size: 16px;
  color: white;
  margin-bottom: 18px;
}

.chart-bars {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.bar-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.bar-meta {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
}

.bar-label { color: #cbd5e1; font-weight: 500; }
.bar-count { color: var(--text-secondary); }

.bar-track {
  height: 10px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 9999px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  border-radius: 9999px;
  transition: width 0.5s ease;
}

.systems-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.system-stat-box {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px;
  text-align: center;
}

/* Modal Dialog */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-dialog {
  max-width: 680px;
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

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

.modal-close-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 18px;
  cursor: pointer;
  padding: 4px 8px;
}

.modal-body-scroll {
  padding: 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.dossier-section {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-md);
  padding: 14px;
}

.dossier-section-title {
  font-size: 13px;
  font-weight: 700;
  color: #a5b4fc;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.dossier-star-box {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.15) 0%, rgba(15, 23, 42, 0.8) 100%);
  border: 1px solid var(--amber);
  border-radius: var(--radius-md);
  padding: 14px;
}

/* REST API Explorer */
.api-explorer-container {
  padding: 24px;
}

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

.api-preset-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.preset-btn {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  color: #a5b4fc;
  font-family: monospace;
  font-size: 12px;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
}

.preset-btn.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.api-request-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.api-method-select {
  background: #1e1b4b;
  border: 1px solid var(--primary);
  color: #c7d2fe;
  font-weight: 700;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  outline: none;
}

.api-path-input {
  flex: 1;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  color: white;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  outline: none;
}

.api-panes-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.api-pane {
  background: #0b1120;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.pane-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(15, 23, 42, 0.9);
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-color);
}

.api-json-editor {
  background: transparent;
  border: none;
  color: #a5b4fc;
  font-family: monospace;
  font-size: 12px;
  padding: 14px;
  height: 320px;
  resize: none;
  outline: none;
}

.api-json-viewer {
  padding: 14px;
  color: #34d399;
  font-size: 12px;
  height: 320px;
  overflow-y: auto;
  margin: 0;
}

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

@keyframes scaleUp {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes pulseGlow {
  from { box-shadow: 0 0 5px rgba(244, 63, 94, 0.4); }
  to { box-shadow: 0 0 20px rgba(244, 63, 94, 0.9); }
}

.animate-fade-in {
  animation: fadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.animate-scale-up {
  animation: scaleUp 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.hidden {
  display: none !important;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
  .nav-container {
    flex-direction: column;
    align-items: flex-start;
  }
  .form-grid, .toggle-card-grid, .kpi-grid, .analytics-view-grid, .api-panes-grid {
    grid-template-columns: 1fr;
  }
  .col-span-2 {
    grid-column: span 1;
  }
  .wizard-card {
    padding: 20px 16px;
  }
  .workflow-stepper {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   Toast Notification System
   ========================================================================== */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 380px;
  pointer-events: none;
}

.toast-item {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 500;
  color: white;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(12px);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.toast-success {
  background: rgba(6, 78, 59, 0.95);
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.toast-error {
  background: rgba(136, 19, 55, 0.95);
  border: 1px solid rgba(244, 63, 94, 0.4);
}

.toast-warning {
  background: rgba(120, 53, 15, 0.95);
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.toast-info {
  background: rgba(30, 27, 75, 0.95);
  border: 1px solid rgba(99, 102, 241, 0.4);
}

.toast-fade-out {
  opacity: 0;
  transform: translateY(10px);
}

/* ==========================================================================
   Authentication Modal & User Badges
   ========================================================================== */
.user-nav-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.4);
  padding: 4px 10px;
  border-radius: 9999px;
  transition: all 0.2s ease;
}

.user-nav-badge:hover {
  background: rgba(99, 102, 241, 0.3);
  border-color: var(--primary);
}

.user-avatar-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 6px #10b981;
}

.badge-role {
  background: #4f46e5;
  color: white;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
}

.auth-tabs {
  display: flex;
  border-bottom: 1px solid var(--border-color);
}

.auth-tab-btn {
  flex: 1;
  padding: 12px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.auth-tab-btn.active {
  color: white;
  border-bottom-color: var(--primary);
  background: rgba(99, 102, 241, 0.08);
}

.auth-error-alert {
  background: rgba(244, 63, 94, 0.15);
  border-left: 3px solid var(--rose);
  padding: 10px 14px;
  color: #fca5a5;
  font-size: 12px;
  margin: 12px 16px 0;
  border-radius: var(--radius-sm);
}

.quick-admin-fill-box {
  background: rgba(99, 102, 241, 0.08);
  border: 1px dashed rgba(99, 102, 241, 0.3);
  border-radius: var(--radius-md);
  padding: 8px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.user-avatar-circle {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  color: white;
  font-size: 28px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.profile-details-card {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 16px;
}

/* ==========================================================================
   Home Landing Page & Features
   ========================================================================== */
.home-page-wrapper {
  max-width: 960px;
  margin: 0 auto;
  padding: 16px 0 40px;
}

.home-hero-card {
  background: linear-gradient(135deg, rgba(30, 27, 75, 0.75), rgba(15, 23, 42, 0.85));
  border: 1px solid rgba(99, 102, 241, 0.3);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
  border-radius: var(--radius-xl);
  padding: 48px 32px;
  text-align: center;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(16px);
}

.home-hero-card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: 50%;
  transform: translateX(-50%);
  width: 500px;
  height: 250px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.25) 0%, transparent 70%);
  pointer-events: none;
}

.home-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.35);
  color: #a5b4fc;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 9999px;
  margin-bottom: 20px;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #38bdf8;
  box-shadow: 0 0 8px #38bdf8;
  animation: pulseGlow 1.5s infinite alternate;
}

.home-hero-title {
  font-size: 2.3rem;
  font-weight: 800;
  line-height: 1.25;
  color: #ffffff;
  max-width: 720px;
  margin: 0 auto 16px;
  letter-spacing: -0.02em;
}

.home-hero-subtitle {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 620px;
  margin: 0 auto 32px;
  line-height: 1.6;
}

.home-hero-actions {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}

.invitation-input-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px dashed rgba(148, 163, 184, 0.25);
  border-radius: var(--radius-lg);
  padding: 14px 20px;
  max-width: 420px;
  margin: 0 auto;
}

.invitation-input-group {
  display: flex;
  gap: 8px;
  width: 100%;
}

.home-features-header {
  text-align: center;
  margin: 48px 0 24px;
}

.home-features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: all 0.25s ease;
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: rgba(99, 102, 241, 0.5);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.3);
}

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin-bottom: 16px;
}

.feature-title {
  font-size: 15px;
  font-weight: 700;
  color: white;
  margin-bottom: 8px;
}

.feature-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.how-it-works-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 28px 32px;
  margin-bottom: 40px;
}

.how-it-works-steps {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.how-step {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  flex: 1;
}

.how-step-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #4f46e5;
  color: white;
  font-weight: 800;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.how-step-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  color: var(--text-secondary);
}

.how-step-content b {
  color: white;
  font-size: 13px;
}

.how-step-arrow {
  color: var(--text-muted);
  font-size: 18px;
  font-weight: bold;
}

@media (max-width: 768px) {
  .how-it-works-steps {
    flex-direction: column;
    align-items: flex-start;
  }
  .how-step-arrow {
    display: none;
  }
}

.public-footer {
  text-align: center;
  padding: 24px 0 12px;
  border-top: 1px solid rgba(148, 163, 184, 0.1);
}

/* ==========================================================================
   403 Forbidden Access Denied Page
   ========================================================================== */
.access-denied-wrapper {
  max-width: 600px;
  margin: 60px auto;
  text-align: center;
}

.access-denied-card {
  background: var(--bg-card);
  border: 1px solid rgba(244, 63, 94, 0.35);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
  border-radius: var(--radius-xl);
  padding: 48px 32px;
}

.access-denied-icon {
  font-size: 56px;
  margin-bottom: 8px;
}

.access-denied-actions {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

/* ==========================================================================
   Admin Login Page
   ========================================================================== */
.admin-login-page {
  max-width: 440px;
  margin: 40px auto;
}

.admin-login-card {
  background: var(--bg-card);
  border: 1px solid rgba(99, 102, 241, 0.3);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.5);
  border-radius: var(--radius-xl);
  padding: 36px 30px;
}

.admin-login-header {
  text-align: center;
  margin-bottom: 24px;
}

.admin-shield-icon {
  font-size: 40px;
  margin-bottom: 10px;
}

.admin-top-badge {
  background: rgba(244, 63, 94, 0.2);
  border: 1px solid rgba(244, 63, 94, 0.5);
  color: #fda4af;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 0.05em;
}

.client-invitation-badge-banner {
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.35);
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  font-size: 12px;
  color: #c7d2fe;
  display: inline-flex;
  align-items: center;
}


