:root {
  --bg-primary: #0b0f19;
  --bg-secondary: #111827;
  --bg-card: rgba(17, 24, 39, 0.75);
  --bg-card-hover: rgba(31, 41, 55, 0.85);
  --border-color: rgba(255, 255, 255, 0.1);
  --border-focus: #3b82f6;
  --text-main: #f3f4f6;
  --text-muted: #9ca3af;
  --text-dim: #6b7280;
  --accent-blue: #3b82f6;
  --accent-cyan: #06b6d4;
  --accent-indigo: #6366f1;
  --accent-purple: #8b5cf6;
  --accent-emerald: #10b981;
  --accent-rose: #f43f5e;
  --accent-amber: #f59e0b;
  --gradient-primary: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
  --gradient-glow: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, rgba(139, 92, 246, 0.15) 100%);
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 10px 25px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -2px rgba(0, 0, 0, 0.3);
  --shadow-glow: 0 0 30px rgba(59, 130, 246, 0.25);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
}

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

html {
  scroll-behavior: smooth;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--text-main);
  background-color: var(--bg-primary);
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
  max-width: 100%;
}

body {
  min-height: 100vh;
  max-width: 100%;
  overflow-x: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
  background: radial-gradient(circle at 15% 15%, rgba(59, 130, 246, 0.08) 0%, transparent 40%),
              radial-gradient(circle at 85% 35%, rgba(139, 92, 246, 0.08) 0%, transparent 45%),
              radial-gradient(circle at 50% 85%, rgba(6, 182, 212, 0.05) 0%, transparent 50%),
              var(--bg-primary);
  background-attachment: fixed;
  padding-left: env(safe-area-inset-left, 0);
  padding-right: env(safe-area-inset-right, 0);
  padding-bottom: env(safe-area-inset-bottom, 0);
}

/* Container */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
}

@media (max-width: 768px) {
  .container {
    padding: 0 16px;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 12px;
  }
}

/* Navigation Bar */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11, 15, 25, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  padding: 12px 0;
}

.nav-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-main);
  font-weight: 700;
  font-size: 1.1rem;
}

.nav-avatar-mini {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--accent-blue);
  flex-shrink: 0;
}

/* Mobile Actions in Nav */
.nav-mobile-actions {
  display: none;
  align-items: center;
  gap: 8px;
}

.hamburger-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-color);
  color: #fff;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  cursor: pointer;
  transition: all 0.2s;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

.hamburger-btn:hover,
.hamburger-btn:active {
  background: rgba(255, 255, 255, 0.18);
}

.nav-mobile-token-btn {
  padding: 8px 12px !important;
  font-size: 0.82rem !important;
  min-height: 40px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 16px;
  list-style: none;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.92rem;
  font-weight: 500;
  transition: color 0.2s, background-color 0.2s;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
}

.nav-links a:hover {
  color: #fff;
  background-color: rgba(255, 255, 255, 0.05);
}

.nav-btn-token {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(139, 92, 246, 0.2));
  border: 1px solid rgba(59, 130, 246, 0.4) !important;
  color: #60a5fa !important;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.nav-btn-token:hover {
  background: linear-gradient(135deg, #3b82f6, #6366f1) !important;
  color: #fff !important;
  box-shadow: 0 0 16px rgba(59, 130, 246, 0.4);
}

/* Mobile Nav Drawer */
@media (max-width: 768px) {
  .nav-mobile-actions {
    display: flex;
  }
  .nav-desktop-token-btn {
    display: none;
  }
  .nav-links {
    display: none;
    position: absolute;
    top: calc(100% + 12px);
    left: 0;
    right: 0;
    width: 100%;
    background: rgba(11, 15, 25, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    flex-direction: column;
    padding: 16px;
    gap: 8px;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.85);
    z-index: 1000;
  }
  .nav-links.mobile-open {
    display: flex;
    animation: fadeInDown 0.2s ease forwards;
  }
  .nav-links li {
    width: 100%;
  }
  .nav-links a {
    display: flex;
    width: 100%;
    padding: 12px 16px;
    font-size: 1rem;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.03);
  }
  .nav-links a:hover,
  .nav-links a:active {
    background: rgba(59, 130, 246, 0.15);
    color: #fff;
  }
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Hero Section */
.hero {
  padding: 56px 0 36px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 36px;
  align-items: center;
}

