/* ==========================================================================
   NEBLINA SKN — SISTEMA INTELIGENTE DE CONTROL DOCUMENTAL (SICD)
   Enterprise / Modern SaaS Dark Design System (Linear / Vercel / Retool Aesthetic)
   ========================================================================== */

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

:root,
html[data-theme="dark"],
body[data-theme="dark"],
[data-theme="dark"] {
  /* Surface & Background (Deep Technical Graphite & Slate) */
  --bg-canvas: #090c13;
  --bg-sidebar: #0c1018;
  --bg-surface: #111622;
  --bg-surface-elevated: #161c2b;
  --bg-surface-hover: #1c2436;
  --bg-surface-subtle: rgba(255, 255, 255, 0.02);
  --bg-input: #0e121b;
  --bg-card: #111622;
  --bg-card-hover: #1c2436;
  --bg-glass: rgba(17, 22, 34, 0.85);

  /* Crisp Micro-Borders */
  --border-subtle: rgba(255, 255, 255, 0.06);
  --border-default: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.16);
  --border-accent: rgba(0, 242, 254, 0.4);
  --border-glass: rgba(255, 255, 255, 0.09);

  /* Primary AI & Tech Accent (Electric Cyan) */
  --accent-cyan: #00f2fe;
  --accent-cyan-hover: #38bdf8;
  --accent-cyan-subtle: rgba(0, 242, 254, 0.08);
  --accent-cyan-glow: 0 0 20px rgba(0, 242, 254, 0.18);
  --accent-indigo: #6366f1;
  --accent-purple: #8b5cf6;

  /* Semantic Status Colors */
  --status-success: #10b981;
  --status-success-bg: rgba(16, 185, 129, 0.1);
  --status-success-border: rgba(16, 185, 129, 0.25);

  --status-warning: #f59e0b;
  --status-warning-bg: rgba(245, 158, 11, 0.1);
  --status-warning-border: rgba(245, 158, 11, 0.25);

  --status-danger: #f43f5e;
  --status-danger-bg: rgba(244, 63, 94, 0.1);
  --status-danger-border: rgba(244, 63, 94, 0.25);

  --status-info: #0ea5e9;
  --status-info-bg: rgba(14, 165, 233, 0.1);
  --status-info-border: rgba(14, 165, 233, 0.25);

  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-main: var(--font-sans);
  --font-heading: 'Plus Jakarta Sans', var(--font-sans);
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  /* Text Colors */
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-inverse: #050811;

  /* Geometry & Radius */
  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.35);
  --shadow-md: 0 4px 12px -1px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 12px 28px -4px rgba(0, 0, 0, 0.6);
  --shadow-cyan: 0 4px 20px rgba(0, 242, 254, 0.25);

  /* Theme-specific tokens */
  --logo-box-bg: rgba(255, 255, 255, 0.04);
  --logo-box-border: rgba(0, 242, 254, 0.25);
  --user-bar-bg: rgba(0, 0, 0, 0.2);

  /* Transitions */
  --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition: var(--transition-base);
}

