/* ==========================================================================
   SIGNATORY LLC — INVESTOR PORTAL STYLES
   Admissible by Design
   ========================================================================== */

:root {
  --bg-deep: #0a0a0a;
  --bg-pure: #000000;
  --gradient-brand: linear-gradient(135deg, #FFB800 0%, #E02694 50%, #8A2BE2 100%);
  --text-primary: #FFFFFF;
  --text-secondary: #C7C7CC;
  --text-muted: #8E8E93;
  --accent-cyan: #38BDF8;
  --accent-gold: #FFB800;
  --accent-magenta: #E02694;
  --accent-purple: #8A2BE2;
  --accent-red: #EF4444;
  --accent-green: #10B981;
  --card-bg: rgba(255, 255, 255, 0.02);
  --card-border: rgba(255, 255, 255, 0.08);
  --card-hover-border: rgba(255, 184, 0, 0.35);
  --card-hover-glow: rgba(224, 38, 148, 0.12);
  --font-serif: "Playfair Display", Georgia, serif;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-cursive: "Alex Brush", "Playfair Display", cursive;
  --container-max: 1080px;
}

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

html {
  font-size: 16px;
  background-color: var(--bg-deep);
  color: var(--text-primary);
  scroll-behavior: smooth;
  min-height: 100%;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-deep);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Background Ambient Lighting */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background:
    radial-gradient(circle at 15% 15%, rgba(224, 38, 148, 0.06) 0%, transparent 45%),
    radial-gradient(circle at 85% 70%, rgba(138, 43, 226, 0.07) 0%, transparent 50%),
    radial-gradient(circle at 50% 95%, rgba(255, 184, 0, 0.04) 0%, transparent 40%);
  pointer-events: none;
  z-index: 0;
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 20px;
  position: relative;
  z-index: 1;
}

/* Typography Utilities */
h1, h2, h3, h4, .serif {
  font-family: var(--font-serif);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.gradient-text {
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.section-label {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--accent-gold);
  margin-bottom: 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.section-label::before {
  content: "";
  display: inline-block;
  width: 16px;
  height: 2px;
  background: var(--gradient-brand);
  border-radius: 2px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  padding: 14px 28px;
  border-radius: 100px;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  border: 1px solid transparent;
  white-space: nowrap;
}

.btn-gradient {
  background: var(--gradient-brand);
  color: #FFFFFF;
  box-shadow: 0 4px 20px rgba(224, 38, 148, 0.35);
}

.btn-gradient:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(224, 38, 148, 0.55);
  filter: brightness(1.08);
}

.btn-gradient:active {
  transform: translateY(0);
}

.btn-outline {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.45);
  transform: translateY(-2px);
}

.btn-sm {
  padding: 8px 18px;
  font-size: 0.85rem;
}

.btn-full {
  width: 100%;
}

/* Brand Lockup Components */
.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: inherit;
}

.brand-lockup-img {
  max-width: 100%;
  height: auto;
  display: block;
}

.brand-shield-svg {
  width: 36px;
  height: 42px;
  filter: drop-shadow(0 2px 8px rgba(224, 38, 148, 0.4));
  flex-shrink: 0;
}

.brand-text-block {
  display: flex;
  flex-direction: column;
}

.brand-wordmark {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--text-primary);
  line-height: 1.1;
}

.brand-tagline-sub {
  font-family: var(--font-sans);
  font-size: 0.65rem;
  letter-spacing: 0.16em;
  color: var(--accent-gold);
  text-transform: uppercase;
  font-weight: 600;
  margin-top: 2px;
}

/* ==========================================================================
   PAGE 1: PASSWORD GATE (LANDING)
   ========================================================================== */
.gate-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  position: relative;
  z-index: 1;
}

.gate-radial-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  max-width: 90vw;
  height: 600px;
  background: radial-gradient(circle, rgba(224, 38, 148, 0.12) 0%, rgba(138, 43, 226, 0.08) 35%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.gate-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 520px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  padding: 48px 36px;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7), 0 0 40px rgba(224, 38, 148, 0.05);
  text-align: center;
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.gate-header {
  margin-bottom: 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.gate-lockup-wrap {
  width: 100%;
  max-width: 320px;
  margin-bottom: 24px;
  display: flex;
  justify-content: center;
}

.gate-title {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  line-height: 1.2;
  margin-bottom: 12px;
}

.gate-subtitle {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.5;
  max-width: 400px;
  margin: 0 auto;
}

.gate-form {
  margin-top: 32px;
  text-align: left;
}

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

.form-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 8px;
}

