/* ============================================================
   RocketCity.org — Main Stylesheet
   Space-inspired dark theme, clean and professional.
   ============================================================ */

/* ---------- CSS Custom Properties ---------- */
:root {
  --bg-primary:    #07080f;
  --bg-secondary:  #0e101c;
  --bg-card:       #141727;
  --bg-card-hover: #1a1f33;
  --border:        #252a40;
  --text-primary:  #e8eaf6;
  --text-secondary:#9095b0;
  --text-muted:    #5a6080;
  --accent:        #4fc3f7;
  --accent-dim:    #1e7aa8;
  --accent-glow:   rgba(79, 195, 247, 0.15);
  --danger:        #ef5350;
  --success:       #66bb6a;
  --warning:       #ffa726;
  --info:          #42a5f5;
  --radius:        8px;
  --radius-lg:     16px;
  --shadow:        0 2px 12px rgba(0,0,0,0.5);
  --shadow-glow:   0 0 24px rgba(79,195,247,0.12);
  --font:          'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-mono:     'JetBrains Mono', 'Fira Code', monospace;
  --nav-height:    64px;
}

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

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

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font);
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main { flex: 1; }

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s, opacity 0.2s;
}
a:hover { color: #fff; text-decoration: underline; }

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

/* ---------- Typography ---------- */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.25;
  color: var(--text-primary);
}

h1 { font-size: 2.25rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.35rem; }

p { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

/* ---------- Utility ---------- */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.text-muted   { color: var(--text-muted); }
.text-accent  { color: var(--accent); }
.text-center  { text-align: center; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

/* ---------- Navigation ---------- */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-height);
  background: rgba(7, 8, 15, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.nav-brand {
  display: flex;
  align-items: center;
}
.nav-brand:hover { opacity: 0.85; text-decoration: none; }
/* Logo image controls all sizing — no forced square */
/* brightness(0) collapses all opaque pixels to black; invert(1) flips to white.
   Result: clean white silhouette that reads clearly on the dark background. */
.nav-brand img  { height: 50px; width: auto; display: block; filter: brightness(0) invert(1); }

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

.nav-links a {
  display: block;
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  color: var(--text-secondary);
  transition: color 0.2s, background 0.2s;
}
.nav-links a:hover {
  color: var(--text-primary);
  background: var(--bg-card);
  text-decoration: none;
}
.nav-links a.active { color: var(--accent); }

.nav-login {
  padding: 0.4rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.85rem;
  color: var(--text-secondary);
  transition: all 0.2s;
}
.nav-login:hover {
  border-color: var(--accent);
  color: var(--accent);
  text-decoration: none;
}

/* Hamburger for mobile */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  color: var(--text-primary);
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: currentColor;
  margin: 5px 0;
  transition: all 0.2s;
}

/* ---------- Hero / Landing ---------- */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 5rem 1.5rem 5rem;
  position: relative;
  overflow: hidden;
}

/* Subtle star-field background effect */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(79,195,247,0.06) 0%, transparent 70%),
    radial-gradient(circle at 20% 80%, rgba(79,195,247,0.04) 0%, transparent 50%);
  pointer-events: none;
}

.hero-logo {
  /* Desktop default. Phones use a fluid width below so the logo stays
     prominent across the wide range of mobile viewports (~320–430px). */
  width: 320px;
  height: auto;
  margin-bottom: 2.5rem;
  /* White silhouette + subtle cyan glow against the dark background */
  filter: brightness(0) invert(1) drop-shadow(0 0 28px rgba(79, 195, 247, 0.25));
  animation: float 7s ease-in-out infinite;
}

@media (max-width: 600px) {
  /* On phones, scale with the viewport so the logo dominates the hero.
     min: small Android (~320px) → 272px
     mid: typical phone (~393px) → 334px
     max: capped at 380px before tablets take over. */
  .hero-logo { width: min(85vw, 380px); }
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-10px); }
}

/* Visitor message card */
.visitor-message {
  max-width: 640px;
  margin: 2.5rem auto 0;
  padding: 1.5rem 2rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-lg);
  color: var(--text-primary);
  font-size: 1rem;
  line-height: 1.7;
  box-shadow: var(--shadow-glow);
}


