:root {
  --bg: #0a0f1d;
  --card: rgba(255,255,255,0.05);
  --card-2: rgba(255,255,255,0.035);
  --border: rgba(255,255,255,0.10);
  --text: #eef3ff;
  --muted: #b9c3df;
  --accent: #8ea5ff;
  --accent-2: #a7b9ff;
  --ruby: #c24c70;
  --ruby-soft: rgba(194,76,112,0.14);
  --ruby-border: rgba(225,132,160,0.24);
  --danger: #ffb4b4;
  --success: #8ff0b5;
  --shadow: 0 18px 60px rgba(0,0,0,0.35);
  --radius: 20px;
  --max: 1180px;
  --secure-nav-offset: 58px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scrollbar-gutter: stable; overflow-y: scroll; }
body { caret-color: transparent; }

html.secure-locked-root,
html.secure-locked-root body {
  overflow: hidden;
}

html:has(body[data-page="secure"]) {
  overflow-x: hidden;
}

html:has(body[data-page="secure"].secure-locked) {
  overflow: hidden;
}

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 16% 0%, rgba(194,76,112,0.18), transparent 24%),
    radial-gradient(circle at top left, rgba(124,156,255,0.18), transparent 26%),
    radial-gradient(circle at 84% 16%, rgba(160,39,79,0.12), transparent 22%),
    radial-gradient(circle at top right, rgba(86,224,182,0.10), transparent 24%),
    linear-gradient(180deg, #070b16 0%, #0a0f1d 100%);
  background-attachment: fixed;
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
  padding-bottom: 120px;
}

body[data-page="secure"].secure-locked {
  overflow: hidden;
}

body[data-page="secure"]::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 120;
  pointer-events: none;
  opacity: 0;
  background:
    radial-gradient(circle at 18% 14%, rgba(194,76,112,0.14), transparent 20%),
    radial-gradient(circle at 78% 12%, rgba(124,156,255,0.14), transparent 22%),
    linear-gradient(180deg, rgba(6,10,20,0.86), rgba(8,13,24,0.72));
  transition: opacity .42s ease;
}

body[data-page="secure"].ui-booting::before {
  opacity: 1;
}

body[data-page="secure"] {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

body[data-page="secure"] .nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 260;
}

body[data-page="secure"] .page-shell {
  transition: opacity .42s ease, transform .42s ease, filter .42s ease;
}

body[data-page="secure"].ui-booting .page-shell {
  opacity: 0;
  transform: translateY(14px);
  filter: blur(5px);
}

body[data-page="secure"] [data-site-header],
body[data-page="secure"] [data-site-footer] {
  display: block;
  min-height: 48px;
}

a { color: inherit; text-decoration: none; }

.container {
  width: min(calc(100% - 32px), var(--max));
  margin: 0 auto;
}

footer .container {
  width: calc(100% - 24px);
  max-width: none;
}

.page-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.page-main {
  flex: 1;
  padding-top: 0;
}

body[data-page="secure"] .page-main {
  padding-top: var(--secure-nav-offset);
}

body[data-page="secure"] .content-wrap {
  transition: opacity .28s ease, transform .28s ease, visibility .28s ease;
}

body[data-page="secure"] .page-shell.is-locked .content-wrap {
  display: none;
}

body[data-page="secure"].secure-locked .page-main {
  overflow: hidden;
}

.content-wrap {
  padding: 38px 0 60px;
}

h1 {
  margin: 0 0 10px;
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1.05;
  text-shadow:
    0 0 22px rgba(194,76,112,0.10),
    0 0 30px rgba(124,156,255,0.08);
}

.lead {
  color: var(--muted);
  margin: 0 0 28px;
  max-width: 860px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.08);
  background:
    linear-gradient(135deg, rgba(255,255,255,0.06), var(--ruby-soft)),
    rgba(255,255,255,0.04);
  color: var(--muted);
  font-size: 0.95rem;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.06),
    0 12px 28px rgba(0,0,0,0.16);
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ffca7a;
  box-shadow: 0 0 18px rgba(255,202,122,0.65);
}

.status-pill.success .status-dot {
  background: var(--success);
  box-shadow: 0 0 18px rgba(143,240,181,0.65);
}

.status-pill[data-clickable="true"] {
  cursor: pointer;
}

.status-pill[data-clickable="true"]:hover {
  border-color: var(--ruby-border);
  background:
    linear-gradient(135deg, rgba(255,255,255,0.07), rgba(194,76,112,0.12)),
    rgba(255,255,255,0.05);
}

