/* ═══════════════════════════════════════════════════════════════════════════
   ALTYDO — Landing Page Styles
   Palette: Dark (#0D1117, #1B2333) + Electric Blue (#2E86C1) + Purple (#8E44AD)
   Font: Inter (Google Fonts)
   ═══════════════════════════════════════════════════════════════════════════ */

/* ─── Reset & Base ────────────────────────────────────────────────────────── */

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

:root {
  --bg: #0d1117;
  --bg-alt: #1b2333;
  --bg-card: #161b26;
  --bg-elevated: #1e2636;
  --border: rgba(255, 255, 255, 0.06);
  --text: #e6edf3;
  --text-muted: #8b949e;
  --text-dim: #6e7681;
  --accent: #2e86c1;
  --accent-glow: rgba(46, 134, 193, 0.35);
  --purple: #8e44ad;
  --purple-glow: rgba(142, 68, 173, 0.3);
  --gradient: linear-gradient(135deg, var(--accent) 0%, var(--purple) 100%);
  --radius: 12px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition);
}
a:hover {
  color: #5dade2;
}

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

.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ─── Utility ─────────────────────────────────────────────────────────────── */

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

kbd {
  display: inline-block;
  padding: 3px 8px;
  font-family: var(--font);
  font-size: 0.85em;
  font-weight: 600;
  color: var(--text);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 6px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* ─── Buttons ─────────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font);
  font-weight: 600;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}

.btn--sm {
  padding: 8px 18px;
  font-size: 0.875rem;
}
.btn--lg {
  padding: 14px 32px;
  font-size: 1.05rem;
}
.btn--full {
  width: 100%;
}

.btn--primary {
  background: var(--gradient);
  color: #fff;
  box-shadow: 0 0 24px var(--accent-glow);
}
.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow:
    0 0 40px var(--accent-glow),
    0 8px 32px rgba(0, 0, 0, 0.3);
}
.btn--primary:active {
  transform: translateY(0);
}

.btn--ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
}
.btn--ghost:hover {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.03);
}

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

/* ─── Navigation ──────────────────────────────────────────────────────────── */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 16px 0;
  background: rgba(13, 17, 23, 0.8);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.nav__inner {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav__logo {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}
.nav__logo:hover {
  color: var(--text);
}
.nav__logo-icon {
  font-size: 1.4rem;
}

.nav__links {
  display: flex;
  gap: 32px;
}
.nav__links a {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color var(--transition);
}
.nav__links a:hover {
  color: var(--text);
}

@media (max-width: 768px) {
  .nav__links {
    display: none;
  }
}

/* ─── Hero ────────────────────────────────────────────────────────────────── */

.hero {
  position: relative;
  padding: 200px 0 140px;
  text-align: center;
  overflow: hidden;
}

.hero__glow {
  position: absolute;
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  pointer-events: none;
  opacity: 0.4;
}

.hero__inner {
  position: relative;
  z-index: 1;
}

.hero__badge {
  display: inline-block;
  padding: 6px 16px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  background: rgba(46, 134, 193, 0.1);
  border: 1px solid rgba(46, 134, 193, 0.2);
  border-radius: var(--radius-full);
  margin-bottom: 32px;
  letter-spacing: 0.02em;
}

.hero__title {
  font-size: clamp(2.8rem, 7vw, 5rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.04em;
  margin-bottom: 28px;
}

.hero__sub {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  color: var(--text-muted);
  max-width: 500px;
  margin: 0 auto 48px;
  line-height: 1.7;
}

.hero__actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ─── Preview window (hero demo) ──────────────────────────────────────────── */

.hero__preview {
  max-width: 680px;
  margin: 0 auto;
}

.preview-window {
  background: #161b26;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.4);
}

.preview-window__bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid var(--border);
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}
.dot--red {
  background: #ff5f57;
}
.dot--yellow {
  background: #ffbd2e;
}
.dot--green {
  background: #27c93f;
}

.preview-window__title {
  margin-left: 12px;
  font-size: 0.8rem;
  color: var(--text-dim);
}

.preview-window__body {
  position: relative;
  padding: 32px 24px;
  min-height: 120px;
  font-size: 1rem;
  color: var(--text-muted);
}

.preview-cursor-line {
  font-family: "Courier New", monospace;
  font-size: 0.95rem;
}

.preview-cursor {
  display: inline-block;
  animation: blink 1s step-end infinite;
  color: var(--accent);
  font-weight: 300;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

.preview-overlay {
  position: absolute;
  bottom: 16px;
  right: 16px;
  background: var(--bg-elevated);
  border: 1px solid rgba(46, 134, 193, 0.3);
  border-radius: var(--radius);
  padding: 12px 18px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  opacity: 0;
  transform: translateY(8px) scale(0.95);
  animation: overlayIn 0.5s 2s forwards;
}

@keyframes overlayIn {
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.preview-overlay__header {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 8px;
}

.preview-overlay__wave {
  display: flex;
  gap: 3px;
  align-items: center;
  height: 20px;
}

.preview-overlay__wave span {
  display: block;
  width: 3px;
  height: 6px;
  background: var(--accent);
  border-radius: 2px;
  animation: wave 0.6s ease-in-out infinite alternate;
}
.preview-overlay__wave span:nth-child(2) {
  animation-delay: 0.1s;
  height: 12px;
}
.preview-overlay__wave span:nth-child(3) {
  animation-delay: 0.2s;
  height: 16px;
}
.preview-overlay__wave span:nth-child(4) {
  animation-delay: 0.3s;
  height: 10px;
}
.preview-overlay__wave span:nth-child(5) {
  animation-delay: 0.4s;
  height: 8px;
}

@keyframes wave {
  from {
    transform: scaleY(0.5);
  }
  to {
    transform: scaleY(1.5);
  }
}

/* ─── Feature Blocks (2-column) ───────────────────────────────────────────── */

.features-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
}

.feature-block {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 48px 40px;
  transition: all var(--transition);
}

.feature-block:hover {
  border-color: rgba(46, 134, 193, 0.2);
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.3);
}

.feature-block--alt:hover {
  border-color: rgba(142, 68, 173, 0.25);
}

.feature-block__badge {
  display: inline-block;
  padding: 4px 14px;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent);
  background: rgba(46, 134, 193, 0.1);
  border: 1px solid rgba(46, 134, 193, 0.15);
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 24px;
}

