/* ═══════════════════════════════════════════════════════════════
   Fortress Cloud — design system & component styles
   ═══════════════════════════════════════════════════════════════ */

:root {
  --bg: #050816;
  --bg-2: #0a0e19;
  --bg-3: #0d1224;
  --surface: rgba(255, 255, 255, 0.04);
  --surface-2: rgba(255, 255, 255, 0.07);
  --surface-3: rgba(255, 255, 255, 0.1);
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #e8ecf4;
  --text-2: #a8b0c2;
  --text-3: #626b80;
  --accent-1: #3b82f6;
  --accent-2: #36cafb;
  --accent-soft: rgba(59, 130, 246, 0.16);
  --gradient: linear-gradient(135deg, #2563eb 0%, #36cafb 100%);
  --success: #34d399;
  --warning: #fbbf24;
  --danger: #f87171;
  --radius: 16px;
  --radius-sm: 10px;
  --radius-xs: 8px;
  --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.3);
  --shadow: 0 10px 34px rgba(0, 0, 0, 0.42);
  --shadow-lg: 0 24px 70px rgba(0, 0, 0, 0.55);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --sidebar-w: 264px;
  --topbar-h: 66px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
input, select, textarea { font-family: inherit; }
img { max-width: 100%; }

::selection { background: rgba(59, 130, 246, 0.4); }

/* Scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.12); border-radius: 8px; border: 2px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.22); background-clip: content-box; }

/* ── Background orbs ─────────────────────────────────────────── */
.bg-orbs { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.orb { position: absolute; border-radius: 50%; filter: blur(90px); opacity: 0.5; }
.orb-1 { width: 520px; height: 520px; background: radial-gradient(circle, rgba(59, 130, 246, 0.45), transparent 70%); top: -180px; left: -120px; }
.orb-2 { width: 460px; height: 460px; background: radial-gradient(circle, rgba(54, 202, 251, 0.32), transparent 70%); bottom: -160px; right: -100px; }
.orb-3 { width: 380px; height: 380px; background: radial-gradient(circle, rgba(244, 114, 182, 0.18), transparent 70%); top: 40%; left: 55%; }

/* ── Logo ────────────────────────────────────────────────────── */
.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; letter-spacing: -0.02em; }
.logo-mark { width: 30px; height: 30px; flex: none; border-radius: 7px; }

/* ── Buttons ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 9px 18px; border-radius: 11px; border: 1px solid transparent;
  font-size: 14px; font-weight: 600; cursor: pointer; color: var(--text);
  background: var(--surface-2); transition: transform 0.12s ease, background 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, color 0.2s ease;
  white-space: nowrap; user-select: none;
}
.btn:hover { background: var(--surface-3); }
.btn:active { transform: translateY(1px) scale(0.99); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }
.btn svg { width: 18px; height: 18px; }

.btn-primary {
  background: var(--gradient); color: #fff;
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}
.btn-primary:hover { background: var(--gradient); box-shadow: 0 8px 26px rgba(59, 130, 246, 0.5); filter: brightness(1.08); }
.btn-primary:disabled { box-shadow: none; filter: none; }

.btn-ghost { background: transparent; border-color: var(--border-strong); color: var(--text-2); }
.btn-ghost:hover { color: var(--text); background: var(--surface-2); }

.btn-danger { background: rgba(248, 113, 113, 0.14); color: var(--danger); border-color: rgba(248, 113, 113, 0.35); }
.btn-danger:hover { background: rgba(248, 113, 113, 0.24); color: #fff; }

.btn-lg { padding: 13px 26px; font-size: 15px; border-radius: 13px; }
.btn-block { width: 100%; }
.btn-sm { padding: 7px 13px; font-size: 13px; border-radius: 9px; }

.btn-google { display: flex; }
.btn-google svg { width: 18px; height: 18px; }

.auth-divider { display: flex; align-items: center; gap: 12px; margin: 18px 0 20px; color: var(--text-2); font-size: 13px; font-weight: 500; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }

.btn.is-busy { position: relative; color: transparent !important; pointer-events: none; }
.btn.is-busy::after {
  content: ""; position: absolute; width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.35); border-top-color: #fff;
  animation: spin 0.7s linear infinite;
}

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 9px; border: none; cursor: pointer;
  color: var(--text-2); background: transparent; transition: background 0.18s ease, color 0.18s ease;
}
.icon-btn:hover { background: var(--surface-3); color: var(--text); }
.icon-btn svg { width: 18px; height: 18px; }

/* ── Inputs ──────────────────────────────────────────────────── */
.field { margin-bottom: 16px; }
.field label, .field-label {
  display: block; font-size: 13px; font-weight: 600; color: var(--text-2);
  margin-bottom: 7px;
}
.input-wrap { position: relative; }
.input-wrap .input { padding-right: 44px; }
.input-wrap .input-toggle {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center;
  border: none; background: transparent; color: var(--text-3); cursor: pointer; border-radius: 8px;
}
.input-wrap .input-toggle:hover { color: var(--text); background: var(--surface-2); }
.input-wrap .input-toggle svg { width: 18px; height: 18px; }

.input, select.input {
  width: 100%; padding: 11px 14px; border-radius: 11px;
  border: 1px solid var(--border-strong); background: rgba(0, 0, 0, 0.25);
  color: var(--text); font-size: 14px; outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}
.input::placeholder { color: var(--text-3); }
.input:focus { border-color: var(--accent-1); box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.22); background: rgba(0, 0, 0, 0.35); }
.field-invalid, .input.field-invalid { border-color: var(--danger); box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.2); }

