/* ═══════════════════════════════════════════════════════════════════════════
   ABSA-FMI — Professional Stylesheet
   Tema: Putih Bersih Minimalis dengan Aksen Biru Profesional
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Google Fonts ──────────────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ── CSS Variables ─────────────────────────────────────────────────────── */
:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-light: #3b82f6;
  --primary-50: #eff6ff;
  --primary-100: #dbeafe;
  --accent: #f97316;
  --accent-dark: #ea580c;
  --success: #059669;
  --success-light: #d1fae5;
  --danger: #dc2626;
  --danger-light: #fee2e2;
  --warning: #d97706;
  --warning-light: #fef3c7;
  --neutral: #6b7280;
  --neutral-light: #f3f4f6;
  --bg: #ffffff;
  --bg-page: #f8fafc;
  --text-primary: #111827;
  --text-secondary: #4b5563;
  --text-tertiary: #9ca3af;
  --border: #e5e7eb;
  --border-light: #f3f4f6;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --transition: all 0.2s ease;
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg-page);
  min-height: 100vh;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Navbar ─────────────────────────────────────────────────────────────── */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.navbar-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 700;
  font-size: 1.05rem;
  cursor: pointer;
}

.brand-icon {
  width: 34px;
  height: 34px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.85rem;
  letter-spacing: -0.5px;
}

.logo-bidar-container {
  position: relative;
  display: inline-block;
  height: 34px;
  border-radius: 4px;
  overflow: hidden;
}

.brand-logo-bidar {
  height: 34px;
  width: auto;
  display: block;
}

.logo-bidar-container::after {
  content: "";
  position: absolute;
  top: 0; left: -100%;
  width: 50%; height: 100%;
  background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.7) 50%, rgba(255,255,255,0) 100%);
  transform: skewX(-25deg);
  animation: shineSweep 2.0s infinite;
}

@keyframes shineSweep {
  0% { left: -100%; }
  80% { left: 200%; }
  100% { left: 200%; }
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 8px;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.8rem;
  padding: 8px 16px;
  border-radius: 8px;
  transition: var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--primary);
  background: var(--primary-50);
}

/* ── Hero Section ──────────────────────────────────────────────────────── */
.hero {
  text-align: center;
  padding: 56px 20px 32px;
}

.hero h1 {
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  line-height: 1.2;
  color: var(--text-primary);
  margin-bottom: 14px;
}

.gradient-text {
  background: linear-gradient(135deg, var(--primary), #7c3aed);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 0.95rem;
  color: var(--text-secondary);
  max-width: 640px;
  margin: 0 auto 18px;
  line-height: 1.7;
}

.hero-badge {
  display: inline-block;
  background: var(--primary-50);
  color: var(--primary);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 6px 16px;
  border-radius: 20px;
  letter-spacing: 0.3px;
}

.section-title {
  text-align: center;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 8px 0 28px;
}

/* ── Landing Cards Grid ────────────────────────────────────────────────── */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  max-width: 900px;
  margin: 0 auto 60px;
  padding: 0 20px;
}

.source-card {
  background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
  border-radius: var(--radius-xl);
  padding: 36px 24px 28px;
  text-align: center;
  color: #fff;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}

.source-card::before {
  content: '';
  position: absolute;
  top: -40%;
  right: -40%;
  width: 80%;
  height: 80%;
  background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 70%);
  border-radius: 50%;
}

.source-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(37, 99, 235, 0.35);
}

.card-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 16px;
  background: rgba(255,255,255,0.15);
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-icon svg {
  width: 36px;
  height: 36px;
  stroke: #fff;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.source-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.source-card p {
  font-size: 0.78rem;
  opacity: 0.85;
  line-height: 1.5;
  margin-bottom: 20px;
}

.card-cta {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 10px 24px;
  border-radius: 24px;
  font-family: 'Inter', sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  letter-spacing: 0.2px;
}

.source-card:hover .card-cta {
  background: var(--accent-dark);
  transform: scale(1.03);
}

/* ── Panel System ──────────────────────────────────────────────────────── */
.panel { display: none; }
.panel.active { display: block; animation: fadeIn 0.35s ease; }

