:root {
  --font-family: 'Outfit', sans-serif;
  --bg: #F8FAFC;
  --bg-color: var(--bg);
  --card: #FFFFFF;
  --panel-bg: var(--card);
  --border-color: #E2E8F0;
  --text: #0F172A;
  --text-main: var(--text);
  --muted: #64748B;
  --text-muted: var(--muted);
  --primary: #10B981;
  --primary-color: var(--primary);
  --primary-light: #D1FAE5;
  --primary-hover: #059669;
  --danger-color: #EF4444;
  --folder-color: #f59e0b;
  --file-color: #F59E0B;
  --hover-bg: #F1F5F9;
  --accent-color: #F59E0B;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.03);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -2px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
}

/* ── Reset ── */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  transition: all 0.2s ease;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-color);
  color: var(--text-main);
  background-image:
    radial-gradient(circle at 15% 50%, rgba(16, 185, 129, 0.04), transparent 30%),
    radial-gradient(circle at 85% 30%, rgba(59, 130, 246, 0.03), transparent 30%);
  min-height: 100vh;
  overflow: hidden;
}

.glass-panel {
  background: var(--panel-bg);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  box-shadow: var(--shadow-md);
}

/* ── LAYOUT ── */
.app-container {
  display: flex;
  height: 100vh;
  width: 100%;
}

/* ── SIDEBAR ── */
.sidebar {
  width: 270px;
  background: #ffffff;
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  padding: 24px;
  z-index: 10;
  box-shadow: var(--shadow-sm);
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 36px;
}

.logo-icon {
  font-size: 32px;
  color: var(--primary-color);
}

.logo-text {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--text-main);
}

/* ── "+ New" Button Dropdown ── */
.new-btn-wrapper {
  position: relative;
  margin-bottom: 28px;
}

.new-btn {
  width: 100%;
  padding: 13px;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
  cursor: pointer;
}

.new-btn:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
}

.new-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  z-index: 200;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px);
}

.new-dropdown.active {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.new-dropdown-item {
  width: 100%;
  padding: 13px 16px;
  background: none;
  border: none;
  color: var(--text-main);
  font-family: inherit;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  text-align: left;
}

.new-dropdown-item:hover {
  background: var(--hover-bg);
}

.new-dropdown-item i {
  font-size: 18px;
}

.new-dropdown-item .ph-folder-plus {
  color: var(--primary-color);
}

.new-dropdown-item .ph-upload-simple {
  color: var(--file-color);
}

/* ── SIDEBAR NAV ── */
.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex-grow: 1;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  color: var(--text-muted);
  text-decoration: none;
  border-radius: 10px;
  font-weight: 500;
  position: relative;
  font-size: 14px;
}

.nav-item i {
  font-size: 20px;
}

.nav-item:hover {
  background: var(--hover-bg);
  color: var(--text-main);
}

.nav-item.active {
  background: var(--primary-light);
  color: var(--primary-color);
  font-weight: 600;
  border-left: 4px solid var(--primary-color);
}

.nav-item.active::before {
  display: none;
}

/* ── STORAGE ── */
.sidebar-bottom {
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid var(--border-color);
}

.storage-info p {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.progress-bar {
  height: 6px;
  background: #e2e8f0;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 8px;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary-color), #34d399);
  border-radius: 10px;
  transition: width 0.5s ease;
}

.storage-text {
  font-size: 12px;
  color: var(--text-muted);
  display: block;
  text-align: center;
  margin-top: 2px;
}

.hf-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 14px;
  padding: 9px 14px;
  background: var(--hover-bg);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}

.hf-emoji {
  font-size: 15px;
}

/* ── TOP HEADER ── */
.main-content {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.top-header {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  border-bottom: 1px solid var(--border-color);
  background: #ffffff;
}

/* ── SEARCH BAR ── */
.search-bar {
  display: flex;
  align-items: center;
  background: #f5f7fa;
  border: none;
  border-radius: 30px;
  padding: 12px 20px;
  width: 520px;
  transition: all 0.2s ease;
}

.search-bar:focus-within {
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.15);
}