.form-error {
  background: rgba(248, 113, 113, 0.12); border: 1px solid rgba(248, 113, 113, 0.3);
  color: var(--danger); font-size: 13px; padding: 9px 12px; border-radius: 10px; margin: 4px 0 14px;
}

.select-wrap { position: relative; display: inline-flex; align-items: center; }
.select-wrap > svg { position: absolute; right: 10px; width: 15px; height: 15px; color: var(--text-3); pointer-events: none; }
.select {
  appearance: none; padding: 9px 34px 9px 13px; border-radius: 10px;
  border: 1px solid var(--border-strong); background: var(--surface-2); color: var(--text-2);
  font-size: 13px; font-weight: 600; cursor: pointer; outline: none;
  transition: border-color 0.18s ease, color 0.18s ease;
}
.select:hover { color: var(--text); }
.select:focus { border-color: var(--accent-1); }
.select option { background: var(--bg-3); color: var(--text); }

/* ── Segmented control ───────────────────────────────────────── */
.segmented { display: inline-flex; padding: 3px; border-radius: 11px; background: var(--surface-2); border: 1px solid var(--border); gap: 2px; }
.segmented button {
  width: 34px; height: 30px; display: inline-flex; align-items: center; justify-content: center;
  border: none; background: transparent; color: var(--text-3); cursor: pointer; border-radius: 8px; transition: all 0.18s ease;
}
.segmented button svg { width: 16px; height: 16px; }
.segmented button:hover { color: var(--text); }
.segmented button.active { background: var(--surface-3); color: var(--text); box-shadow: var(--shadow-sm); }

/* ── Pills ───────────────────────────────────────────────────── */
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; padding: 4px 11px; border-radius: 999px; }
.pill-ok { background: rgba(52, 211, 153, 0.14); color: var(--success); }
.pill-warn { background: rgba(251, 191, 36, 0.14); color: var(--warning); }
.pill-crit { background: rgba(248, 113, 113, 0.16); color: var(--danger); }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* ── LANDING ─────────────────────────────────────────────────── */
.landing-body { overflow-x: hidden; }

.landing-nav {
  display: flex; align-items: center; gap: 28px; max-width: 1160px; margin: 0 auto;
  padding: 20px 24px; position: relative; z-index: 5;
}
.landing-nav-links { display: flex; gap: 26px; margin-left: auto; }
.landing-nav-links a { font-size: 14px; font-weight: 500; color: var(--text-2); transition: color 0.18s ease; }
.landing-nav-links a:hover { color: var(--text); }
.landing-nav-cta { display: flex; gap: 10px; }