.input-wrapper {
  position: relative;
  width: 100%;
}

.form-input {
  width: 100%;
  padding: 14px 18px;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 1rem;
  outline: none;
  transition: all 0.25s ease;
}

.form-input:focus {
  border-color: transparent;
  box-shadow: 0 0 0 2px var(--accent-magenta), 0 0 16px rgba(224, 38, 148, 0.3);
  background: rgba(10, 10, 10, 0.9);
}

.form-input.input-error {
  border-color: var(--accent-red) !important;
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.4), 0 0 12px rgba(239, 68, 68, 0.25) !important;
}

.error-message {
  color: var(--accent-red);
  font-size: 0.85rem;
  margin-top: 8px;
  display: none;
  align-items: center;
  gap: 6px;
}

.error-message.visible {
  display: flex;
}

.gate-muted-note {
  margin-top: 24px;
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.5;
  text-align: center;
}

.gate-muted-note a {
  color: var(--text-secondary);
  text-decoration: underline;
  transition: color 0.2s ease;
}

.gate-muted-note a:hover {
  color: #FFFFFF;
}

/* Shake Animation on Error */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-8px); }
  40%, 80% { transform: translateX(8px); }
}

.shake {
  animation: shake 0.4s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

/* ==========================================================================
   DISCLAIMER GATE & DIGITAL SIGNATURE ENHANCEMENTS
   ========================================================================== */
.gate-card.gate-card-disclaimer {
  max-width: 860px;
  padding: 40px 38px;
  text-align: left;
}

.gate-meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 24px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 12px 18px;
  margin: 18px 0;
  font-size: 0.84rem;
}

@media (max-width: 600px) {
  .gate-meta-grid {
    grid-template-columns: 1fr;
    gap: 6px;
  }
}

.gate-meta-item {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  padding-bottom: 4px;
}

.gate-meta-label {
  color: var(--text-muted);
}

.gate-meta-val {
  color: #FFFFFF;
  font-weight: 600;
}

.gate-meta-val.mono {
  font-family: 'JetBrains Mono', monospace;
  color: #38BDF8;
}

