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

:root {
  --bg: #0f0f13;
  --surface: #17171f;
  --surface-2: #1e1e2a;
  --surface-3: #252535;
  --border: rgba(255,255,255,0.07);
  --border-light: rgba(255,255,255,0.04);
  --accent: #6366f1;
  --accent-hover: #5254cc;
  --accent-dim: rgba(99,102,241,0.14);
  --text: #ededf0;
  --text-2: #8585a0;
  --text-3: #4a4a60;
  --success: #22c55e;
  --success-dim: rgba(34,197,94,0.12);
  --warning: #f59e0b;
  --warning-dim: rgba(245,158,11,0.12);
  --danger: #ef4444;
  --danger-dim: rgba(239,68,68,0.1);
  --folder-color: #f59e0b;
  --header-h: 60px;
  --crumb-h: 40px;
  --transition: 150ms ease;
  --transition-med: 240ms ease;
  --radius: 12px;
}

html, body { height: 100%; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100dvh;
}

/* ── LOGIN ── */
body.login-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  position: relative;
  overflow: hidden;
}

.glow {
  position: fixed;
  top: -120px;
  left: 50%;
  transform: translateX(-50%);
  width: 700px;
  height: 500px;
  background: radial-gradient(ellipse at center, rgba(99,102,241,0.09) 0%, transparent 65%);
  pointer-events: none;
  z-index: 0;
}

.login-card {
  background: var(--surface);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 20px;
  padding: 48px 40px 40px;
  width: 100%;
  max-width: 400px;
  position: relative;
  z-index: 1;
}

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

