/* ═══════════════════════════════════════════════════════════
   VaultFolio — Confidential Document Portal
   Apple design system: dark, gold, cinematic
   ═══════════════════════════════════════════════════════════ */

/* ── Tokens ──────────────────────────────────────────────── */
:root {
  --bg:           #080808;
  --bg-elevated:  #111111;
  --bg-card:      rgba(18, 18, 18, 0.72);
  --bg-card-hover:rgba(24, 24, 24, 0.88);
  --gold:         #c8a84e;
  --gold-dim:     rgba(200, 168, 78, 0.18);
  --gold-glow:    rgba(200, 168, 78, 0.08);
  --surface:      rgba(255,255,255,0.04);
  --surface-hover:rgba(255,255,255,0.07);
  --border:       rgba(255,255,255,0.08);
  --border-gold:  rgba(200,168,78,0.35);
  --text-primary: #f5f5f7;
  --text-secondary:#a1a1a6;
  --text-tertiary: #636366;
  --red:          #ef4444;
  --red-dim:      rgba(239,68,68,0.15);
  --teal:         #2dd4bf;
  --purple:       #a78bfa;
  --blue:         #60a5fa;
  --green:        #22c55e;
  --radius-sm:    10px;
  --radius:       14px;
  --radius-lg:    20px;
  --radius-xl:    28px;
  --shadow-card:  0 1px 3px rgba(0,0,0,0.5), 0 4px 16px rgba(0,0,0,0.4);
  --shadow-gold:  0 0 40px rgba(200,168,78,0.12);
  --font:         'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Text', system-ui, sans-serif;
}

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

html { font-size: 16px; scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text-primary);
  font-family: var(--font);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

a { color: var(--gold); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Screen transitions ──────────────────────────────────── */
.screen { display: none; opacity: 0; transition: opacity 0.45s ease; }
.screen.active { display: block; opacity: 1; }

/* ═══════════════════════════════════════════════════════════
   AUTH SCREEN
   ═══════════════════════════════════════════════════════════ */

#auth-screen {
  position: relative;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  overflow: hidden;
}

/* ── Vault video background ──────────────────────────────── */
.vault-video-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.vault-video-bg video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1.8s ease;
}

.vault-video-bg video.loaded { opacity: 1; }

/* Fallback gradient shown when video not yet loaded */
.vault-video-fallback {
  position: absolute;
  inset: 0;
  background:
    /* Central gold glow — simulates vault light source */
    radial-gradient(ellipse 55% 55% at 50% 48%, rgba(200,168,78,0.18) 0%, rgba(200,168,78,0.06) 35%, transparent 65%),
    /* Outer warm rim light */
    radial-gradient(ellipse 100% 100% at 50% 50%, rgba(180,140,50,0.08) 0%, transparent 75%),
    /* Bottom shadow */
    radial-gradient(ellipse 80% 50% at 50% 100%, rgba(0,0,0,0.8) 0%, transparent 70%),
    /* Base dark */
    linear-gradient(175deg, #0e0d0a 0%, #090808 45%, #060606 100%);
}

/* The vault door "frame" — a subtle metallic ring that appears over the video */
.vault-ring {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 1;
}

.vault-ring-inner {
  width: min(560px, 92vw);
  height: min(560px, 92vw);
  border-radius: 50%;
  border: 1px solid rgba(200,168,78,0.14);
  box-shadow:
    0 0 0 1px rgba(200,168,78,0.06),
    0 0 80px rgba(200,168,78,0.08),
    inset 0 0 80px rgba(200,168,78,0.04);
  animation: ring-breathe 6s ease-in-out infinite;
}

@keyframes ring-breathe {
  0%, 100% { transform: scale(1);    opacity: 0.6; }
  50%       { transform: scale(1.015); opacity: 1; }
}

/* Multi-layer overlay for depth + readability */
.auth-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  background:
    /* Strong vignette */
    radial-gradient(ellipse 100% 100% at 50% 50%, transparent 30%, rgba(0,0,0,0.65) 100%),
    /* Darken the entire scene */
    rgba(0, 0, 0, 0.58);
  backdrop-filter: blur(0px);
}

/* Subtle scan-line texture for cinematic feel */
.auth-overlay::after {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0,0,0,0.03) 2px,
    rgba(0,0,0,0.03) 4px
  );
  pointer-events: none;
}

/* ── Auth container ──────────────────────────────────────── */
.auth-container {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 420px;
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
}

