:root {
  --bg: #020617;
  --surface: rgba(15, 23, 42, 0.8);
  --panel: rgba(15, 23, 42, 0.6);
  --muted: #94a3b8;
  --text: #e2e8f0;
  --text-light: #cbd5e1;
  --accent: #06b6d4;
  --accent-2: #a5f3fc;
  --accent-warm: #f97316;
  --accent-danger: #f87171;
  --border: rgba(6, 182, 212, 0.2);
  --border-subtle: rgba(255, 255, 255, 0.05);
  --shadow: 0 0 40px rgba(6, 182, 212, 0.1);
  --radius: 16px;
  --radius-sm: 12px;
}

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

body {
  margin: 0;
  font-family: "Rajdhani", "Inter", system-ui, sans-serif;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  line-height: 1.6;
  font-weight: 500;
}

h1,
h2,
h3,
h4 {
  font-family: "Orbitron", "Space Grotesk", system-ui, sans-serif;
  margin: 0 0 0.5rem;
  letter-spacing: 1px;
  text-transform: uppercase;
}

h1 {
  font-size: clamp(2.5rem, 5vw + 1rem, 4.5rem);
  background: linear-gradient(to right, #fff, var(--accent-2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 0 40px rgba(6, 182, 212, 0.4);
}

h2 {
  font-size: 1.8rem;
  color: #fff;
}

h3 {
  font-size: 1.3rem;
  color: #fff;
}

p {
  margin: 0 0 1rem;
  color: var(--text-light);
  font-size: 1.05rem;
}

a {
  color: inherit;
}

.bg-canvas {
  position: fixed;
  inset: 0;
  background: linear-gradient(135deg, #0f172a 0%, #020617 100%);
  z-index: -2;
}

.bg-canvas::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(6, 182, 212, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(6, 182, 212, 0.03) 1px, transparent 1px);
  background-size: 50px 50px;
  z-index: -1;
}

.bg-canvas::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  box-shadow: 0 0 20px var(--accent);
}

.hero {
  max-width: 1000px;
  margin: 0 auto;
  padding: 80px 24px 60px;
  text-align: center;
}

.hero__badge {
  display: inline-block;
  background: rgba(6, 182, 212, 0.1);
  border: 1px solid var(--border);
  padding: 8px 20px;
  border-radius: 999px;
  font-size: 0.9rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 20px;
}

.hero__name {
  font-family: "Orbitron", sans-serif;
  font-size: clamp(1.2rem, 2vw + 0.5rem, 1.8rem);
  color: var(--accent);
  text-shadow: 0 0 20px rgba(6, 182, 212, 0.4);
  margin-bottom: 16px;
  letter-spacing: 3px;
  text-transform: uppercase;
}

.hero__author {
  font-size: clamp(1.5rem, 3vw + 0.5rem, 2.2rem);
  color: var(--text-light);
  margin-bottom: 20px;
  font-weight: 400;
  letter-spacing: 2px;
}

.hero__lead {
  font-size: clamp(1.2rem, 2vw + 0.4rem, 1.9rem);
  line-height: 1.6;
  max-width: 880px;
  margin: 0 auto 18px;
}

.hero__line {
  width: 200px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  margin: 30px auto;
  box-shadow: 0 0 10px var(--accent);
}

.hero__meta {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.chip {
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(6, 182, 212, 0.1);
  border: 1px solid var(--border);
  color: #d8f6ff;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.layout {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 24px 80px;
}

.form-container {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
}

.form-container::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
}

.section {
  background: rgba(6, 182, 212, 0.03);
  border: 1px solid var(--border-subtle);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: 30px;
  margin-bottom: 30px;
}

.section__header {
  margin-bottom: 24px;
}

.section__header h3 {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--accent);
}

.eyebrow {
  font-family: "Orbitron", sans-serif;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 0.75rem;
  color: var(--muted);
  margin: 0 0 0.4rem;
}

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

.grid {
  display: grid;
  gap: 14px;
}

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

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}

.info-card {
  background: rgba(6, 182, 212, 0.06);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.15);
  position: relative;
  overflow: hidden;
}

.info-card--full {
  grid-column: 1 / -1;
}

.badge {
  display: inline-block;
  margin-top: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #0f172a;
  background: var(--accent);
  border: 1px solid var(--border);
}