.logo-mark {
  width: 44px; height: 44px;
  background: var(--accent);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.logo-mark svg { width: 22px; height: 22px; color: #fff; }
.logo-name { font-size: 22px; font-weight: 700; letter-spacing: -0.4px; }

.login-subtitle { color: var(--text-2); font-size: 13.5px; margin-bottom: 36px; margin-left: 2px; }

.error-msg {
  background: var(--danger-dim);
  border: 1px solid rgba(239,68,68,0.2);
  color: #f87171;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
  margin-bottom: 16px;
  display: none;
  align-items: center;
  gap: 8px;
}
.error-msg.show { display: flex; }

.form-group { margin-bottom: 16px; }

label {
  display: block;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-2);
  margin-bottom: 8px;
  letter-spacing: 0.2px;
  text-transform: uppercase;
}

.input-wrap { position: relative; }

input[type="password"], input[type="text"] {
  width: 100%;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  padding: 13px 46px 13px 14px;
  font-size: 15px;
  font-family: inherit;
  color: var(--text);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
  -webkit-appearance: none;
  min-height: 48px;
}
input:focus { border-color: var(--accent); background: rgba(255,255,255,0.06); box-shadow: 0 0 0 3px rgba(99,102,241,0.18); }
input::placeholder { color: var(--text-2); opacity: 0.45; }

.toggle-pw {
  position: absolute; right: 2px; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer; color: var(--text-2);
  padding: 10px 12px;
  display: flex; align-items: center; justify-content: center;
  transition: color var(--transition);
  min-width: 44px; min-height: 44px;
}
.toggle-pw:hover { color: var(--text); }

.btn-primary {
  width: 100%;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 13px;
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  margin-top: 6px;
  transition: background var(--transition), transform 100ms ease, opacity var(--transition);
  min-height: 48px;
  letter-spacing: -0.1px;
}
.btn-primary:hover { background: var(--accent-hover); }
.btn-primary:active { transform: scale(0.985); }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }
.btn-primary.loading { position: relative; color: transparent; }
.btn-primary.loading::after {
  content: '';
  position: absolute;
  width: 18px; height: 18px;
  top: 50%; left: 50%;
  margin: -9px 0 0 -9px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.65s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.footer-note { text-align: center; font-size: 11.5px; color: var(--text-2); margin-top: 28px; opacity: 0.5; }

/* ── MAIN APP BODY ── */
body.app-page { display: flex; flex-direction: column; overflow-x: hidden; }

/* ── HEADER ── */
.header {
  position: sticky; top: 0; z-index: 100;
  height: var(--header-h);
  background: rgba(15,15,19,0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 0 20px;
}

.logo {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; color: inherit; flex-shrink: 0;
}
.header-logo-mark {
  width: 34px; height: 34px;
  background: var(--accent);
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
}
.header-logo-mark svg { width: 18px; height: 18px; color: #fff; }
.logo-name-sm { font-size: 17px; font-weight: 700; letter-spacing: -0.3px; }

.search-wrap { position: relative; max-width: 480px; width: 100%; justify-self: center; }
.search-icon-inner {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  color: var(--text-3); display: flex; align-items: center; pointer-events: none;
}
.search-input {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 8px 12px 8px 38px;
  font-size: 14px; font-family: inherit; color: var(--text);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
  min-height: 38px;
}
.search-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(99,102,241,0.15); }
.search-input::placeholder { color: var(--text-3); }

.header-actions { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }

.icon-btn {
  width: 38px; height: 38px;
  background: none; border: none; border-radius: 9px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-2);
  transition: background var(--transition), color var(--transition);
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.icon-btn.active { background: var(--accent-dim); color: var(--accent); }
.icon-btn svg { width: 20px; height: 20px; }

.search-toggle { display: none; }

.mobile-search-bar {
  display: none;
  position: absolute; top: 0; left: 0; right: 0;
  height: var(--header-h);
  background: rgba(15,15,19,0.95);
  backdrop-filter: blur(12px);
  align-items: center;
  padding: 0 16px; gap: 10px; z-index: 10;
}
.mobile-search-bar.open { display: flex; }
.mobile-search-input {
  flex: 1;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 9px; padding: 9px 14px;
  font-size: 15px; font-family: inherit; color: var(--text);
  outline: none; min-height: 44px;
}
.mobile-search-input:focus { border-color: var(--accent); }
.mobile-search-input::placeholder { color: var(--text-3); }

/* ── BREADCRUMB ── */
.breadcrumb-bar {
  height: var(--crumb-h);
  display: flex; align-items: center;
  padding: 0 20px; gap: 2px;
  border-bottom: 1px solid var(--border-light);
  background: var(--surface);
  overflow-x: auto; scrollbar-width: none; flex-shrink: 0;
}
.breadcrumb-bar::-webkit-scrollbar { display: none; }

.crumb-btn {
  background: none; border: none; cursor: pointer;
  font-family: inherit; font-size: 13px; color: var(--text-2);
  padding: 4px 6px; border-radius: 6px; white-space: nowrap;
  transition: background var(--transition), color var(--transition);
  display: flex; align-items: center; gap: 4px; min-height: 30px;
}
.crumb-btn:hover { background: var(--surface-2); color: var(--text); }
.crumb-btn.active { color: var(--text); font-weight: 500; cursor: default; }
.crumb-btn.active:hover { background: none; }
.crumb-sep { color: var(--text-3); font-size: 14px; padding: 0 2px; user-select: none; }

/* ── FILE AREA ── */
.main { flex: 1; overflow-y: auto; padding-bottom: 120px; }

.col-header {
  display: grid;
  grid-template-columns: 48px 44px 1fr 90px 110px 80px 50px;
  align-items: center;
  padding: 0 8px 0 0;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  position: sticky; top: 0; z-index: 5;
}
.col-h {
  padding: 10px 12px;
  font-size: 11.5px; font-weight: 600; color: var(--text-3);
  text-transform: uppercase; letter-spacing: 0.5px;
  user-select: none; white-space: nowrap;
}

.file-row {
  display: grid;
  grid-template-columns: 48px 44px 1fr 90px 110px 80px 50px;
  align-items: center;
  border-bottom: 1px solid var(--border-light);
  transition: background var(--transition);
  cursor: default; min-height: 54px;
}
.file-row:hover { background: var(--surface-2); }
.file-row.selected { background: var(--accent-dim); }
.file-row.selected:hover { background: rgba(99,102,241,0.18); }
.folder-row { cursor: pointer; }

.col-check { display: flex; align-items: center; justify-content: center; padding: 0 4px; }

.row-checkbox {
  width: 18px; height: 18px;
  accent-color: var(--accent); cursor: pointer;
  opacity: 0; transition: opacity var(--transition); flex-shrink: 0;
}
.file-row:hover .row-checkbox,
.file-row.selected .row-checkbox,
.selecting .row-checkbox { opacity: 1; }

#selectAllCheck { width: 18px; height: 18px; accent-color: var(--accent); cursor: pointer; opacity: 0.5; }
#selectAllCheck:hover { opacity: 1; }

.col-icon { display: flex; align-items: center; justify-content: center; }

.folder-icon-wrap { width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; color: var(--folder-color); }
.folder-icon-wrap svg { width: 26px; height: 26px; }

.file-type-badge {
  width: 32px; height: 32px; border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
  font-size: 9px; font-weight: 700; letter-spacing: 0.5px;
}
.badge-pdf { background: rgba(239,68,68,0.15); color: #f87171; }
.badge-zip { background: rgba(245,158,11,0.15); color: #fbbf24; }
.badge-png,.badge-jpg,.badge-gif,.badge-webp { background: rgba(34,197,94,0.15); color: #4ade80; }
.badge-mp4,.badge-mov,.badge-avi { background: rgba(168,85,247,0.15); color: #c084fc; }
.badge-mp3,.badge-wav { background: rgba(6,182,212,0.15); color: #67e8f9; }
.badge-generic { background: var(--surface-3); color: var(--text-2); }

.col-name { padding: 10px 12px; min-width: 0; }
.file-name {
  font-size: 14px; font-weight: 500; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block;
}
.file-meta-mobile { display: none; font-size: 12px; color: var(--text-2); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.col-size, .col-date { padding: 10px 12px; font-size: 13px; color: var(--text-2); white-space: nowrap; }
.col-expiry { padding: 10px 8px; display: flex; align-items: center; }

.expiry-badge { padding: 3px 8px; border-radius: 20px; font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.expiry-ok { background: var(--success-dim); color: var(--success); }
.expiry-warn { background: var(--warning-dim); color: var(--warning); }
.expiry-none { background: var(--surface-3); color: var(--text-3); }

.col-action { display: flex; align-items: center; justify-content: center; }

.more-btn {
  width: 34px; height: 34px;
  background: none; border: none; border-radius: 7px;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  color: var(--text-3); opacity: 0;
  transition: background var(--transition), color var(--transition), opacity var(--transition);
}
.file-row:hover .more-btn { opacity: 1; color: var(--text-2); }
.more-btn:hover { background: var(--surface-3); color: var(--text) !important; opacity: 1 !important; }
.more-btn svg { width: 18px; height: 18px; }

/* ── CONTEXT MENU ── */
.context-menu {
  position: fixed;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 5px;
  min-width: 175px;
  z-index: 500;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  display: none; flex-direction: column;
  animation: popIn 120ms ease;
}
.context-menu.open { display: flex; }
@keyframes popIn { from { opacity: 0; transform: scale(0.95); } to { opacity: 1; transform: scale(1); } }

.ctx-item {
  background: none; border: none; font-family: inherit;
  font-size: 13.5px; color: var(--text);
  padding: 8px 12px; border-radius: 6px;
  text-align: left; cursor: pointer;
  display: flex; align-items: center; gap: 10px;
  transition: background var(--transition);
  min-height: 36px;
}
.ctx-item:hover { background: var(--surface-3); }
.ctx-item.danger { color: var(--danger); }
.ctx-item.danger:hover { background: var(--danger-dim); }
.ctx-item svg { width: 15px; height: 15px; opacity: 0.8; flex-shrink: 0; }
.ctx-divider { height: 1px; background: var(--border); margin: 4px 0; }

/* ── BULK BAR ── */
.bulk-bar {
  position: fixed; bottom: 0; left: 0; right: 0;
  height: 64px;
  background: var(--surface-2);
  border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 20px;
  transform: translateY(100%);
  transition: transform var(--transition-med);
  z-index: 90; gap: 12px;
}
.bulk-bar.show { transform: translateY(0); }

.bulk-count { font-size: 14px; font-weight: 500; color: var(--text-2); white-space: nowrap; flex-shrink: 0; }
.bulk-count strong { color: var(--text); }
.bulk-actions { display: flex; gap: 8px; overflow-x: auto; }

.bulk-btn {
  background: var(--surface-3);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 13.5px; font-weight: 500; font-family: inherit;
  color: var(--text); cursor: pointer;
  transition: background var(--transition), border-color var(--transition);
  display: flex; align-items: center; gap: 7px;
  min-height: 38px; white-space: nowrap;
}
.bulk-btn:hover { background: var(--surface-2); border-color: rgba(255,255,255,0.12); }
.bulk-btn.danger { color: var(--danger); border-color: rgba(239,68,68,0.2); }
.bulk-btn.danger:hover { background: var(--danger-dim); }
.bulk-btn svg { width: 15px; height: 15px; }

/* ── FAB ── */
.fab-wrap {
  position: fixed; bottom: 28px; right: 24px;
  display: flex; flex-direction: column; align-items: flex-end; gap: 10px;
  z-index: 200;
  transition: bottom var(--transition-med);
}
.fab-wrap.raised { bottom: 92px; }

.fab-menu {
  display: flex; flex-direction: column; gap: 8px; align-items: flex-end;
  opacity: 0; transform: translateY(8px) scale(0.97); pointer-events: none;
  transition: opacity var(--transition-med), transform var(--transition-med);
}
.fab-menu.open { opacity: 1; transform: translateY(0) scale(1); pointer-events: all; }

.fab-item {
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 10px; padding: 10px 16px;
  font-family: inherit; font-size: 13.5px; font-weight: 500; color: var(--text);
  cursor: pointer; display: flex; align-items: center; gap: 10px;
  transition: background var(--transition), border-color var(--transition);
  white-space: nowrap; box-shadow: 0 4px 16px rgba(0,0,0,0.3); min-height: 44px;
}
.fab-item:hover { background: var(--surface-3); border-color: rgba(255,255,255,0.1); }
.fab-item svg { width: 17px; height: 17px; color: var(--accent); }

.fab {
  width: 52px; height: 52px;
  background: var(--accent); border: none; border-radius: 15px;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  color: #fff; box-shadow: 0 4px 20px rgba(99,102,241,0.4);
  transition: background var(--transition), transform 200ms ease, box-shadow var(--transition);
}
.fab:hover { background: var(--accent-hover); box-shadow: 0 6px 24px rgba(99,102,241,0.5); }
.fab svg { width: 24px; height: 24px; transition: transform 200ms ease; }
.fab.open svg { transform: rotate(45deg); }

/* ── SETTINGS DRAWER ── */
.drawer-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 300; opacity: 0; pointer-events: none;
  transition: opacity var(--transition-med);
  backdrop-filter: blur(2px);
}
.drawer-overlay.open { opacity: 1; pointer-events: all; }

.settings-drawer {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: 360px; max-width: 100vw;
  background: var(--surface); border-left: 1px solid var(--border);
  z-index: 400;
  display: flex; flex-direction: column;
  transform: translateX(100%);
  transition: transform var(--transition-med);
  overflow: hidden;
}
.settings-drawer.open { transform: translateX(0); }

.drawer-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 20px; border-bottom: 1px solid var(--border); flex-shrink: 0;
}
.drawer-title { font-size: 16px; font-weight: 700; letter-spacing: -0.2px; }

.drawer-body { flex: 1; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 28px; }

.setting-group { display: flex; flex-direction: column; gap: 14px; }
.setting-label { font-size: 11px; font-weight: 600; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.7px; }
.setting-item { display: flex; flex-direction: column; gap: 8px; }
.setting-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.setting-name { font-size: 14px; color: var(--text); font-weight: 500; }
.setting-desc { font-size: 12px; color: var(--text-2); }

.num-input {
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 8px; padding: 7px 10px;
  font-size: 14px; font-family: inherit; color: var(--text);
  outline: none; width: 90px; text-align: right;
  transition: border-color var(--transition); min-height: 38px;
}
.num-input:focus { border-color: var(--accent); }
.input-unit { display: flex; align-items: center; gap: 6px; }
.unit-label { font-size: 13px; color: var(--text-2); white-space: nowrap; }

.toggle { position: relative; width: 42px; height: 24px; flex-shrink: 0; }
.toggle input { opacity: 0; width: 0; height: 0; position: absolute; }
.toggle-track {
  position: absolute; inset: 0;
  background: var(--surface-3); border-radius: 12px; cursor: pointer;
  transition: background var(--transition); border: 1px solid var(--border);
}
.toggle-track::after {
  content: ''; position: absolute;
  width: 18px; height: 18px; left: 2px; top: 2px;
  background: var(--text-2); border-radius: 50%;
  transition: transform var(--transition), background var(--transition);
}
.toggle input:checked + .toggle-track { background: var(--accent); border-color: var(--accent); }
.toggle input:checked + .toggle-track::after { transform: translateX(18px); background: #fff; }

.usage-bar-wrap { display: flex; flex-direction: column; gap: 8px; }
.usage-labels { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-2); }
.usage-used { color: var(--text); font-weight: 500; }
.usage-bar { height: 6px; background: var(--surface-3); border-radius: 3px; overflow: hidden; }
.usage-fill { height: 100%; background: var(--accent); border-radius: 3px; transition: width 600ms ease; }

/* ── UPLOAD PROGRESS ── */
.upload-progress {
  position: fixed; bottom: 24px; left: 20px;
  width: 280px;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 12px; padding: 14px 16px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  z-index: 250;
  display: none; flex-direction: column; gap: 10px;
}
.upload-progress.show { display: flex; }

.progress-header { display: flex; align-items: center; justify-content: space-between; }
.progress-title {
  font-size: 12.5px; font-weight: 600; color: var(--text-2);
  text-transform: uppercase; letter-spacing: 0.5px;
  display: flex; align-items: center; gap: 6px;
}
.progress-title svg { width: 13px; height: 13px; color: var(--accent); animation: pulse 1.5s ease-in-out infinite; }
@keyframes pulse { 0%,100%{opacity:1}50%{opacity:0.4} }

.progress-filename { font-size: 13.5px; font-weight: 500; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.progress-bar-wrap { height: 4px; background: var(--surface-3); border-radius: 2px; overflow: hidden; }
.progress-fill-bar {
  height: 100%; background: var(--accent); border-radius: 2px;
  width: 0%; position: relative; overflow: hidden;
  transition: width 150ms ease;
}
.progress-fill-bar::after {
  content: ''; position: absolute; top:0; left:-100%; bottom:0; right:0;
  background: linear-gradient(90deg,transparent,rgba(255,255,255,0.3),transparent);
  animation: shimmer 1.5s ease-in-out infinite;
}
@keyframes shimmer { to { left: 200%; } }
.progress-meta { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--text-2); }

/* ── MODALS ── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 600; display: none;
  align-items: center; justify-content: center;
  padding: 24px;
  backdrop-filter: blur(3px);
}
.modal-overlay.open { display: flex; }

.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  width: 100%; max-width: 380px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  animation: popIn 150ms ease;
}
.modal-title { font-size: 16px; font-weight: 700; margin-bottom: 16px; }
.modal-input {
  width: 100%;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 9px; padding: 10px 14px;
  font-size: 14px; font-family: inherit; color: var(--text);
  outline: none;
  transition: border-color var(--transition);
  min-height: 42px;
}
.modal-input:focus { border-color: var(--accent); }
.modal-actions { display: flex; gap: 8px; margin-top: 16px; justify-content: flex-end; }

.btn-secondary {
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 8px; padding: 8px 16px;
  font-size: 13.5px; font-weight: 500; font-family: inherit;
  color: var(--text); cursor: pointer;
  transition: background var(--transition);
  min-height: 38px;
}
.btn-secondary:hover { background: var(--surface-3); }

.btn-accent {
  background: var(--accent); border: none;
  border-radius: 8px; padding: 8px 16px;
  font-size: 13.5px; font-weight: 600; font-family: inherit;
  color: #fff; cursor: pointer;
  transition: background var(--transition);
  min-height: 38px;
}
.btn-accent:hover { background: var(--accent-hover); }

.modal-label { font-size: 12px; color: var(--text-2); margin-bottom: 8px; display: block; }

/* ── TOAST ── */
.toast-wrap {
  position: fixed; bottom: 84px; left: 50%; transform: translateX(-50%);
  z-index: 800; display: flex; flex-direction: column; gap: 8px; align-items: center;
  pointer-events: none;
}
.toast {
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 10px; padding: 10px 18px;
  font-size: 13.5px; font-weight: 500; color: var(--text);
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  white-space: nowrap;
  animation: toastIn 200ms ease;
}
.toast.success { border-color: rgba(34,197,94,0.3); color: var(--success); }
.toast.error { border-color: rgba(239,68,68,0.3); color: #f87171; }
@keyframes toastIn { from { opacity:0; transform: translateY(8px); } to { opacity:1; transform: translateY(0); } }

/* ── EMPTY STATE ── */
.empty-state {
  display: none; flex-direction: column; align-items: center;
  justify-content: center; padding: 80px 24px; color: var(--text-3); gap: 12px;
}
.empty-state.show { display: flex; }
.empty-state svg { width: 40px; height: 40px; opacity: 0.3; }
.empty-state p { font-size: 14px; }

/* ── PASSWORD CHANGE IN SETTINGS ── */
.pw-form { display: flex; flex-direction: column; gap: 10px; }
.pw-input {
  width: 100%;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 8px; padding: 9px 12px;
  font-size: 13.5px; font-family: inherit; color: var(--text);
  outline: none; transition: border-color var(--transition); min-height: 38px;
}
.pw-input:focus { border-color: var(--accent); }
.pw-input::placeholder { color: var(--text-3); }
.pw-error { font-size: 12px; color: #f87171; display: none; }
.pw-error.show { display: block; }

/* ── PREVIEW OVERLAY ── */
.preview-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.92);
  z-index: 700;
  display: none; flex-direction: column;
}
.preview-overlay.open { display: flex; }

.preview-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px; gap: 16px; flex-shrink: 0;
  border-bottom: 1px solid var(--border);
}
.preview-filename {
  font-size: 14px; font-weight: 500; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0;
}
.preview-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.preview-download {
  text-decoration: none;
  display: inline-flex; align-items: center; gap: 6px;
}
.preview-download svg { width: 14px; height: 14px; }

.preview-body {
  flex: 1; display: flex; align-items: center; justify-content: center;
  padding: 24px; overflow: hidden; min-height: 0;
}
.preview-body img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 6px; }
.preview-body video { max-width: 100%; max-height: 100%; border-radius: 6px; outline: none; }
.preview-body audio { width: min(480px, 100%); }
.preview-body.is-pdf { padding: 0; }
.preview-body.is-pdf iframe { width: 100%; height: 100%; border: none; }

/* ── ETA ── */
.progress-eta { font-size: 11px; color: var(--text-2); }
.progress-eta:empty { display: none; }

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .col-header, .file-row { grid-template-columns: 48px 44px 1fr 110px 50px; }
  .col-h.hide-tablet, .file-row .col-size, .file-row .col-date { display: none; }
}

@media (max-width: 600px) {
  .col-header { display: none; }
  .file-row { grid-template-columns: 44px 40px 1fr 72px 44px; min-height: 60px; }
  .file-row .col-size, .file-row .col-date { display: none; }
  .file-meta-mobile { display: block; }
  .col-expiry { padding: 0 8px; }
  .more-btn { opacity: 1; }
  .search-wrap { display: none; }
  .search-toggle { display: flex; }
  .header { grid-template-columns: auto 1fr auto; }
  .settings-drawer { width: 100vw; }
  .upload-progress { width: calc(100vw - 40px); }
  .fab-wrap { bottom: 20px; right: 16px; }
  .fab-wrap.raised { bottom: 84px; }
  .bulk-bar { padding: 0 16px; }
  .hide-mobile { display: none; }
}

@media (min-width: 1200px) {
  .header { padding: 0 32px; }
  .breadcrumb-bar { padding: 0 32px; }
}