/* ── Back Button ───────────────────────────────────────────────────────── */
.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  color: var(--primary);
  font-family: 'Inter', sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  padding: 8px 4px;
  margin: 24px 0 16px;
  transition: var(--transition);
}

.back-btn:hover { color: var(--primary-dark); transform: translateX(-3px); }
.back-btn svg { width: 16px; height: 16px; }

/* ── Cards ─────────────────────────────────────────────────────────────── */
.card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  margin-bottom: 20px;
  overflow: hidden;
}

.card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-light);
}

.card-header h2 {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-primary);
}

.card-body { padding: 20px; }

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

.icon.blue { background: var(--primary-50); color: var(--primary); }
.icon.green { background: var(--success-light); color: var(--success); }
.icon.orange { background: var(--warning-light); color: var(--warning); }

/* ── Form Elements ─────────────────────────────────────────────────────── */
.form-group { margin-bottom: 16px; }

.form-group label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
}

textarea,
input[type="url"],
input[type="text"] {
  width: 100%;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  font-family: 'Inter', sans-serif;
  font-size: 0.82rem;
  color: var(--text-primary);
  background: var(--bg);
  transition: var(--transition);
  resize: vertical;
}

textarea { min-height: 120px; }
textarea:focus, input[type="url"]:focus, input[type="text"]:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-50);
}

.char-count {
  text-align: right;
  font-size: 0.7rem;
  color: var(--text-tertiary);
  margin-top: 4px;
}

/* ── Buttons ───────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 22px;
  border: none;
  border-radius: 10px;
  font-family: 'Inter', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}
.btn-primary:hover:not(:disabled) { background: var(--primary-dark); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }

.btn-secondary {
  background: var(--neutral-light);
  color: var(--text-secondary);
}
.btn-secondary:hover { background: var(--border); }

.btn-sm { padding: 7px 14px; font-size: 0.72rem; border-radius: 8px; }

.btn-group { display: flex; gap: 10px; flex-wrap: wrap; }

/* ── Spinner ───────────────────────────────────────────────────────────── */
.spinner {
  width: 16px; height: 16px;
  border: 2.5px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ── Example Chips ─────────────────────────────────────────────────────── */
.example-chips { margin-bottom: 16px; }
.example-chips label {
  display: block;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--text-tertiary);
  margin-bottom: 8px;
}

.example-chip {
  display: inline-block;
  background: var(--primary-50);
  color: var(--primary);
  border: 1px solid var(--primary-100);
  border-radius: 20px;
  padding: 5px 14px;
  font-family: 'Inter', sans-serif;
  font-size: 0.72rem;
  font-weight: 500;
  cursor: pointer;
  margin: 0 6px 6px 0;
  transition: var(--transition);
}

.example-chip:hover { background: var(--primary-100); border-color: var(--primary); }

/* ── Mode Tabs ─────────────────────────────────────────────────────────── */
.input-mode-tabs {
  display: flex;
  gap: 4px;
  background: var(--neutral-light);
  padding: 4px;
  border-radius: 10px;
  margin-bottom: 18px;
}

.mode-tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 16px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--text-secondary);
  font-family: 'Inter', sans-serif;
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.mode-tab.active {
  background: var(--bg);
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.mode-tab svg { width: 14px; height: 14px; }

.mode-panel { animation: fadeIn 0.25s ease; }

/* ── Drop Zone (CSV) ───────────────────────────────────────────────────── */
.drop-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 40px 20px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  background: var(--bg-page);
}

.drop-zone:hover, .drop-zone.dragover {
  border-color: var(--primary);
  background: var(--primary-50);
}

.drop-zone svg { width: 40px; height: 40px; stroke: var(--text-tertiary); margin-bottom: 10px; }
.drop-zone.dragover svg { stroke: var(--primary); }

.drop-zone p {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-bottom: 10px;
}

.drop-zone .file-name {
  font-size: 0.75rem;
  color: var(--primary);
  font-weight: 600;
  margin-top: 8px;
}

.csv-guide {
  background: var(--primary-50);
  border: 1px solid var(--primary-100);
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 16px;
}

