/* TeleDrive Modern Design System */
:root {
  --bg-base: #0b0f17;
  --bg-surface: #111827;
  --bg-surface-hover: #1f2937;
  --bg-elevated: #1e293b;
  --bg-elevated-hover: #334155;
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-focus: #6366f1;
  --text-primary: #f9fafb;
  --text-secondary: #9ca3af;
  --text-muted: #6b7280;
  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --primary-light: rgba(79, 70, 229, 0.15);
  --accent: #38bdf8;
  --danger: #ef4444;
  --danger-hover: #dc2626;
  --danger-light: rgba(239, 68, 68, 0.15);
  --success: #10b981;
  --success-light: rgba(16, 185, 129, 0.15);
  --warning: #f59e0b;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -2px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -4px rgba(0, 0, 0, 0.5);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.6), 0 8px 10px -6px rgba(0, 0, 0, 0.6);
  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  --transition-fast: 0.15s ease;
  --transition-normal: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="light"] {
  --bg-base: #f8fafc;
  --bg-surface: #ffffff;
  --bg-surface-hover: #f1f5f9;
  --bg-elevated: #f1f5f9;
  --bg-elevated-hover: #e2e8f0;
  --border-subtle: #e2e8f0;
  --border-focus: #4f46e5;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --primary-light: rgba(79, 70, 229, 0.08);
  --accent: #0284c7;
  --danger: #ef4444;
  --danger-hover: #dc2626;
  --danger-light: rgba(239, 68, 68, 0.08);
  --success: #10b981;
  --success-light: rgba(16, 185, 129, 0.08);
  --warning: #d97706;
  --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.07);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.12), 0 8px 10px -6px rgba(0, 0, 0, 0.12);
}

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

body {
  background-color: var(--bg-base);
  color: var(--text-primary);
  font-family: var(--font-family);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Common Icon Utilities */
.icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.25rem;
  height: 1.25rem;
  stroke-width: 2;
  stroke: currentColor;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: middle;
  flex-shrink: 0;
}
.icon-sm { width: 1rem; height: 1rem; }
.icon-lg { width: 1.5rem; height: 1.5rem; }
.icon-xl { width: 2.25rem; height: 2.25rem; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 16px;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
  white-space: nowrap;
}
.btn:focus-visible {
  outline: 2px solid var(--border-focus);
  outline-offset: 2px;
}
.btn-primary {
  background: var(--primary);
  color: #ffffff;
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover {
  background: var(--primary-hover);
}
.btn-secondary {
  background: var(--bg-surface);
  color: var(--text-primary);
  border-color: var(--border-subtle);
}
.btn-secondary:hover {
  background: var(--bg-surface-hover);
  border-color: var(--text-muted);
}
.btn-danger {
  background: var(--danger);
  color: #ffffff;
}
.btn-danger:hover {
  background: var(--danger-hover);
}
.btn-icon {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  padding: 6px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}
.btn-icon:hover {
  background: var(--bg-surface-hover);
  color: var(--text-primary);
}

/* Header */
.header {
  height: 64px;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  position: sticky;
  top: 0;
  z-index: 40;
}
.header-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 700;
  font-size: 1.15rem;
}
.brand-badge {
  background: linear-gradient(135deg, var(--primary), #818cf8);
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.4);
}
.header-search {
  flex: 1;
  max-width: 520px;
  margin: 0 24px;
  position: relative;
}
.search-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}
.search-icon-left {
  position: absolute;
  left: 12px;
  color: var(--text-muted);
  pointer-events: none;
}
.search-input {
  width: 100%;
  padding: 9px 36px 9px 38px;
  background: var(--bg-base);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.875rem;
  outline: none;
  transition: all var(--transition-fast);
}
.search-input:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--primary-light);
}
.search-clear-btn {
  position: absolute;
  right: 10px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  display: none;
}
.search-clear-btn:hover {
  color: var(--text-primary);
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Layout */
.main-wrapper {
  display: flex;
  flex: 1;
  overflow: hidden;
  height: calc(100vh - 64px);
}
.sidebar {
  width: 260px;
  background: var(--bg-surface);
  border-right: 1px solid var(--border-subtle);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  flex-shrink: 0;
  overflow-y: auto;
  transition: transform var(--transition-normal);
}
.sidebar-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 8px;
}
.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all var(--transition-fast);
  cursor: pointer;
}
.nav-link:hover {
  background: var(--bg-surface-hover);
  color: var(--text-primary);
}
.nav-link.active {
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 600;
}
.sidebar-status-widget {
  margin-top: auto;
  background: var(--bg-base);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px;
  font-size: 0.8rem;
}
.status-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
}
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--success);
  box-shadow: 0 0 0 2px var(--success-light);
  display: inline-block;
  animation: pulse-dot 2s infinite;
}
@keyframes pulse-dot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.2); opacity: 0.7; }
}