/* ---------- Cards ---------- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 1.25rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s;
  text-decoration: none;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; }

.btn-primary {
  background: var(--accent);
  color: #07080f;
  border-color: var(--accent);
}
.btn-primary:hover {
  background: #fff;
  border-color: #fff;
  color: #07080f;
}

.btn-secondary {
  background: transparent;
  color: var(--text-secondary);
  border-color: var(--border);
}
.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--text-primary);
}

.btn-danger {
  background: transparent;
  color: var(--danger);
  border-color: var(--danger);
}
.btn-danger:hover {
  background: var(--danger);
  color: #fff;
}

.btn-sm {
  padding: 0.3rem 0.75rem;
  font-size: 0.8rem;
}

.btn-success {
  background: var(--success);
  color: #07080f;
  border-color: var(--success);
}

/* ---------- Forms ---------- */
.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 0.4rem;
}

.form-control {
  width: 100%;
  padding: 0.6rem 0.9rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-size: 0.95rem;
  font-family: var(--font);
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}
.form-control:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(79,195,247,0.12);
}
.form-control::placeholder { color: var(--text-muted); }

textarea.form-control {
  resize: vertical;
  min-height: 120px;
}

.form-check {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.75rem;
}
.form-check input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
  cursor: pointer;
}

.form-error {
  color: var(--danger);
  font-size: 0.82rem;
  margin-top: 0.3rem;
}

.form-hint {
  color: var(--text-muted);
  font-size: 0.82rem;
  margin-top: 0.3rem;
}

/* ---------- Alerts / Flash ---------- */
.alerts { margin-bottom: 1.5rem; }

.alert {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.9rem 1.1rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  border: 1px solid;
  margin-bottom: 0.75rem;
}

.alert-success { background: rgba(102,187,106,0.1); border-color: rgba(102,187,106,0.4); color: var(--success); }
.alert-danger  { background: rgba(239,83,80,0.1);  border-color: rgba(239,83,80,0.4);  color: var(--danger); }
.alert-warning { background: rgba(255,167,38,0.1); border-color: rgba(255,167,38,0.4); color: var(--warning); }
.alert-info    { background: rgba(66,165,245,0.1); border-color: rgba(66,165,245,0.4); color: var(--info); }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

th {
  text-align: left;
  padding: 0.75rem 1rem;
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}

td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid rgba(37,42,64,0.5);
  vertical-align: middle;
  color: var(--text-secondary);
}

tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(20,23,39,0.6); }

.badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.03em;
}
.badge-success { background: rgba(102,187,106,0.15); color: var(--success); }
.badge-danger  { background: rgba(239,83,80,0.15);  color: var(--danger); }
.badge-warning { background: rgba(255,167,38,0.15); color: var(--warning); }
.badge-info    { background: rgba(66,165,245,0.15); color: var(--info); }
.badge-muted   { background: rgba(90,96,128,0.2);  color: var(--text-muted); }

/* ---------- Admin Layout ---------- */
.admin-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: calc(100vh - var(--nav-height));
}

.admin-sidebar {
  background: var(--bg-secondary);
  border-right: 1px solid var(--border);
  padding: 1.5rem 0;
  position: sticky;
  top: var(--nav-height);
  height: calc(100vh - var(--nav-height));
  overflow-y: auto;
}

.sidebar-section {
  padding: 0 0.75rem;
  margin-bottom: 1.5rem;
}

.sidebar-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 0 0.75rem;
  margin-bottom: 0.4rem;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  color: var(--text-secondary);
  transition: all 0.15s;
}
.sidebar-link:hover {
  background: var(--bg-card);
  color: var(--text-primary);
  text-decoration: none;
}
.sidebar-link.active {
  background: var(--accent-glow);
  color: var(--accent);
}
.sidebar-link svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  opacity: 0.7;
}