.csv-guide p {
  font-size: 0.78rem;
  color: var(--primary-dark);
  line-height: 1.6;
}

.csv-guide code {
  background: rgba(37, 99, 235, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
}

/* ── Extension Guide Card ────────────────────────────────────────────────── */
.extension-guide-card {
  background: linear-gradient(135deg, rgba(239, 246, 255, 0.4) 0%, rgba(219, 234, 254, 0.2) 100%);
  border: 1px solid rgba(37, 99, 235, 0.1);
  border-left: 4px solid var(--accent);
  border-radius: 10px;
  padding: 18px 20px;
  margin-bottom: 20px;
  box-shadow: 0 4px 15px rgba(37, 99, 235, 0.03);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  backdrop-filter: blur(8px);
}

.extension-guide-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 25px rgba(37, 99, 235, 0.07);
}

.guide-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  gap: 12px;
}

.guide-card-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--primary-dark);
}

.guide-card-title svg {
  width: 16px;
  height: 16px;
  stroke: var(--primary);
  stroke-width: 2.2px;
  flex-shrink: 0;
}

.guide-badge-recommended {
  font-size: 0.65rem;
  font-weight: 800;
  padding: 3px 10px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
  color: #fff;
  border-radius: 20px;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 6px rgba(249, 115, 22, 0.15);
}

.guide-card-body p {
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.guide-card-body p strong {
  color: var(--text-primary);
}

.guide-card-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.btn-download-ext {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  font-size: 0.78rem;
  font-weight: 600;
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  border: none;
  border-radius: 8px;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
  transition: all 0.25s ease;
}

.btn-download-ext:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.3);
  color: #ffffff;
}

.btn-github-ext {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--border);
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.25s ease;
}

.btn-github-ext:hover {
  background: #ffffff;
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-1px);
}

/* ── Premium IDE Editor wrapper ────────────────────────────────────────── */
.premium-editor-wrapper {
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--shadow-sm), 0 4px 12px rgba(0, 0, 0, 0.02);
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
  margin-top: 6px;
  margin-bottom: 16px;
}

.premium-editor-wrapper:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-50), var(--shadow-sm);
}

/* Header Bar */
.editor-header {
  background: var(--border-light);
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  border-bottom: 1.5px solid var(--border);
  user-select: none;
}

.editor-actions-left {
  display: flex;
  gap: 6px;
}

.editor-actions-left .dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  display: inline-block;
}

.editor-actions-left .dot-red { background: #ff5f56; }
.editor-actions-left .dot-yellow { background: #ffbd2e; }
.editor-actions-left .dot-green { background: #27c93f; }

.editor-tab-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: 'Fira Code', 'Menlo', 'Inter', monospace;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.editor-tab-title svg {
  stroke: var(--primary);
  stroke-width: 2.2px;
}

/* Paste Clipboard Button */
.btn-editor-paste {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 4px 10px;
  font-family: 'Inter', sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
}

.btn-editor-paste:hover {
  background: var(--primary-50);
  border-color: var(--primary);
  color: var(--primary);
}

.btn-editor-paste.success {
  background: var(--success-light);
  border-color: var(--success);
  color: var(--success);
}

.btn-editor-paste svg {
  width: 11px;
  height: 11px;
}

/* Textarea Body */
.editor-body textarea {
  width: 100%;
  border: none !important;
  border-radius: 0 !important;
  padding: 14px 16px;
  background: #fafbfe;
  color: var(--text-primary);
  font-family: 'Fira Code', 'Menlo', 'Consolas', monospace;
  font-size: 0.75rem;
  line-height: 1.45;
  resize: vertical;
  outline: none !important;
  box-shadow: none !important;
}

/* Status Bar */
.editor-status-bar {
  background: var(--border-light);
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  border-top: 1.5px solid var(--border);
  font-family: 'Inter', sans-serif;
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text-secondary);
  user-select: none;
}

.status-left {
  display: flex;
  align-items: center;
  gap: 6px;
}

.status-indicator {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
  display: inline-block;
  box-shadow: 0 0 6px var(--success);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(5, 150, 105, 0.4); }
  70% { transform: scale(1); box-shadow: 0 0 0 5px rgba(5, 150, 105, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(5, 150, 105, 0); }
}

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

.char-count-badge {
  background: var(--border);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.65rem;
  color: var(--text-primary);
}

.shopee-note {
  display: flex;
  gap: 8px;
  background: var(--warning-light);
  border: 1px solid #fde68a;
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 16px;
}

.shopee-note svg { flex-shrink: 0; width: 16px; height: 16px; stroke: var(--warning); margin-top: 1px; }
.shopee-note p { font-size: 0.75rem; color: #92400e; line-height: 1.6; }

/* ── Review Preview List ───────────────────────────────────────────────── */
.preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  flex-wrap: wrap;
  gap: 10px;
}

.preview-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--success-light);
  color: var(--success);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 20px;
}

