/**
 * AudiThibz Financial Statement Checker - Stylesheet
 * Dark High-Tech Financial Audit Theme (Aligned with audithibz.app)
 */

/* ==========================================================================
   PERMANENT NETLIFY BADGE, WATERMARK & FLOATING PILL ERADICATION
   ========================================================================== */
.nl-badge,
#nl-badge,
#nl-card,
.nl-card,
[class*="nl-badge"],
[id*="nl-badge"],
.netlify-badge,
[data-netlify-badge],
#netlify-badge,
[class*="netlify"]:not(.social-link):not(.audithibz-hub-brand),
[id*="netlify"],
iframe[src*="netlify"],
.netlify-footer-badge,
netlify-drawer,
#netlify-identity-widget,
[class*="netlify-portal"],
a[href*="netlify.com"],
a[href*="app.netlify.com"],
a:not(.social-link):not(.btn):not(.audithibz-stage-item)[href*="netlify.app"] {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
  height: 0 !important;
  width: 0 !important;
  overflow: hidden !important;
  position: absolute !important;
  left: -9999px !important;
  top: -9999px !important;
  z-index: -9999 !important;
}

@media print {
  .nl-badge,
  #nl-badge,
  #nl-card,
  .nl-card,
  [class*="nl-badge"],
  [id*="nl-badge"],
  .netlify-badge,
  [data-netlify-badge],
  #netlify-badge,
  [class*="netlify"],
  [id*="netlify"],
  iframe[src*="netlify"],
  .netlify-footer-badge,
  netlify-drawer,
  #netlify-identity-widget,
  [class*="netlify-portal"],
  a[href*="netlify.com"],
  a[href*="app.netlify.com"],
  a:not(.social-link):not(.btn)[href*="netlify.app"] {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
    height: 0 !important;
    width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    position: absolute !important;
    left: -9999px !important;
    top: -9999px !important;
    z-index: -9999 !important;
  }
}