.account-panel {
  display: grid;
  gap: 12px;
  margin-bottom: 22px;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background:
    radial-gradient(circle at 12% 0%, rgba(194,76,112,0.10), transparent 32%),
    linear-gradient(135deg, rgba(255,255,255,0.045), rgba(194,76,112,0.045)),
    rgba(255,255,255,0.03);
  box-shadow:
    0 10px 28px rgba(0,0,0,0.18),
    inset 0 1px 0 rgba(255,255,255,0.05);
}

.master-scope-box {
  display: grid;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.10);
  background:
    linear-gradient(135deg, rgba(255,255,255,0.04), rgba(194,76,112,0.05)),
    rgba(255,255,255,0.025);
}

.master-scope-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.master-scope-box label {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(232,220,230,0.84);
}

.master-scope-box select {
  width: 100%;
  padding: 11px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.12);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.05), rgba(194,76,112,0.06)),
    rgba(13, 18, 34, 0.96);
  color: #f3f7ff;
  outline: none;
  font: inherit;
  caret-color: auto;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  color-scheme: dark;
}

.master-scope-box select option {
  background: #0f1528;
  color: #eef3ff;
}

.master-scope-box select option:checked,
.master-scope-box select option:hover {
  background: #873654;
  color: #ffffff;
}

.account-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.quota-box,
.upload-box {
  display: grid;
  gap: 10px;
  min-width: 0;
  align-content: start;
}

.upload-box {
  padding: 0;
  border: 0;
  background: none;
  box-shadow: none;
}

.quota-title,
.upload-title {
  margin: 0;
  font-size: 1rem;
  line-height: 1.1;
}

.quota-meta {
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.35;
}

.quota-plan-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.plan-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.12);
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #f7fbff;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.10), rgba(255,255,255,0.03)),
    rgba(18, 24, 42, 0.92);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.08),
    0 14px 28px rgba(0,0,0,0.18);
}

.plan-badge[data-plan="bronze"] {
  background:
    linear-gradient(135deg, rgba(255,203,138,0.30), rgba(110,68,33,0.16)),
    rgba(38, 24, 16, 0.95);
  border-color: rgba(255,193,122,0.34);
  box-shadow:
    inset 0 1px 0 rgba(255,236,214,0.12),
    0 0 30px rgba(214,134,69,0.16);
}

.plan-badge[data-plan="silver"] {
  background:
    linear-gradient(135deg, rgba(222,233,255,0.30), rgba(102,124,163,0.16)),
    rgba(19, 28, 48, 0.95);
  border-color: rgba(190,210,255,0.34);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.14),
    0 0 32px rgba(130,162,235,0.18);
}

.plan-badge[data-plan="gold"] {
  background:
    linear-gradient(135deg, rgba(255,232,153,0.32), rgba(153,111,26,0.18)),
    rgba(41, 31, 12, 0.95);
  border-color: rgba(255,217,112,0.34);
  box-shadow:
    inset 0 1px 0 rgba(255,247,214,0.12),
    0 0 34px rgba(255,192,76,0.20);
}

.plan-badge[data-plan="platinum"] {
  background:
    linear-gradient(135deg, rgba(180,246,255,0.28), rgba(101,170,182,0.16)),
    rgba(15, 33, 38, 0.96);
  border-color: rgba(149,232,245,0.34);
  box-shadow:
    inset 0 1px 0 rgba(229,255,255,0.12),
    0 0 36px rgba(99,219,230,0.18);
}

.plan-badge[data-plan="custom"] {
  background:
    linear-gradient(135deg, rgba(198,177,255,0.28), rgba(120,84,198,0.18)),
    rgba(27, 20, 45, 0.95);
  border-color: rgba(183,162,255,0.34);
  box-shadow:
    inset 0 1px 0 rgba(241,233,255,0.12),
    0 0 34px rgba(157,124,255,0.18);
}

.plan-badge[data-plan="unlimited"] {
  background:
    linear-gradient(135deg, rgba(168,255,218,0.24), rgba(38,153,109,0.16)),
    rgba(14, 34, 28, 0.95);
  border-color: rgba(127,240,185,0.30);
  box-shadow:
    inset 0 1px 0 rgba(223,255,239,0.10),
    0 0 30px rgba(93,223,168,0.14);
}

.plan-icon {
  font-size: 1rem;
  line-height: 1;
}

.quota-bar {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(255,255,255,0.05), rgba(194,76,112,0.08)),
    rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
}