.badge--warn {
  background: var(--accent-warm);
  color: #0f172a;
}

.badge--danger {
  background: var(--accent-danger);
  color: #0f172a;
}

.pill-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}

.pill-list li {
  padding: 12px 14px 12px 34px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(6, 182, 212, 0.07);
  color: var(--text-light);
  position: relative;
}

.pill-list li::before {
  content: "";
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent-warm);
  box-shadow: 0 0 12px rgba(249, 115, 22, 0.5);
}

.form-step {
  grid-column: 1 / -1;
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.form-step + .form-step {
  border-top: 1px solid var(--border-subtle);
  padding-top: 16px;
  margin-top: 6px;
}

.form__hint {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 0.92rem;
  margin: 4px 0 0;
}

.field {
  display: grid;
  gap: 8px;
  color: var(--text);
}

.field span {
  font-size: 0.95rem;
  color: var(--text-light);
  letter-spacing: 0.5px;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.02);
  color: #fff;
  font-size: 1rem;
}

.field textarea {
  resize: vertical;
  min-height: 100px;
}

.range-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.95rem;
  color: var(--text-light);
}

.range-hints {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--muted);
}

.range-value {
  color: var(--accent);
  font-weight: 700;
}

.program__deck {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}

.program__card {
  position: relative;
  background: rgba(6, 182, 212, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 14px;
  cursor: pointer;
  transition: transform 0.15s ease, border 0.15s ease;
}

.program__card:hover {
  transform: translateY(-2px);
  border-color: var(--border);
}

.program__card--active {
  border-color: var(--accent);
  box-shadow: 0 0 20px rgba(6, 182, 212, 0.2);
}

.program__card::after {
  content: "↗";
  position: absolute;
  top: 12px;
  right: 12px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid var(--border);
  color: var(--accent);
  display: grid;
  place-items: center;
  font-size: 0.9rem;
  background: rgba(6, 182, 212, 0.08);
}

.program__card h4 {
  margin-right: 28px;
}

.modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 12px;
  z-index: 20;
}

.modal.is-hidden {
  display: none;
}

.modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 23, 0.78);
  backdrop-filter: blur(6px);
}

.modal__dialog {
  position: relative;
  z-index: 1;
  width: min(640px, calc(100vw - 32px));
  background: rgba(6, 182, 212, 0.08);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.4);
  max-height: 88vh;
  overflow-y: auto;
  margin: 0 auto;
}

.modal__dialog ul {
  margin: 8px 0 0;
  padding-left: 18px;
}

.modal__close {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  color: #fff;
  border-radius: 10px;
  width: 32px;
  height: 32px;
  cursor: pointer;
}

.modal__close:hover {
  border-color: var(--accent);
}

.is-hidden {
  display: none;
}

.cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  background: linear-gradient(90deg, var(--accent), #0ea5e9);
  border: none;
  border-radius: 12px;
  color: #04131d;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
  box-shadow: 0 10px 25px rgba(6, 182, 212, 0.25);
}

.cta--secondary {
  background: transparent;
  color: #fff;
  border: 1px solid var(--border);
  box-shadow: none;
}

.admin-link {
  margin-top: 16px;
  text-align: center;
}

.admin-link .cta {
  font-size: 0.95rem;
}

.actions {
  display: flex;
  justify-content: flex-end;
}

.status {
  font-size: 0.95rem;
  color: var(--muted);
}

.status--ok {
  color: #7cf2d4;
}

.status--err {
  color: #fca5a5;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  color: var(--text);
}

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

th {
  color: var(--muted);
  font-weight: 700;
  letter-spacing: 0.5px;
}

.footer {
  text-align: center;
  color: var(--muted);
  padding: 40px 24px 60px;
  font-size: 0.95rem;
}

.footer__admin {
  margin-top: 8px;
  font-size: 0.9rem;
}

.footer__admin a {
  color: var(--muted);
  text-decoration: none;
}

.footer__admin a:hover {
  color: #e2e8f0;
}

@media (max-width: 720px) {
  .form-container {
    padding: 24px;
  }

  .modal__dialog {
    width: calc(100vw - 18px);
    max-height: 85vh;
    padding: 16px;
  }
}