/* ── Logo ────────────────────────────────────────────────── */
.auth-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  animation: fade-up 0.7s ease both;
}

.auth-logo svg {
  filter: drop-shadow(0 0 20px rgba(200,168,78,0.4));
}

.auth-logo-text {
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, #e8d48a 0%, #c8a84e 50%, #a07d2e 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: none;
}

/* ── Auth card ───────────────────────────────────────────── */
.auth-card {
  width: 100%;
  background: rgba(10, 10, 10, 0.82);
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: var(--radius-xl);
  padding: 36px 32px;
  backdrop-filter: blur(40px) saturate(160%);
  -webkit-backdrop-filter: blur(40px) saturate(160%);
  box-shadow:
    0 0 0 0.5px rgba(200,168,78,0.15),
    0 2px 4px rgba(0,0,0,0.6),
    0 8px 32px rgba(0,0,0,0.5),
    0 0 80px rgba(200,168,78,0.06);
  animation: fade-up 0.7s 0.1s ease both;
}

/* ── Card header ─────────────────────────────────────────── */
.auth-card-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
  text-align: center;
}

.auth-lock-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--gold-dim);
  border: 1px solid var(--border-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  box-shadow: 0 0 24px rgba(200,168,78,0.15);
}

.auth-title {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.3px;
  color: var(--text-primary);
}

.auth-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.55;
}

/* ── Divider label ───────────────────────────────────────── */
.auth-divider-label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  text-align: center;
  margin-bottom: 16px;
}

/* ── Auth buttons ────────────────────────────────────────── */
.auth-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.auth-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  height: 52px;
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.1px;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.auth-btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0);
  transition: background 0.15s ease;
}

.auth-btn:hover::after { background: rgba(255,255,255,0.06); }
.auth-btn:active { transform: scale(0.985); }

/* Apple button — black with white text */
.auth-btn-apple {
  background: #ffffff;
  color: #000000;
}

.auth-btn-apple:hover {
  background: #f0f0f0;
}

/* Google button — surface with border */
.auth-btn-google {
  background: rgba(255,255,255,0.05);
  color: var(--text-primary);
  border: 1px solid rgba(255,255,255,0.12);
}

.auth-btn-google:hover {
  background: rgba(255,255,255,0.09);
  border-color: rgba(255,255,255,0.18);
}

.auth-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* ── Auth note ───────────────────────────────────────────── */
.auth-note {
  margin-top: 20px;
  font-size: 12px;
  color: var(--text-tertiary);
  text-align: center;
  line-height: 1.6;
}

/* ── Error message ───────────────────────────────────────── */
.auth-error-msg {
  margin-top: 14px;
  padding: 12px 16px;
  background: rgba(239,68,68,0.1);
  border: 1px solid rgba(239,68,68,0.25);
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: #fca5a5;
  text-align: center;
}

/* ── Loading ─────────────────────────────────────────────── */
.auth-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 16px;
  font-size: 13px;
  color: var(--text-secondary);
}

.auth-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(200,168,78,0.2);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
}

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

/* ── Footer note ─────────────────────────────────────────── */
.auth-footer-note {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--text-tertiary);
  text-align: center;
  animation: fade-up 0.7s 0.2s ease both;
}

/* ═══════════════════════════════════════════════════════════
   DOCS SCREEN — NAV
   ═══════════════════════════════════════════════════════════ */

.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(8,8,8,0.85);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-brand-name {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.2px;
  color: var(--text-primary);
}

.nav-brand-tag {
  display: block;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  margin-top: -2px;
  opacity: 0.8;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.nav-user {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--gold-dim);
  border: 1px solid var(--border-gold);
  color: var(--gold);
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  letter-spacing: 0;
  flex-shrink: 0;
}

.nav-user-email {
  font-size: 13px;
  color: var(--text-secondary);
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-signout {
  font-family: var(--font);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-tertiary);
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.nav-signout:hover {
  color: var(--text-secondary);
  border-color: rgba(255,255,255,0.18);
  background: var(--surface);
}

/* ═══════════════════════════════════════════════════════════
   DOCS HERO
   ═══════════════════════════════════════════════════════════ */

.docs-hero {
  position: relative;
  overflow: hidden;
  padding: 72px 24px 56px;
  background:
    radial-gradient(ellipse 60% 80% at 50% 0%, rgba(200,168,78,0.07) 0%, transparent 70%),
    linear-gradient(180deg, rgba(12,11,9,1) 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--border);
}

/* Fine grain texture */
.docs-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  opacity: 0.3;
  pointer-events: none;
}

