/* CLIMATEC SRL - CLOUD — Main Styles */
/* Brand: var(--brand) (orange), var(--danger) (red), Inter font */

:root {
  --brand: #009fe0;
  --brand-dark: #0086c2;
  --accent: #00a398;
  --highlight: #f5941a;
  --danger: #e03333;
  --bg: #f0f4f7;
  --bg-card: #ffffff;
  --sidebar-bg: #00a398;
  --sidebar-text: rgba(255,255,255,.75);
  --sidebar-active: #ffffff;
  --text: #111827;
  --text-muted: #5a7184;
  --border: #e0e8ee;
  --shadow: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md: 0 4px 16px rgba(0,0,0,.1);
  --radius: 10px;
  --radius-sm: 6px;
  --sidebar-w: 240px;
  --transition: 200ms cubic-bezier(.4,0,.2,1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 15px; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  display: flex;
  min-height: 100vh;
  line-height: 1.5;
}

/* ── Sidebar ─────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  background: var(--sidebar-bg);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  overflow-y: auto;
}

.sidebar-header { padding: 20px 16px 12px; border-bottom: 1px solid rgba(255,255,255,.07); }

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #fff;
  font-size: .95rem;
}

.logo-img { width: 32px; height: 32px; border-radius: 8px; }
.logo-text strong { color: var(--brand); }

.sidebar-nav {
  padding: 12px 8px;
  flex: 1;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  color: var(--sidebar-text);
  text-decoration: none;
  font-size: .875rem;
  font-weight: 500;
  transition: background var(--transition), color var(--transition);
  margin-bottom: 2px;
}

.nav-item:hover { background: rgba(255,255,255,.07); color: #fff; }
.nav-item.active { background: rgba(0,159,224,.15); color: var(--brand); }
.nav-icon { width: 18px; height: 18px; flex-shrink: 0; }

/* Storage bar */
.sidebar-storage {
  padding: 12px 16px;
  border-top: 1px solid rgba(255,255,255,.07);
}

.storage-header {
  display: flex;
  justify-content: space-between;
  color: var(--sidebar-text);
  font-size: .8rem;
  margin-bottom: 6px;
}

.storage-bar {
  height: 4px;
  background: rgba(255,255,255,.1);
  border-radius: 999px;
  overflow: hidden;
}

.storage-fill {
  height: 100%;
  background: linear-gradient(90deg, #009fe0, #00a398);
  border-radius: 999px;
  transition: width .6s ease;
}

.storage-info { color: #6b7280; font-size: .75rem; margin-top: 4px; }
.storage-pct { font-weight: 600; color: var(--brand); }

/* User row */
.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-top: 1px solid rgba(255,255,255,.07);
}

.user-avatar {
  width: 34px; height: 34px;
  background: linear-gradient(135deg, #009fe0, #00a398);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: .85rem;
  color: #fff;
  flex-shrink: 0;
}

.user-info { flex: 1; min-width: 0; }
.user-name { color: #fff; font-size: .875rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-role { color: var(--sidebar-text); font-size: .75rem; }
.logout-btn { color: var(--sidebar-text); transition: color var(--transition); }
.logout-btn:hover { color: var(--danger); }

/* ── Main Content ────────────────────────────────────────── */
.main-content {
  margin-left: var(--sidebar-w);
  flex: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Page Header ─────────────────────────────────────────── */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 28px 16px;
  gap: 12px;
}

.page-title { font-size: 1.4rem; font-weight: 700; }
.page-title span { color: var(--text-muted); font-weight: 400; }

.header-actions { display: flex; gap: 8px; }

/* ── Breadcrumb ──────────────────────────────────────────── */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 28px 12px;
  font-size: .85rem;
  color: var(--text-muted);
}
.breadcrumb a { color: var(--text-muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--brand); }
.breadcrumb-sep { color: #d1d5db; }
.breadcrumb-current { color: var(--text); font-weight: 500; }

/* ── File Grid ───────────────────────────────────────────── */
.file-area { padding: 0 20px 28px; }

.file-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
}

.file-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 12px 12px;
  cursor: pointer;
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
  position: relative;
  user-select: none;
}

.file-card:hover {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(0,159,224,.12);
  transform: translateY(-1px);
}

.file-card.selected {
  border-color: var(--brand);
  background: rgba(0,159,224,.05);
}

.file-card-icon {
  width: 48px; height: 48px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  margin: 0 auto 10px;
}

.icon-image { background: #fef3c7; }
.icon-pdf   { background: #fee2e2; }
.icon-word  { background: #dbeafe; }
.icon-excel { background: #dcfce7; }
.icon-video { background: #f3e8ff; }
.icon-audio { background: #fce7f3; }
.icon-archive { background: #fef9c3; }
.icon-file  { background: #f3f4f6; }

.file-card-name {
  font-size: .8rem;
  font-weight: 500;
  text-align: center;
  word-break: break-word;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: var(--text);
}

.file-card-size {
  font-size: .72rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: 4px;
}

.file-card-menu {
  position: absolute;
  top: 8px; right: 8px;
  width: 26px; height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  opacity: 0;
  transition: opacity var(--transition), background var(--transition);
  cursor: pointer;
  color: var(--text-muted);
}
.file-card:hover .file-card-menu { opacity: 1; }
.file-card-menu:hover { background: var(--border); color: var(--text); }

/* ── Folder Cards ────────────────────────────────────────── */
.folder-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  text-decoration: none;
  color: var(--text);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.folder-card:hover { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(0,159,224,.1); }
.folder-icon { font-size: 1.4rem; }
.folder-name { font-size: .875rem; font-weight: 500; }
.folders-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; margin-bottom: 20px; }

/* ── Context Menu ────────────────────────────────────────── */
.ctx-menu {
  position: fixed;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  padding: 4px;
  min-width: 180px;
  z-index: 9999;
  animation: fadeIn .1s ease;
}

@keyframes fadeIn { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: scale(1); } }

.ctx-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 5px;
  font-size: .85rem;
  cursor: pointer;
  color: var(--text);
  transition: background var(--transition);
}
.ctx-item:hover { background: var(--bg); }
.ctx-item.danger { color: var(--danger); }
.ctx-item.danger:hover { background: #fef2f2; }
.ctx-sep { height: 1px; background: var(--border); margin: 4px 0; }

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: .875rem;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: background var(--transition), opacity var(--transition);
  text-decoration: none;
}
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); }
.btn-danger  { background: var(--danger); color: #fff; }
.btn-ghost   { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn-ghost:hover { background: var(--bg); }
.btn-sm { padding: 5px 11px; font-size: .8rem; }
.btn-copy { background: var(--bg); color: var(--text); border: 1px solid var(--border); white-space: nowrap; }
.btn-copy:hover { background: var(--border); }
.btn-icon { padding: 7px; border-radius: var(--radius-sm); }

/* ── Modals ──────────────────────────────────────────────── */
.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn .15s ease;
}
.modal[hidden] { display: none; }

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.45);
  backdrop-filter: blur(3px);
}

.modal-box {
  position: relative;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 20px 60px rgba(0,0,0,.2);
  width: 90%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  animation: slideUp .2s cubic-bezier(.34,1.56,.64,1);
}
.modal-sm { max-width: 360px; }

@keyframes slideUp { from { opacity:0; transform:translateY(20px); } to { opacity:1; transform:none; } }

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 0;
  margin-bottom: 16px;
}
.modal-header h2 { font-size: 1.1rem; font-weight: 600; }
.modal-close {
  background: none;
  border: none;
  font-size: 1.4rem;
  color: var(--text-muted);
  cursor: pointer;
  width: 28px; height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}
.modal-close:hover { background: var(--bg); color: var(--text); }

/* ── Upload zone ─────────────────────────────────────────── */
.upload-zone {
  border: 2px dashed var(--border);
  border-radius: 10px;
  margin: 0 24px;
  padding: 32px 20px;
  text-align: center;
  transition: border-color var(--transition), background var(--transition);
  cursor: pointer;
  color: var(--text-muted);
}
.upload-zone.dragover { border-color: var(--brand); background: rgba(0,159,224,.04); }
.upload-zone svg { color: var(--brand); margin-bottom: 12px; }
.upload-zone p { font-size: .9rem; margin-bottom: 4px; }
.upload-hint { font-size: .8rem; color: #9ca3af; }
.upload-browse { color: var(--brand); cursor: pointer; font-weight: 500; }

.upload-list { padding: 12px 24px 20px; display: flex; flex-direction: column; gap: 8px; }
.upload-item { display: flex; align-items: center; gap: 10px; font-size: .85rem; }
.upload-item-name { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.upload-progress { height: 4px; background: var(--bg); border-radius: 999px; overflow: hidden; flex: 0 0 80px; }
.upload-progress-fill { height: 100%; background: var(--brand); border-radius: 999px; transition: width .3s; }
.upload-status { font-size: .75rem; white-space: nowrap; }
.upload-status.done { color: #16a34a; }
.upload-status.error { color: var(--danger); }

/* ── Share form ──────────────────────────────────────────── */
.share-form { padding: 0 24px 8px; display: flex; flex-direction: column; gap: 14px; }
.form-row { display: flex; flex-direction: column; gap: 4px; }
.form-row label { font-size: .8rem; font-weight: 500; color: var(--text-muted); }
.form-input {
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: .875rem;
  font-family: inherit;
  width: 100%;
  transition: border-color var(--transition);
  color: var(--text);
  background: #fff;
}
.form-input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(0,159,224,.15); }
.form-hint { font-size: .75rem; color: #9ca3af; }
.form-row-check label { display: flex; align-items: center; gap: 8px; font-size: .875rem; font-weight: 400; color: var(--text); cursor: pointer; }

.share-link-box { display: flex; gap: 8px; align-items: center; padding: 12px 24px; }
.share-link-box .form-input { font-size: .8rem; color: var(--text-muted); background: var(--bg); }

#shareLinkResult { border-top: 1px solid var(--border); margin-top: 8px; }

.share-links-history { padding: 0 24px 20px; }
.share-links-history h4 { font-size: .8rem; color: var(--text-muted); margin-bottom: 8px; font-weight: 500; }
.share-link-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: .8rem;
}
.share-link-row:last-child { border-bottom: none; }
.link-token { font-family: monospace; color: var(--text-muted); flex: 1; overflow: hidden; text-overflow: ellipsis; }
.link-badge { padding: 2px 6px; border-radius: 4px; font-size: .7rem; font-weight: 600; }
.link-badge.active { background: #dcfce7; color: #15803d; }
.link-badge.expired { background: #f3f4f6; color: var(--text-muted); }

/* ── Empty state ─────────────────────────────────────────── */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 20px;
  color: var(--text-muted);
  text-align: center;
}
.empty-state svg { color: #d1d5db; margin-bottom: 16px; }
.empty-state h3 { font-size: 1rem; font-weight: 600; margin-bottom: 6px; color: var(--text); }
.empty-state p { font-size: .875rem; }

/* ── Flash messages ──────────────────────────────────────── */
.flash {
  margin: 16px 28px 0;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: .875rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.flash-success { background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; }
.flash-error   { background: #fef2f2; color: var(--danger); border: 1px solid #fecaca; }
.flash-close { background: none; border: none; cursor: pointer; font-size: 1.2rem; color: inherit; opacity: .6; }

/* ── Admin stats ─────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px;
  padding: 0 28px 24px;
}
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}
.stat-value { font-size: 1.8rem; font-weight: 700; color: var(--brand); }
.stat-label { font-size: .8rem; color: var(--text-muted); margin-top: 4px; }

/* ── Table ───────────────────────────────────────────────── */
.table-wrap { padding: 0 28px 28px; overflow-x: auto; }
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: .875rem;
}
.table th {
  text-align: left;
  padding: 10px 12px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
  font-weight: 500;
  font-size: .8rem;
  white-space: nowrap;
}
.table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  vertical-align: middle;
}
.table tr:last-child td { border-bottom: none; }
.table tr:hover td { background: rgba(0,159,224,.03); }
.table-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }

/* ── Login page ──────────────────────────────────────────── */
.auth-page {
  margin: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0f2027 0%, #00a398 50%, #009fe0 100%);
}

.auth-box {
  background: #fff;
  border-radius: 16px;
  padding: 40px;
  width: 90%;
  max-width: 380px;
  box-shadow: 0 20px 60px rgba(0,0,0,.3);
}

.auth-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
}
.auth-logo img { width: 36px; height: 36px; border-radius: 8px; }
.auth-logo span { font-size: 1.1rem; font-weight: 700; }
.auth-logo strong { color: var(--brand); }

.auth-title { font-size: 1.3rem; font-weight: 700; margin-bottom: 6px; }
.auth-sub { color: var(--text-muted); font-size: .875rem; margin-bottom: 24px; }

.auth-form { display: flex; flex-direction: column; gap: 14px; }
.auth-form label { display: block; font-size: .8rem; font-weight: 500; margin-bottom: 5px; color: var(--text-muted); }
.auth-form .form-input { margin-bottom: 0; }

.auth-error {
  background: #fef2f2;
  color: var(--danger);
  border: 1px solid #fecaca;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: .85rem;
}

/* ── Share view page ─────────────────────────────────────── */
.share-page {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(135deg, #0f172a, #1e293b);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Inter', sans-serif;
}

.share-box {
  background: #fff;
  border-radius: 16px;
  padding: 40px;
  width: 90%;
  max-width: 480px;
  box-shadow: 0 20px 60px rgba(0,0,0,.3);
  text-align: center;
}

.share-box .file-icon-lg { font-size: 3.5rem; margin-bottom: 16px; }
.share-box h2 { font-size: 1.1rem; font-weight: 600; word-break: break-word; }
.share-box .file-meta { color: var(--text-muted); font-size: .85rem; margin: 8px 0 24px; }
.share-preview { border: 1px solid var(--border); border-radius: 10px; overflow: hidden; margin-bottom: 20px; max-height: 320px; }
.share-preview img { width: 100%; object-fit: contain; }
.share-preview video, .share-preview audio { width: 100%; }
.share-preview iframe { width: 100%; height: 300px; border: none; }

.share-dl-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--brand);
  color: #fff;
  padding: 12px 28px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: .95rem;
  transition: background var(--transition);
}
.share-dl-btn:hover { background: var(--brand-dark); }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); transition: transform .25s ease; }
  .sidebar.open { transform: none; }
  .main-content { margin-left: 0; }
  .page-header { padding: 16px; }
  .file-area { padding: 0 12px 24px; }
  .file-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
  .table-wrap { padding: 0 16px 24px; }
  .stats-grid { padding: 0 16px 20px; }
}

/* ── Scrollbar ───────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #9ca3af; }

/* ── Auth page redesign ──────────────────────────────────── */
.auth-page {
  margin: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  position: relative;
  overflow: hidden;
}

.auth-page::before {
  background: linear-gradient(45deg, #00a398, #009fe0, #f5941a, #f5941a, #009fe0, #00a398, #00a398, #009fe0, #f5941a);
  background-size: 800% !important;
  background-repeat: repeat !important;
  filter: blur(300px);
  animation: glowing 80s linear infinite;
  width: 100%;
  right: 0;
  height: 100%;
  content: "";
  position: absolute;
  z-index: -1;
}

@keyframes glowing {
  0%   { background-position: 0 0; }
  50%  { background-position: 400% 0; }
  100% { background-position: 0 0; }
}

.auth-title {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 6px;
  text-align: center;
}

.auth-sub {
  color: var(--text-muted);
  font-size: .875rem;
  margin-bottom: 24px;
  text-align: center;
}

.auth-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 28px;
}

.auth-logo img {
  height: 48px;
  width: auto;
}

/* ── Sidebar redesign ────────────────────────────────────── */
.sidebar {
  background: #ffffff;
}

.sidebar-text-override {
  color: #374151;
}

.nav-item {
  color: #374151;
}

.nav-item:hover {
  background: rgba(0,159,224,.08);
  color: #009fe0;
}

.nav-item.active {
  background: rgba(0,159,224,.12);
  color: #009fe0;
}

.sidebar-header {
  border-bottom: 1px solid #e5e7eb;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #111827;
  font-size: .95rem;
  justify-content: flex-start;
}

.logo-img {
  width: auto;
  height: 32px;
  border-radius: 8px;
}

.storage-header {
  color: #374151;
}

.storage-bar {
  background: #e5e7eb;
}

.storage-info {
  color: #6b7280;
}

.storage-pct {
  color: #009fe0;
}

.sidebar-user {
  border-top: 1px solid #e5e7eb;
}

.user-name {
  color: #111827;
}

.user-role {
  color: #6b7280;
}

.logout-btn {
  color: #9ca3af;
}

.logout-btn:hover {
  color: #e03333;
}

.sidebar-nav .nav-icon {
  color: currentColor;
}

/* ── Modal folder fix ────────────────────────────────────── */
#folderModal .modal-box {
  max-width: 380px;
}