.admin-content {
  padding: 2rem;
  max-width: 1000px;
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.75rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.page-title {
  font-size: 1.5rem;
  font-weight: 700;
}

/* ---------- Stat Cards ---------- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  text-align: center;
}

.stat-number {
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

/* ---------- Blog ---------- */
.blog-hero {
  padding: 4rem 1.5rem 2rem;
  text-align: center;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-top: 2.5rem;
}

.blog-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}
.blog-card:hover {
  border-color: var(--accent-dim);
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

.blog-card-img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

/* Section cards on the Journal index can carry a background image.
   The dark overlay keeps the section title/description legible. */
.section-card.has-bg {
  position: relative;
  min-height: 220px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: #fff;
  border-color: transparent;
  isolation: isolate;
}
.section-card.has-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(7,8,15,0.35) 0%, rgba(7,8,15,0.85) 100%);
  z-index: 0;
  transition: background 0.2s;
}
.section-card.has-bg .blog-card-body {
  position: relative;
  z-index: 1;
  background: transparent;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 220px;
}
.section-card.has-bg .blog-card-title { color: #fff; }
.section-card.has-bg .blog-card-excerpt {
  color: rgba(255,255,255,0.85);
}
.section-card.has-bg .blog-card-meta {
  color: rgba(255,255,255,0.7);
}
.section-card.has-bg:hover::before {
  background: linear-gradient(180deg, rgba(7,8,15,0.25) 0%, rgba(7,8,15,0.75) 100%);
}

.blog-card-body {
  padding: 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.blog-card-title {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.blog-card-excerpt {
  font-size: 0.875rem;
  color: var(--text-secondary);
  flex: 1;
}

.blog-card-meta {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.75rem;
}

/* Blog post full */
.post-container {
  max-width: 740px;
  margin: 0 auto;
  padding: 3rem 1.5rem;
}

.post-header {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.post-title {
  font-size: 2.25rem;
  margin-bottom: 0.75rem;
}

.post-meta {
  color: var(--text-muted);
  font-size: 0.875rem;
}

.post-body {
  line-height: 1.8;
  color: var(--text-secondary);
}

.post-body h1, .post-body h2, .post-body h3 { color: var(--text-primary); margin: 1.5rem 0 0.75rem; }
.post-body p { margin-bottom: 1.25rem; }
.post-body ul, .post-body ol { padding-left: 1.5rem; margin-bottom: 1.25rem; }
.post-body li { margin-bottom: 0.4rem; }
.post-body img { border-radius: var(--radius); margin: 1.5rem 0; box-shadow: var(--shadow); }
.post-body a { color: var(--accent); }
.post-body blockquote {
  border-left: 3px solid var(--accent);
  padding-left: 1rem;
  color: var(--text-muted);
  font-style: italic;
  margin: 1.5rem 0;
}
.post-body code {
  background: var(--bg-card);
  padding: 0.15em 0.4em;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.875em;
}
.post-body pre {
  background: var(--bg-card);
  padding: 1rem;
  border-radius: var(--radius);
  overflow-x: auto;
  margin: 1.5rem 0;
}
.post-body pre code { background: none; padding: 0; }

.post-featured-img {
  width: 100%;
  border-radius: var(--radius-lg);
  margin-bottom: 2rem;
  box-shadow: var(--shadow);
}

/* ---------- Post Gallery (public) ---------- */
.post-gallery {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.post-gallery-title {
  font-size: 1.15rem;
  color: var(--text-secondary);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
}

.post-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.75rem;
}

.post-gallery-thumb {
  position: relative;
  display: block;
  padding: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 1 / 1;
  transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s;
}
.post-gallery-thumb:hover,
.post-gallery-thumb:focus {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
  outline: none;
}
.post-gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.post-gallery-thumb-caption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 0.4rem 0.55rem;
  font-size: 0.72rem;
  color: var(--text-primary);
  background: linear-gradient(to top, rgba(7,8,15,0.85) 0%, rgba(7,8,15,0) 100%);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: left;
}

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(3, 4, 9, 0.92);
  backdrop-filter: blur(6px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}
.lightbox.is-open {
  display: flex;
}

.lightbox-figure {
  max-width: min(90vw, 1200px);
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0;
}

.lightbox-image {
  max-width: 100%;
  max-height: 78vh;
  width: auto;
  height: auto;
  border-radius: var(--radius);
  box-shadow: 0 10px 40px rgba(0,0,0,0.7);
  background: var(--bg-card);
}

.lightbox-caption {
  margin-top: 0.9rem;
  color: var(--text-primary);
  text-align: center;
  font-size: 1rem;
  max-width: 80ch;
  line-height: 1.5;
  min-height: 1.5em;
}
.lightbox-caption:empty::before {
  content: "";
}

.lightbox-counter {
  margin-top: 0.35rem;
  color: var(--text-muted);
  font-size: 0.8rem;
  letter-spacing: 0.05em;
}

.lightbox-close,
.lightbox-nav {
  position: absolute;
  background: rgba(20, 23, 39, 0.7);
  color: var(--text-primary);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.lightbox-close {
  top: 1.25rem;
  right: 1.25rem;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox-nav {
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
}
.lightbox-prev { left: 1.25rem; }
.lightbox-next { right: 1.25rem; }
.lightbox-close:hover,
.lightbox-nav:hover {
  background: var(--accent);
  color: #07080f;
  border-color: var(--accent);
}
.lightbox-nav[hidden] {
  display: none;
}

body.lightbox-open {
  overflow: hidden;
}

@media (max-width: 600px) {
  .post-gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  }
  .lightbox-close,
  .lightbox-nav {
    width: 38px;
    height: 38px;
    font-size: 1.4rem;
  }
  .lightbox-prev { left: 0.5rem; }
  .lightbox-next { right: 0.5rem; }
  .lightbox-close { top: 0.5rem; right: 0.5rem; }
}

/* ---------- Admin gallery editor ---------- */
.gallery-admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.85rem;
  margin-bottom: 0.5rem;
}
.gallery-admin-item {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.6rem;
  display: flex;
  flex-direction: column;
}
.gallery-admin-item img {
  width: 100%;
  height: 130px;
  object-fit: cover;
  border-radius: 4px;
  background: var(--bg-card);
}

/* ---------- Credentials ---------- */
.credentials-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 3rem 1.5rem;
}

.credentials-header {
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

/* ---------- Credentials: contact section ---------- */
.credentials-contact {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}
.credentials-contact-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem 1.75rem;
  box-shadow: var(--shadow);
}
.credentials-contact-eyebrow {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 0.4rem;
}
.credentials-contact-line {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.6;
  margin: 0;
}
.credentials-contact-link {
  font-weight: 600;
  word-break: break-all;
}
.credentials-contact-link:hover { text-decoration: underline; }

/* ---------- Login Page ---------- */
.auth-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - var(--nav-height));
  padding: 2rem 1.5rem;
}