.avatar-container {
  position: relative;
  width: 180px;
  height: 180px;
  margin: 0 auto;
}

.avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid rgba(59, 130, 246, 0.5);
  box-shadow: var(--shadow-glow);
  background: var(--bg-secondary);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 9999px;
  font-size: 0.86rem;
  font-weight: 600;
  background: rgba(16, 185, 129, 0.12);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
  margin-bottom: 12px;
}

.status-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 10px #10b981;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

.hero-name {
  font-size: clamp(2rem, 5vw + 0.5rem, 2.8rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #ffffff 40%, #93c5fd 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 8px;
  overflow-wrap: break-word;
  word-break: break-word;
}

.hero-title {
  font-size: clamp(1.1rem, 2.5vw + 0.4rem, 1.35rem);
  font-weight: 600;
  color: #60a5fa;
  margin-bottom: 14px;
  line-height: 1.35;
  overflow-wrap: break-word;
}

.hero-tagline {
  font-size: 1.02rem;
  color: var(--text-muted);
  max-width: 650px;
  margin-bottom: 20px;
  line-height: 1.6;
  overflow-wrap: break-word;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.hero-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.04);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* Mobile Hero Adjustments */
@media (max-width: 768px) {
  .hero {
    padding: 32px 0 20px;
  }
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 20px;
  }
  .avatar-container {
    width: 140px;
    height: 140px;
    margin-bottom: 4px;
  }
  .hero-meta {
    justify-content: center;
    gap: 8px;
  }
  .hero-meta-item {
    font-size: 0.84rem;
    padding: 6px 10px;
  }
  .hero-actions {
    flex-direction: column;
    width: 100%;
  }
  .hero-actions .btn {
    width: 100%;
    min-height: 48px;
    font-size: 1rem;
  }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid transparent;
  min-height: 42px;
  -webkit-tap-highlight-color: transparent;
}

.btn-primary {
  background: linear-gradient(135deg, #3b82f6, #6366f1);
  color: #fff;
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.35);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.5);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-main);
  border-color: var(--border-color);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.btn-token {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
}

.btn-token:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.5);
}

.btn-danger {
  background: rgba(244, 63, 94, 0.15);
  color: #fb7185;
  border-color: rgba(244, 63, 94, 0.3);
}

.btn-danger:hover {
  background: #f43f5e;
  color: #fff;
}

/* Highlights Grid */
.highlights-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin: 32px 0 48px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: transform 0.2s, border-color 0.2s;
}

.stat-card:hover {
  transform: translateY(-3px);
  border-color: rgba(59, 130, 246, 0.4);
}

.stat-val {
  font-size: 1.8rem;
  font-weight: 800;
  color: #60a5fa;
  margin-bottom: 4px;
}

.stat-lbl {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Mobile 2x2 Highlights Grid for iPhone */
@media (max-width: 640px) {
  .highlights-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin: 20px 0 32px;
  }
  .stat-card {
    padding: 14px 10px;
    text-align: center;
  }
  .stat-val {
    font-size: 1.35rem;
  }
  .stat-lbl {
    font-size: 0.78rem;
    line-height: 1.3;
  }
}

@media (max-width: 340px) {
  .highlights-grid {
    grid-template-columns: 1fr;
  }
}

/* Sections */
.section {
  padding: 40px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

@media (max-width: 640px) {
  .section {
    padding: 28px 0;
  }
}

.section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: clamp(1.35rem, 4vw, 1.7rem);
  font-weight: 700;
  margin-bottom: 20px;
  color: #f9fafb;
}

.section-title-icon {
  color: var(--accent-blue);
  flex-shrink: 0;
}

/* Card Container */
.content-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 32px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: var(--shadow-md);
  max-width: 100%;
  overflow: hidden;
}

@media (max-width: 768px) {
  .content-card {
    padding: 20px 14px;
    border-radius: var(--radius-md);
  }
}

@media (max-width: 480px) {
  .content-card {
    padding: 16px 12px;
  }
}

/* Markdown typography rendering */
.markdown-body {
  color: #d1d5db;
  font-size: 1rem;
  line-height: 1.7;
  max-width: 100%;
  overflow-wrap: break-word;
  word-break: break-word;
}

.markdown-body h1,
.markdown-body h2,
.markdown-body h3,
.markdown-body h4 {
  color: #f3f4f6;
  margin-top: 1.3em;
  margin-bottom: 0.5em;
  font-weight: 700;
  letter-spacing: -0.01em;
  overflow-wrap: break-word;
}