#folderModal form {
  padding: 0 24px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

#folderModal .form-row {
  margin: 0;
}

#folderModal .form-input {
  width: 100%;
}

#folderModal .btn-primary {
  width: 100%;
  justify-content: center;
  padding: 10px;
}

/* ── Upload item redesign cu speed + cancel ──────────────── */
.upload-item {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}
.upload-item:last-child { border-bottom: none; }

.upload-item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.upload-item-name {
  font-size: .82rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

.upload-cancel-btn {
  background: none;
  border: none;
  color: #9ca3af;
  cursor: pointer;
  font-size: .85rem;
  padding: 2px 6px;
  border-radius: 4px;
  flex-shrink: 0;
  line-height: 1;
}
.upload-cancel-btn:hover { background: #fee2e2; color: var(--danger); }

.upload-item-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.upload-item-bar .upload-progress {
  flex: 1;
  height: 5px;
  background: var(--bg);
  border-radius: 999px;
  overflow: hidden;
}

.upload-pct {
  font-size: .75rem;
  color: var(--text-muted);
  min-width: 32px;
  text-align: right;
}

.upload-item-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: .75rem;
}

.upload-speed { color: #009fe0; font-weight: 500; }
.upload-eta   { color: var(--text-muted); }
.upload-status.done  { color: #16a34a; font-weight: 500; }
.upload-status.error { color: var(--danger); font-weight: 500; }

/* ── Multi-select ────────────────────────────────────────── */
.selection-bar {
  display: none;
  align-items: center;
  gap: 12px;
  padding: 10px 20px;
  background: #009fe0;
  color: #fff;
  border-radius: 8px;
  margin: 0 20px 16px;
  font-size: .875rem;
  font-weight: 500;
}
.selection-bar.visible { display: flex; }
.selection-bar-count { flex: 1; }
.btn-select-all {
  background: rgba(255,255,255,.2);
  border: none;
  color: #fff;
  padding: 5px 12px;
  border-radius: 5px;
  cursor: pointer;
  font-size: .8rem;
  font-weight: 500;
}
.btn-select-all:hover { background: rgba(255,255,255,.3); }
.btn-delete-selected {
  background: #e03333;
  border: none;
  color: #fff;
  padding: 5px 14px;
  border-radius: 5px;
  cursor: pointer;
  font-size: .8rem;
  font-weight: 600;
}
.btn-delete-selected:hover { background: #c02020; }
.btn-cancel-select {
  background: rgba(255,255,255,.15);
  border: none;
  color: #fff;
  padding: 5px 12px;
  border-radius: 5px;
  cursor: pointer;
  font-size: .8rem;
}
.btn-cancel-select:hover { background: rgba(255,255,255,.25); }

.file-card .card-checkbox {
  position: absolute;
  top: 8px;
  left: 8px;
  width: 18px;
  height: 18px;
  opacity: 0;
  cursor: pointer;
  z-index: 10;
  accent-color: #009fe0;
}
.select-mode .file-card .card-checkbox { opacity: 1; }
.select-mode .file-card { cursor: pointer; }
.file-card.selected-card {
  border-color: #009fe0;
  background: rgba(0,159,224,.07);
}

.folder-card .card-checkbox {
  width: 16px;
  height: 16px;
  opacity: 0;
  cursor: pointer;
  accent-color: #009fe0;
  flex-shrink: 0;
}
.select-mode .folder-card .card-checkbox { opacity: 1; }
.folder-card.selected-card {
  border-color: #009fe0;
  background: rgba(0,159,224,.07);
}

.btn-toggle-select {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: .8rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 5px;
}
.btn-toggle-select:hover { border-color: #009fe0; color: #009fe0; }