.gate-legal-panel {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-left: 3px solid transparent;
  border-image: linear-gradient(180deg, #FFB800 0%, #E02694 50%, #8A2BE2 100%) 1;
  border-radius: 4px;
  padding: 14px 18px;
  margin: 16px 0;
  max-height: 240px;
  overflow-y: auto;
}

.gate-legal-headline {
  font-family: var(--font-serif);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent-gold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.gate-legal-warning {
  font-size: 0.74rem;
  font-weight: 700;
  color: #FFFFFF;
  line-height: 1.4;
  margin-bottom: 10px;
  text-align: justify;
}

.gate-legal-clauses {
  font-size: 0.73rem;
  color: var(--text-secondary);
  line-height: 1.45;
  text-align: justify;
}

.gate-legal-clauses p {
  margin-bottom: 8px;
}

.gate-legal-clauses strong {
  color: #E2E8F0;
}

.gate-signature-section {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 20px;
  margin: 20px 0 16px;
}

.gate-sig-title {
  font-family: var(--font-serif);
  font-size: 0.95rem;
  font-weight: 700;
  color: #FFFFFF;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.gate-sig-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin-bottom: 14px;
}

.gate-sig-preview-box {
  background: rgba(0, 0, 0, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  padding: 12px 18px;
  margin-bottom: 16px;
  text-align: center;
  min-height: 64px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.gate-sig-preview-text {
  font-family: 'Alex Brush', cursive;
  font-size: 2.3rem;
  color: #6B9FD4;
  line-height: 1.1;
  text-shadow: 0 0 12px rgba(107, 159, 212, 0.4);
  transition: all 0.2s ease;
}

.gate-sig-preview-label {
  font-size: 0.68rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: 4px;
}

.gate-fields-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 600px) {
  .gate-fields-row {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

.gate-checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.4;
  cursor: pointer;
  margin: 14px 0 18px;
}

.gate-checkbox-label input[type="checkbox"] {
  margin-top: 3px;
  accent-color: #E02694;
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.gate-footer-lockup {
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 14px;
  margin-top: 24px;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.gate-footer-poly-img {
  height: 18px;
  width: auto;
  vertical-align: middle;
  margin-bottom: 4px;
}

/* ==========================================================================
   PAGE 2: DASHBOARD
   ========================================================================== */
.dashboard-page {
  padding-bottom: 80px;
}

/* SECTION A: HEADER */
.dash-header {
  position: sticky;
  top: 0;
  width: 100%;
  z-index: 100;
  background: rgba(10, 10, 10, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--card-border);
  padding: 16px 0;
}

.dash-header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.dash-lockup {
  max-width: 280px;
}

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

.portal-badge {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  padding: 6px 12px;
  background: rgba(255, 184, 0, 0.1);
  border: 1px solid rgba(255, 184, 0, 0.3);
  color: var(--accent-gold);
  border-radius: 100px;
}

.btn-signout {
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 6px 14px;
  border-radius: 100px;
  border: 1px solid var(--card-border);
  background: rgba(255, 255, 255, 0.03);
  transition: all 0.2s ease;
  cursor: pointer;
}

.btn-signout:hover {
  color: #FFFFFF;
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.07);
}

/* Dashboard Sections Common */
.dash-section {
  padding: 48px 0;
}

.dash-section-title {
  font-size: clamp(1.85rem, 3.2vw, 2.5rem);
  line-height: 1.2;
  margin-bottom: 14px;
}

.dash-section-body {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.65;
  max-width: 780px;
}

/* SECTION B: WELCOME */
.welcome-section {
  padding-top: 60px;
}

/* SECTION C: PERSONAL NOTE FROM FOUNDER */
.founder-note-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-left: 4px solid var(--accent-magenta);
  border-image: var(--gradient-brand) 1 100%;
  border-radius: 16px;
  padding: 40px 36px;
  backdrop-filter: blur(12px);
  position: relative;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.founder-body-text {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-top: 16px;
  margin-bottom: 24px;
}

.founder-body-text p + p {
  margin-top: 16px;
}

.founder-signature-block {
  margin-top: 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 20px;
}

.founder-name {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 700;
  color: #FFFFFF;
}

.founder-title {
  font-size: 0.88rem;
  color: var(--accent-gold);
  letter-spacing: 0.04em;
}

/* SECTION D: THE ASK */
.ask-stats-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin: 36px 0 24px;
}

.stat-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 32px 24px;
  text-align: center;
  position: relative;
  overflow: hidden;
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.stat-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gradient-brand);
}

.stat-card:hover {
  transform: translateY(-4px);
  border-color: var(--card-hover-border);
}

.stat-value {
  font-family: var(--font-serif);
  font-size: clamp(2.2rem, 3.8vw, 3rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 8px;
}

.stat-label {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-secondary);
}

.ask-breakdown-note {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 820px;
  border-left: 2px solid var(--accent-gold);
  padding-left: 16px;
  margin-top: 20px;
}

/* SECTION E: INVESTOR DOCUMENTS */
.doc-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin-top: 36px;
}

.doc-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.3s ease;
  position: relative;
}

.doc-card:hover {
  border-color: var(--card-hover-border);
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4), 0 0 20px rgba(224, 38, 148, 0.08);
}

.doc-card-top {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 20px;
}

.doc-icon-wrap {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--card-border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--accent-gold);
}

.doc-content {
  flex: 1;
}

.doc-tag {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent-gold);
  margin-bottom: 4px;
}

.doc-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 6px;
  color: #FFFFFF;
}

.doc-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.doc-card-action {
  margin-top: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 18px;
  flex-wrap: wrap;
}

.doc-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.doc-btn-group {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.doc-btn-group .btn-icon-download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.doc-card-top-clickable {
  cursor: pointer;
  border-radius: 12px;
  transition: opacity 0.2s ease;
}

.doc-card-top-clickable:hover {
  opacity: 0.92;
}

/* SECTION F: CONTACT THE FOUNDER */
.contact-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  padding: 44px 36px;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}

.contact-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 20px;
  padding: 1px;
  background: var(--gradient-brand);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.contact-headline {
  font-size: clamp(1.8rem, 3.5vw, 2.3rem);
  margin-bottom: 12px;
}

.contact-body {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 580px;
  margin: 0 auto 32px;
}

.contact-cta-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

/* SECTION G: FOOTER */
.dash-footer {
  border-top: 1px solid var(--card-border);
  padding: 48px 0 32px;
  margin-top: 40px;
  text-align: center;
}