.markdown-body h1 { font-size: clamp(1.4rem, 4vw, 1.6rem); border-bottom: 1px solid var(--border-color); padding-bottom: 8px; }
.markdown-body h2 { font-size: clamp(1.2rem, 3.5vw, 1.4rem); }
.markdown-body h3 { font-size: clamp(1.08rem, 3vw, 1.2rem); color: #93c5fd; }
.markdown-body h4 { font-size: clamp(0.98rem, 2.5vw, 1.05rem); color: #cbd5e1; }

.markdown-body p {
  margin-bottom: 1em;
}

.markdown-body ul,
.markdown-body ol {
  margin-bottom: 1em;
  padding-left: 20px;
}

.markdown-body li {
  margin-bottom: 6px;
}

.markdown-body hr {
  border: 0;
  height: 1px;
  background: var(--border-color);
  margin: 24px 0;
}

.markdown-body blockquote {
  border-left: 4px solid var(--accent-blue);
  padding: 12px 14px;
  margin: 16px 0;
  color: #9ca3af;
  font-style: italic;
  background: rgba(59, 130, 246, 0.05);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.markdown-body code {
  background: rgba(255, 255, 255, 0.08);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: monospace;
  font-size: 0.88em;
  color: #f472b6;
  word-break: break-word;
}

.markdown-body pre {
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  background: #0d1117;
  padding: 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  margin: 16px 0;
}

/* ==========================================================================
   RESPONSIVE TABLES (Full mobile & iPhone optimization)
   ========================================================================== */

.markdown-table-wrapper {
  width: 100%;
  max-width: 100%;
  margin: 18px 0;
  border-radius: var(--radius-md);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Desktop & Tablet Table Styling */
.markdown-body table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 0;
  font-size: 0.92rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.markdown-body th,
.markdown-body td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color);
  border-right: 1px solid var(--border-color);
  text-align: left;
}

.markdown-body th:last-child,
.markdown-body td:last-child {
  border-right: none;
}

.markdown-body tr:last-child td {
  border-bottom: none;
}

.markdown-body th {
  background: rgba(30, 41, 59, 0.85);
  color: #93c5fd;
  font-weight: 600;
  font-size: 0.84rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.markdown-body tbody tr {
  transition: background-color 0.15s ease;
}

.markdown-body tbody tr:hover {
  background: rgba(59, 130, 246, 0.05);
}

.markdown-body tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.02);
}

/* 📱 iPhone & Mobile Responsive Card Transformation */
/* 📱 Mobile & iPhone Responsive Card Transformation for all Markdown Tables */
@media (max-width: 850px) {
  .markdown-table-wrapper {
    overflow-x: visible !important;
    overflow: visible !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 12px 0 !important;
    border: none !important;
    background: transparent !important;
  }

  .markdown-body table,
  .markdown-body table.responsive-table {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    border: none !important;
    background: transparent !important;
    overflow: visible !important;
    box-sizing: border-box !important;
  }

  .markdown-body table thead {
    display: none !important;
  }

  .markdown-body table tbody {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    width: 100% !important;
  }

  .markdown-body table tr {
    display: flex !important;
    flex-direction: column !important;
    background: rgba(17, 24, 39, 0.94) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    border-radius: var(--radius-md) !important;
    padding: 14px 16px !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25) !important;
    gap: 8px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .markdown-body table tr:nth-child(even) {
    background: rgba(24, 33, 49, 0.98) !important;
  }

  .markdown-body table tr:hover {
    border-color: rgba(59, 130, 246, 0.4) !important;
  }

  .markdown-body table td {
    display: flex !important;
    flex-direction: column !important;
    padding: 5px 0 !important;
    border: none !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
    text-align: left !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-break: break-word !important;
    overflow-wrap: break-word !important;
  }

  .markdown-body table td:last-child {
    border-bottom: none !important;
    padding-bottom: 0 !important;
  }

  /* Label above each field */
  .markdown-body table td::before {
    content: attr(data-label);
    font-size: 0.72rem !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.06em !important;
    color: #60a5fa !important;
    margin-bottom: 2px !important;
    display: block !important;
  }

  /* Fallback labels if JS attribute is missing */
  .markdown-body table td:not([data-label]):nth-child(1)::before {
    content: "Bereich" !important;
    color: #34d399 !important;
  }
  .markdown-body table td:not([data-label]):nth-child(2)::before {
    content: "Technologien & Tools" !important;
    color: #60a5fa !important;
  }
  .markdown-body table td:not([data-label]):nth-child(3)::before {
    content: "Erfahrungslevel" !important;
    color: #a78bfa !important;
  }

  /* Primary field highlight */
  .markdown-body table td:first-child {
    font-size: 1.05rem !important;
    font-weight: 700 !important;
    color: #fff !important;
    padding-top: 0 !important;
  }

  .markdown-body table td:first-child::before {
    color: #34d399 !important;
  }
}

/* ==========================================================================
   TOKEN GATE SECTION
   ========================================================================== */

.token-section {
  position: relative;
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.5) 0%, rgba(15, 23, 42, 0.8) 100%);
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: var(--radius-xl);
  padding: 36px 32px;
  box-shadow: 0 0 35px rgba(59, 130, 246, 0.12);
  margin: 36px 0;
}