.quota-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent-2) 58%, rgba(212,111,141,0.94) 100%);
  box-shadow: 0 0 22px rgba(194,76,112,0.16);
  transition: width .2s ease;
}

.upload-form {
  display: grid;
  gap: 14px;
}

.upload-field {
  display: grid;
  gap: 8px;
}

.upload-field label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(232,220,230,0.84);
}

.upload-field input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.12);
  background:
    linear-gradient(135deg, rgba(255,255,255,0.04), rgba(194,76,112,0.05)),
    rgba(255,255,255,0.03);
  color: var(--text);
  outline: none;
  font: inherit;
  caret-color: auto;
}

.file-input-native {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.file-picker-shell {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  transition: transform .18s ease;
}

.file-picker-shell.is-selected {
  transform: translateY(-1px);
}

.file-picker-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: 158px;
  min-height: 56px;
  padding: 0 20px;
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(170,185,255,0.98) 0%, rgba(135,160,255,0.94) 58%, rgba(120,147,255,0.92) 100%),
    rgba(135,160,255,0.92);
  color: #07101f;
  font-weight: 800;
  cursor: pointer;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.26),
    0 16px 34px rgba(86,116,255,0.24);
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}

.file-picker-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.03);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.30),
    0 18px 36px rgba(86,116,255,0.28);
}

.file-picker-btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: rgba(8,16,31,0.14);
  font-size: 0.92rem;
  line-height: 1;
}

.file-picker-summary {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.file-picker-caption {
  color: rgba(213,223,244,0.72);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.file-picker-name {
  flex: 1;
  display: flex;
  align-items: center;
  min-height: 0;
  padding: 0;
  border-radius: 0;
  background: none;
  border: 0;
  color: #f0f4ff;
  font-size: 0.95rem;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  box-shadow: none;
}

.file-picker-size {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.10);
  background:
    linear-gradient(135deg, rgba(255,255,255,0.05), rgba(194,76,112,0.08)),
    rgba(255,255,255,0.03);
  color: rgba(231,238,255,0.86);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.upload-field select,
.gate-form select,
.password-field select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.03)),
    rgba(13, 18, 34, 0.96);
  color: #f3f7ff;
  color-scheme: dark;
}

.upload-field select option,
.gate-form select option,
.password-field select option {
  background: #0f1528;
  color: #eef3ff;
}

.upload-field select option:checked,
.upload-field select option:hover,
.gate-form select option:checked,
.gate-form select option:hover,
.password-field select option:checked,
.password-field select option:hover {
  background: #873654;
  color: #ffffff;
}

.upload-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.upload-actions .primary-btn {
  min-height: 48px;
  min-width: 154px;
  padding-inline: 18px;
  border-radius: 16px;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.22),
    0 16px 30px rgba(86,116,255,0.20);
}

.upload-actions .ghost-btn {
  min-height: 48px;
  min-width: 154px;
  padding-inline: 18px;
  border-radius: 16px;
}

.upload-progress {
  display: grid;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.08);
  background:
    linear-gradient(135deg, rgba(255,255,255,0.035), rgba(194,76,112,0.05)),
    rgba(255,255,255,0.025);
}

.upload-progress-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.78rem;
}

.upload-progress-label {
  color: rgba(232,220,230,0.84);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
}

.upload-progress-value {
  color: #edf2ff;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.upload-progress-bar {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(255,255,255,0.05), rgba(194,76,112,0.10)),
    rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
}

.upload-progress-fill {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(142,165,255,0.96) 0%, rgba(167,185,255,0.92) 56%, rgba(212,111,141,0.92) 100%);
  box-shadow:
    0 0 18px rgba(110,137,255,0.16),
    0 0 24px rgba(194,76,112,0.16);
  transition: width .18s ease;
}

.upload-progress[data-state="done"] .upload-progress-fill {
  background: linear-gradient(135deg, rgba(143,240,181,0.96), rgba(105,209,154,0.94));
  box-shadow: 0 0 20px rgba(96,223,162,0.24);
}

.upload-progress[data-state="error"] .upload-progress-fill {
  background: linear-gradient(135deg, rgba(255,149,149,0.96), rgba(255,108,108,0.92));
  box-shadow: 0 0 18px rgba(255,124,124,0.20);
}

.upload-progress.is-indeterminate .upload-progress-fill {
  width: 34% !important;
  animation: upload-progress-indeterminate 1.15s ease-in-out infinite;
}

.upload-form.is-busy .file-picker-btn,
.upload-form.is-busy .primary-btn {
  pointer-events: none;
}