.docs-hero-inner {
  position: relative;
  max-width: 1100px;
  margin: 0 auto;
}

.docs-hero-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 16px;
  opacity: 0.85;
}

.docs-hero-title {
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 700;
  letter-spacing: -1.5px;
  line-height: 1.06;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.docs-hero-sub {
  font-size: 15px;
  color: var(--text-secondary);
  max-width: 500px;
  line-height: 1.6;
  margin-bottom: 36px;
}

.docs-hero-stats {
  display: flex;
  align-items: center;
  gap: 0;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 28px;
  width: fit-content;
  gap: 28px;
}

.docs-stat { text-align: center; }

.docs-stat-val {
  display: block;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--gold);
  line-height: 1;
  margin-bottom: 4px;
}

.docs-stat-label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-tertiary);
}

.docs-stat-div {
  width: 1px;
  height: 32px;
  background: var(--border);
  flex-shrink: 0;
}

/* ═══════════════════════════════════════════════════════════
   DOCS MAIN
   ═══════════════════════════════════════════════════════════ */

.docs-main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 24px 80px;
  display: flex;
  flex-direction: column;
  gap: 48px;
}

/* ── Usage banner ────────────────────────────────────────── */
.usage-banner {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 16px 20px;
  background: rgba(245,158,11,0.07);
  border: 1px solid rgba(245,158,11,0.2);
  border-radius: var(--radius);
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
  flex-shrink: 0;
}

.usage-banner svg { flex-shrink: 0; margin-top: 2px; }
.usage-banner strong { color: #fbbf24; font-weight: 600; }
.usage-banner a { color: #fbbf24; }

/* ── Section ─────────────────────────────────────────────── */
.docs-section { display: flex; flex-direction: column; gap: 16px; }

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.3px;
  color: var(--text-primary);
}

.section-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.section-badge {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 4px 10px;
  white-space: nowrap;
}

.section-badge-gold {
  color: var(--gold);
  background: var(--gold-dim);
  border-color: var(--border-gold);
}

.section-badge-red {
  color: #fca5a5;
  background: rgba(239,68,68,0.1);
  border-color: rgba(239,68,68,0.25);
}

/* ── Catalogue card ──────────────────────────────────────── */
.catalogue-card {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 24px 28px;
  background: var(--bg-card);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: var(--shadow-gold);
  position: relative;
  overflow: hidden;
}

.catalogue-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(200,168,78,0.05) 0%, transparent 50%);
  pointer-events: none;
}

.catalogue-card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(200,168,78,0.5);
  transform: translateY(-1px);
  box-shadow: 0 0 60px rgba(200,168,78,0.15), var(--shadow-card);
}

.catalogue-card-icon {
  width: 56px;
  height: 56px;
  flex-shrink: 0;
  background: var(--gold-dim);
  border: 1px solid var(--border-gold);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.catalogue-card-content { flex: 1; min-width: 0; }

.catalogue-card-content h3 {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.2px;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.catalogue-card-content p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 10px;
}

.catalogue-card-meta {
  display: flex;
  align-items: center;
  gap: 10px;
}

.catalogue-card-arrow {
  color: var(--gold);
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.catalogue-card:hover .catalogue-card-arrow {
  transform: translateX(4px);
}

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

/* ── Doc card ────────────────────────────────────────────── */
.doc-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 22px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.doc-card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(255,255,255,0.14);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.4), 0 2px 4px rgba(0,0,0,0.3);
}

/* Featured */
.doc-card-featured {
  border-color: rgba(200,168,78,0.25);
  background: rgba(200,168,78,0.04);
}

.doc-card-featured:hover {
  border-color: rgba(200,168,78,0.45);
  box-shadow: 0 0 40px rgba(200,168,78,0.1), 0 8px 32px rgba(0,0,0,0.4);
}

/* Legal */
.doc-card-legal {
  border-color: rgba(239,68,68,0.18);
  background: rgba(239,68,68,0.03);
}

.doc-card-legal:hover {
  border-color: rgba(239,68,68,0.35);
}

/* Live */
.doc-card-live {
  border-color: rgba(200,168,78,0.3);
}

