/* 9Drive - Modern Vue/Bootstrap Theme & Dark Mode Styles */

:root {
  --bg-main: #f8fafc;
  --bg-surface: #ffffff;
  --bg-sidebar: #ffffff;
  --bg-input: #f1f5f9;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --border-color: #e2e8f0;
  --border-light: #f1f5f9;
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-light: #eff6ff;
  --card-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.05), 0 2px 4px -2px rgb(0 0 0 / 0.05);
  --modal-bg: rgba(15, 23, 42, 0.6);
}

[data-theme="dark"] {
  --bg-main: #090d16;
  --bg-surface: #111827;
  --bg-sidebar: #0f172a;
  --bg-input: #1e293b;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --border-color: #1e293b;
  --border-light: #1e293b;
  --primary: #3b82f6;
  --primary-hover: #2563eb;
  --primary-light: #1e293b;
  --card-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.3), 0 2px 4px -2px rgb(0 0 0 / 0.3);
  --modal-bg: rgba(0, 0, 0, 0.8);
}

* {
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: var(--bg-main);
  color: var(--text-main);
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* Utilities */
.bg-surface { background-color: var(--bg-surface); }
.bg-sidebar { background-color: var(--bg-sidebar); }
.border-theme { border-color: var(--border-color) !important; }
.text-main { color: var(--text-main); }
.text-muted { color: var(--text-muted); }

/* Navigation links */
.nav-btn {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 1rem;
  border-radius: 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  transition: all 0.15s ease-in-out;
  cursor: pointer;
  border: 1px solid transparent;
}
.nav-btn:hover {
  background-color: var(--primary-light);
  color: var(--primary);
}
.nav-btn.active {
  background-color: var(--primary);
  color: #ffffff;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

/* Storage Bar */
.storage-progress {
  height: 8px;
  border-radius: 9999px;
  background-color: var(--border-color);
  overflow: hidden;
}
.storage-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #3b82f6, #6366f1);
  border-radius: 9999px;
  transition: width 0.3s ease;
}

/* Folder Card */
.folder-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 1rem;
  padding: 1rem;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  user-select: none;
}
.folder-card:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
  box-shadow: var(--card-shadow);
}

/* File Card */
.file-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 1rem;
  padding: 1rem;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  position: relative;
}
.file-card:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
  box-shadow: var(--card-shadow);
}
.file-card.selected {
  border-color: var(--primary);
  background-color: var(--primary-light);
}

/* Table styles */
.drive-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}
.drive-table th {
  padding: 0.75rem 1rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-color);
}
.drive-table td {
  padding: 0.85rem 1rem;
  font-size: 0.875rem;
  border-bottom: 1px solid var(--border-color);
  transition: background-color 0.15s ease;
}
.drive-table tr:hover td {
  background-color: var(--primary-light);
}

/* Floating Upload Panel */
.upload-floating-panel {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  width: 380px;
  max-width: calc(100vw - 3rem);
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 1rem;
  box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  z-index: 1050;
  overflow: hidden;
}

/* Modal Backdrop */
.modal-overlay {
  position: fixed;
  inset: 0;
  background-color: var(--modal-bg);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1060;
  padding: 1rem;
}
.modal-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 1.25rem;
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.25);
  animation: modalFadeIn 0.2s ease-out;
}
@keyframes modalFadeIn {
  from { opacity: 0; transform: scale(0.95) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

/* Badges */
.badge-pill {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.65rem;
  border-radius: 9999px;
}
.badge-blue { background: #dbeafe; color: #1e40af; }
.badge-green { background: #dcfce7; color: #166534; }
.badge-amber { background: #fef3c7; color: #92400e; }
.badge-red { background: #fee2e2; color: #991b1b; }

[data-theme="dark"] .badge-blue { background: rgba(59, 130, 246, 0.2); color: #93c5fd; }
[data-theme="dark"] .badge-green { background: rgba(34, 197, 94, 0.2); color: #86efac; }
[data-theme="dark"] .badge-amber { background: rgba(245, 158, 11, 0.2); color: #fde68a; }
[data-theme="dark"] .badge-red { background: rgba(239, 68, 68, 0.2); color: #fca5a5; }

/* Drag & drop highlight */
.drag-overlay {
  position: absolute;
  inset: 0;
  background: rgba(37, 99, 235, 0.1);
  border: 2px dashed #2563eb;
  border-radius: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 40;
  pointer-events: none;
}