.upload-form.is-busy .file-picker-btn {
  opacity: 0.72;
  filter: saturate(0.88);
}

.primary-btn:disabled,
.download-btn:disabled,
.ghost-btn:disabled {
  cursor: wait;
  opacity: 0.78;
  transform: none !important;
}

.upload-status {
  min-height: 20px;
  font-size: 0.82rem;
  line-height: 1.3;
  color: var(--muted);
}

.upload-status.ok {
  color: var(--success);
}

.upload-status.error {
  color: var(--danger);
}

.password-overlay {
  position: fixed;
  inset: 72px 0 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(12, 7, 14, 0.58);
  backdrop-filter: blur(14px);
  z-index: 35;
}

.password-card {
  width: min(100%, 480px);
  display: grid;
  gap: 14px;
  padding: 22px;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.12);
  background:
    radial-gradient(circle at 14% 0%, rgba(194,76,112,0.16), transparent 34%),
    linear-gradient(155deg, rgba(12,18,34,0.96), rgba(36,16,29,0.94));
  box-shadow:
    var(--shadow),
    0 0 42px rgba(194,76,112,0.10);
}

.password-card h2 {
  margin: 0;
  font-size: 1.2rem;
  line-height: 1.1;
}

.password-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.3;
}

.password-form {
  display: grid;
  gap: 12px;
}

.password-field {
  display: grid;
  gap: 6px;
}

.password-field label {
  font-size: 0.84rem;
  font-weight: 700;
}

.password-field input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.04);
  color: var(--text);
  outline: none;
  font: inherit;
  caret-color: auto;
}

.password-field input:focus,
.upload-field input:focus,
.gate-form input:focus {
  border-color: rgba(214,112,141,0.90);
  box-shadow:
    0 0 0 4px rgba(194,76,112,0.14),
    0 0 24px rgba(112,134,255,0.10);
}

.password-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.success-text {
  color: var(--success);
}

.tree-root {
  display: grid;
  gap: 10px;
}

.folder-card {
  background:
    linear-gradient(135deg, rgba(255,255,255,0.045), rgba(194,76,112,0.035)),
    var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow:
    0 10px 28px rgba(0,0,0,0.20),
    inset 0 1px 0 rgba(255,255,255,0.04);
  overflow: hidden;
}

.folder-card.depth-1 {
  background:
    linear-gradient(135deg, rgba(255,255,255,0.045), rgba(194,76,112,0.04)),
    rgba(255,255,255,0.03);
}

.folder-card.depth-2 {
  background:
    linear-gradient(135deg, rgba(255,255,255,0.04), rgba(194,76,112,0.035)),
    rgba(255,255,255,0.028);
}

.folder-card.depth-3 {
  background:
    linear-gradient(135deg, rgba(255,255,255,0.035), rgba(194,76,112,0.03)),
    rgba(255,255,255,0.024);
}

.folder-header {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.folder-header:hover {
  background:
    linear-gradient(135deg, rgba(255,255,255,0.03), rgba(194,76,112,0.06)),
    rgba(255,255,255,0.02);
}

.folder-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.07), rgba(194,76,112,0.08)),
    rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  font-size: 0.85rem;
  overflow: hidden;
}

.folder-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.folder-text {
  min-width: 0;
  flex: 1;
}

.folder-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex-wrap: wrap;
}

.folder-title {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.1;
  word-break: break-word;
}

.folder-sub {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.25;
  word-break: break-word;
}

.folder-badge {
  flex-shrink: 0;
  padding: 3px 7px;
  border-radius: 999px;
  background:
    linear-gradient(135deg, rgba(142,165,255,0.15), rgba(194,76,112,0.18)),
    rgba(255,255,255,0.04);
  color: #ffe5ee;
  font-size: 0.7rem;
  line-height: 1;
  white-space: nowrap;
}

.folder-chevron {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.06), rgba(194,76,112,0.08)),
    rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  font-size: 0.7rem;
  transition: transform 0.18s ease;
}

.folder-card.open > .folder-header .folder-chevron {
  transform: rotate(90deg);
}

.folder-body {
  display: none;
  padding: 0 12px 12px;
}

.folder-card.open > .folder-body {
  display: block;
}

.folder-inner {
  display: grid;
  gap: 8px;
}

.file-list {
  display: grid;
  gap: 6px;
}

.file-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.035), rgba(194,76,112,0.03)),
    var(--card-2);
  border: 1px solid rgba(255,255,255,0.08);
}

.file-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.file-left {
  min-width: 0;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  flex: 1;
}