.search-bar i {
  color: var(--text-muted);
  font-size: 18px;
  margin-right: 12px;
  flex-shrink: 0;
}

.search-bar input {
  background: none;
  border: none;
  color: var(--text-main);
  outline: none;
  width: 100%;
  font-family: inherit;
  font-size: 14px;
}

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

/* ── USER ACTIONS ── */
.user-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.icon-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 22px;
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.icon-btn:hover {
  background: var(--hover-bg);
  color: var(--text-main);
  transform: scale(1.05);
}

.icon-btn.active {
  color: var(--primary-color);
  background: var(--accent-color);
}

.avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-color), #2dd4bf);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  color: white;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

/* ── BREADCRUMBS ── */
.breadcrumbs {
  padding: 28px 40px 8px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 20px;
  font-weight: 700;
}

.breadcrumb-item {
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 18px;
}

.breadcrumb-item:hover {
  background: var(--hover-bg);
  color: var(--primary-color);
}

.breadcrumb-item.active {
  color: var(--text-main);
  pointer-events: none;
}

.breadcrumb-separator {
  color: var(--text-muted);
  font-size: 14px;
  opacity: 0.5;
}

/* ── CONTENT ── */
.content-area {
  flex-grow: 1;
  padding: 0 40px 40px;
  overflow-y: auto;
  position: relative;
}

.content-area.drag-over::after {
  content: '';
  position: fixed;
  inset: 0;
  border: 4px dashed var(--primary-color);
  pointer-events: none;
  background: rgba(16, 185, 129, 0.04);
  z-index: 500;
  border-radius: 12px;
}

/* ── SECTION HEADERS ── */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-top: 12px;
}

.section-header h2 {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.view-toggles {
  display: flex;
  gap: 4px;
  background: var(--hover-bg);
  padding: 4px;
  border-radius: 10px;
  border: 1px solid var(--border-color);
}

.view-toggles .icon-btn {
  border-radius: 7px;
  padding: 5px 9px;
  font-size: 18px;
  color: var(--text-muted);
}

.view-toggles .icon-btn.active {
  background: #ffffff;
  color: var(--primary-color);
  box-shadow: var(--shadow-sm);
}

.mt-8 {
  margin-top: 44px;
}

.grid-container,
.files-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}

.list-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ── FILE CARDS ── */
.file-card {
  background: #ffffff;
  border-radius: 16px;
  padding: 14px;
  border: 1px solid #e5e7eb;
  position: relative;
  transition: all 0.25s ease;
  cursor: pointer;
  overflow: hidden;
}

.file-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 14px 30px rgba(0,0,0,0.08);
}

.file-card.selected {
  border: 2px solid var(--primary-color);
  background: var(--primary-light);
}

.file-preview {
  height: 130px;
  border-radius: 12px;
  overflow: hidden;
  background: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}

.file-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.file-icon {
  font-size: 40px;
}

.file-info {
  margin-bottom: 8px;
}