/* Content Area */
.content-area {
  flex: 1;
  padding: 24px 32px;
  overflow-y: auto;
  background: var(--bg-base);
}
.content-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  gap: 16px;
  flex-wrap: wrap;
}
.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  color: var(--text-secondary);
  flex-wrap: wrap;
}
.breadcrumb-item {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: var(--radius-sm);
  padding: 4px 6px;
  transition: background var(--transition-fast);
}
.breadcrumb-item:hover {
  background: var(--bg-surface-hover);
  color: var(--text-primary);
}
.breadcrumb-item.active {
  color: var(--text-primary);
  font-weight: 600;
  cursor: default;
}
.breadcrumb-separator {
  color: var(--text-muted);
}
.toolbar-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}
.view-switcher {
  display: flex;
  align-items: center;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 2px;
}
.view-btn {
  background: transparent;
  border: none;
  padding: 6px 10px;
  border-radius: 4px;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  transition: all var(--transition-fast);
}
.view-btn.active {
  background: var(--bg-elevated);
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
}

/* Dropzone */
.dropzone {
  border: 2px dashed var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
  text-align: center;
  color: var(--text-secondary);
  margin-bottom: 24px;
  transition: all var(--transition-fast);
  background: var(--bg-surface);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
}
.dropzone.dragover {
  border-color: var(--primary);
  background: var(--primary-light);
  color: var(--primary);
}