html[data-theme="light"],
body[data-theme="light"],
[data-theme="light"] {
  /* Surface & Background (Crisp Modern SaaS Enterprise Light) */
  --bg-canvas: #f8fafc;
  --bg-sidebar: #ffffff;
  --bg-surface: #ffffff;
  --bg-surface-elevated: #f1f5f9;
  --bg-surface-hover: #e2e8f0;
  --bg-surface-subtle: rgba(15, 23, 42, 0.02);
  --bg-input: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #f8fafc;
  --bg-glass: rgba(255, 255, 255, 0.95);

  /* Crisp Light Micro-Borders */
  --border-subtle: #e2e8f0;
  --border-default: #cbd5e1;
  --border-strong: #94a3b8;
  --border-accent: #0284c7;
  --border-glass: #e2e8f0;

  /* Primary AI & Tech Accent (Electric Tech Blue in Light Mode) */
  --accent-cyan: #0284c7;
  --accent-cyan-hover: #0369a1;
  --accent-cyan-subtle: rgba(2, 132, 199, 0.08);
  --accent-cyan-glow: 0 0 16px rgba(2, 132, 199, 0.15);
  --accent-indigo: #4f46e5;
  --accent-purple: #7c3aed;

  /* Semantic Status Colors (Rich & Crisp for light mode) */
  --status-success: #059669;
  --status-success-bg: rgba(5, 150, 105, 0.08);
  --status-success-border: rgba(5, 150, 105, 0.25);

  --status-warning: #d97706;
  --status-warning-bg: rgba(217, 119, 6, 0.08);
  --status-warning-border: rgba(217, 119, 6, 0.25);

  --status-danger: #e11d48;
  --status-danger-bg: rgba(225, 29, 72, 0.08);
  --status-danger-border: rgba(225, 29, 72, 0.25);

  --status-info: #0284c7;
  --status-info-bg: rgba(2, 132, 199, 0.08);
  --status-info-border: rgba(2, 132, 199, 0.25);

  /* Text Colors */
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --text-inverse: #ffffff;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.06), 0 2px 4px -2px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
  --shadow-cyan: 0 4px 14px rgba(2, 132, 199, 0.12);

  /* Theme-specific tokens */
  --logo-box-bg: rgba(2, 132, 199, 0.05);
  --logo-box-border: rgba(2, 132, 199, 0.2);
  --user-bar-bg: #f8fafc;
}

/* ==========================================================================
   RESET & BASE STYLES
   ========================================================================== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

html {
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-canvas);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.5;
  letter-spacing: -0.01em;
  transition: background-color var(--transition-base), color var(--transition-base);
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 242, 254, 0.4);
}

/* Tabular numbers for clean alignment */
.tabular-nums,
.data-table td,
.stat-value,
.code-val {
  font-variant-numeric: tabular-nums;
  font-feature-settings: 'tnum' on, 'zero' on;
}

/* ==========================================================================
   AUTHENTICATION SCREEN (MODERN ENTERPRISE LOGIN)
   ========================================================================== */
.auth-screen {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background-color: var(--bg-canvas);
  background-image: 
    radial-gradient(circle at 50% 0%, rgba(0, 242, 254, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 80% 90%, rgba(99, 102, 241, 0.05) 0%, transparent 40%),
    linear-gradient(to right, rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 32px 32px, 32px 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.auth-card {
  width: 100%;
  max-width: 520px;
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  padding: 36px 32px;
  box-shadow: 0 24px 64px -12px rgba(0, 0, 0, 0.8), var(--shadow-cyan);
  position: relative;
  z-index: 10;
}

.auth-theme-toggle {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-default);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-fast);
  z-index: 20;
}

.auth-theme-toggle:hover {
  background: var(--bg-surface-hover);
  border-color: var(--border-strong);
  color: var(--text-primary);
}

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

.auth-brand-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 8px;
}

.auth-brand-logo {
  width: 56px !important;
  height: 56px !important;
  max-width: 56px !important;
  max-height: 56px !important;
  object-fit: contain !important;
  display: block !important;
  margin: 0 auto !important;
  filter: drop-shadow(0 4px 14px rgba(0, 242, 254, 0.25));
}

.auth-brand-title {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  line-height: 1.1;
}

.sidebar-brand-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  overflow: hidden;
}

.sidebar-brand-logo,
.sidebar-logo-img,
.brand-logo-img {
  width: 32px !important;
  height: 32px !important;
  max-width: 32px !important;
  max-height: 32px !important;
  min-width: 32px !important;
  min-height: 32px !important;
  object-fit: contain !important;
  display: block !important;
  flex-shrink: 0 !important;
}

.sidebar-brand-name {
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Theme Toggle Button in Topbar */
.btn-theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition-fast);
  user-select: none;
}