.doc-card-live:hover {
  border-color: rgba(200,168,78,0.5);
  box-shadow: 0 0 40px rgba(200,168,78,0.12), 0 8px 32px rgba(0,0,0,0.4);
}

/* ── Card internals ──────────────────────────────────────── */
.doc-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.doc-id {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--text-tertiary);
  font-variant-numeric: tabular-nums;
}

.doc-title {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.2px;
  color: var(--text-primary);
  line-height: 1.35;
}

.doc-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.55;
  flex: 1;
}

.doc-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.meta-sep { color: var(--text-tertiary); }
.meta-text { font-size: 12px; color: var(--text-tertiary); }

.doc-audience {
  font-size: 12px;
  color: var(--text-tertiary);
  line-height: 1.4;
}

.doc-audience-restricted {
  color: #fca5a5;
  font-weight: 500;
}

.doc-action {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-tertiary);
  margin-top: 4px;
  transition: color 0.15s ease;
}

.doc-card:hover .doc-action { color: var(--text-secondary); }
.doc-card-featured:hover .doc-action,
.doc-card-live:hover .doc-action { color: var(--gold); }

/* ── Tags ────────────────────────────────────────────────── */
.tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 6px;
  padding: 3px 9px;
}

.tag-investor {
  color: var(--gold);
  background: rgba(200,168,78,0.12);
  border: 1px solid rgba(200,168,78,0.25);
}

.tag-technical {
  color: var(--teal);
  background: rgba(45,212,191,0.1);
  border: 1px solid rgba(45,212,191,0.2);
}

.tag-strategy {
  color: var(--purple);
  background: rgba(167,139,250,0.1);
  border: 1px solid rgba(167,139,250,0.2);
}

.tag-legal {
  color: #fca5a5;
  background: rgba(239,68,68,0.1);
  border: 1px solid rgba(239,68,68,0.2);
}

.tag-ops {
  color: var(--blue);
  background: rgba(96,165,250,0.1);
  border: 1px solid rgba(96,165,250,0.2);
}

.tag-product {
  color: var(--green);
  background: rgba(34,197,94,0.1);
  border: 1px solid rgba(34,197,94,0.2);
}

/* ── Status chips ────────────────────────────────────────── */
.status {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  border-radius: 5px;
  padding: 2px 8px;
}

.status-current { color: #86efac; background: rgba(34,197,94,0.1); border: 1px solid rgba(34,197,94,0.2); }
.status-archive { color: var(--text-tertiary); background: var(--surface); border: 1px solid var(--border); }
.status-live { color: var(--gold); background: var(--gold-dim); border: 1px solid rgba(200,168,78,0.3); }

/* ═══════════════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════════════ */

.docs-footer {
  border-top: 1px solid var(--border);
  padding: 28px 24px;
  text-align: center;
  font-size: 12px;
  color: var(--text-tertiary);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.docs-footer a { color: var(--text-tertiary); }
.docs-footer a:hover { color: var(--gold); }

/* ═══════════════════════════════════════════════════════════
   ANIMATIONS
   ═══════════════════════════════════════════════════════════ */

@keyframes fade-up {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Stagger doc cards */
.doc-card:nth-child(1) { animation: fade-up 0.5s 0.05s ease both; }
.doc-card:nth-child(2) { animation: fade-up 0.5s 0.10s ease both; }
.doc-card:nth-child(3) { animation: fade-up 0.5s 0.15s ease both; }
.doc-card:nth-child(4) { animation: fade-up 0.5s 0.20s ease both; }

/* Docs screen entry */
#docs-screen.active .nav { animation: fade-up 0.4s ease both; }
#docs-screen.active .docs-hero { animation: fade-up 0.5s 0.05s ease both; }
#docs-screen.active .docs-main { animation: fade-up 0.5s 0.1s ease both; }

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════ */

@media (max-width: 600px) {
  .auth-card { padding: 28px 24px; }
  .auth-container { padding: 20px 16px; gap: 24px; }

  .nav-user-email { display: none; }
  .nav-inner { padding: 0 16px; }

  .docs-hero { padding: 48px 16px 40px; }
  .docs-main { padding: 28px 16px 60px; gap: 36px; }

  .docs-hero-stats {
    flex-wrap: wrap;
    gap: 16px;
    padding: 16px 20px;
  }

  .docs-stat-div { display: none; }

  .doc-grid { grid-template-columns: 1fr; }

  .catalogue-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }

  .catalogue-card-arrow { display: none; }
}

/* ═══════════════════════════════════════════════════════════
   REQUEST ACCESS MODAL
   ═══════════════════════════════════════════════════════════ */

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fade-in 0.2s ease;
}

@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

.modal-card {
  width: 100%;
  max-width: 480px;
  background: rgba(12,12,12,0.95);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-xl);
  padding: 36px 32px;
  backdrop-filter: blur(40px);
  box-shadow: 0 0 0 0.5px rgba(200,168,78,0.15), 0 24px 64px rgba(0,0,0,0.6);
  animation: fade-up 0.25s ease;
}

