:root {
  /* Light / Clean Studio Palette (Default) */
  --bg-app: #f8fafc;
  --bg-surface: #ffffff;
  --bg-surface-hover: #f1f5f9;
  --bg-subtle: #f8fafc;
  --bg-glass: rgba(255, 255, 255, 0.85);
  
  --border-color: #e2e8f0;
  --border-subtle: #f1f5f9;
  --border-focus: #6366f1;
  
  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-dim: #94a3b8;
  
  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --primary-light: #eef2ff;
  --primary-glow: rgba(79, 70, 229, 0.12);
  
  --accent-cyan: #0284c7;
  --accent-emerald: #059669;
  --accent-amber: #d97706;
  --accent-rose: #e11d48;
  
  /* Status Badges - Light */
  --st-rec-bg: #eff6ff;
  --st-rec-text: #2563eb;
  --st-rec-border: #dbeafe;
  
  --st-ana-bg: #fffbeb;
  --st-ana-text: #d97706;
  --st-ana-border: #fef3c7;
  
  --st-prep-bg: #faf5ff;
  --st-prep-text: #7c3aed;
  --st-prep-border: #f3e8ff;
  
  --st-grav-bg: #fdf2f8;
  --st-grav-text: #db2777;
  --st-grav-border: #fce7f3;
  
  --st-adj-bg: #fff1f2;
  --st-adj-text: #e11d48;
  --st-adj-border: #ffe4e6;
  
  --st-pau-bg: #fefce8;
  --st-pau-text: #ca8a04;
  --st-pau-border: #fef08a;

  --st-fin-bg: #ecfdf5;
  --st-fin-text: #059669;
  --st-fin-border: #d1fae5;

  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
  --shadow-card-hover: 0 8px 20px -4px rgba(0, 0, 0, 0.08);
  
  --transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
  --bg-app: #0f172a;
  --bg-surface: #1e293b;
  --bg-surface-hover: #273549;
  --bg-subtle: #162032;
  --bg-glass: rgba(30, 41, 59, 0.85);
  
  --border-color: #334155;
  --border-subtle: #1e293b;
  --border-focus: #818cf8;
  
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  
  --primary: #6366f1;
  --primary-hover: #4f46e5;
  --primary-light: rgba(99, 102, 241, 0.15);
  --primary-glow: rgba(99, 102, 241, 0.2);
  
  --accent-cyan: #38bdf8;
  --accent-emerald: #34d399;
  --accent-amber: #fbbf24;
  --accent-rose: #f43f5e;
  
  /* Status Badges - Dark */
  --st-rec-bg: rgba(37, 99, 235, 0.18);
  --st-rec-text: #93c5fd;
  --st-rec-border: rgba(59, 130, 246, 0.3);
  
  --st-ana-bg: rgba(217, 119, 6, 0.18);
  --st-ana-text: #fcd34d;
  --st-ana-border: rgba(245, 158, 11, 0.3);
  
  --st-prep-bg: rgba(124, 58, 237, 0.18);
  --st-prep-text: #d8b4fe;
  --st-prep-border: rgba(168, 85, 247, 0.3);
  
  --st-grav-bg: rgba(219, 39, 119, 0.18);
  --st-grav-text: #f9a8d4;
  --st-grav-border: rgba(236, 72, 153, 0.3);
  
  --st-adj-bg: rgba(225, 29, 72, 0.22);
  --st-adj-text: #fda4af;
  --st-adj-border: rgba(244, 63, 94, 0.35);
  
  --st-pau-bg: rgba(202, 138, 4, 0.2);
  --st-pau-text: #fde047;
  --st-pau-border: rgba(234, 179, 8, 0.35);
  
  --st-fin-bg: rgba(5, 150, 105, 0.18);
  --st-fin-text: #6ee7b7;
  --st-fin-border: rgba(16, 185, 129, 0.3);
  
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 10px 20px rgba(0, 0, 0, 0.5);
  --shadow-card-hover: 0 10px 25px rgba(0, 0, 0, 0.45);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

body {
  background-color: var(--bg-app);
  color: var(--text-main);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  transition: background-color 0.2s ease, color 0.2s ease;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-app);
}
::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-dim);
}