.btn-theme-toggle:hover {
  background: var(--bg-surface-hover);
  border-color: var(--border-strong);
  color: var(--text-primary);
}

/* Theme Icon Visibility Switch */
[data-theme="dark"] .icon-sun,
html:not([data-theme="light"]) .icon-sun,
body:not([data-theme="light"]) .icon-sun {
  display: inline-block !important;
}
[data-theme="dark"] .icon-moon,
html:not([data-theme="light"]) .icon-moon,
body:not([data-theme="light"]) .icon-moon {
  display: none !important;
}

[data-theme="light"] .icon-sun {
  display: none !important;
}
[data-theme="light"] .icon-moon {
  display: inline-block !important;
}

.brand-title {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text-primary);
}

.brand-tagline {
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 400;
}

/* Modern Role Selector Grid */
.role-selector {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 24px;
}

.role-btn {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px 10px;
  text-align: center;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition-base);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  position: relative;
  user-select: none;
}

.role-btn svg {
  width: 20px;
  height: 20px;
  stroke: var(--text-muted);
  transition: var(--transition-fast);
}

.role-btn:hover {
  background: var(--bg-surface-hover);
  border-color: var(--border-strong);
  color: var(--text-primary);
}

.role-btn:hover svg {
  stroke: var(--text-primary);
}

.role-btn.active {
  background: var(--accent-cyan-subtle);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
  box-shadow: 0 0 16px rgba(0, 242, 254, 0.18);
}

.role-btn.active svg {
  stroke: var(--accent-cyan);
}

.role-btn .role-badge {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 2px 6px;
  border-radius: var(--radius-xs);
  margin-top: 2px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
}

.role-btn.active .role-badge {
  background: rgba(0, 242, 254, 0.15);
  color: var(--accent-cyan);
}

.role-corner-info {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.6;
  transition: var(--transition-fast);
}

.role-corner-info:hover {
  opacity: 1;
  background: var(--accent-cyan);
  color: var(--text-inverse);
}

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

.form-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}

.form-input {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  font-size: 13px;
  color: var(--text-primary);
  font-family: var(--font-sans);
  transition: var(--transition-fast);
  outline: none;
}

.form-input:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 0 3px rgba(0, 242, 254, 0.12);
}

.form-input::placeholder {
  color: var(--text-muted);
}

/* Buttons */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 10px 18px;
  background: var(--accent-cyan);
  color: #050811;
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 700;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: var(--transition-fast);
  box-shadow: 0 2px 10px rgba(0, 242, 254, 0.25);
  user-select: none;
}

.btn-primary:hover {
  background: var(--accent-cyan-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0, 242, 254, 0.35);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-tool {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition-fast);
  user-select: none;
}

.btn-tool:hover {
  background: var(--bg-surface-hover);
  border-color: var(--border-strong);
  color: var(--text-primary);
}

.btn-success {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--status-success);
  color: #050811;
  border: none;
  border-radius: var(--radius-sm);
  padding: 8px 16px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition-fast);
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.25);
}

.btn-success:hover {
  background: #34d399;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
}

.btn-danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--status-danger-bg);
  border: 1px solid var(--status-danger-border);
  color: var(--status-danger);
  border-radius: var(--radius-sm);
  padding: 7px 14px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-danger:hover {
  background: rgba(244, 63, 94, 0.2);
  border-color: var(--status-danger);
}

/* ==========================================================================
   APP MAIN LAYOUT
   ========================================================================== */