.preview-badge svg { width: 13px; height: 13px; }

.review-preview-list {
  max-height: 260px;
  overflow-y: auto;
  border: 1px solid var(--border-light);
  border-radius: 10px;
}

.review-preview-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-light);
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.review-preview-item:last-child { border-bottom: none; }
.review-preview-item:hover { background: var(--bg-page); }

.review-num {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  background: var(--primary-50);
  color: var(--primary);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.68rem;
  font-weight: 700;
}

.review-text-preview { flex: 1; }

/* ── Error Box ─────────────────────────────────────────────────────────── */
.error-box {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: var(--danger-light);
  border: 1px solid #fca5a5;
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 16px;
  animation: fadeIn 0.25s ease;
}

.error-box svg { flex-shrink: 0; width: 16px; height: 16px; stroke: var(--danger); margin-top: 1px; }
.error-box span { font-size: 0.78rem; color: #991b1b; line-height: 1.6; white-space: pre-line; }

/* ── Results Section ───────────────────────────────────────────────────── */
.results-section { animation: fadeIn 0.3s ease; }

.original-review-box {
  background: var(--bg-page);
  border: 1px solid var(--border-light);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 16px;
}

.original-review-box .label {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.original-review-box .value {
  font-size: 0.82rem;
  color: var(--text-primary);
  line-height: 1.6;
}

/* ── Tables ─────────────────────────────────────────────────────────────── */
.table-wrapper {
  overflow-x: auto;
  border: 1px solid var(--border-light);
  border-radius: 10px;
}

table {
  width: 100%;
  border-collapse: collapse;
}

thead { background: var(--bg-page); }

th {
  padding: 10px 14px;
  text-align: left;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border);
}

td {
  padding: 10px 14px;
  font-size: 0.8rem;
  border-bottom: 1px solid var(--border-light);
  vertical-align: middle;
}

tr:last-child td { border-bottom: none; }
tbody tr:hover { background: var(--bg-page); }

.aspect-name { font-weight: 600; color: var(--text-primary); }

/* ── Badges ────────────────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.2px;
}

.badge-positif { background: var(--success-light); color: var(--success); }
.badge-negatif { background: var(--danger-light); color: var(--danger); }
.badge-netral { background: var(--neutral-light); color: var(--neutral); }

/* ── Confidence Bars ───────────────────────────────────────────────────── */
.confidence-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.confidence-value {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-primary);
  min-width: 42px;
  font-variant-numeric: tabular-nums;
}

.confidence-bar-track {
  flex: 1;
  height: 6px;
  background: var(--neutral-light);
  border-radius: 3px;
  overflow: hidden;
  min-width: 60px;
}

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