/* Layout */
.app-container {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  width: 250px;
  background: var(--bg-surface);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  padding: 20px 14px;
  flex-shrink: 0;
  transition: var(--transition);
  z-index: 40;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 6px 18px 6px;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 16px;
}
.brand-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  border: 1px solid var(--border-color);
}
.brand-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.2px;
}
.brand-subtitle {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-weight: 600;
}

.nav-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  list-style: none;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}
.nav-item:hover {
  background: var(--bg-surface-hover);
  color: var(--text-main);
}
.nav-item.active {
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 600;
}
.nav-item svg {
  width: 16px;
  height: 16px;
}

.sidebar-spacer {
  flex: 1;
}

/* Theme Toggle Button in Sidebar */
.theme-toggle-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  margin-bottom: 12px;
  transition: var(--transition);
}
.theme-toggle-btn:hover {
  color: var(--text-main);
  background: var(--bg-surface-hover);
}

/* Retention Info Card in Sidebar */
.retention-info-card {
  background: var(--st-ana-bg);
  border: 1px solid var(--st-ana-border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  margin-bottom: 10px;
}
.retention-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--st-ana-text);
  margin-bottom: 4px;
}
.retention-badge {
  font-size: 0.65rem;
  padding: 1px 5px;
  border-radius: 4px;
  background: var(--st-ana-text);
  color: #fff;
  font-weight: 700;
}
.retention-text {
  font-size: 0.7rem;
  line-height: 1.35;
  color: var(--text-muted);
}
.retention-text strong {
  color: var(--text-main);
}

/* Storage Widget */
.storage-card {
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 12px;
  margin-bottom: 12px;
}
.storage-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.storage-progress-bg {
  width: 100%;
  height: 5px;
  background: var(--border-color);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 6px;
}
.storage-progress-fill {
  height: 100%;
  width: 0%;
  border-radius: 3px;
  background: var(--primary);
  transition: width 0.4s ease;
}
.storage-progress-fill.warning {
  background: var(--accent-rose);
}
.storage-details {
  font-size: 0.72rem;
  color: var(--text-dim);
  display: flex;
  justify-content: space-between;
}

/* User Card */
.user-profile-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
}
.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.82rem;
  border: 1px solid var(--border-color);
}
.user-info {
  flex: 1;
  overflow: hidden;
}
.user-name {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}
.user-role-badge {
  display: inline-block;
  font-size: 0.65rem;
  padding: 1px 5px;
  border-radius: 3px;
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 600;
  text-transform: uppercase;
}
.user-role-badge.admin {
  background: var(--st-ana-bg);
  color: var(--st-ana-text);
}
.btn-logout {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  cursor: pointer;
  padding: 5px 9px;
  border-radius: var(--radius-xs);
  font-size: 0.76rem;
  font-weight: 600;
  flex-shrink: 0;
  white-space: nowrap;
  transition: var(--transition);
}
.btn-logout:hover {
  color: var(--accent-rose);
  background: var(--st-adj-bg);
  border-color: var(--st-adj-border);
}
.btn-profile-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  cursor: pointer;
  border-radius: var(--radius-xs);
  flex-shrink: 0;
  transition: var(--transition);
}
.btn-profile-action:hover {
  color: var(--primary);
  background: var(--primary-light);
  border-color: var(--primary);
}

/* Main Content Area */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow-y: auto;
  max-height: 100vh;
}

/* Top Bar */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 28px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 30;
}
.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  width: 260px;
  transition: var(--transition);
}
.search-box:focus-within {
  border-color: var(--primary);
  background: var(--bg-surface);
  box-shadow: 0 0 0 2px var(--primary-glow);
}
.search-box input {
  background: none;
  border: none;
  outline: none;
  color: var(--text-main);
  font-size: 0.85rem;
  width: 100%;
}
.search-box input::placeholder {
  color: var(--text-dim);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: var(--transition);
  text-decoration: none;
}
.btn svg {
  width: 15px;
  height: 15px;
}
.btn-primary {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
}
.btn-secondary {
  background: var(--bg-surface);
  color: var(--text-main);
  border-color: var(--border-color);
}
.btn-secondary:hover {
  background: var(--bg-surface-hover);
  border-color: var(--text-dim);
}
.btn-danger {
  background: var(--st-adj-bg);
  color: var(--accent-rose);
  border-color: var(--st-adj-border);
}
.btn-danger:hover {
  background: var(--accent-rose);
  color: #fff;
}
.btn-icon {
  padding: 6px 9px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  color: var(--text-muted);
  border: 1px solid var(--border-color);
  cursor: pointer;
}
.btn-icon:hover {
  color: var(--text-main);
  background: var(--bg-surface-hover);
  border-color: var(--text-dim);
}