.app-layout {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* Fixed Sidebar */
.sidebar {
  width: 240px;
  min-width: 240px;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  height: 100%;
  user-select: none;
  z-index: 50;
}

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

.sidebar-header .brand-title {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.sidebar-header .version-tag {
  font-size: 9px;
  font-weight: 700;
  color: var(--accent-cyan);
  background: var(--accent-cyan-subtle);
  padding: 2px 5px;
  border-radius: var(--radius-xs);
  border: 1px solid rgba(0, 242, 254, 0.2);
}

.sidebar-menu {
  flex: 1;
  overflow-y: auto;
  padding: 14px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.menu-category {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  padding: 14px 10px 6px;
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 12.5px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition-fast);
  position: relative;
}

.menu-item svg {
  width: 17px;
  height: 17px;
  stroke: var(--text-muted);
  stroke-width: 2;
  flex-shrink: 0;
  transition: var(--transition-fast);
}

.menu-item:hover {
  background: var(--bg-surface-elevated);
  color: var(--text-primary);
}

.menu-item:hover svg {
  stroke: var(--text-primary);
}

.menu-item.active {
  background: var(--accent-cyan-subtle);
  color: var(--accent-cyan);
  font-weight: 600;
}

.menu-item.active svg {
  stroke: var(--accent-cyan);
}

.menu-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 6px;
  bottom: 6px;
  width: 3px;
  background: var(--accent-cyan);
  border-radius: 0 3px 3px 0;
  box-shadow: 0 0 8px var(--accent-cyan);
}

.menu-badge {
  margin-left: auto;
  font-size: 10px;
  font-weight: 700;
  background: rgba(245, 158, 11, 0.15);
  color: var(--status-warning);
  border: 1px solid rgba(245, 158, 11, 0.3);
  padding: 1px 6px;
  border-radius: 999px;
  line-height: 1.4;
}

/* User Profile Footer */
.user-profile {
  padding: 12px 14px;
  border-top: 1px solid var(--border-subtle);
  background: rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-profile .avatar {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
  border: 1px solid var(--border-default);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 700;
  color: var(--accent-cyan);
  position: relative;
}

.avatar-status-dot {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--status-success);
  border: 2px solid var(--bg-sidebar);
}

.user-info {
  flex: 1;
  min-width: 0;
}

.user-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-role {
  font-size: 10px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn-logout {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: var(--radius-xs);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
}

.btn-logout:hover {
  color: var(--status-danger);
  background: rgba(244, 63, 94, 0.1);
}

/* ==========================================================================
   MAIN CONTENT AREA
   ========================================================================== */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  background: var(--bg-canvas);
}

/* Top Sticky Header */
.topbar {
  height: 56px;
  min-height: 56px;
  padding: 0 24px;
  background: var(--bg-sidebar);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  z-index: 40;
}

.page-title-area {
  display: flex;
  align-items: center;
  gap: 10px;
}

.page-title {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

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

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 10px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-secondary);
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--status-success);
  box-shadow: 0 0 8px var(--status-success);
  animation: pulseStatus 2s infinite ease-in-out;
}

@keyframes pulseStatus {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.85); }
}

.btn-upload-nav {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent-cyan);
  color: var(--text-inverse);
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition-fast);
  box-shadow: 0 2px 8px rgba(0, 242, 254, 0.25);
  user-select: none;
}

.btn-upload-nav:hover {
  background: var(--accent-cyan-hover);
  box-shadow: 0 4px 14px rgba(0, 242, 254, 0.35);
}

/* Theme Switcher Controls */
.btn-theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition-fast);
  user-select: none;
}

.btn-theme-toggle:hover {
  background: var(--bg-surface-hover);
  border-color: var(--border-strong);
  color: var(--text-primary);
}

.auth-theme-toggle {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-default);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-fast);
  z-index: 20;
}

.auth-theme-toggle:hover {
  background: var(--bg-surface-hover);
  color: var(--accent-cyan);
  border-color: var(--accent-cyan);
}

/* Theme Icon Visibility Switcher */
:root .icon-sun,
[data-theme="dark"] .icon-sun {
  display: inline-block;
}
:root .icon-moon,
[data-theme="dark"] .icon-moon {
  display: none;
}

[data-theme="light"] .icon-sun {
  display: none;
}
[data-theme="light"] .icon-moon {
  display: inline-block;
}