.feature-block__badge--purple {
  color: var(--purple);
  background: rgba(142, 68, 173, 0.1);
  border-color: rgba(142, 68, 173, 0.15);
}

.feature-block__icon {
  font-size: 3rem;
  margin-bottom: 20px;
}

.feature-block__title {
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 12px;
}

.feature-block__desc {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.7;
  max-width: 600px;
  margin-bottom: 32px;
}

.feature-block__demo {
  margin-top: 8px;
}

/* ─── Corrector Preview ───────────────────────────────────────────────────── */

.corrector-preview {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  max-width: 520px;
}

.corrector-preview__line {
  margin-bottom: 16px;
}

.corrector-preview__original {
  font-size: 1rem;
  color: var(--text-muted);
  font-style: italic;
  text-decoration: underline;
  text-decoration-color: rgba(142, 68, 173, 0.4);
  text-decoration-style: wavy;
  text-underline-offset: 4px;
}

.corrector-preview__suggestion {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 16px;
  background: rgba(46, 134, 193, 0.06);
  border: 1px solid rgba(46, 134, 193, 0.15);
  border-radius: var(--radius);
  font-size: 0.9rem;
  color: var(--text);
  line-height: 1.5;
}

.corrector-preview__icon {
  font-size: 1.1rem;
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .features-grid {
    gap: 28px;
  }
  .feature-block {
    padding: 32px 24px;
  }
}

/* ─── Sections ────────────────────────────────────────────────────────────── */

.section {
  padding: 120px 0;
}

.section--alt {
  background: var(--bg-alt);
}

.section__header {
  text-align: center;
  margin-bottom: 72px;
}

.section__label {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 12px;
}

.section__title {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.section__desc {
  font-size: 1.1rem;
  color: var(--text-muted);
}

/* ─── Steps ───────────────────────────────────────────────────────────────── */

.steps {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 24px;
}

.step {
  flex: 1;
  max-width: 300px;
  text-align: center;
  padding: 32px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: all var(--transition);
}

.step:hover {
  border-color: rgba(46, 134, 193, 0.2);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.step__number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent);
  background: rgba(46, 134, 193, 0.1);
  border-radius: 50%;
  margin-bottom: 16px;
}