.file-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.06), rgba(194,76,112,0.08)),
    rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  font-size: 0.8rem;
}

.file-info {
  min-width: 0;
}

.file-name {
  font-weight: 800;
  font-size: 0.9rem;
  line-height: 1.15;
  word-break: break-word;
}

.file-meta {
  color: var(--muted);
  font-size: 0.74rem;
  margin-top: 2px;
  line-height: 1.2;
  word-break: break-word;
}

.download-btn,
.primary-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 82px;
  padding: 8px 10px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(154,174,255,0.98) 0%, rgba(127,154,255,0.94) 56%, rgba(167,185,255,0.92) 100%);
  color: #08101d;
  font-weight: 800;
  font-size: 0.8rem;
  line-height: 1;
  text-decoration: none;
  border: 0;
  cursor: pointer;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.18),
    0 10px 22px rgba(86,116,255,0.18);
  transition: transform .18s ease, opacity .18s ease, box-shadow .18s ease;
}

.download-btn:hover,
.primary-btn:hover,
.ghost-btn:hover {
  transform: translateY(-1px);
}

.ghost-btn {
  border: 1px solid rgba(255,255,255,0.12);
  background:
    linear-gradient(135deg, rgba(255,255,255,0.035), rgba(126,149,255,0.045)),
    rgba(255,255,255,0.02);
  color: var(--text);
  border-radius: 10px;
  padding: 8px 10px;
  font-weight: 700;
  cursor: pointer;
}

.file-delete-btn {
  border-color: rgba(255,126,150,0.24);
  background:
    linear-gradient(135deg, rgba(255,255,255,0.03), rgba(194,76,112,0.10)),
    rgba(255,255,255,0.02);
  color: #ffdbe5;
}

.state {
  color: var(--muted);
  padding: 4px 0;
}

.folder-empty {
  padding: 8px 10px;
  border-radius: 10px;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.03), rgba(194,76,112,0.05)),
    rgba(255,255,255,0.02);
  border: 1px dashed rgba(225,132,160,0.20);
  font-size: 0.8rem;
}

.state.error,
.error-text {
  color: var(--danger);
}

.gate-overlay {
  position: fixed;
  inset: 72px 0 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: transparent;
  z-index: 30;
}

.gate-card {
  width: min(100%, 520px);
  background:
    radial-gradient(circle at 14% 0%, rgba(194,76,112,0.18), transparent 34%),
    linear-gradient(155deg, rgba(12,18,34,0.95), rgba(35,15,29,0.93));
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 24px;
  box-shadow:
    var(--shadow),
    0 0 44px rgba(194,76,112,0.10);
  padding: 28px;
}

.gate-logo {
  display: block;
  max-width: 240px;
  width: 100%;
  margin: 0 auto 18px;
  opacity: .96;
}

.gate-card h2 {
  margin: 0 0 10px;
  font-size: 1.7rem;
  text-align: center;
}

.gate-card p {
  margin: 0 0 18px;
  color: var(--muted);
  text-align: center;
}

.gate-form {
  display: grid;
  gap: 14px;
}

.gate-form label {
  font-weight: 700;
  font-size: 0.95rem;
}

.gate-form input {
  width: 100%;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.04);
  color: var(--text);
  outline: none;
  caret-color: auto;
  font-size: 1rem;
}

.gate-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.helper {
  font-size: 0.92rem;
  color: var(--muted);
  text-align: center;
}

.hidden {
  display: none !important;
}

@keyframes upload-progress-indeterminate {
  0% {
    transform: translateX(-45%);
  }
  100% {
    transform: translateX(235%);
  }
}

@media (max-width: 760px) {
  :root { --secure-nav-offset: 64px; }
  .folder-header { padding: 9px 10px; }
  .folder-body { padding: 0 10px 10px; }
  .file-item { flex-direction: column; align-items: flex-start; }
  .file-actions { width: 100%; }
  .download-btn { width: 100%; }
  .gate-card { padding: 20px; }
  .account-grid { grid-template-columns: 1fr; }
  .file-picker-shell { grid-template-columns: 1fr; }
  .file-picker-btn { min-height: 48px; width: 100%; }
  .file-picker-size { justify-self: flex-start; }
  .upload-actions { justify-content: stretch; }
  .upload-actions .primary-btn { width: 100%; }
  .nav-links { width: 100%; gap: 8px; }
  .nav-links > * { width: 100%; }
  .nav-links a,
  .nav-links button { min-height: 38px; }
  .gate-overlay { inset: 90px 0 0 0; }
}