[data-theme="light"] .auth-screen {
  background-image: 
    radial-gradient(circle at 50% 0%, rgba(2, 132, 199, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 80% 90%, rgba(79, 70, 229, 0.04) 0%, transparent 40%),
    linear-gradient(to right, rgba(0, 0, 0, 0.03) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(0, 0, 0, 0.03) 1px, transparent 1px);
}

/* Dynamic Views Body */
.content-body {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
}

.view-panel {
  display: none;
  animation: fadeIn 0.2s ease-out;
}

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

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

/* ==========================================================================
   KPI METRIC CARDS (HIGH-TECH ENTERPRISE)
   ========================================================================== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  transition: var(--transition-fast);
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent);
}

.stat-card:hover {
  background: var(--bg-surface-elevated);
  border-color: var(--border-strong);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

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

.stat-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
}

.stat-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
}

.stat-icon svg {
  width: 17px;
  height: 17px;
}

.stat-value-container {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.stat-value {
  font-family: var(--font-heading);
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  line-height: 1.1;
}

.stat-trend {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: var(--radius-xs);
}

.stat-trend.positive {
  background: var(--status-success-bg);
  color: var(--status-success);
}

.stat-trend.warning {
  background: var(--status-warning-bg);
  color: var(--status-warning);
}

/* ==========================================================================
   CHARTS & GRAPHS CARDS
   ========================================================================== */
.dashboard-charts {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}

.chart-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: 20px;
}

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

.card-title {
  font-family: var(--font-heading);
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-primary);
}

.chart-canvas {
  width: 100%;
  height: 220px;
}

/* Stage Breakdown List */
.stage-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 12px;
}

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