:root {
  --bg-dark: #03050a;
  --bg-card: rgba(13, 17, 23, 0.78);
  --bg-card-hover: rgba(22, 27, 34, 0.9);
  --bg-card-alt: rgba(255, 255, 255, 0.02);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(0, 242, 254, 0.3);
  
  --text-main: #f0f6fc;
  --text-muted: #8b949e;
  --text-dim: #94a3b8;

  --cyan-glow: #00f2fe;
  --blue-glow: #4facfe;
  --purple-glow: #8b5cf6;
  --accent-green: #10b981;
  --accent-warning: #f59e0b;
  --accent-danger: #ef4444;

  --gradient-primary: linear-gradient(135deg, #00f2fe 0%, #4facfe 100%);
  --gradient-purple: linear-gradient(135deg, #8b5cf6 0%, #3b82f6 100%);
  --gradient-emerald: linear-gradient(135deg, #10b981 0%, #06b6d4 100%);
  
  --font-main: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-code: 'JetBrains Mono', monospace;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

/* LIGHT THEME HIGH-CONTRAST OVERRIDES */
[data-theme="light"] {
  --bg-dark: #f8fafc;
  --bg-card: #ffffff;
  --bg-card-hover: #f1f5f9;
  --bg-card-alt: #f8fafc;
  --border-color: #cbd5e1;
  --border-glow: rgba(2, 132, 199, 0.3);
  
  --text-main: #0f172a;
  --text-muted: #475569;
  --text-dim: #475569;

  --cyan-glow: #0284c7;
  --blue-glow: #1d4ed8;
  --purple-glow: #6d28d9;
  
  color-scheme: light;
}

[data-theme="light"] body {
  background-color: #f1f5f9;
  color: #0f172a;
  background-image: 
    radial-gradient(circle at 10% 10%, rgba(2, 132, 199, 0.04) 0%, transparent 40%),
    radial-gradient(circle at 90% 90%, rgba(109, 40, 217, 0.04) 0%, transparent 40%);
}

[data-theme="light"] .app-header {
  background: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid #cbd5e1;
}

[data-theme="light"] .dropzone-card,
[data-theme="light"] .tab-content-card,
[data-theme="light"] .kpi-card,
[data-theme="light"] .modal-content,
[data-theme="light"] .statement-table-wrapper {
  background: #ffffff;
  border-color: #cbd5e1;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .custom-select,
[data-theme="light"] .search-input {
  background: #ffffff;
  border-color: #cbd5e1;
  color: #0f172a;
}

[data-theme="light"] table th {
  background: #f1f5f9;
  color: #334155;
  border-bottom: 2px solid #cbd5e1;
}

[data-theme="light"] table td {
  color: #0f172a;
  border-bottom: 1px solid #e2e8f0;
}

/* Light Theme Status Badges (WCAG AA >= 4.5:1) */
[data-theme="light"] .status-badge.ok {
  background: #ecfdf5 !important;
  color: #047857 !important;
  border-color: #a7f3d0 !important;
}

[data-theme="light"] .status-badge.warning {
  background: #fef3c7 !important;
  color: #b45309 !important;
  border-color: #fde68a !important;
}

[data-theme="light"] .status-badge.error {
  background: #fee2e2 !important;
  color: #b91c1c !important;
  border-color: #fca5a5 !important;
}

[data-theme="light"] .status-badge.info {
  background: #f0f9ff !important;
  color: #0369a1 !important;
  border-color: #bae6fd !important;
}

/* Light Theme KPI Amounts, Metrics & Modal Values */
[data-theme="light"] .kpi-value,
[data-theme="light"] .kpi-card .kpi-value,
[data-theme="light"] .stat-val,
[data-theme="light"] .ratio-card-val,
[data-theme="light"] .modal-kpi-val,
[data-theme="light"] #zoom-total-n,
[data-theme="light"] #zoom-dest,
[data-theme="light"] .file-metrics strong {
  color: #0f172a !important;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-image: 
    radial-gradient(circle at 10% 10%, rgba(0, 242, 254, 0.04) 0%, transparent 40%),
    radial-gradient(circle at 90% 90%, rgba(139, 92, 246, 0.04) 0%, transparent 40%);
  overflow-x: hidden;
}

/* Scrollbars */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: rgba(3, 5, 10, 0.5);
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--cyan-glow);
}

/* Header */
.app-header {
  padding: 0.85rem 2rem;
  background: rgba(3, 5, 10, 0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
  color: white;
}

.brand-logo {
  width: 40px;
  height: 40px;
  background: var(--gradient-primary);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.15rem;
  color: #03050a;
  box-shadow: 0 0 20px rgba(0, 242, 254, 0.35);
}

.brand-info h1 {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.brand-info small {
  display: block;
  font-size: 0.72rem;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.badge-version {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  background: rgba(0, 242, 254, 0.12);
  color: var(--cyan-glow);
  border: 1px solid rgba(0, 242, 254, 0.3);
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.norm-selector-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.03);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
}

.norm-selector-group label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 600;
}

.custom-select {
  background: rgba(0, 0, 0, 0.4);
  color: white;
  border: 1px solid var(--border-color);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-family: var(--font-main);
  outline: none;
  cursor: pointer;
  transition: var(--transition);
}

.custom-select:hover, .custom-select:focus {
  border-color: var(--cyan-glow);
}

/* Action buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 600;
  font-family: var(--font-main);
  cursor: pointer;
  text-decoration: none;
  transition: var(--transition);
  border: none;
}

.btn-primary {
  background: var(--gradient-primary);
  color: #03050a;
  box-shadow: 0 0 15px rgba(0, 242, 254, 0.25);
}

.btn-primary:hover {
  box-shadow: 0 0 25px rgba(0, 242, 254, 0.5);
  transform: translateY(-1px);
}

.btn-glass {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
  border: 1px solid var(--border-color);
}

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

.btn-danger {
  background: rgba(239, 68, 68, 0.15);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
  background: rgba(239, 68, 68, 0.25);
}

.btn-success {
  background: var(--gradient-emerald);
  color: #03050a;
}

.btn-xs {
  padding: 0.2rem 0.55rem;
  font-size: 0.72rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.btn-outline-cyan {
  background: rgba(0, 242, 254, 0.08);
  color: var(--cyan-glow);
  border: 1px solid rgba(0, 242, 254, 0.35);
  cursor: pointer;
  transition: var(--transition);
}

.btn-outline-cyan:hover {
  background: rgba(0, 242, 254, 0.18);
  border-color: var(--cyan-glow);
  box-shadow: 0 0 10px rgba(0, 242, 254, 0.3);
}

.btn-outline-danger {
  background: rgba(239, 68, 68, 0.08);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.35);
  cursor: pointer;
  transition: var(--transition);
}

.btn-outline-danger:hover {
  background: rgba(239, 68, 68, 0.22);
  border-color: #ef4444;
  color: #fff;
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.3);
}

.metric-n1-wrap {
  display: inline-flex;
  align-items: center;
}

/* File Drop Zone Banner */
.dropzone-container {
  padding: 1.5rem 2rem 0.5rem;
}

.dropzone-card {
  background: var(--bg-card);
  border: 2px dashed rgba(0, 242, 254, 0.25);
  border-radius: var(--radius-lg);
  padding: 1.75rem 2rem;
  text-align: center;
  position: relative;
  transition: var(--transition);
  cursor: pointer;
  backdrop-filter: blur(12px);
}

.dropzone-card:hover, .dropzone-card.dragover {
  border-color: var(--cyan-glow);
  background: rgba(0, 242, 254, 0.04);
  box-shadow: 0 0 30px rgba(0, 242, 254, 0.15);
}

.dropzone-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
}

.dropzone-icon {
  font-size: 2.2rem;
  color: var(--cyan-glow);
  margin-bottom: 0.2rem;
}

.dropzone-title {
  font-size: 1.15rem;
  font-weight: 700;
}

.dropzone-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.dropzone-badges {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.4rem;
  flex-wrap: wrap;
  justify-content: center;
}

.file-badge {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.05);
  color: #cbd5e1;
  border: 1px solid var(--border-color);
}

.privacy-badge {
  color: var(--accent-green);
  border-color: rgba(16, 185, 129, 0.3);
  background: rgba(16, 185, 129, 0.1);
}

/* File Info Bar (When file is loaded) */
.file-status-bar {
  display: none;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: var(--radius-md);
  padding: 0.85rem 1.25rem;
  margin: 1rem 2rem 0;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.file-status-bar.active {
  display: flex;
}

.status-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.status-indicator {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent-green);
  box-shadow: 0 0 10px var(--accent-green);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.15); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

.file-name-text {
  font-weight: 700;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.badge-source-type {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
}

.badge-source-fec {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.badge-source-gl {
  background: rgba(0, 242, 254, 0.12);
  color: var(--cyan-glow);
  border: 1px solid rgba(0, 242, 254, 0.4);
}

.badge-source-balance {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.file-metrics {
  display: flex;
  gap: 1.25rem;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.file-metrics strong {
  color: white;
  font-family: var(--font-code);
}

/* App Navigation Tabs */
.app-tabs-wrap {
  padding: 1.25rem 2rem 0.5rem;
}

.tabs-container {
  display: flex;
  gap: 0.5rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.5rem;
  overflow-x: auto;
}

.tab-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-main);
  font-size: 0.88rem;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: var(--transition);
  white-space: nowrap;
}

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

.tab-btn.active {
  color: #03050a;
  background: var(--cyan-glow);
  font-weight: 700;
  box-shadow: 0 0 15px rgba(0, 242, 254, 0.3);
}

/* Tab Panels */
.tab-content-area {
  padding: 1.5rem 2rem 3rem;
  flex: 1;
}

.tab-panel {
  display: none;
  animation: fadeIn 0.3s ease;
}

.tab-panel.active {
  display: block;
}

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

/* Dashboard Grid */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1.25rem;
}

.kpi-row {
  grid-column: span 12;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
}

.kpi-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(12px);
  transition: var(--transition);
}

.kpi-card:hover {
  border-color: rgba(0, 242, 254, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

.kpi-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-primary);
  opacity: 0.7;
}

.kpi-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.kpi-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.kpi-icon {
  color: var(--cyan-glow);
  font-size: 1.1rem;
}

.kpi-value {
  font-size: 1.6rem;
  font-weight: 800;
  font-family: var(--font-code);
  letter-spacing: -0.02em;
  color: var(--text-main);
}

.kpi-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.4rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

/* Score Card */
.score-card {
  grid-column: span 4;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  backdrop-filter: blur(12px);
}

.score-circle {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 6px solid var(--accent-green);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 1rem 0;
  box-shadow: 0 0 25px rgba(16, 185, 129, 0.2);
}

.score-num {
  font-size: 2rem;
  font-weight: 800;
  font-family: var(--font-code);
}

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

/* Ratios Card */
.ratios-card {
  grid-column: span 8;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  backdrop-filter: blur(12px);
}

.card-title-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-color);
}