.hero { max-width: 1160px; margin: 0 auto; padding: 70px 24px 90px; text-align: center; position: relative; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--text-2);
  padding: 7px 15px; border-radius: 999px; border: 1px solid var(--border-strong);
  background: var(--surface); margin-bottom: 26px;
}
.hero-badge .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--success); box-shadow: 0 0 10px var(--success); }
.hero-title { font-size: clamp(38px, 6vw, 64px); line-height: 1.08; letter-spacing: -0.03em; font-weight: 800; }
.gradient-text {
  background: var(--gradient); -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.hero-sub { max-width: 620px; margin: 20px auto 34px; font-size: 18px; color: var(--text-2); }
.hero-cta { display: flex; gap: 14px; justify-content: center; margin-bottom: 60px; }

.hero-card {
  max-width: 560px; margin: 0 auto; padding: 22px; border-radius: 20px; text-align: left;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
  border: 1px solid var(--border-strong); backdrop-filter: blur(20px);
  box-shadow: var(--shadow-lg); transform: rotate(-1deg);
  animation: float 7s ease-in-out infinite;
}
.hero-card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.hero-card-title { font-weight: 700; font-size: 15px; }
.hc-row { margin-bottom: 10px; }
.file-chip {
  display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 12px;
  background: rgba(0, 0, 0, 0.3); border: 1px solid var(--border); font-size: 14px;
}
.file-chip svg { width: 18px; height: 18px; color: var(--accent-2); flex: none; }
.file-chip b { margin-left: auto; font-weight: 600; color: var(--text-2); font-size: 13px; }
.hc-storage { margin-top: 16px; padding: 12px 14px; border-radius: 12px; background: rgba(0, 0, 0, 0.3); border: 1px solid var(--border); }
.hc-bar { height: 8px; border-radius: 99px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.hc-bar span { display: block; height: 100%; border-radius: 99px; background: var(--gradient); }
.hc-storage-text { display: block; margin-top: 8px; font-size: 12px; color: var(--text-3); font-weight: 600; }

.section { max-width: 1160px; margin: 0 auto; padding: 80px 24px; }
.section-alt { max-width: none; }
.section-title { font-size: clamp(28px, 4vw, 40px); letter-spacing: -0.025em; font-weight: 800; line-height: 1.15; }
.section-sub { color: var(--text-2); font-size: 16px; margin-top: 12px; max-width: 560px; }

.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; margin-top: 44px; }
.feature-card {
  padding: 26px 24px; border-radius: var(--radius); background: var(--surface);
  border: 1px solid var(--border); transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}
.feature-card:hover { transform: translateY(-5px); border-color: var(--border-strong); background: var(--surface-2); }
.feature-icon { width: 52px; height: 52px; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 24px; margin-bottom: 18px; }
.gradient-violet { background: rgba(59, 130, 246, 0.18); }
.gradient-blue { background: rgba(54, 202, 251, 0.16); }
.gradient-green { background: rgba(52, 211, 153, 0.16); }
.gradient-orange { background: rgba(251, 146, 60, 0.16); }
.feature-card h3 { font-size: 17px; margin-bottom: 8px; }
.feature-card p { font-size: 14px; color: var(--text-2); }

.section-alt { background: linear-gradient(180deg, rgba(59, 130, 246, 0.05), transparent); border-block: 1px solid var(--border); }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; max-width: 1160px; margin: 0 auto; padding: 60px 24px; }
.check-list { list-style: none; margin-top: 26px; display: grid; gap: 13px; }
.check-list li { display: flex; gap: 12px; align-items: flex-start; color: var(--text-2); font-size: 15px; }
.check-list li::before {
  content: "✓"; flex: none; width: 20px; height: 20px; border-radius: 7px; margin-top: 2px;
  display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 800;
  background: var(--gradient); color: #fff;
}

.shield-card {
  padding: 34px; border-radius: 22px; background: linear-gradient(160deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.02));
  border: 1px solid var(--border-strong); backdrop-filter: blur(16px); text-align: center; box-shadow: var(--shadow-lg);
}
.shield-icon { width: 64px; height: 64px; margin-bottom: 16px; }
.shield-card h3 { font-size: 19px; margin-bottom: 10px; }
.shield-card p { color: var(--text-2); font-size: 14px; }

.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 22px; margin-top: 44px; }
.step { padding: 26px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); position: relative; }
.step-num {
  width: 38px; height: 38px; border-radius: 12px; display: flex; align-items: center; justify-content: center;
  background: var(--gradient); color: #fff; font-weight: 800; font-size: 16px; margin-bottom: 16px;
  box-shadow: 0 6px 18px rgba(59, 130, 246, 0.4);
}
.step h3 { font-size: 17px; margin-bottom: 8px; }
.step p { font-size: 14px; color: var(--text-2); }