.footer-shield-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 12px;
}

.footer-company-name {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: #FFFFFF;
}

.footer-confidential {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent-gold);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.footer-copy {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.footer-polysignature-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
}

.footer-polysignature-cursive {
  font-family: var(--font-cursive);
  font-size: 1.6rem;
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
  letter-spacing: 0.05em;
}

/* Auth guard visibility management */
.auth-protected {
  opacity: 0;
  transition: opacity 0.25s ease;
}

.auth-protected.authenticated {
  opacity: 1;
}

/* ==========================================================================
   RESPONSIVE BREAKPOINTS (768px tablet, 1024px desktop)
   ========================================================================== */

/* Tablet & Desktop (>= 768px) */
@media (min-width: 768px) {
  .container {
    padding: 0 32px;
  }

  .ask-stats-row {
    grid-template-columns: repeat(3, 1fr);
  }

  .doc-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .contact-cta-row {
    flex-direction: row;
    gap: 20px;
  }

  .gate-card {
    padding: 56px 48px;
  }
}

/* Desktop (>= 1024px) */
@media (min-width: 1024px) {
  .dash-section {
    padding: 64px 0;
  }

  .welcome-section {
    padding-top: 80px;
  }
}

/* Mobile Small (< 420px) */
@media (max-width: 420px) {
  .gate-card {
    padding: 36px 20px;
    border-radius: 16px;
  }

  .dash-nav-right .portal-badge {
    display: none;
  }

  .doc-btn-group {
    width: 100%;
    justify-content: stretch;
  }

  .doc-btn-group .btn {
    flex: 1;
    text-align: center;
    justify-content: center;
  }
}

/* ==========================================================================
   DOCUMENT VIEWER MODAL
   ========================================================================== */
.doc-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: docModalFadeIn 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes docModalFadeIn {
  from {
    opacity: 0;
    transform: scale(0.98);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.doc-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(4, 4, 7, 0.88);
  backdrop-filter: blur(10px);
  z-index: 1;
}

.doc-modal-container {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1160px;
  height: 92vh;
  max-height: 940px;
  background: #0B0B0F;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.85), 0 0 45px rgba(224, 38, 148, 0.16);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.doc-modal-header {
  padding: 14px 20px;
  background: rgba(18, 18, 24, 0.98);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-shrink: 0;
}

.doc-modal-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.doc-modal-icon-wrap {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(255, 184, 0, 0.1);
  border: 1px solid rgba(255, 184, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-gold);
  flex-shrink: 0;
}

.doc-modal-title-group {
  min-width: 0;
}

.doc-modal-tag {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent-gold);
  line-height: 1;
  margin-bottom: 3px;
}

.doc-modal-title {
  font-size: 1.08rem;
  font-weight: 700;
  color: #FFFFFF;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin: 0;
  line-height: 1.25;
}

.doc-modal-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.doc-modal-close {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #FFFFFF;
  font-size: 1.6rem;
  line-height: 1;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.doc-modal-close:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.4);
  color: #EF4444;
}

.doc-modal-body {
  position: relative;
  flex: 1;
  min-height: 0;
  background: #14141C;
}

.doc-modal-loading {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--text-secondary);
  font-size: 0.92rem;
  background: #0B0B0F;
  z-index: 1;
  transition: opacity 0.3s ease;
}

.doc-modal-loading.hidden {
  opacity: 0;
  pointer-events: none;
}

.doc-spinner {
  width: 38px;
  height: 38px;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--accent-magenta);
  border-radius: 50%;
  animation: docSpin 0.75s linear infinite;
}

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

.doc-modal-iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

.doc-modal-footer {
  padding: 10px 20px;
  background: rgba(14, 14, 18, 0.98);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-muted);
  flex-shrink: 0;
  flex-wrap: wrap;
  gap: 8px;
}

.doc-modal-footer-links {
  display: flex;
  align-items: center;
  gap: 10px;
}

.doc-footer-link {
  color: var(--accent-gold);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.doc-footer-link:hover {
  color: #FFFFFF;
  text-decoration: underline;
}

@media (max-width: 640px) {
  .doc-modal {
    padding: 0;
  }
  .doc-modal-container {
    height: 100vh;
    max-height: 100vh;
    border-radius: 0;
    border: none;
  }
  .doc-modal-header {
    padding: 10px 14px;
  }
  .doc-modal-title {
    max-width: 160px;
  }
}