.auth-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow);
}

.auth-title {
  text-align: center;
  font-size: 1.4rem;
  margin-bottom: 0.4rem;
}

.auth-subtitle {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.875rem;
  margin-bottom: 2rem;
}

/* ---------- QR Code (2FA) ---------- */
.qr-container {
  text-align: center;
  margin: 1.5rem 0;
}
.qr-container img {
  border-radius: var(--radius);
  border: 4px solid #fff;
  display: inline-block;
}

.secret-code {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.5rem 1rem;
  text-align: center;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin: 0.75rem 0;
  word-break: break-all;
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.82rem;
}

/* ---------- Pagination ---------- */
.pagination {
  display: flex;
  gap: 0.4rem;
  justify-content: center;
  margin-top: 2rem;
}

.page-link {
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  font-size: 0.875rem;
  color: var(--text-secondary);
  transition: all 0.15s;
}
.page-link:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.page-link.active { background: var(--accent); color: #07080f; border-color: var(--accent); }

/* ---------- Empty State ---------- */
.empty-state {
  text-align: center;
  padding: 4rem 1.5rem;
  color: var(--text-muted);
}
.empty-state svg { width: 48px; height: 48px; margin: 0 auto 1rem; opacity: 0.4; }
.empty-state h3 { color: var(--text-secondary); margin-bottom: 0.5rem; }

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
  h1 { font-size: 1.75rem; }
  .hero-title { font-size: 2rem; }

  .nav-toggle { display: block; }

  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    padding: 1rem;
    gap: 0.15rem;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 0.65rem 1rem; }

  .admin-layout {
    grid-template-columns: 1fr;
  }

  .admin-sidebar {
    position: static;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  .admin-content { padding: 1.25rem; }

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

  .auth-card { padding: 1.75rem 1.25rem; }
}

/* ---------- Misc ---------- */
.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 1.5rem 0;
}

.action-row {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
}

.text-truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