/* View Container */
.view-container {
  padding: 24px 28px;
  flex: 1;
}

/* Breadcrumbs & Toolbar */
.toolbar-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 12px;
}
.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.2px;
}
.breadcrumb-item {
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Status Filter Tabs / Chips Bar */
.status-filters-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 16px;
  overflow-x: auto;
  padding-bottom: 2px;
}
.status-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition);
}
.status-filter-chip:hover {
  background: var(--bg-surface-hover);
  color: var(--text-main);
}
.status-filter-chip.active {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}
.status-filter-chip .chip-count {
  font-size: 0.7rem;
  padding: 1px 6px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.08);
}
.status-filter-chip.active .chip-count {
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

/* Minimalist Slim Dropzone */
.dropzone {
  border: 1.5px dashed var(--border-color);
  background: var(--bg-surface);
  border-radius: var(--radius-md);
  padding: 14px 20px;
  text-align: center;
  margin-bottom: 20px;
  transition: var(--transition);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}
.dropzone:hover {
  border-color: var(--primary);
  background: var(--primary-light);
}
.dropzone.dragover {
  border-color: var(--primary);
  background: var(--primary-light);
  transform: scale(1.005);
}
.dropzone-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}
.dropzone-title {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text-main);
}
.dropzone-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Live Upload Queue */
.upload-queue {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  margin-bottom: 20px;
  display: none;
}
.upload-queue.active {
  display: block;
  animation: fadeIn 0.2s ease;
}
.upload-queue-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 8px;
}
.upload-item-progress-bar {
  height: 100%;
  background: var(--primary);
  width: 0%;
  border-radius: 3px;
  transition: width 0.15s ease;
}

/* File Grid - Modern Minimalist */
.files-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 16px;
}

.file-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
  transition: var(--transition);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}
.file-card:hover {
  transform: translateY(-2px);
  border-color: #cbd5e1;
  box-shadow: var(--shadow-card-hover);
}
[data-theme="dark"] .file-card:hover {
  border-color: #475569;
}

.file-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.file-card-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  flex-shrink: 0;
}
.file-card-icon.pdf { background: #fee2e2; color: #dc2626; border-color: #fecaca; }
.file-card-icon.image { background: #e0f2fe; color: #0284c7; border-color: #bae6fd; }
.file-card-icon.archive { background: #f3e8ff; color: #7c3aed; border-color: #e9d5ff; }
.file-card-icon.doc { background: #f1f5f9; color: #475569; border-color: #e2e8f0; }

.file-card-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-main);
  word-break: break-word;
  line-height: 1.35;
  margin-top: 2px;
}

/* Status Pill Badges - Minimalist Clean */
.badge-status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
}
.badge-status.recebido { background: var(--st-rec-bg); color: var(--st-rec-text); border: 1px solid var(--st-rec-border); }
.badge-status.analise { background: var(--st-ana-bg); color: var(--st-ana-text); border: 1px solid var(--st-ana-border); }
.badge-status.preparando { background: var(--st-prep-bg); color: var(--st-prep-text); border: 1px solid var(--st-prep-border); }
.badge-status.gravando { background: var(--st-grav-bg); color: var(--st-grav-text); border: 1px solid var(--st-grav-border); }
.badge-status.ajuste { background: var(--st-adj-bg); color: var(--st-adj-text); border: 1px solid var(--st-adj-border); }
.badge-status.pausado { background: var(--st-pau-bg); color: var(--st-pau-text); border: 1px solid var(--st-pau-border); }
.badge-status.finalizado { background: var(--st-fin-bg); color: var(--st-fin-text); border: 1px solid var(--st-fin-border); }

/* Note / Callout Boxes */
.card-note {
  font-size: 0.76rem;
  padding: 6px 10px;
  border-radius: var(--radius-xs);
  line-height: 1.35;
  word-break: break-word;
}
.card-note.description {
  background: var(--bg-subtle);
  color: var(--text-muted);
  border-left: 2px solid var(--accent-cyan);
}
.card-note.adjustment {
  background: var(--st-adj-bg);
  color: var(--st-adj-text);
  border: 1px solid var(--st-adj-border);
  border-left: 3px solid var(--accent-rose);
  font-weight: 500;
}

/* Card Metadata Compact Chips */
.card-meta-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 0.73rem;
  color: var(--text-muted);
  padding: 6px 0;
  border-top: 1px solid var(--border-color);
}
.meta-chip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}
.meta-chip strong {
  color: var(--text-main);
  font-weight: 600;
}