/* Section titles */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 20px 0 12px;
}
.section-title {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

/* Search status banner */
.search-banner {
  background: var(--primary-light);
  border: 1px solid var(--border-focus);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  font-size: 0.875rem;
  color: var(--text-primary);
}

/* Grid Layout */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  cursor: pointer;
  transition: all var(--transition-fast);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
}
.card:hover {
  border-color: var(--border-focus);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 12px;
}
.card-icon-wrap {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-base);
  color: var(--primary);
}
.card-icon-wrap.folder { color: #f59e0b; }
.card-icon-wrap.video { color: #8b5cf6; }
.card-icon-wrap.audio { color: #ec4899; }
.card-icon-wrap.image { color: #10b981; }
.card-icon-wrap.pdf { color: #ef4444; }
.card-icon-wrap.code { color: #06b6d4; }
.card-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 4px;
}
.card-meta {
  font-size: 0.775rem;
  color: var(--text-muted);
}
.card-actions {
  display: flex;
  gap: 4px;
}

/* Table / List View */
.table-container {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow-x: auto;
  margin-bottom: 28px;
  box-shadow: var(--shadow-sm);
}
.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.875rem;
}
.data-table th {
  padding: 12px 16px;
  background: var(--bg-elevated);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.8rem;
  border-bottom: 1px solid var(--border-subtle);
  user-select: none;
}
.data-table th.sortable {
  cursor: pointer;
}
.data-table th.sortable:hover {
  color: var(--text-primary);
}
.data-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-primary);
}
.data-table tr:last-child td {
  border-bottom: none;
}
.data-table tbody tr {
  cursor: pointer;
  transition: background var(--transition-fast);
}
.data-table tbody tr:hover {
  background: var(--bg-surface-hover);
}
.table-name-cell {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 500;
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 48px 16px;
  color: var(--text-secondary);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.empty-icon {
  width: 56px;
  height: 56px;
  color: var(--text-muted);
  stroke-width: 1.5;
}

/* Floating Upload Manager */
.upload-drawer {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 380px;
  max-width: calc(100vw - 48px);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  z-index: 90;
  overflow: hidden;
  transition: all var(--transition-normal);
}
.upload-drawer-header {
  padding: 12px 16px;
  background: var(--bg-elevated);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
  cursor: pointer;
}
.upload-drawer-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
}
.upload-drawer-body {
  max-height: 260px;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.upload-item {
  background: var(--bg-base);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.upload-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
}
.upload-item-name {
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 220px;
}
.upload-item-status {
  color: var(--text-secondary);
  font-size: 0.75rem;
}
.progress-bar-wrap {
  width: 100%;
  height: 6px;
  background: var(--bg-elevated);
  border-radius: 999px;
  overflow: hidden;
}
.progress-bar-fill {
  height: 100%;
  background: var(--primary);
  width: 0%;
  transition: width 0.2s ease;
}
.progress-bar-fill.success {
  background: var(--success);
}
.progress-bar-fill.error {
  background: var(--danger);
}
.upload-drawer.minimized .upload-drawer-body {
  display: none;
}

/* Modals */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 20px;
  animation: fadeIn 0.15s ease;
}
.modal-dialog {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 480px;
  padding: 24px;
  box-shadow: var(--shadow-xl);
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}
.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 8px;
}
.modal-preview {
  max-width: 860px;
  width: 90%;
  max-height: 90vh;
}
.preview-container {
  min-height: 240px;
  max-height: 65vh;
  overflow-y: auto;
  background: var(--bg-base);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.code-preview {
  font-family: var(--font-mono);
  font-size: 0.825rem;
  white-space: pre-wrap;
  word-break: break-all;
  color: var(--text-primary);
  width: 100%;
  height: 100%;
}

/* Form inputs */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.form-label {
  font-size: 0.825rem;
  font-weight: 500;
  color: var(--text-secondary);
}
.form-input {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-base);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.875rem;
  outline: none;
  transition: all var(--transition-fast);
}
.form-input:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--primary-light);
}

/* Toasts */
.toast-container {
  position: fixed;
  top: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 120;
  pointer-events: none;
}
.toast {
  pointer-events: auto;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 280px;
  max-width: 400px;
  animation: slideInRight 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.toast.success { border-left: 4px solid var(--success); }
.toast.error { border-left: 4px solid var(--danger); }
.toast.info { border-left: 4px solid var(--accent); }
.toast-content {
  flex: 1;
  font-size: 0.875rem;
  color: var(--text-primary);
}

/* Dropdown Menu (Meatball / 3-dot) */
.dropdown-menu {
  position: absolute;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 6px;
  min-width: 160px;
  z-index: 60;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.dropdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.825rem;
  color: var(--text-primary);
  background: transparent;
  border: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
  transition: background var(--transition-fast);
}
.dropdown-item:hover {
  background: var(--bg-surface-hover);
}
.dropdown-item.danger {
  color: var(--danger);
}
.dropdown-item.danger:hover {
  background: var(--danger-light);
}

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

/* Mobile Responsiveness */
.mobile-menu-btn {
  display: none;
}
@media (max-width: 768px) {
  .mobile-menu-btn {
    display: inline-flex;
  }
  .sidebar {
    position: fixed;
    top: 64px;
    bottom: 0;
    left: 0;
    z-index: 50;
    transform: translateX(-100%);
    box-shadow: var(--shadow-xl);
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 64px 0 0 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 45;
  }
  .sidebar-backdrop.open {
    display: block;
  }
  .header-search {
    margin: 0 12px;
  }
  .content-area {
    padding: 16px;
  }
}

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

/* Multi-Select & Selection UI */
.item-checkbox {
  position: absolute;
  top: 10px;
  left: 10px;
  width: 18px;
  height: 18px;
  border-radius: 4px;
  border: 1.5px solid var(--border-subtle);
  background: var(--bg-surface);
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
  opacity: 0;
}
.card:hover .item-checkbox,
.card.selected .item-checkbox,
tr:hover .item-checkbox,
tr.selected .item-checkbox {
  opacity: 1;
}
.item-checkbox.checked {
  background: var(--primary);
  border-color: var(--primary);
  opacity: 1;
}
.item-checkbox.checked::after {
  content: "";
  display: block;
  width: 5px;
  height: 9px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
  margin-bottom: 2px;
}
.card.selected {
  border-color: var(--primary);
  background: rgba(79, 70, 229, 0.08);
}
tr.selected td {
  background: rgba(79, 70, 229, 0.08);
}

/* Drag & Drop UI */
.card[draggable="true"], tr[draggable="true"] {
  cursor: grab;
}
.card.dragging, tr.dragging {
  opacity: 0.45;
  cursor: grabbing;
}
.drop-hover {
  outline: 2px dashed var(--primary) !important;
  background: rgba(79, 70, 229, 0.15) !important;
  border-radius: var(--radius-md);
}

/* Floating Bulk Action Bar */
.bulk-action-bar {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.5);
  border-radius: 999px;
  padding: 8px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  z-index: 1000;
  backdrop-filter: blur(12px);
  animation: slideUp 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
@keyframes slideUp {
  from { transform: translate(-50%, 20px); opacity: 0; }
  to { transform: translate(-50%, 0); opacity: 1; }
}
.bulk-action-info {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
}
.bulk-action-buttons {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Folder Move Tree */
.tree-folder-node {
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-primary);
  font-size: 0.875rem;
  transition: var(--transition-fast);
}
.tree-folder-node:hover {
  background: var(--bg-surface-hover);
}
.tree-folder-node.selected {
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 600;
}

/* Changelog Viewer Component */
.changelog-container {
  flex: 1;
  overflow-y: auto;
  padding: 18px 20px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--text-secondary);
  max-height: 62vh;
  display: block;
}