.storage-demo {
  padding: 30px; border-radius: 20px; background: linear-gradient(160deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.02));
  border: 1px solid var(--border-strong); box-shadow: var(--shadow-lg);
}
.storage-demo-head { display: flex; align-items: center; justify-content: space-between; font-weight: 700; margin-bottom: 18px; }
.storage-demo-bar { height: 14px; border-radius: 99px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.storage-demo-bar span { display: block; height: 100%; border-radius: 99px; background: var(--gradient); }
.storage-demo-labels { display: flex; justify-content: space-between; margin-top: 10px; font-size: 13px; color: var(--text-2); font-weight: 600; }
.storage-demo-note { margin-top: 18px; font-size: 13px; color: var(--text-3); padding-top: 16px; border-top: 1px solid var(--border); }

.cta { max-width: 760px; margin: 40px auto 90px; padding: 60px 30px; text-align: center; border-radius: 28px;
  background: linear-gradient(160deg, rgba(59, 130, 246, 0.16), rgba(54, 202, 251, 0.08));
  border: 1px solid var(--border-strong); position: relative; overflow: hidden;
}
.cta h2 { font-size: clamp(26px, 4vw, 38px); letter-spacing: -0.03em; font-weight: 800; }
.cta p { color: var(--text-2); margin: 14px auto 28px; font-size: 16px; max-width: 480px; }

.footer { border-top: 1px solid var(--border); background: var(--bg-2); }
.footer-inner { max-width: 1160px; margin: 0 auto; padding: 44px 24px; display: flex; flex-direction: column; gap: 16px; align-items: flex-start; }
.footer-tag { color: var(--text-3); font-size: 14px; }
.footer-links { display: flex; gap: 22px; }
.footer-links a { color: var(--text-2); font-size: 14px; font-weight: 500; }
.footer-links a:hover { color: var(--text); }
.footer-copy { color: var(--text-3); font-size: 13px; margin-top: 8px; }

/* ── AUTH pages ──────────────────────────────────────────────── */
.auth-body { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 30px 20px; }
.auth-wrap { width: 100%; max-width: 420px; display: flex; flex-direction: column; align-items: center; }
.auth-logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 20px; margin-bottom: 26px; }
.auth-card {
  width: 100%; padding: 34px 32px; border-radius: 22px;
  background: linear-gradient(170deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
  border: 1px solid var(--border-strong); backdrop-filter: blur(20px); box-shadow: var(--shadow-lg);
  animation: rise 0.5s ease both;
}
.auth-title { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; }
.auth-sub { color: var(--text-2); margin: 6px 0 24px; font-size: 15px; }
.auth-alt { text-align: center; margin-top: 22px; font-size: 14px; color: var(--text-2); }
.auth-alt a, .auth-foot a { color: var(--accent-2); font-weight: 600; }
.auth-alt a:hover, .auth-foot a:hover { text-decoration: underline; }
.auth-foot { margin-top: 22px; font-size: 13px; color: var(--text-3); text-align: center; }

.strength-meter { display: flex; gap: 5px; margin-top: 9px; }
.sm-bar { flex: 1; height: 4px; border-radius: 99px; background: rgba(255, 255, 255, 0.1); transition: background 0.25s ease; }
.sm-bar.lvl-1 { background: var(--danger); }
.sm-bar.lvl-2 { background: var(--warning); }
.sm-bar.lvl-3 { background: var(--warning); }
.sm-bar.lvl-4 { background: var(--success); }
.sm-bar.lvl-5 { background: var(--success); }
.strength-label { font-size: 12px; color: var(--text-3); margin-top: 6px; }

/* ── APP SHELL ───────────────────────────────────────────────── */
.app-body { height: 100vh; overflow: hidden; }
.shell { display: flex; height: 100vh; }

.sidebar {
  width: var(--sidebar-w); flex: none; height: 100vh; display: flex; flex-direction: column;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.012));
  border-right: 1px solid var(--border); backdrop-filter: blur(20px); z-index: 40;
}
.sidebar-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 18px 14px; }
.sidebar-close { display: none; }