.step__icon {
  font-size: 2.5rem;
  margin-bottom: 16px;
}

.step__title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.step__desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.step__arrow {
  display: flex;
  align-items: center;
  font-size: 1.5rem;
  color: var(--text-dim);
  margin-top: 80px;
}

@media (max-width: 768px) {
  .steps {
    flex-direction: column;
    align-items: center;
  }
  .step__arrow {
    margin-top: 0;
    transform: rotate(90deg);
  }
}

/* ─── Cards ───────────────────────────────────────────────────────────────── */

.cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}

.card {
  padding: 40px 36px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: all var(--transition);
}

.card:hover {
  border-color: rgba(46, 134, 193, 0.2);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.card__icon {
  font-size: 2.4rem;
  margin-bottom: 20px;
}

.card__title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.card__desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
}

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

/* ─── Story ───────────────────────────────────────────────────────────────── */

.story {
  display: flex;
  gap: 64px;
  align-items: center;
}

.story__content {
  flex: 1.5;
}

.story__text {
  font-size: 1.05rem;
  color: var(--text-muted);
  margin-top: 16px;
  line-height: 1.8;
}

.story__text--highlight {
  color: var(--text);
  font-weight: 600;
  font-size: 1.15rem;
  margin-top: 24px;
}

.story__visual {
  flex: 1;
  display: flex;
  justify-content: center;
}

.story__card {
  text-align: center;
  padding: 40px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.3);
}

.story__emoji {
  font-size: 4rem;
  margin-bottom: 16px;
}

.story__info {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-top: 4px;
  font-weight: 500;
}
.story__info:first-of-type {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
}

@media (max-width: 768px) {
  .story {
    flex-direction: column;
    gap: 40px;
  }
}

/* ─── CTA Block ───────────────────────────────────────────────────────────── */

.section--cta {
  padding: 120px 0;
}

.cta-block {
  position: relative;
  text-align: center;
  padding: 64px 40px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.cta-block__glow {
  position: absolute;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 400px;
  background: radial-gradient(ellipse, var(--purple-glow) 0%, transparent 70%);
  pointer-events: none;
  opacity: 0.5;
}

.cta-block__title {
  position: relative;
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 800;
  margin-bottom: 16px;
}

.cta-block__desc {
  position: relative;
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 32px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

/* ─── Footer ──────────────────────────────────────────────────────────────── */

.footer {
  padding: 40px 0;
  border-top: 1px solid var(--border);
}

.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.footer__brand {
  font-weight: 700;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.footer__copy {
  font-size: 0.8rem;
  color: var(--text-dim);
}

.footer__love {
  font-size: 0.8rem;
  color: var(--text-muted);
}

@media (max-width: 600px) {
  .footer__inner {
    flex-direction: column;
    text-align: center;
  }
}

/* ─── Modal ───────────────────────────────────────────────────────────────── */

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.modal-backdrop.active {
  opacity: 1;
  visibility: visible;
}

.modal {
  position: relative;
  width: 90%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px 32px;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.5);
  transform: translateY(20px) scale(0.97);
  transition: transform 0.3s ease;
}

.modal-backdrop.active .modal {
  transform: translateY(0) scale(1);
}

.modal__close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-dim);
  cursor: pointer;
  line-height: 1;
  transition: color var(--transition);
}
.modal__close:hover {
  color: var(--text);
}

.modal__header {
  margin-bottom: 28px;
}

.modal__title {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 6px;
}

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

/* ─── Form ────────────────────────────────────────────────────────────────── */

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

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group select {
  width: 100%;
  padding: 12px 14px;
  font-family: var(--font);
  font-size: 0.95rem;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  outline: none;
  transition:
    border-color var(--transition),
    box-shadow var(--transition);
}

.form-group input:focus,
.form-group select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

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

.form-group select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%238B949E' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

.checkbox-group,
.radio-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.checkbox-label,
.radio-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
  color: var(--text-muted);
  cursor: pointer;
  padding: 8px 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all var(--transition);
}

.checkbox-label:hover,
.radio-label:hover {
  border-color: rgba(46, 134, 193, 0.3);
  color: var(--text);
}

.checkbox-label:has(input:checked),
.radio-label:has(input:checked) {
  border-color: var(--accent);
  background: rgba(46, 134, 193, 0.08);
  color: var(--text);
}