.changelog-timeline {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.changelog-card {
  background: var(--bg-base);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color var(--transition-fast);
}

.changelog-card.is-current {
  border-color: var(--primary);
  box-shadow: 0 0 0 1px var(--primary-light);
}

.changelog-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 10px;
  gap: 12px;
  flex-wrap: wrap;
}

.changelog-ver-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
}

.changelog-ver-badge {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  background: var(--bg-surface-hover);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
}

.changelog-card.is-current .changelog-ver-badge {
  color: var(--primary);
  border-color: var(--primary);
  background: var(--primary-light);
}

.changelog-status-badge {
  font-size: 0.725rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: var(--success-light);
  color: var(--success);
  padding: 2px 6px;
  border-radius: 4px;
}

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

.changelog-card-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.changelog-section {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.changelog-section-header {
  margin-top: 2px;
}

.changelog-cat-badge {
  display: inline-block;
  font-size: 0.725rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 2px 8px;
  border-radius: 4px;
}

.changelog-cat-badge.badge-added {
  background: var(--success-light);
  color: var(--success);
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.changelog-cat-badge.badge-changed {
  background: rgba(56, 189, 248, 0.12);
  color: var(--accent);
  border: 1px solid rgba(56, 189, 248, 0.25);
}

.changelog-cat-badge.badge-fixed {
  background: rgba(245, 158, 11, 0.12);
  color: var(--warning);
  border: 1px solid rgba(245, 158, 11, 0.25);
}

.changelog-cat-badge.badge-removed {
  background: var(--danger-light);
  color: var(--danger);
  border: 1px solid rgba(239, 68, 68, 0.25);
}

.changelog-cat-badge.badge-security {
  background: rgba(168, 85, 247, 0.12);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.25);
}

.changelog-items {
  margin: 0;
  padding-left: 20px;
  list-style-type: disc;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.changelog-item {
  color: var(--text-primary);
  font-size: 0.85rem;
  line-height: 1.5;
}

.changelog-subitems {
  margin: 4px 0 2px 0;
  padding-left: 18px;
  list-style-type: circle;
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: var(--text-secondary);
  font-size: 0.825rem;
}

.changelog-text {
  margin: 4px 0;
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.changelog-link {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.changelog-raw {
  white-space: pre-wrap;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-primary);
}