.stage-name {
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.stage-color-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.stage-count {
  font-weight: 700;
  color: var(--text-primary);
}

/* ==========================================================================
   DATA TABLES (HIGH DENSITY & SCANNABLE)
   ========================================================================== */
.data-table-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.table-wrapper {
  overflow-x: auto;
  width: 100%;
}

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

.data-table thead {
  background: var(--bg-surface-elevated);
  border-bottom: 1px solid var(--border-default);
}

.data-table th {
  padding: 10px 14px;
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
  white-space: nowrap;
  user-select: none;
}

.data-table th.sortable {
  cursor: pointer;
  transition: var(--transition-fast);
}

.data-table th.sortable:hover {
  color: var(--accent-cyan);
}

.data-table tbody tr {
  border-bottom: 1px solid var(--border-subtle);
  transition: var(--transition-fast);
}

.data-table tbody tr:hover {
  background: var(--bg-surface-hover);
}

.data-table td {
  padding: 11px 14px;
  color: var(--text-primary);
  white-space: nowrap;
  vertical-align: middle;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.badge-success {
  background: var(--status-success-bg);
  color: var(--status-success);
  border: 1px solid var(--status-success-border);
}

.badge-warning {
  background: var(--status-warning-bg);
  color: var(--status-warning);
  border: 1px solid var(--status-warning-border);
}

.badge-danger {
  background: var(--status-danger-bg);
  color: var(--status-danger);
  border: 1px solid var(--status-danger-border);
}

.badge-info {
  background: var(--status-info-bg);
  color: var(--status-info);
  border: 1px solid var(--status-info-border);
}

.badge-cyan {
  background: var(--accent-cyan-subtle);
  color: var(--accent-cyan);
  border: 1px solid rgba(0, 242, 254, 0.25);
}

/* Confidence Gauge Bar */
.confidence-gauge-cell {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  font-size: 11.5px;
}

.confidence-mini-bar {
  width: 38px;
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.confidence-mini-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.3s ease;
}

/* ==========================================================================
   SPLIT VIEW VALIDATION MODULE
   ========================================================================== */
.split-container {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 16px;
  height: calc(100vh - 165px);
  min-height: 520px;
}

.doc-viewer-panel {
  background: #06080d;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

.viewer-toolbar {
  height: 44px;
  background: var(--bg-surface-elevated);
  border-bottom: 1px solid var(--border-subtle);
  padding: 0 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.doc-canvas-area {
  flex: 1;
  overflow: auto;
  padding: 24px;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  background-image: 
    radial-gradient(circle, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 20px 20px;
}

#document-sheet {
  background: #ffffff;
  color: #000000;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
  position: relative;
  user-select: none;
}

/* Bounding Boxes */
.bbox {
  position: absolute;
  border: 1.5px solid rgba(0, 242, 254, 0.7);
  background: transparent;
  border-radius: 3px;
  pointer-events: auto;
  cursor: pointer;
  transition: all 0.15s ease;
  z-index: 10;
}

.bbox:hover {
  border: 2px solid #00f2fe;
  background: rgba(0, 242, 254, 0.05);
  box-shadow: 0 0 8px rgba(0, 242, 254, 0.5);
  z-index: 25;
}

.bbox.highlighted {
  border: 2px solid #00f2fe;
  background: rgba(0, 242, 254, 0.08);
  box-shadow: 0 0 0 2px rgba(0, 242, 254, 0.4), 0 0 14px rgba(0, 242, 254, 0.6);
  z-index: 30;
  animation: pulseBbox 2s infinite ease-in-out;
}

@keyframes pulseBbox {
  0% { box-shadow: 0 0 0 1.5px rgba(0, 242, 254, 0.4), 0 0 8px rgba(0, 242, 254, 0.5); }
  50% { box-shadow: 0 0 0 3px rgba(0, 242, 254, 0.7), 0 0 16px rgba(0, 242, 254, 0.8); }
  100% { box-shadow: 0 0 0 1.5px rgba(0, 242, 254, 0.4), 0 0 8px rgba(0, 242, 254, 0.5); }
}

.bbox.bbox-icr {
  border-color: rgba(167, 139, 250, 0.85);
}

.bbox.bbox-icr:hover,
.bbox.bbox-icr.highlighted {
  border: 2px solid #a78bfa;
  box-shadow: 0 0 0 2px rgba(167, 139, 250, 0.4), 0 0 14px rgba(167, 139, 250, 0.6);
}

.bbox.bbox-error {
  border-color: #f43f5e;
}

.bbox.bbox-error:hover,
.bbox.bbox-error.highlighted {
  border: 2px solid #f43f5e;
  box-shadow: 0 0 0 2px rgba(244, 63, 94, 0.4), 0 0 14px rgba(244, 63, 94, 0.6);
}

.bbox.warning {
  border-color: #f59e0b;
}

.bbox.warning:hover,
.bbox.warning.highlighted {
  border: 2px solid #f59e0b;
  box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.4), 0 0 14px rgba(245, 158, 11, 0.6);
}

/* Inspection status bar */
.doc-inspection-bar {
  padding: 8px 14px;
  background: var(--bg-surface-elevated);
  border-bottom: 1px solid var(--border-default);
  display: flex;
  align-items: center;
  min-height: 38px;
}

/* Capture Hub Styles */
.capture-hub-modal-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: 24px;
  width: 100%;
  max-width: 840px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.7), var(--shadow-cyan);
}

.capture-tabs-nav {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--border-default);
  padding-bottom: 12px;
  margin-bottom: 18px;
  overflow-x: auto;
}

.capture-tab-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition-fast);
  white-space: nowrap;
}

.capture-tab-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.04);
}

.capture-tab-btn.active {
  color: var(--accent-cyan);
  background: var(--accent-cyan-subtle);
  border-color: rgba(0, 242, 254, 0.25);
}

.capture-channel-pane {
  display: none;
  overflow-y: auto;
  padding-right: 4px;
}

.capture-channel-pane.active {
  display: block;
}

.drag-drop-zone {
  border: 2px dashed var(--border-strong);
  background: var(--bg-surface-elevated);
  border-radius: var(--radius-lg);
  padding: 40px 20px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition-fast);
}

