:root {
  --bg: #13121b;
  --panel: #1f1f28;
  --panel-strong: #2a2933;
  --line: #464555;
  --text: #e4e1ee;
  --muted: #918fa1;
  --accent: #4f46e5;
  --accent-soft: rgba(79, 70, 229, 0.15);
  --danger: #e11d48;
  --warning: #f59e0b;
  --success: #10b981;
  --shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Geist", "Inter", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(79, 70, 229, 0.18), transparent 35%),
    linear-gradient(180deg, #13121b 0%, #0e0d16 100%);
  background-attachment: fixed;
}

a {
  color: inherit;
}

code,
pre {
  font-family: "Geist Mono", "JetBrains Mono", monospace;
}

.shell {
  max-width: 1180px;
  margin: 0 auto;
  padding: 24px;
}

.site-header,
.hero,
.panel,
.notice-bar,
.flash {
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.site-header {
  background: rgba(31, 31, 40, 0.75);
  backdrop-filter: blur(12px);
  border-radius: 24px;
  padding: 20px 24px;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
  margin-bottom: 18px;
}

.brand {
  text-decoration: none;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text);
}

.muted {
  color: var(--muted);
  margin: 6px 0 0;
}

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

.nav a {
  text-decoration: none;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(79, 70, 229, 0.12);
  transition: all 0.2s ease;
}

.nav a:hover {
  background: rgba(79, 70, 229, 0.25);
  color: var(--text);
}

.notice-bar,
.flash {
  padding: 14px 18px;
  border-radius: 18px;
  margin-bottom: 16px;
  background: rgba(31, 31, 40, 0.85);
  backdrop-filter: blur(12px);
  color: var(--text);
}

.flash--success {
  border-color: rgba(16, 185, 129, 0.4);
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
}

.flash--error {
  border-color: rgba(225, 29, 72, 0.4);
  background: rgba(225, 29, 72, 0.12);
  color: #ffb4ab;
}

.panel,
.hero {
  background: rgba(31, 31, 40, 0.7);
  backdrop-filter: blur(12px);
  border-radius: 24px;
  padding: 24px;
}

.hero {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
}

.hero-actions,
.card-actions,
.actions-cell,
.checkbox-stack,
.metrics,
.card-grid,
.grid-two,
.stack {
  display: grid;
  gap: 18px;
}

.metrics {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.metric-card strong {
  font-size: 2rem;
  display: block;
}

.card-grid {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

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

.site-card__head,
.key-grid {
  display: grid;
  gap: 12px;
}

.site-card__head {
  grid-template-columns: 1fr auto;
  align-items: start;
}

.key-grid {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  margin-top: 18px;
}

.key-grid strong,
label span,
fieldset legend,
.eyebrow {
  display: block;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.75rem;
  color: var(--muted);
}

.eyebrow {
  margin-bottom: 10px;
}

.button {
  border: none;
  border-radius: 14px;
  background: var(--accent);
  color: #fff;
  padding: 11px 16px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
}

.button--ghost {
  background: rgba(79, 70, 229, 0.12);
  color: var(--text);
}

.button:hover {
  background: #4338ca;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.4);
}

.button--ghost:hover {
  background: rgba(79, 70, 229, 0.22);
  transform: translateY(-1px);
}

.button, .button--ghost {
  transition: all 0.2s ease;
}

.inline-form {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  margin: 0;
}

.inline-form input[type="text"] {
  min-width: 120px;
}

.stack-form,
.checkbox-stack {
  display: grid;
  gap: 14px;
}

label input,
input[type="file"],
textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--panel-strong);
  color: var(--text);
  border-radius: 14px;
  padding: 12px 14px;
  margin-top: 6px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

label input:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.25);
}

fieldset {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
}

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

.checkbox input {
  width: auto;
  margin: 0;
}

.plain-list {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 8px;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(79, 70, 229, 0.16);
  color: var(--text);
  font-weight: 700;
  text-transform: capitalize;
}

.badge--success {
  background: rgba(16, 185, 129, 0.15);
  color: var(--success);
}

.badge--warning {
  background: rgba(245, 158, 11, 0.15);
  color: var(--warning);
}

.badge--danger {
  background: rgba(225, 29, 72, 0.15);
  color: var(--danger);
}

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

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  text-align: left;
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.actions-cell {
  min-width: 320px;
}

.code-block,
.mini-pre {
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  overflow-x: auto;
  white-space: pre-wrap;
}

.mini-pre {
  margin: 0;
}

.auth-layout {
  min-height: calc(100vh - 120px);
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 20px;
  align-items: center;
}

.top-gap {
  margin-top: 22px;
}

.site-footer {
  margin-top: 60px;
  padding: 40px 0 30px;
  border-top: 1px solid var(--line);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 30px;
}

.footer-grid h4 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin: 0 0 14px;
}

.footer-grid ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
}

.footer-grid a {
  text-decoration: none;
  color: var(--muted);
  transition: color 0.2s ease;
  font-size: 0.9rem;
}

.footer-grid a:hover {
  color: var(--text);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 0.85rem;
  color: var(--muted);
  flex-wrap: wrap;
  gap: 12px;
}

.footer-legal-links {
  display: flex;
  gap: 20px;
}

.footer-legal-links a {
  text-decoration: none;
  color: var(--muted);
  transition: color 0.2s ease;
}

.footer-legal-links a:hover {
  color: var(--text);
}

.legal-content {
  line-height: 1.8;
}

.legal-content h2 {
  margin-top: 30px;
  margin-bottom: 10px;
  font-size: 1.25rem;
}

.legal-content h3 {
  margin-top: 20px;
  margin-bottom: 8px;
}

.legal-content p,
.legal-content li {
  color: var(--muted);
}

.legal-content ul {
  padding-left: 20px;
  display: grid;
  gap: 6px;
}

@media (max-width: 900px) {
  .site-header,
  .hero,
  .auth-layout,
  .grid-two {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: stretch;
  }

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

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

  .shell {
    padding: 16px;
  }
}

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

  .site-header {
    padding: 18px;
  }

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