.confidence-bar-fill.high { background: linear-gradient(90deg, var(--success), #34d399); }
.confidence-bar-fill.mid { background: linear-gradient(90deg, var(--primary), var(--primary-light)); }
.confidence-bar-fill.low { background: linear-gradient(90deg, var(--danger), #f87171); }

/* ── Progress Bar ──────────────────────────────────────────────────────── */
.batch-progress-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.batch-progress-header svg { stroke: var(--primary); }

.progress-track {
  height: 12px;
  background: #f1f5f9;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
  border: 1px solid #e2e8f0;
}

@keyframes progress-shimmer {
  0% { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #2563eb, #60a5fa, #2563eb);
  background-size: 800px 100%;
  border-radius: 6px;
  box-shadow: 0 0 10px rgba(37, 99, 235, 0.4);
  animation: progress-shimmer 2s infinite linear;
  transition: width 0.08s linear;
}

/* ── Batch Results ─────────────────────────────────────────────────────── */
.batch-chart-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.batch-review-cell {
  max-width: 280px;
  font-size: 0.75rem;
  color: var(--text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ── Evaluation / Dashboard ────────────────────────────────────────────── */
.evaluation-section {
  padding-top: 20px;
  border-top: 2px solid var(--border);
  margin-top: 40px;
}

.dashboard-header {
  text-align: center;
  padding: 32px 20px 28px;
}

.dashboard-header h1 {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.dashboard-header p {
  font-size: 0.88rem;
  color: var(--text-secondary);
}

/* ── Stats Grid ────────────────────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.stat-label {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-primary);
}

.stat-value.primary { color: var(--primary); }
.stat-value.success { color: var(--success); }

/* ── Score Bars ────────────────────────────────────────────────────────── */
.score {
  font-size: 0.8rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.eval-table { width: 100%; }
.aspect-col { min-width: 100px; }

.score-bar-track {
  height: 8px;
  background: var(--neutral-light);
  border-radius: 4px;
  overflow: hidden;
  min-width: 80px;
}

.score-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.6s ease;
}

.score-bar-fill.excellent { background: linear-gradient(90deg, var(--success), #34d399); }
.score-bar-fill.good { background: linear-gradient(90deg, var(--primary), var(--primary-light)); }
.score-bar-fill.fair { background: linear-gradient(90deg, var(--warning), #fbbf24); }
.score-bar-fill.poor { background: linear-gradient(90deg, var(--danger), #f87171); }

/* ── Model Info ────────────────────────────────────────────────────────── */
.model-info {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.model-tag {
  display: inline-block;
  background: var(--primary-50);
  color: var(--primary);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 6px;
}

/* ── Detail Card Toggle ────────────────────────────────────────────────── */
.detail-toggle {
  cursor: pointer;
  user-select: none;
}

.detail-toggle:hover { background: var(--bg-page); }

.detail-toggle .toggle-icon {
  margin-left: auto;
  transition: transform 0.2s ease;
  color: var(--text-tertiary);
}

.detail-toggle.open .toggle-icon { transform: rotate(180deg); }

.detail-content {
  display: none;
  animation: fadeIn 0.25s ease;
}

.detail-content.open { display: block; }

/* ── Footer ────────────────────────────────────────────────────────────── */
.footer {
  text-align: center;
  padding: 24px 20px;
  margin-top: 40px;
  border-top: 1px solid var(--border);
  color: var(--text-tertiary);
  font-size: 0.72rem;
  background: var(--bg);
}

/* ── Modals ────────────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(17, 24, 39, 0.6);
  backdrop-filter: blur(2px);
  z-index: 1000;
  display: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.modal-overlay.active { display: block; opacity: 1; }

.modal {
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%) scale(0.95);
  background: var(--bg);
  width: 90%;
  max-width: 800px;
  max-height: 90vh;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  z-index: 1001;
  display: none;
  opacity: 0;
  transition: all 0.3s ease;
  flex-direction: column;
}

.modal.active { display: flex; opacity: 1; transform: translate(-50%, -50%) scale(1); }

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

.modal-header h2 { font-size: 1.1rem; font-weight: 700; color: var(--text-primary); }

.modal-close {
  background: var(--neutral-light);
  border: none;
  border-radius: 8px;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 6px;
  transition: var(--transition);
  display: flex;
}

.modal-close:hover { background: var(--danger-light); color: var(--danger); transform: scale(1.05); }

.modal-body { padding: 24px; overflow-y: auto; flex: 1; }
.modal-footer { padding: 16px 24px; border-top: 1px solid var(--border-light); background: var(--bg-page); border-radius: 0 0 var(--radius-lg) var(--radius-lg); }

/* ── Aspect Cards ──────────────────────────────────────────────────────── */
.aspect-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-top: 12px;
}

/* ── Premium Aspect Cards (Doughnut Style) ──────────────────────────────── */
.aspect-card {
  background: var(--bg);
  border: 1px solid rgba(226, 232, 240, 0.8);
  border-radius: var(--radius-lg);
  padding: 20px 16px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.02);
  position: relative;
  overflow: hidden;
}

.aspect-card:hover {
  transform: translateY(-4px);
  border-color: rgba(37, 99, 235, 0.2);
  box-shadow: 0 12px 20px -3px rgba(37, 99, 235, 0.08), 0 4px 6px -2px rgba(37, 99, 235, 0.03);
}

.aspect-card-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
  font-size: 0.95rem;
}

.aspect-card-header svg {
  stroke: var(--primary);
  filter: drop-shadow(0 2px 4px rgba(37, 99, 235, 0.1));
}

.aspect-card-chart-container {
  width: 120px;
  height: 120px;
  position: relative;
  margin-bottom: 16px;
}

.aspect-stats-grid {
  display: flex;
  justify-content: space-between;
  width: 100%;
  gap: 6px;
  margin-bottom: 16px;
}

.stat-pill {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: #f8fafc;
  border-radius: 8px;
  padding: 6px 4px;
  flex: 1;
  border: 1px solid #f1f5f9;
  transition: var(--transition);
}

.stat-pill:hover {
  background: #f1f5f9;
}

.stat-pill-dot-label {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.65rem;
  color: var(--text-secondary);
  font-weight: 500;
  margin-bottom: 2px;
}

.stat-pill .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.stat-pill.pos .dot { background-color: #3b82f6; }
.stat-pill.neu .dot { background-color: #f59e0b; }
.stat-pill.neg .dot { background-color: #ef4444; }

.stat-pill-val {
  font-size: 0.78rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.stat-pill.pos .stat-pill-val { color: #2563eb; }
.stat-pill.neu .stat-pill-val { color: #d97706; }
.stat-pill.neg .stat-pill-val { color: #dc2626; }

.aspect-card-btn {
  margin-top: auto;
  background: transparent;
  border: none;
  border-top: 1px solid var(--border-light);
  color: var(--accent);
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.5px;
  width: 100%;
  padding-top: 12px;
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
}

.aspect-card-btn:hover {
  color: var(--accent-dark);
  letter-spacing: 1px;
}

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

.fade-row {
  animation: rowIn 0.3s ease both;
}

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

/* ── Responsive ────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .cards-grid { grid-template-columns: 1fr; gap: 16px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .hero h1 { font-size: 1.6rem; }
  .navbar-inner { padding: 0 16px; }
  .container { padding: 0 16px; }
  .nav-links { gap: 4px; }
  .nav-links a { padding: 6px 10px; font-size: 0.75rem; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .hero { padding: 36px 12px 24px; }
  .hero h1 { font-size: 1.35rem; }
  .cards-grid { padding: 0 8px; }
  .btn-group { flex-direction: column; }
  .btn { width: 100%; }
  .preview-header { flex-direction: column; align-items: flex-start; }
}

/* ── Premium File Card & Processing styles ─────────────────────────────────── */
.file-card-wrapper {
  background: var(--bg);
  border: 1.5px solid var(--border-light);
  border-radius: 12px;
  padding: 16px;
  box-shadow: var(--shadow-sm);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  animation: fileCardIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes fileCardIn {
  from { opacity: 0; transform: scale(0.95) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.file-card {
  display: flex;
  align-items: center;
  gap: 16px;
  position: relative;
}

.file-card-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.3s ease;
}

.file-card-icon.pulse {
  animation: iconPulse 2s infinite ease-in-out;
}

@keyframes iconPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

/* Icon backgrounds based on file type */
.file-card-icon.csv { background-color: rgba(37, 99, 235, 0.1); color: var(--primary); }
.file-card-icon.excel { background-color: rgba(5, 150, 105, 0.1); color: #059669; }
.file-card-icon.pdf { background-color: rgba(220, 38, 38, 0.1); color: #dc2626; }
.file-card-icon.unknown { background-color: rgba(100, 116, 139, 0.1); color: #64748b; }

.file-card-icon svg {
  width: 24px;
  height: 24px;
  stroke: currentColor;
}

.file-card-details {
  flex: 1;
  min-width: 0;
}

.file-card-name {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-card-size {
  font-size: 0.72rem;
  color: var(--text-tertiary);
  margin-top: 2px;
}

.file-processing-status {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--primary);
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.file-processing-status.success {
  color: #059669;
}

.file-processing-status.error {
  color: #dc2626;
}

.btn-clear-file {
  background: transparent;
  border: none;
  font-size: 1.4rem;
  color: var(--text-tertiary);
  cursor: pointer;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.btn-clear-file:hover {
  background: var(--neutral-light);
  color: #dc2626;
  transform: rotate(90deg);
}

/* Progress styles */
.file-progress-container {
  margin-top: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.file-progress-track {
  flex: 1;
  height: 6px;
  background: var(--neutral-light);
  border-radius: 3px;
  overflow: hidden;
}

.file-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--primary) 0%, #3b82f6 50%, #60a5fa 100%);
  border-radius: 3px;
  transition: width 0.1s ease;
}

.file-progress-bar.excel {
  background: linear-gradient(90deg, #059669 0%, #10b981 100%);
}

.file-progress-bar.pdf {
  background: linear-gradient(90deg, #dc2626 0%, #ef4444 100%);
}

.file-progress-percent {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-secondary);
  width: 36px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* Spinner & animations */
.spinner-sm {
  display: inline-block;
  width: 12px;
  height: 12px;
  border: 2px solid rgba(37, 99, 235, 0.2);
  border-radius: 50%;
  border-top-color: var(--primary);
  animation: spin 0.8s linear infinite;
  margin-right: 6px;
  vertical-align: middle;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Staggered animation for review items */
.review-preview-list .review-preview-item {
  opacity: 0;
  transform: translateY(12px);
  animation: itemFadeIn 0.4s ease forwards;
}

@keyframes itemFadeIn {
  to { opacity: 1; transform: translateY(0); }
}

/* ── Glassmorphism CSV Form ────────────────────────────────────────────── */
.glass-wrapper {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  padding: 24px;
  margin-top: 8px;
  background: transparent;
}

.glass-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(40px);
  z-index: 0;
  opacity: 0.6;
  animation: blob-float 10s infinite ease-in-out alternate;
}

.glass-blob-1 {
  width: 200px;
  height: 200px;
  background: #a78bfa;
  top: -40px;
  left: -20px;
}

.glass-blob-2 {
  width: 250px;
  height: 250px;
  background: #60a5fa;
  bottom: -60px;
  right: -40px;
  animation-delay: 2s;
}

@keyframes blob-float {
  0% { transform: translateY(0) scale(1); }
  100% { transform: translateY(30px) scale(1.1); }
}

.glass-card {
  position: relative;
  z-index: 1;
  background: rgba(255, 255, 255, 0.45) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.6) !important;
  box-shadow: 0 8px 32px rgba(31, 38, 135, 0.1) !important;
  border-radius: 16px !important;
}

.glass-header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.4) !important;
}

.glass-icon {
  background: rgba(255, 255, 255, 0.8) !important;
  color: #4f46e5 !important;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.15) !important;
}

.glass-title {
  color: #1e1b4b !important;
  font-weight: 800 !important;
}

.glass-card .drop-zone {
  background: rgba(255, 255, 255, 0.5) !important;
  border: 2px dashed rgba(99, 102, 241, 0.4) !important;
  transition: all 0.3s ease;
}

.glass-card .drop-zone:hover, .glass-card .drop-zone.dragover {
  background: rgba(255, 255, 255, 0.8) !important;
  border-color: #6366f1 !important;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.15);
}

.glass-card .csv-guide p {
  color: #374151 !important;
  font-weight: 500;
}

.glass-card .file-card-wrapper {
  background: rgba(255, 255, 255, 0.7) !important;
  border: 1px solid rgba(255, 255, 255, 0.9) !important;
  backdrop-filter: blur(8px);
}