.file-type {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 8px;
  background: rgba(16, 185, 129, 0.1);
  color: var(--primary-color);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.file-name {
  font-size: 14px;
  font-weight: 700;
  margin: 4px 0 6px 0;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

.file-meta {
  font-size: 11px;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.4;
}

.file-actions {
  position: absolute;
  top: 10px;
  right: 10px;
  opacity: 0;
  cursor: pointer;
  font-size: 18px;
  color: #64748b;
  transition: opacity 0.2s ease;
}

.file-card:hover .file-actions {
  opacity: 1;
}

.quick-actions {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.file-card:hover .quick-actions {
  opacity: 1;
}

.quick-btn {
  background: rgba(255, 255, 255, 0.9);
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #64748b;
  font-size: 14px;
  backdrop-filter: blur(8px);
  transition: all 0.2s ease;
}

.quick-btn:hover {
  background: #ffffff;
  color: #0f172a;
  transform: scale(1.1);
}

/* File Menu Dropdown */
.file-menu-dropdown {
  position: absolute;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  padding: 8px 0;
  min-width: 140px;
  z-index: 1000;
}

.menu-item {
  width: 100%;
  padding: 8px 16px;
  border: none;
  background: none;
  text-align: left;
  cursor: pointer;
  font-size: 14px;
  color: #374151;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: background-color 0.2s ease;
}

.menu-item:hover {
  background: #f3f4f6;
}

.menu-item.danger {
  color: #dc2626;
}

.menu-item.danger:hover {
  background: #fef2f2;
}

.menu-divider {
  height: 1px;
  background: #e5e7eb;
  margin: 4px 0;
}



.dropdown-item:hover {
  background: var(--hover-bg);
}

.dropdown-item.danger {
  color: var(--danger-color);
}

.dropdown-item.danger i {
  color: var(--danger-color);
}

.dropdown-item.danger:hover {
  background: #fee2e2;
}

/* ── EMPTY STATE ── */
.empty-state {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 0;
  color: var(--text-muted);
  text-align: center;
  background: #ffffff;
  border-radius: 16px;
  border: 2px dashed #d1fae5;
}

.empty-state i {
  font-size: 64px;
  margin-bottom: 20px;
  color: var(--primary-color);
  opacity: 0.6;
}

.empty-state h3 {
  font-size: 20px;
  color: var(--text-main);
  margin-bottom: 8px;
  font-weight: 700;
}

.empty-state p {
  font-size: 14px;
  margin-bottom: 24px;
  max-width: 320px;
  line-height: 1.6;
}

/* ── LOADING ── */
.loading-state {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 0;
  gap: 16px;
  color: var(--text-muted);
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #d1fae5;
  border-top-color: var(--primary-color);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.spinner-sm {
  width: 22px;
  height: 22px;
  border: 3px solid #d1fae5;
  border-top-color: var(--primary-color);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  flex-shrink: 0;
}

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

/* ── BUTTONS ── */
.btn-primary {
  background: var(--primary-color);
  color: #fff;
  border: none;
  padding: 11px 22px;
  border-radius: 10px;
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 14px;
}

.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
}

.btn-secondary {
  background: #ffffff;
  color: var(--text-main);
  border: 1.5px solid var(--border-color);
  padding: 11px 22px;
  border-radius: 10px;
  font-family: inherit;
  font-weight: 500;
  cursor: pointer;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-secondary:hover {
  background: var(--hover-bg);
  border-color: #9ca3af;
}

.btn-danger {
  background: #fee2e2;
  color: var(--danger-color);
  border: 1.5px solid #fecaca;
  padding: 11px 22px;
  border-radius: 10px;
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-danger:hover {
  background: #fecaca;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.2);
}

/* ── MODALS ── */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal {
  width: 100%;
  max-width: 440px;
  padding: 32px;
  position: relative;
  transform: translateY(16px) scale(0.96);
  background: #ffffff;
  border-radius: 18px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-color);
}

.modal-overlay.active .modal {
  transform: translateY(0) scale(1);
}

.close-modal {
  position: absolute;
  top: 14px;
  right: 14px;
  background: var(--hover-bg);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 18px;
  cursor: pointer;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.close-modal:hover {
  background: #fee2e2;
  border-color: #fecaca;
  color: var(--danger-color);
}

.modal h3 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 22px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-main);
}

.input-group {
  margin-bottom: 18px;
}

.input-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.input-group input {
  width: 100%;
  background: var(--hover-bg);
  border: 1.5px solid var(--border-color);
  padding: 12px 14px;
  border-radius: 10px;
  color: var(--text-main);
  font-family: inherit;
  font-size: 14px;
}

.input-group input:focus {
  outline: none;
  border-color: var(--primary-color);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.12);
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 8px;
}

.settings-help-box {
  background: #f1f5f9;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 14px;
  font-size: 13px;
  color: var(--text-main);
  line-height: 1.6;
}

.settings-help-box p {
  margin-bottom: 8px;
}

.settings-help-box p:last-child {
  margin-bottom: 0;
}

.settings-help-box code {
  background: #e2e8f0;
  padding: 2px 4px;
  border-radius: 4px;
  font-family: monospace;
}

.settings-help-box .small {
  color: var(--text-muted);
  font-size: 12px;
}

.btn-star {
  position: absolute;
  top: 14px;
  right: 50px;
  background: none;
  border: none;
  font-size: 20px;
  color: #d1d5db;
  cursor: pointer;
  z-index: 5;
}

.btn-star:hover {
  color: #f59e0b;
  transform: scale(1.1);
}

.btn-star.active {
  color: #f59e0b;
}

.list-container .btn-star {
  position: static;
  margin-right: 12px;
}

/* ── PREVIEW MODAL ── */
.preview-header {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  border-bottom: 1px solid var(--border-color);
  background: #ffffff;
}

.preview-title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  color: var(--text-main);
  font-size: 16px;
}

.preview-icon {
  font-size: 24px;
  color: var(--primary-color);
}

.preview-body {
  flex-grow: 1;
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: auto;
  position: relative;
}

.preview-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  box-shadow: var(--shadow-lg);
}