.checkbox-label input,
.radio-label input {
  accent-color: var(--accent);
}

.form-group--error p {
  font-size: 0.85rem;
  color: #e74c3c;
  padding: 10px 14px;
  background: rgba(231, 76, 60, 0.08);
  border: 1px solid rgba(231, 76, 60, 0.2);
  border-radius: var(--radius);
}

/* ─── Modal success ───────────────────────────────────────────────────────── */

.modal__success {
  text-align: center;
  padding: 20px 0;
}

.modal__success-icon {
  font-size: 3.5rem;
  margin-bottom: 16px;
}

.modal__success-title {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.modal__success-sub {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 24px;
}

/* ─── Reveal animation ────────────────────────────────────────────────────── */

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition:
    opacity 0.7s ease,
    transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ─── Spinner ─────────────────────────────────────────────────────────────── */

.spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

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

/* ═══════════════════════════════════════════════════════════════════════════
   ADMIN DASHBOARD
   ═══════════════════════════════════════════════════════════════════════════ */

/* ─── Admin login ─────────────────────────────────────────────────────────── */

.admin-login {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.admin-login__card {
  width: 90%;
  max-width: 380px;
  padding: 40px 32px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  text-align: center;
}

.admin-login__card h1 {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 8px;
}

.admin-login__card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.admin-login__card input {
  width: 100%;
  padding: 12px 14px;
  font-family: var(--font);
  font-size: 0.95rem;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  outline: none;
  margin-bottom: 16px;
  transition:
    border-color var(--transition),
    box-shadow var(--transition);
}

.admin-login__card input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.admin-login__error {
  font-size: 0.85rem;
  color: #e74c3c;
  margin-bottom: 12px;
}

/* ─── Admin dashboard ─────────────────────────────────────────────────────── */

.admin-dash {
  display: none;
  padding: 32px;
  max-width: 1200px;
  margin: 0 auto;
}

.admin-dash.active {
  display: block;
}

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

.admin-header h1 {
  font-size: 1.6rem;
  font-weight: 800;
}

.admin-header__actions {
  display: flex;
  gap: 12px;
}

/* ─── Stat cards ──────────────────────────────────────────────────────────── */

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}

.stat-card {
  padding: 24px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.stat-card__label {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}

.stat-card__value {
  font-size: 2rem;
  font-weight: 800;
}

.stat-card__value--accent {
  color: var(--accent);
}

/* ─── Chart area ──────────────────────────────────────────────────────────── */

.admin-section {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 24px;
}

.admin-section__title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 16px;
}

/* ─── Bar chart (pure CSS) ────────────────────────────────────────────────── */

.bar-chart {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 140px;
  padding-top: 8px;
}

.bar-chart__col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 0;
}

.bar-chart__bar {
  width: 100%;
  max-width: 36px;
  border-radius: 4px 4px 0 0;
  background: var(--gradient);
  transition: height 0.6s ease;
}

.bar-chart__label {
  font-size: 0.65rem;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 50px;
}

.bar-chart__count {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
}

/* ─── Trouble distribution ────────────────────────────────────────────────── */

.trouble-bars {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.trouble-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.trouble-row__name {
  width: 140px;
  font-size: 0.85rem;
  color: var(--text-muted);
  flex-shrink: 0;
}

.trouble-row__track {
  flex: 1;
  height: 8px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
  overflow: hidden;
}

.trouble-row__fill {
  height: 100%;
  border-radius: 4px;
  background: var(--gradient);
  transition: width 0.6s ease;
}

.trouble-row__count {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text);
  width: 40px;
  text-align: right;
}

/* ─── Table ───────────────────────────────────────────────────────────────── */

.admin-table-wrap {
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.admin-table th,
.admin-table td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
}

.admin-table th {
  font-weight: 600;
  color: var(--text-muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.admin-table td {
  color: var(--text);
}

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

.badge {
  display: inline-block;
  padding: 2px 8px;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  background: rgba(46, 134, 193, 0.1);
  color: var(--accent);
  margin: 2px;
}

/* ─── Empty state ─────────────────────────────────────────────────────────── */

.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-muted);
}

.empty-state__icon {
  font-size: 2.5rem;
  margin-bottom: 12px;
}