.token-header {
  text-align: center;
  max-width: 650px;
  margin: 0 auto 28px;
}

.token-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border-radius: 9999px;
  font-size: 0.84rem;
  font-weight: 600;
  margin-bottom: 12px;
}

.token-form-wrapper {
  max-width: 500px;
  margin: 0 auto;
  width: 100%;
}

.token-input-group {
  display: flex;
  gap: 10px;
  width: 100%;
}

.token-input {
  flex: 1;
  background: rgba(11, 15, 25, 0.9);
  border: 1px solid var(--border-color);
  color: #fff;
  padding: 12px 18px;
  border-radius: var(--radius-md);
  font-size: 16px !important; /* CRITICAL for iPhone: prevents iOS Safari auto-zoom */
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  min-height: 48px;
  width: 100%;
}

.token-input:focus {
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);
}

.token-error {
  color: #fb7185;
  font-size: 0.9rem;
  margin-top: 10px;
  text-align: center;
}

/* Unlocked Documents View */
.unlocked-banner {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.unlocked-company {
  font-weight: 700;
  color: #34d399;
}

.docs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 18px;
}

.doc-card {
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.doc-card:hover {
  transform: translateY(-3px);
  border-color: rgba(59, 130, 246, 0.5);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

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

.doc-icon {
  width: 44px;
  height: 44px;
  background: rgba(244, 63, 94, 0.15);
  color: #fb7185;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}

.doc-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #f9fafb;
  margin-bottom: 4px;
  overflow-wrap: break-word;
}

.doc-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.5;
  overflow-wrap: break-word;
}

.doc-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 18px;
  border-top: 1px solid var(--border-color);
  padding-top: 14px;
  font-size: 0.86rem;
  color: var(--text-dim);
}

/* Mobile Token Section Adjustments */
@media (max-width: 768px) {
  .token-section {
    padding: 24px 16px;
    margin: 28px 0;
    border-radius: var(--radius-lg);
  }
  .token-header h2 {
    font-size: 1.35rem;
  }
  .token-input-group {
    flex-direction: column;
    gap: 10px;
  }
  .token-input-group .btn {
    width: 100%;
    min-height: 48px;
    font-size: 1rem;
  }
  .unlocked-banner {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    text-align: center;
  }
  .unlocked-banner .btn {
    width: 100%;
    min-height: 42px;
  }
  .docs-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .doc-card {
    padding: 16px 14px;
  }
  .doc-meta {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    text-align: center;
  }
  .doc-meta .btn {
    width: 100%;
    min-height: 44px;
  }
}

/* ==========================================================================
   FOOTER
   ========================================================================== */

.footer {
  margin-top: auto;
  border-top: 1px solid var(--border-color);
  background: rgba(11, 15, 25, 0.95);
  padding: 36px 0 24px;
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 18px;
}

.footer-socials {
  display: flex;
  gap: 14px;
}

.footer-social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  border: 1px solid var(--border-color);
  text-decoration: none;
  font-size: 1.1rem;
  transition: all 0.2s;
  -webkit-tap-highlight-color: transparent;
}

.footer-social-link:hover,
.footer-social-link:active {
  background: var(--accent-blue);
  color: #fff;
  transform: translateY(-2px);
  border-color: transparent;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  width: 100%;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 18px;
  font-size: 0.85rem;
  color: var(--text-dim);
}