.modal-header { text-align: center; margin-bottom: 28px; }

.request-form { display: flex; flex-direction: column; gap: 16px; }

.form-group { display: flex; flex-direction: column; gap: 7px; }

.form-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
}

.form-required { color: var(--gold); }

.form-input {
  font-family: var(--font);
  font-size: 14px;
  color: var(--text-primary);
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  outline: none;
  transition: border-color 0.15s ease;
  width: 100%;
  box-sizing: border-box;
}

.form-input:focus {
  border-color: rgba(200,168,78,0.5);
  background: rgba(255,255,255,0.07);
}

.form-input::placeholder { color: var(--text-tertiary); }

.form-textarea {
  resize: vertical;
  min-height: 88px;
  line-height: 1.5;
}

.req-success-msg {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: rgba(34,197,94,0.1);
  border: 1px solid rgba(34,197,94,0.25);
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: #86efac;
}

.modal-actions {
  display: flex;
  gap: 12px;
  margin-top: 4px;
}

.modal-cancel {
  font-family: var(--font);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-tertiary);
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0 20px;
  height: 48px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.modal-cancel:hover { color: var(--text-secondary); background: rgba(255,255,255,0.08); }

/* Request access link on auth screen */
.auth-request-link {
  text-align: center;
  margin-top: 8px;
}

.auth-request-link button {
  background: none;
  border: none;
  font-family: var(--font);
  font-size: 13px;
  color: var(--text-tertiary);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.15s ease;
}

.auth-request-link button:hover { color: var(--gold); }

/* ═══════════════════════════════════════════════════════════
   ADMIN PANEL
   ═══════════════════════════════════════════════════════════ */

.admin-tab {
  font-family: var(--font);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-tertiary);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 7px 16px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.admin-tab:hover { color: var(--text-secondary); }
.admin-tab.active { color: var(--gold); border-color: var(--border-gold); background: var(--gold-dim); }

.request-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  margin-bottom: 12px;
  transition: border-color 0.2s ease;
}

.request-card.pending { border-color: rgba(245,158,11,0.2); }
.request-card.approved { border-color: rgba(34,197,94,0.2); }
.request-card.denied { border-color: rgba(239,68,68,0.15); }

.request-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.request-card-name {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.2px;
  color: var(--text-primary);
  margin-bottom: 3px;
}

.request-card-meta {
  font-size: 12px;
  color: var(--text-tertiary);
}

.request-card-reason {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.55;
  padding: 12px;
  background: rgba(255,255,255,0.03);
  border-radius: 8px;
  margin-bottom: 16px;
  border-left: 2px solid var(--border);
}

.request-card-actions { display: flex; gap: 10px; }

.btn-approve {
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  color: #000;
  background: var(--gold);
  border: none;
  border-radius: 8px;
  padding: 8px 20px;
  cursor: pointer;
  transition: opacity 0.15s ease;
}

.btn-approve:hover { opacity: 0.85; }

.btn-deny {
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  color: #fca5a5;
  background: rgba(239,68,68,0.1);
  border: 1px solid rgba(239,68,68,0.25);
  border-radius: 8px;
  padding: 8px 20px;
  cursor: pointer;
  transition: opacity 0.15s ease;
}

.btn-deny:hover { opacity: 0.8; }

.request-empty {
  text-align: center;
  padding: 60px 0;
  color: var(--text-tertiary);
  font-size: 14px;
}

.status-badge-pending { color: #fbbf24; background: rgba(245,158,11,0.1); border: 1px solid rgba(245,158,11,0.25); }
.status-badge-approved { color: #86efac; background: rgba(34,197,94,0.1); border: 1px solid rgba(34,197,94,0.25); }
.status-badge-denied { color: #fca5a5; background: rgba(239,68,68,0.1); border: 1px solid rgba(239,68,68,0.25); }