.sidebar-nav { display: flex; flex-direction: column; gap: 4px; padding: 8px 12px; }
.nav-item {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 11px;
  color: var(--text-2); font-weight: 600; font-size: 14px; cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease;
}
.nav-item:hover { background: var(--surface-2); color: var(--text); }
.nav-item.active { background: var(--accent-soft); color: #fff; }
.nav-icon { display: inline-flex; }
.nav-icon svg { width: 19px; height: 19px; }
.nav-item.active .nav-icon svg { color: var(--accent-2); }

.sidebar-storage { margin: 14px 14px; padding: 14px 15px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--border); }
.sidebar-storage-title { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: var(--text-2); margin-bottom: 10px; }
.sidebar-storage-title svg { width: 16px; height: 16px; color: var(--accent-2); }
.storage-bar { height: 8px; border-radius: 99px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.storage-bar span { display: block; height: 100%; border-radius: 99px; background: var(--gradient); transition: width 0.5s ease; }
.storage-bar span.warn { background: linear-gradient(90deg, var(--warning), #fb7185); }
.sidebar-storage-text { font-size: 12px; color: var(--text-3); font-weight: 600; margin-top: 8px; }

.sidebar-foot { margin-top: auto; display: flex; align-items: center; gap: 6px; padding: 14px 14px 18px; border-top: 1px solid var(--border); }
.sidebar-user { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.sidebar-user-name { font-size: 13px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-foot .icon-btn { flex: none; }

.avatar {
  width: 34px; height: 34px; flex: none; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  background: var(--gradient); color: #fff; font-weight: 800; font-size: 13px; letter-spacing: 0.02em;
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.4);
}
.avatar-lg { width: 58px; height: 58px; font-size: 20px; }
.avatar-btn { border: none; cursor: pointer; }

.sidebar-backdrop { display: none; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; height: 100vh; }

.topbar {
  height: var(--topbar-h); flex: none; display: flex; align-items: center; gap: 14px;
  padding: 0 26px; border-bottom: 1px solid var(--border); background: rgba(7, 10, 18, 0.72);
  backdrop-filter: blur(18px); position: relative; z-index: 30;
}
.hamburger { display: none; }
.topbar-search {
  flex: 1; max-width: 480px; display: flex; align-items: center; gap: 10px;
  padding: 0 14px; height: 40px; border-radius: 12px;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text-3);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}
.topbar-search:focus-within { border-color: var(--accent-1); box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.18); background: var(--surface-3); }
.topbar-search svg { width: 17px; height: 17px; flex: none; }
.topbar-search input { flex: 1; border: none; background: transparent; color: var(--text); font-size: 14px; outline: none; }
.topbar-search input::placeholder { color: var(--text-3); }
.topbar-right { margin-left: auto; }

.content { flex: 1; overflow-y: auto; padding: 28px 34px 60px; max-width: 1220px; width: 100%; margin: 0 auto; }

/* ── Views ───────────────────────────────────────────────────── */
.view-head { margin-bottom: 24px; }
.view-title { font-size: 24px; font-weight: 800; letter-spacing: -0.02em; display: flex; align-items: center; gap: 10px; }
.view-title svg { width: 22px; height: 22px; color: var(--accent-2); }
.view-sub { color: var(--text-2); font-size: 14px; margin-top: 4px; }
.view-loading { min-height: 300px; }

.files-head { margin-bottom: 6px; }
.breadcrumbs { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; margin-bottom: 16px; min-height: 28px; }
.crumb {
  border: none; background: transparent; color: var(--text-2); font-size: 14px; font-weight: 600;
  cursor: pointer; padding: 4px 8px; border-radius: 8px; transition: all 0.16s ease;
}
.crumb:hover { background: var(--surface-2); color: var(--text); }
.crumb.current { color: var(--text); pointer-events: none; }
.crumb-sep { color: var(--text-3); }

.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.toolbar-right { display: flex; align-items: center; gap: 10px; margin-left: auto; }

/* ── Dashboard cards ─────────────────────────────────────────── */
.dash-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 20px; margin-bottom: 34px; }
.dash-card {
  padding: 24px; border-radius: var(--radius); background: linear-gradient(170deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
  border: 1px solid var(--border); transition: border-color 0.2s ease, transform 0.2s ease;
}
.dash-card:hover { border-color: var(--border-strong); }
.dash-card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.dash-card-title { display: flex; align-items: center; gap: 9px; font-size: 14px; font-weight: 700; color: var(--text-2); text-transform: uppercase; letter-spacing: 0.04em; }
.dash-card-title svg { width: 17px; height: 17px; color: var(--accent-2); }
.dash-big { font-size: 34px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; margin-bottom: 14px; }
.dash-big span { font-size: 15px; color: var(--text-3); font-weight: 600; margin-left: 4px; }
.storage-bar.big { height: 11px; }
.storage-bar.big span.warn { background: linear-gradient(90deg, var(--warning), #fb7185); }
.storage-bar.big span.crit { background: linear-gradient(90deg, var(--danger), var(--warning)); }
.storage-bar.big.warn span { background: linear-gradient(90deg, var(--warning), #fb7185); }
.storage-bar.big.crit span { background: linear-gradient(90deg, var(--danger), var(--warning)); }
.dash-storage-stats { display: flex; gap: 18px; margin: 14px 0 20px; font-size: 13px; color: var(--text-2); font-weight: 600; flex-wrap: wrap; }
.storage-card .btn { margin-top: 4px; }

.dash-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 6px; }
.dash-action {
  display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 13px;
  background: var(--surface-2); border: 1px solid var(--border); cursor: pointer;
  color: var(--text); font-weight: 600; font-size: 14px; transition: all 0.18s ease; text-align: left;
}
.dash-action:hover { background: var(--surface-3); border-color: var(--border-strong); transform: translateY(-2px); }
.dash-action-icon { width: 38px; height: 38px; flex: none; border-radius: 11px; display: flex; align-items: center; justify-content: center; }
.dash-action-icon svg { width: 19px; height: 19px; }
.violet { background: rgba(59, 130, 246, 0.18); color: #93c5fd; }
.blue { background: rgba(54, 202, 251, 0.16); color: #67e8f9; }
.amber { background: rgba(251, 191, 36, 0.16); color: #fcd34d; }
.red { background: rgba(248, 113, 113, 0.16); color: #fca5a5; }

.dash-section { margin-top: 6px; }
.dash-section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.dash-section-title { font-size: 18px; font-weight: 800; letter-spacing: -0.01em; }

/* ── File grid ───────────────────────────────────────────────── */
.file-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 16px; }

.file-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  padding: 14px; cursor: default; transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
  animation: rise 0.35s ease both; outline: none;
}
.file-card:hover { transform: translateY(-3px); border-color: var(--border-strong); background: var(--surface-2); box-shadow: var(--shadow); }
.file-card:focus-visible { border-color: var(--accent-1); box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25); }
.file-card-top { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 10px; }
.file-card-preview { display: flex; align-items: center; justify-content: center; height: 64px; }
.file-card-preview .file-icon { filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.45)); }
.file-card-actions { display: flex; gap: 2px; opacity: 0; transition: opacity 0.16s ease; }
.file-card:hover .file-card-actions, .file-card:focus-visible .file-card-actions { opacity: 1; }
.file-card-actions .icon-btn { width: 30px; height: 30px; }
.file-card-name {
  font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin-bottom: 3px;
}
.file-card-meta { font-size: 12px; color: var(--text-3); }

.preview-folder { width: 56px; height: 56px; border-radius: 14px; display: flex; align-items: center; justify-content: center;
  background: rgba(59, 130, 246, 0.16); border: 1px solid rgba(59, 130, 246, 0.3); color: #93c5fd; }
.preview-folder svg { width: 30px; height: 30px; }
.preview-folder.sm { width: 40px; height: 40px; border-radius: 11px; }
.preview-folder.sm svg { width: 22px; height: 22px; }
.preview-folder.lg { width: 64px; height: 64px; border-radius: 16px; }
.preview-folder.lg svg { width: 34px; height: 34px; }

.file-thumb { width: 52px; height: 52px; object-fit: cover; border-radius: 12px; border: 1px solid var(--border-strong); }
.file-row .file-thumb { width: 38px; height: 38px; border-radius: 9px; }

.star-btn.active { color: var(--warning); }
.star-btn.active svg { width: 18px; height: 18px; }

/* ── File list ───────────────────────────────────────────────── */
.file-list { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: 14px; overflow: hidden; background: var(--surface); }
.file-row {
  display: grid; grid-template-columns: 46px minmax(160px, 1fr) 130px 90px 150px 88px;
  align-items: center; gap: 10px; padding: 10px 14px; border-top: 1px solid var(--border);
  transition: background 0.14s ease; cursor: default; outline: none;
}
.file-row:first-child { border-top: none; }
.file-row:not(.file-row-head):hover { background: var(--surface-2); }
.file-row-head { background: var(--surface-2); font-size: 12px; color: var(--text-3); font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; cursor: default; }
.col-icon { display: flex; align-items: center; }
.col-name { min-width: 0; display: flex; flex-direction: column; }
.row-name { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-path { font-size: 12px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.col-type, .col-size, .col-date { font-size: 13px; color: var(--text-2); }
.col-actions { display: flex; justify-content: flex-end; gap: 2px; opacity: 0; transition: opacity 0.15s ease; }
.file-row:hover .col-actions { opacity: 1; }
[data-kind="folder"][data-action="open-folder"] { cursor: pointer; }

/* ── Empty states & skeletons ────────────────────────────────── */
.empty-state { text-align: center; padding: 70px 20px; animation: rise 0.4s ease both; }
.empty-icon {
  width: 84px; height: 84px; margin: 0 auto 20px; border-radius: 26px; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(160deg, rgba(59, 130, 246, 0.2), rgba(54, 202, 251, 0.12));
  border: 1px solid var(--border-strong); box-shadow: var(--shadow);
}
.empty-icon svg { width: 40px; height: 40px; color: var(--accent-2); }
.empty-state h3 { font-size: 19px; font-weight: 800; margin-bottom: 8px; }
.empty-state p { color: var(--text-2); font-size: 14px; margin-bottom: 22px; }

.sk-card { padding: 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); }
.sk { background: rgba(255, 255, 255, 0.07); border-radius: 8px; position: relative; overflow: hidden; }
.sk::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.06), transparent);
  transform: translateX(-100%); animation: shimmer 1.4s infinite;
}
.sk-icon { height: 56px; border-radius: 12px; margin-bottom: 12px; }
.sk-line { height: 12px; margin-bottom: 8px; }
.w70 { width: 70%; }
.w40 { width: 40%; }

/* ── Modals ──────────────────────────────────────────────────── */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center;
  background: rgba(3, 5, 10, 0.68); backdrop-filter: blur(6px); padding: 20px;
  animation: fade 0.2s ease both;
}
.modal {
  width: 100%; max-width: 460px; max-height: 88vh; display: flex; flex-direction: column;
  background: linear-gradient(175deg, #131827, #0c101c); border: 1px solid var(--border-strong);
  border-radius: 20px; box-shadow: var(--shadow-lg); overflow: hidden;
  animation: pop 0.28s cubic-bezier(0.34, 1.4, 0.64, 1) both;
}
.modal-wide { max-width: 620px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px 12px; }
.modal-title { font-size: 17px; font-weight: 800; }
.modal-close { width: 32px; height: 32px; }
.modal-body { padding: 8px 22px; overflow-y: auto; }
.modal-foot { display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding: 16px 22px 20px; }
.modal-foot .upload-summary { margin-right: auto; font-size: 13px; color: var(--text-3); font-weight: 600; }
.confirm-msg { color: var(--text-2); font-size: 14px; line-height: 1.6; }

/* Move dialog */
.move-tree { max-height: 300px; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; margin-top: 6px; }
.move-option {
  display: flex; align-items: center; gap: 9px; padding: 10px 12px; border-radius: 10px;
  cursor: pointer; font-size: 14px; transition: background 0.14s ease; border: 1px solid transparent;
}
.move-option:hover { background: var(--surface-2); }
.move-option.selected { background: var(--accent-soft); border-color: rgba(59, 130, 246, 0.4); }
.move-option svg { width: 17px; height: 17px; color: var(--accent-2); flex: none; }
.move-radio { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--text-3); flex: none; transition: all 0.15s ease; }
.move-option.selected .move-radio { border-color: var(--accent-2); background: radial-gradient(circle, var(--accent-2) 35%, transparent 40%); }
.move-indent { flex: none; }

/* Details dialog */
.details-head { display: flex; align-items: center; gap: 16px; margin: 6px 0 18px; }
.details-name { font-size: 17px; font-weight: 800; word-break: break-word; }
.details-sub { font-size: 13px; color: var(--text-3); font-weight: 600; }
.details-rows { display: flex; flex-direction: column; }
.details-row { display: flex; justify-content: space-between; gap: 16px; padding: 11px 0; border-top: 1px solid var(--border); font-size: 14px; }
.details-row:first-child { border-top: none; }
.details-key { color: var(--text-3); font-weight: 600; flex: none; }
.details-val { color: var(--text); text-align: right; word-break: break-word; }

/* ── Upload panel ────────────────────────────────────────────── */
.dropzone {
  border: 2px dashed var(--border-strong); border-radius: 16px; padding: 34px 20px;
  text-align: center; cursor: pointer; transition: all 0.2s ease; margin-bottom: 14px; background: rgba(0, 0, 0, 0.15);
}
.dropzone:hover, .dropzone.dragging { border-color: var(--accent-1); background: var(--accent-soft); }
.dz-icon { width: 64px; height: 64px; margin: 0 auto 12px; border-radius: 18px; display: flex; align-items: center; justify-content: center; background: var(--accent-soft); }
.dz-icon svg { width: 30px; height: 30px; color: var(--accent-2); }
.dz-title { font-size: 16px; font-weight: 800; }
.dz-sub { font-size: 13px; color: var(--text-2); margin: 4px 0 14px; }
.dz-limit { font-size: 12px; color: var(--text-3); margin-top: 14px; }

.upload-queue { display: flex; flex-direction: column; gap: 10px; max-height: 240px; overflow-y: auto; }
.upload-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); }
.upload-item .file-icon { flex: none; }
.ui-info { flex: 1; min-width: 0; }
.ui-name { font-size: 13px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ui-progress { height: 5px; border-radius: 99px; background: rgba(255, 255, 255, 0.08); margin: 7px 0; overflow: hidden; }
.ui-progress-fill { height: 100%; border-radius: 99px; background: var(--gradient); transition: width 0.15s ease; }
.ui-meta { font-size: 12px; color: var(--text-3); }
.upload-item.done .ui-progress-fill { background: var(--success); }
.upload-item.done .ui-meta { color: var(--success); }
.upload-item.error .ui-progress-fill { background: var(--danger); }
.upload-item.error .ui-meta { color: var(--danger); }
.upload-item .icon-btn { width: 30px; height: 30px; }

/* ── Toasts ──────────────────────────────────────────────────── */
.toast-root { position: fixed; bottom: 22px; right: 22px; z-index: 200; display: flex; flex-direction: column; gap: 10px; }
.toast {
  display: flex; align-items: center; gap: 11px; min-width: 260px; max-width: 380px;
  padding: 13px 16px; border-radius: 13px; font-size: 14px; font-weight: 600;
  background: linear-gradient(170deg, #161c2c, #10141f); border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-lg); transform: translateX(120%); opacity: 0; transition: all 0.32s cubic-bezier(0.34, 1.3, 0.64, 1);
}
.toast.show { transform: translateX(0); opacity: 1; }
.toast-icon { width: 28px; height: 28px; flex: none; border-radius: 9px; display: flex; align-items: center; justify-content: center; }
.toast-icon svg { width: 16px; height: 16px; color: #fff; }
.toast-success .toast-icon { background: rgba(52, 211, 153, 0.9); }
.toast-error .toast-icon { background: rgba(248, 113, 113, 0.9); }
.toast-info .toast-icon { background: rgba(96, 165, 250, 0.9); }

/* ── Context menu ────────────────────────────────────────────── */
.context-menu {
  position: fixed; z-index: 150; min-width: 200px; padding: 6px; border-radius: 13px;
  background: linear-gradient(175deg, #171d2d, #101420); border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-lg); opacity: 0; transform: scale(0.96) translateY(-4px);
  transition: all 0.15s ease; transform-origin: top right;
}
.context-menu.show { opacity: 1; transform: scale(1) translateY(0); }
.menu-item {
  display: flex; align-items: center; gap: 11px; width: 100%; padding: 9px 11px;
  background: transparent; border: none; border-radius: 9px; color: var(--text);
  font-size: 14px; font-weight: 600; cursor: pointer; text-align: left; transition: background 0.13s ease;
}
.menu-item:hover { background: var(--surface-3); }
.menu-item.danger { color: var(--danger); }
.menu-item.danger:hover { background: rgba(248, 113, 113, 0.14); }
.menu-item.disabled { opacity: 0.4; cursor: not-allowed; }
.menu-item-icon { display: inline-flex; }
.menu-item-icon svg { width: 17px; height: 17px; }

/* ── Settings ────────────────────────────────────────────────── */
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
.settings-col { display: flex; flex-direction: column; gap: 20px; }
.settings-account { display: flex; align-items: center; gap: 16px; margin-bottom: 14px; }
.settings-account-meta { display: flex; flex-direction: column; }
.settings-name { font-size: 17px; font-weight: 800; }
.settings-email { font-size: 13px; color: var(--text-3); }
.settings-note { font-size: 13px; color: var(--text-2); margin: 4px 0 14px; }
.danger-card { border-color: rgba(248, 113, 113, 0.25); }
.danger-card .dash-card-title { color: var(--danger); }

.api-docs-link { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; color: var(--accent-2); }
.api-docs-link svg { width: 14px; height: 14px; }
.api-docs-link:hover { text-decoration: underline; }
.api-key-box {
  display: flex; align-items: center; background: var(--surface);
  border: 1px solid var(--border-strong); border-radius: 10px;
  padding: 11px 14px; margin-bottom: 14px;
}
.api-key-text {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 14px; letter-spacing: 0.02em; color: var(--text);
  word-break: break-all; line-height: 1.4;
}
.api-key-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ── Animations ──────────────────────────────────────────────── */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: scale(0.92) translateY(8px); } }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
@keyframes float { 0%, 100% { transform: rotate(-1deg) translateY(0); } 50% { transform: rotate(-1deg) translateY(-12px); } }
@keyframes shimmer { to { transform: translateX(100%); } }
@keyframes pulse-soft { 0%, 100% { opacity: 1; } 50% { opacity: 0.55; } }