.drag-drop-zone:hover,
.drag-drop-zone.drag-over {
  border-color: var(--accent-cyan);
  background: rgba(0, 242, 254, 0.04);
  box-shadow: inset 0 0 20px rgba(0, 242, 254, 0.1);
}

.camera-preview-container {
  position: relative;
  background: #000;
  border-radius: var(--radius-md);
  overflow: hidden;
  max-width: 640px;
  margin: 0 auto 16px;
  border: 2px solid var(--border-default);
}

.camera-guide-overlay {
  position: absolute;
  inset: 20px;
  border: 2px dashed rgba(0, 242, 254, 0.7);
  border-radius: 8px;
  pointer-events: none;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
}

.camera-flash {
  position: absolute;
  inset: 0;
  background: #fff;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
}

.validation-form-panel {
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.validation-form-panel .panel-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-surface-elevated);
}

.field-list {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Field Cards */
.field-card {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  transition: var(--transition-fast);
  cursor: pointer;
}

.field-card:hover {
  border-color: var(--border-strong);
  background: var(--bg-surface-hover);
}

.field-card.active {
  border-color: var(--accent-cyan);
  background: rgba(0, 242, 254, 0.04);
  box-shadow: 0 0 14px rgba(0, 242, 254, 0.1);
}

.field-card.low-confidence {
  border-color: rgba(245, 158, 11, 0.4);
  background: rgba(245, 158, 11, 0.04);
}

.field-card.low-confidence.active {
  border-color: var(--status-warning);
  box-shadow: 0 0 14px rgba(245, 158, 11, 0.2);
}

.field-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.field-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
}

.field-confidence-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: var(--radius-xs);
}

.validation-actions {
  padding: 14px 20px;
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-surface-elevated);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

/* ==========================================================================
   EMPTY STATES (HIGH-TECH MINIMALIST)
   ========================================================================== */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-secondary);
}

.empty-state-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-default);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}

.empty-state-icon svg {
  width: 24px;
  height: 24px;
  stroke: var(--text-secondary);
}

.empty-state-title {
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.empty-state-desc {
  font-size: 12px;
  color: var(--text-muted);
  max-width: 320px;
  margin: 0 auto;
}

/* ==========================================================================
   TOAST NOTIFICATIONS
   ========================================================================== */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-primary);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slideInToast 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  min-width: 280px;
}

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

.toast.toast-success {
  border-left: 3px solid var(--status-success);
}

.toast.toast-error {
  border-left: 3px solid var(--status-danger);
}

.toast.toast-info {
  border-left: 3px solid var(--accent-cyan);
}

/* ==========================================================================
   MODALS & POPOVERS
   ========================================================================== */
.role-popover-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.role-popover-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: 28px;
  width: 100%;
  max-width: 440px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), var(--shadow-cyan);
}

/* Summary Grid Cards (Extracted Data & History) */
.summary-metric-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: var(--transition-fast);
}

.summary-metric-card:hover {
  background: var(--bg-surface-elevated);
  border-color: var(--border-strong);
}

.summary-metric-icon {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}

.summary-metric-icon svg {
  width: 18px;
  height: 18px;
}

/* Multi-Export & Help Guide Modals */
.export-option-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition-fast);
}

.export-option-card:hover {
  background: var(--bg-surface);
  border-color: var(--accent-cyan);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.export-card-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.help-modal-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: 24px;
  width: 100%;
  max-width: 780px;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.7), var(--shadow-cyan);
}

.help-tabs-nav {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--border-default);
  padding-bottom: 12px;
  margin-bottom: 18px;
  overflow-x: auto;
}

.help-tab-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-secondary);
  font-size: 12.5px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition-fast);
  white-space: nowrap;
}

.help-tab-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.04);
}

.help-tab-btn.active {
  color: var(--accent-cyan);
  background: var(--accent-cyan-subtle);
  border-color: rgba(0, 242, 254, 0.25);
}