/* Card Actions Bottom Row */
.card-actions-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding-top: 8px;
  border-top: 1px solid var(--border-color);
  margin-top: auto;
}
.card-actions-row .btn {
  font-size: 0.76rem;
  padding: 5px 9px;
}

.file-menu-btn {
  background: none;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  padding: 4px;
  border-radius: var(--radius-xs);
  transition: var(--transition);
  font-size: 15px;
}
.file-menu-btn:hover {
  color: var(--text-main);
  background: var(--bg-surface-hover);
}

/* File List View (Table) */
.files-table-container {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow-x: auto;
  box-shadow: var(--shadow-sm);
}
.files-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.85rem;
}
.files-table th {
  padding: 10px 14px;
  background: var(--bg-subtle);
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border-color);
}
.files-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-main);
  vertical-align: middle;
}
.files-table tr:hover td {
  background: var(--bg-surface-hover);
}
.table-file-name {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 500;
  cursor: pointer;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-muted);
}
.empty-state-icon {
  font-size: 36px;
  margin-bottom: 10px;
  opacity: 0.7;
}

/* Form Controls */
.form-group {
  margin-bottom: 14px;
}
.form-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 5px;
}
.form-control {
  width: 100%;
  padding: 7px 11px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background: var(--bg-surface);
  color: var(--text-main);
  font-size: 0.85rem;
  outline: none;
  transition: var(--transition);
}
.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--primary-glow);
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 100;
  pointer-events: none;
}
.toast {
  pointer-events: auto;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-lg);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.84rem;
  min-width: 260px;
  max-width: 380px;
  animation: slideInRight 0.25s ease;
}
.toast.success { border-left: 3px solid var(--accent-emerald); }
.toast.error { border-left: 3px solid var(--accent-rose); }
.toast.info { border-left: 3px solid var(--accent-cyan); }
.toast.warning { border-left: 3px solid var(--accent-amber); }

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 90;
  padding: 20px;
  animation: fadeIn 0.15s ease;
}
.modal-dialog {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  animation: scaleUp 0.15s ease;
}
.modal-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-main);
}
.modal-close {
  background: none;
  border: none;
  font-size: 18px;
  color: var(--text-dim);
  cursor: pointer;
  padding: 4px;
}
.modal-close:hover {
  color: var(--text-main);
}
.modal-body {
  padding: 20px;
}
.modal-footer {
  padding: 12px 20px;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  background: var(--bg-subtle);
  border-bottom-left-radius: var(--radius-md);
  border-bottom-right-radius: var(--radius-md);
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes scaleUp {
  from { transform: scale(0.96); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
@keyframes slideInRight {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}
@keyframes fadeOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

/* Auth Page */
.auth-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 20px;
  background: var(--bg-app);
}
.auth-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  width: 100%;
  max-width: 400px;
  box-shadow: var(--shadow-lg);
}
.auth-header {
  text-align: center;
  margin-bottom: 24px;
}
.auth-logo {
  font-size: 36px;
  margin-bottom: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  background: var(--primary-light);
  border-radius: 50%;
  border: 1px solid var(--border-color);
}

@media (max-width: 768px) {
  .app-container { flex-direction: column; }
  .sidebar { width: 100%; border-right: none; border-bottom: 1px solid var(--border-color); }
  .files-grid { grid-template-columns: 1fr; }
  .search-box { width: 100%; }
}