@media (max-width: 600px) {
  .footer-bottom {
    flex-direction: column;
    gap: 10px;
    align-items: center;
    text-align: center;
  }
}

.footer-admin-link {
  color: var(--text-dim);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 38px;
}

.footer-admin-link:hover {
  color: #93c5fd;
}

/* ==========================================================================
   ADMIN SPECIFIC STYLES
   ========================================================================== */

.admin-body {
  background: #0d1117;
}

.admin-header {
  background: #161b22;
  border-bottom: 1px solid #30363d;
  padding: 12px 0;
}

.admin-tabs {
  display: flex;
  gap: 6px;
  border-bottom: 1px solid #30363d;
  margin-bottom: 24px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 2px;
  scrollbar-width: none;
}

.admin-tabs::-webkit-scrollbar {
  display: none;
}

.admin-tab {
  padding: 10px 16px;
  background: transparent;
  border: none;
  color: #8b949e;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  min-height: 42px;
}

.admin-tab.active {
  color: #58a6ff;
  border-bottom-color: #58a6ff;
  background: rgba(56, 139, 253, 0.05);
}

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

.form-label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  color: #c9d1d9;
  margin-bottom: 6px;
}

.form-control {
  width: 100%;
  background: #0d1117;
  border: 1px solid #30363d;
  color: #f0f6fc;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 16px !important; /* Prevents auto-zoom on mobile iOS */
  outline: none;
  font-family: inherit;
  min-height: 44px;
}

.form-control:focus {
  border-color: #58a6ff;
  box-shadow: 0 0 0 3px rgba(88, 166, 255, 0.2);
}

textarea.form-control {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 15px !important;
  line-height: 1.5;
  min-height: 150px;
}

.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-grid-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
}

@media (max-width: 768px) {
  .form-grid-2,
  .form-grid-3 {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

/* Data Tables */
.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid #30363d;
  border-radius: var(--radius-md);
  width: 100%;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  background: #161b22;
  font-size: 0.9rem;
  min-width: 600px; /* guarantees data columns stay readable when swiping on mobile */
}

.data-table th,
.data-table td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid #21262d;
}

.data-table th {
  background: #0d1117;
  color: #8b949e;
  font-weight: 600;
}

.data-table tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
}

.badge-green { background: rgba(46, 160, 67, 0.15); color: #3fb950; border: 1px solid rgba(46, 160, 67, 0.3); }
.badge-red { background: rgba(248, 81, 73, 0.15); color: #f85149; border: 1px solid rgba(248, 81, 73, 0.3); }
.badge-blue { background: rgba(56, 139, 253, 0.15); color: #58a6ff; border: 1px solid rgba(56, 139, 253, 0.3); }

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: calc(100vw - 32px);
}

.toast {
  background: #1f2937;
  color: #fff;
  padding: 12px 18px;
  border-radius: var(--radius-md);
  border-left: 4px solid var(--accent-blue);
  box-shadow: var(--shadow-lg);
  font-size: 0.9rem;
  animation: slideIn 0.25s ease forwards;
}

.toast.toast-success { border-left-color: #10b981; }
.toast.toast-error { border-left-color: #f43f5e; }

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

@media (max-width: 480px) {
  .toast-container {
    left: 16px;
    right: 16px;
    bottom: 16px;
  }
}

/* ==========================================================================
   MODAL DIALOG (Token Request / Info Popup)
   ========================================================================== */

.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(11, 15, 25, 0.78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: modalFadeIn 0.2s ease-out;
}

@keyframes modalFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-card {
  background: #111827;
  border: 1px solid #334155;
  border-radius: 18px;
  max-width: 490px;
  width: 100%;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.75);
  animation: modalSlideUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

@keyframes modalSlideUp {
  from { transform: translateY(14px) scale(0.97); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid #1e293b;
}

.modal-close-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 1.25rem;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: all 0.15s ease;
  line-height: 1;
}

.modal-close-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.modal-body {
  padding: 22px;
}

.modal-email-box {
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 12px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.modal-meta-box {
  background: rgba(15, 23, 42, 0.6);
  border: 1px dashed #334155;
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 0.85rem;
  margin-bottom: 22px;
}

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

@media (max-width: 480px) {
  .modal-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .modal-actions .btn {
    width: 100%;
  }
}