.preview-text {
  width: 100%;
  height: 100%;
  padding: 32px;
  margin: 0;
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 14px;
  line-height: 1.6;
  background: #ffffff;
  color: var(--text-main);
  white-space: pre-wrap;
  tab-size: 4;
}

/* ─── SETTINGS MODAL ── */
.settings-modal {
  max-width: 420px !important;
}

.settings-modal h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  font-size: 18px;
  font-weight: 700;
}

.settings-intro {
  background: var(--primary-light);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 20px;
  font-size: 13px;
  color: var(--text-main);
  line-height: 1.5;
}

.settings-intro a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 600;
}

.settings-intro a:hover {
  text-decoration: underline;
}

.settings-modal .input-label {
  display: flex;
  align-items: center;
  gap: 6px;
}

.token-input-wrap {
  position: relative;
}

.token-input-wrap input {
  padding-right: 46px;
}

.toggle-token-btn {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px;
  font-size: 18px;
}

.toggle-token-btn:hover {
  color: var(--text-main);
}

/* ── DELETE MODAL ── */
.delete-icon-wrap {
  text-align: center;
  font-size: 56px;
  color: var(--danger-color);
  margin-bottom: 20px;
  animation: pulse-danger 1.5s infinite;
}

@keyframes pulse-danger {

  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.06);
  }
}

/* ── UPLOAD PROGRESS ── */
.upload-progress {
  position: fixed;
  bottom: -100px;
  left: 50%;
  transform: translateX(-50%);
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 16px 24px;
  z-index: 300;
  box-shadow: var(--shadow-lg);
  min-width: 300px;
  transition: bottom 0.3s ease;
}

.upload-progress.active {
  bottom: 28px;
}

.upload-progress-inner {
  display: flex;
  align-items: center;
  gap: 14px;
}

.upload-progress-inner span {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
}

/* ── TOAST ── */
.toast-container {
  position: fixed;
  top: 28px;
  right: 28px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 500;
}

.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 14px 18px;
  box-shadow: var(--shadow-lg);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
  transform: translateX(110%);
  opacity: 0;
  max-width: 360px;
}

.toast.show {
  transform: translateX(0);
  opacity: 1;
}

.toast i {
  font-size: 20px;
  flex-shrink: 0;
}

.toast-success {
  border-left: 4px solid var(--primary-color);
}

.toast-success i {
  color: var(--primary-color);
}

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

.toast-error i {
  color: var(--danger-color);
}

.toast-warning {
  border-left: 4px solid #f59e0b;
}

.toast-warning i {
  color: #f59e0b;
}

.toast-info {
  border-left: 4px solid var(--file-color);
}

.toast-info i {
  color: var(--file-color);
}

/* ── SCROLLBAR ── */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-color);
}