.card-title-bar h3 {
  font-size: 1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

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

.ratios-table th, .ratios-table td {
  padding: 0.75rem 0.5rem;
  text-align: left;
  font-size: 0.85rem;
}

.ratios-table th {
  color: var(--text-muted);
  font-weight: 600;
  border-bottom: 1px solid var(--border-color);
}

.ratios-table tr:not(:last-child) td {
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

/* Variations Card */
.variations-card {
  grid-column: span 12;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  backdrop-filter: blur(12px);
}

/* Audit Controls Table */
.controls-container {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.control-group-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  backdrop-filter: blur(12px);
}

.control-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.control-item:last-child {
  border-bottom: none;
}

.control-name {
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 0.2rem;
}

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

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 700;
}

.status-badge.ok {
  background: rgba(16, 185, 129, 0.12);
  color: var(--accent-green);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.status-badge.warning {
  background: rgba(245, 158, 11, 0.12);
  color: var(--accent-warning);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.status-badge.error {
  background: rgba(239, 68, 68, 0.12);
  color: var(--accent-danger);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.status-badge.info {
  background: rgba(0, 242, 254, 0.1);
  color: var(--cyan-glow);
  border: 1px solid rgba(0, 242, 254, 0.25);
}

/* Plaquette Financière (Bilan & CR) */
.plaquette-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

@media (max-width: 1100px) {
  .plaquette-split {
    grid-template-columns: 1fr;
  }
}

.statement-sheet {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  backdrop-filter: blur(12px);
  overflow-x: auto;
}

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

.statement-table th {
  padding: 0.75rem 0.5rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  border-bottom: 1px solid var(--border-color);
  text-align: right;
}

.statement-table th:first-child {
  text-align: left;
}

.statement-table td {
  padding: 0.55rem 0.5rem;
  font-size: 0.82rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  text-align: right;
  font-family: var(--font-code);
}

.statement-table td:first-child {
  text-align: left;
  font-family: var(--font-main);
}

.statement-table tr.header-row td {
  background: rgba(255, 255, 255, 0.04);
  font-weight: 800;
  color: var(--cyan-glow);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.82rem;
  padding-top: 0.85rem;
  padding-bottom: 0.85rem;
}

.statement-table tr.section-row td {
  font-weight: 700;
  color: #cbd5e1;
  padding-left: 0.75rem;
  background: rgba(0, 0, 0, 0.2);
}

.statement-table tr.data-row td:first-child {
  padding-left: 1.5rem;
}

.statement-table tr.data-row:hover td {
  background: rgba(0, 242, 254, 0.04);
}

.statement-table tr.subtotal-row td {
  font-weight: 700;
  color: #fff;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.02);
}

.statement-table tr.total-row td {
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--cyan-glow);
  border-top: 2px solid var(--cyan-glow);
  border-bottom: 2px solid var(--cyan-glow);
  background: rgba(0, 242, 254, 0.06);
}

.btn-zoom {
  opacity: 0.6;
  background: transparent;
  border: none;
  color: var(--cyan-glow);
  cursor: pointer;
  padding: 2px 5px;
  border-radius: 4px;
  font-size: 0.75rem;
  margin-left: 0.4rem;
  transition: var(--transition);
}

.btn-zoom:hover {
  opacity: 1;
  background: rgba(0, 242, 254, 0.15);
  transform: scale(1.1);
}

/* Zoom Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(3, 5, 10, 0.85);
  backdrop-filter: blur(10px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.modal-overlay.active {
  display: flex;
}

.modal-card {
  background: #0d1117;
  border: 1px solid rgba(0, 242, 254, 0.3);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 950px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 0 50px rgba(0, 242, 254, 0.2);
  overflow: hidden;
  animation: modalEnter 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

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

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

.modal-header h2 {
  font-size: 1.15rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

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

.modal-close-btn:hover {
  color: white;
  background: rgba(255, 255, 255, 0.1);
}

.modal-kpi-bar {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  padding: 1rem 1.75rem;
  background: rgba(0, 0, 0, 0.3);
  border-bottom: 1px solid var(--border-color);
}

.modal-kpi-item {
  display: flex;
  flex-direction: column;
}

.modal-kpi-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
}

.modal-kpi-val {
  font-size: 1.1rem;
  font-weight: 800;
  font-family: var(--font-code);
}

.modal-search-bar {
  padding: 0.75rem 1.75rem;
  display: flex;
  gap: 0.75rem;
  border-bottom: 1px solid var(--border-color);
}

.search-input {
  flex: 1;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  color: white;
  font-family: var(--font-main);
  font-size: 0.85rem;
  outline: none;
}

.search-input:focus {
  border-color: var(--cyan-glow);
}

.modal-body {
  padding: 1rem 1.75rem;
  overflow-y: auto;
  flex: 1;
}

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

.zoom-table th {
  padding: 0.65rem 0.5rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

.zoom-table td {
  padding: 0.65rem 0.5rem;
  font-size: 0.82rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.modal-footer {
  padding: 1rem 1.75rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}

/* Mapping Studio Table */
.mapping-studio-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.mapping-table-wrap {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  max-height: 600px;
  overflow-y: auto;
}

/* Footer */
.app-footer {
  padding: 1.5rem 2rem;
  border-top: 1px solid var(--border-color);
  background: rgba(3, 5, 10, 0.95);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: auto;
}

.footer-links a {
  color: var(--cyan-glow);
  text-decoration: none;
  margin-left: 1rem;
}

.footer-links a:hover {
  text-decoration: underline;
}