.help-tab-pane {
  display: none;
  overflow-y: auto;
  padding-right: 6px;
}

.help-tab-pane.active {
  display: block;
}

.help-item-row {
  display: flex;
  gap: 14px;
  padding: 12px 14px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  margin-bottom: 10px;
  align-items: flex-start;
}

.help-item-badge {
  padding: 4px 8px;
  background: rgba(0, 242, 254, 0.1);
  color: var(--accent-cyan);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  border-radius: var(--radius-xs);
  white-space: nowrap;
  flex-shrink: 0;
}

/* ==========================================================================
   RESPONSIVENESS & LIGHT THEME POLISH OVERRIDES
   ========================================================================== */
@media (max-width: 1024px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .dashboard-charts {
    grid-template-columns: 1fr;
  }
  .split-container {
    grid-template-columns: 1fr;
    height: auto;
  }
  .doc-viewer-panel {
    height: 480px;
  }
}

/* Specific Light Mode High-Contrast Refinements */
[data-theme="light"] body {
  background-color: #f8fafc;
  color: #0f172a;
}

[data-theme="light"] .sidebar {
  background-color: #ffffff;
  border-right-color: #e2e8f0;
}

[data-theme="light"] .sidebar-header {
  border-bottom-color: #e2e8f0;
}

[data-theme="light"] .topbar {
  background-color: #ffffff;
  border-bottom-color: #e2e8f0;
}

[data-theme="light"] .stat-card,
[data-theme="light"] .chart-card,
[data-theme="light"] .table-card,
[data-theme="light"] .config-card,
[data-theme="light"] .wizard-card,
[data-theme="light"] .help-modal-card,
[data-theme="light"] .user-drawer-card,
[data-theme="light"] .role-info-card,
[data-theme="light"] .export-modal-card,
[data-theme="light"] .doc-viewer-panel,
[data-theme="light"] .doc-form-panel {
  background-color: #ffffff;
  border-color: #e2e8f0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .data-table th {
  background-color: #f1f5f9;
  color: #475569;
  border-bottom-color: #cbd5e1;
}

[data-theme="light"] .data-table td {
  border-bottom-color: #f1f5f9;
  color: #1e293b;
}

[data-theme="light"] .data-table tbody tr:hover {
  background-color: #f8fafc;
}

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

[data-theme="light"] .btn-tool {
  background-color: #f1f5f9;
  border-color: #cbd5e1;
  color: #334155;
}

[data-theme="light"] .btn-tool:hover {
  background-color: #e2e8f0;
  color: #0f172a;
}

[data-theme="light"] .doc-inspection-bar {
  background-color: #f1f5f9;
  border-color: #cbd5e1;
}

[data-theme="light"] .auth-screen {
  background-color: #f1f5f9;
  background-image: 
    radial-gradient(circle at 50% 0%, rgba(2, 132, 199, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 80% 90%, rgba(79, 70, 229, 0.05) 0%, transparent 40%),
    linear-gradient(to right, rgba(15, 23, 42, 0.03) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(15, 23, 42, 0.03) 1px, transparent 1px);
}

[data-theme="light"] .auth-card {
  background-color: #ffffff;
  border-color: #e2e8f0;
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.1), 0 0 20px rgba(2, 132, 199, 0.1);
}

[data-theme="light"] .role-btn {
  background-color: #f8fafc;
  border-color: #e2e8f0;
  color: #475569;
}

[data-theme="light"] .role-btn:hover {
  background-color: #f1f5f9;
  color: #0f172a;
}

[data-theme="light"] .role-btn.active {
  background-color: rgba(2, 132, 199, 0.08);
  border-color: #0284c7;
  color: #0284c7;
}

[data-theme="light"] ::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.15);
}

[data-theme="light"] ::-webkit-scrollbar-thumb:hover {
  background: rgba(2, 132, 199, 0.5);
}