::-webkit-scrollbar-thumb {
  background: #d1d5db;
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: #9ca3af;
}

/* ─── PREMIUM UI ─────────────────────────────────────────── */

/* Sidebar Divider */
.sidebar-divider {
  height: 1px;
  background: var(--border-color);
  margin: 16px 0;
  opacity: 0.6;
  display: none;
}

/* Storage Dashboard */
.storage-dashboard {
  background: #ffffff;
  padding: 16px;
  border-radius: 16px;
  margin-top: auto;
  border: 1px solid var(--border-color);
  box-shadow: 0 4px 12px rgba(0,0,0,0.03);
}

.storage-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 12px;
  color: var(--text-main);
}

.storage-progress {
  height: 8px;
  background: #f1f5f9;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 10px;
}

.progress-fill {
  height: 100%;
  background: var(--primary-gradient);
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 10px;
}

.storage-text {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
  display: block;
}

/* Premium Card Lift */
.item-card {
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
}

.item-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 24px rgba(0,0,0,0.08);
}

/* Skeleton Loading Shimmer */
.skeleton {
  background: #f1f5f9;
  background-image: linear-gradient(90deg, #f1f5f9 0px, #e2e8f0 40px, #f1f5f9 80px);
  background-size: 600px;
  animation: shimmer 1.8s infinite linear;
}

@keyframes shimmer {
  0% { background-position: -600px; }
  100% { background-position: 600px; }
}

.skeleton-card {
  height: 140px;
  border-radius: 16px;
}

/* Share Link Prompt Styling */
.dropdown-item i.ph-share-network {
  color: var(--accent-color);
}

/* ─── PREVIEW MODAL ─────────────────────────────────────── */
.preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
  background: #ffffff;
  border-radius: 16px 16px 0 0;
  flex-shrink: 0;
}

.preview-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 15px;
  color: var(--text-main);
  overflow: hidden;
}

.preview-title span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 600px;
}

.preview-icon {
  font-size: 22px;
  flex-shrink: 0;
  color: var(--primary-color);
}

.preview-body {
  flex: 1;
  overflow: auto;
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.preview-iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

.preview-image {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 4px;
  display: block;
}

.preview-text {
  width: 100%;
  height: 100%;
  padding: 24px 28px;
  font-family: 'Fira Code', 'Consolas', monospace;
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-main);
  white-space: pre-wrap;
  word-break: break-word;
  background: #f8fafc;
  overflow: auto;
  margin: 0;
  align-self: flex-start;
  min-height: 100%;
}

.preview-fallback {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 60px 32px;
  text-align: center;
  color: var(--text-muted);
}

.preview-fallback i {
  font-size: 72px;
}

.preview-fallback p {
  font-size: 15px;
  font-weight: 500;
}

/* ─── DROPDOWN DIVIDER ──────────────────────────────────── */
.dropdown-divider {
  height: 1px;
  background: var(--border-color);
  margin: 4px 0;
}

/* ─── ADMIN ONLY VISIBILITY (always visible in open mode) ─── */
.admin-only {
  display: block !important;
}

/* Drag-over full body overlay glow */
body.drag-active .content-area::after {
  content: 'Drop files to upload';
  position: fixed;
  inset: 0;
  border: 4px dashed var(--primary-color);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 700;
  color: var(--primary-color);
  background: rgba(16, 185, 129, 0.05);
  pointer-events: none;
  z-index: 500;
}

/* Storage stats enhanced */
.storage-stats-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.storage-pct {
  font-size: 11px;
  font-weight: 700;
  color: var(--primary-color);
}

/* ── FOLDER CARDS ── */
.folder-card {
  padding: 24px;
  border-radius: 18px;
  background: linear-gradient(135deg, #e8f5e9, #ffffff);
  border: 1px solid #e5e7eb;
  position: relative;
  transition: all 0.25s ease;
  cursor: pointer;
  display: flex;
  flex-direction: column;
}

.folder-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 10px 25px rgba(0,0,0,0.08);
}