:root {
  --bg: #07111f;
  --bg-alt: #0d1730;
  --panel: rgba(12, 21, 42, 0.9);
  --panel-strong: #101a35;
  --panel-soft: rgba(21, 32, 60, 0.82);
  --line: rgba(162, 183, 216, 0.14);
  --line-strong: rgba(194, 211, 241, 0.22);
  --text: #f5f8ff;
  --muted: #a5b6d7;
  --accent: #f3c76c;
  --accent-2: #76e4d0;
  --accent-3: #8fb4ff;
  --danger: #f27e7e;
  --success: #6de1a8;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --content-width: 1240px;
  --header-height: 76px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(121, 144, 255, 0.18), transparent 28%),
    radial-gradient(circle at top right, rgba(243, 199, 108, 0.14), transparent 24%),
    linear-gradient(180deg, #06101d 0%, #091423 42%, #070d18 100%);
  font-family: "Space Grotesk", sans-serif;
  line-height: 1.55;
  text-rendering: optimizeLegibility;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.55), transparent 86%);
  opacity: 0.4;
}

h1,
h2,
h3,
h4,
.brand strong,
.panel-card strong {
  font-family: "Fraunces", serif;
  letter-spacing: 0.01em;
  line-height: 1.05;
  margin: 0;
}

p {
  margin: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

code {
  padding: 0.12rem 0.38rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 0.9em;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.hidden,
[hidden] {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.muted {
  color: var(--muted);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.72rem;
  font-weight: 700;
}

.eyebrow::before {
  content: "";
  width: 26px;
  height: 1px;
  background: linear-gradient(90deg, transparent, currentColor);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0.85rem 1.2rem;
  min-height: 46px;
  font-weight: 700;
  letter-spacing: 0.01em;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, color 180ms ease;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.16);
}

.btn:hover {
  transform: translateY(-1px);
}

.btn--primary {
  background: linear-gradient(135deg, #f3c76c, #ffdd9f);
  color: #1a1320;
}

.btn--soft {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.1);
}

.btn--ghost {
  background: transparent;
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.14);
}

.btn--light {
  background: rgba(255, 255, 255, 0.95);
  color: #0f172a;
}

.btn--full {
  width: 100%;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(18px);
  background: linear-gradient(180deg, rgba(7, 17, 31, 0.96), rgba(7, 17, 31, 0.72));
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.site-header__inner,
.page,
.site-footer {
  width: min(var(--content-width), calc(100vw - 2rem));
  margin: 0 auto;
}

.site-header__inner {
  min-height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
}

.brand__mark {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  display: inline-grid;
  place-items: center;
  background: linear-gradient(135deg, #f3c76c, #8fb4ff);
  color: #0b1220;
  font-weight: 800;
  box-shadow: 0 14px 30px rgba(111, 145, 225, 0.25);
}

.brand__text {
  display: grid;
  gap: 0.1rem;
}

.brand__text strong {
  font-size: 1.02rem;
}

.brand__text small {
  color: var(--muted);
  font-size: 0.82rem;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.site-nav a {
  color: var(--muted);
  font-weight: 600;
}

.site-nav a:hover {
  color: var(--text);
}

.page {
  padding: 2.2rem 0 4rem;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
  gap: 1.4rem;
  align-items: stretch;
  margin-top: 1rem;
}

.hero__copy,
.hero__panel,
.section,
.notes-card,
.panel,
.table-card,
.stack-card {
  position: relative;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(14, 23, 44, 0.9), rgba(8, 16, 31, 0.92));
  box-shadow: var(--shadow);
}

.hero__copy {
  border-radius: var(--radius-xl);
  padding: clamp(1.6rem, 3vw, 3rem);
  overflow: hidden;
}

.hero__copy::after,
.notes-card--accent::after {
  content: "";
  position: absolute;
  inset: auto -12% -18% auto;
  width: 260px;
  height: 260px;
  background: radial-gradient(circle, rgba(243, 199, 108, 0.2), transparent 65%);
  pointer-events: none;
}

.hero h1 {
  margin-top: 0.8rem;
  font-size: clamp(2.7rem, 6vw, 5rem);
  max-width: 12ch;
}

.hero__lead {
  margin-top: 1rem;
  max-width: 62ch;
  font-size: 1.05rem;
  color: rgba(229, 236, 255, 0.88);
}

.hero__actions {
  display: flex;
  gap: 0.85rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

.hero__stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
  margin-top: 1.7rem;
}

.metric {
  padding: 1rem 1rem 0.95rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.metric dt {
  color: var(--muted);
  font-size: 0.82rem;
}

.metric dd {
  margin: 0.3rem 0 0;
  font-family: "Fraunces", serif;
  font-size: clamp(1.55rem, 3vw, 2.2rem);
}

.hero__panel {
  border-radius: var(--radius-xl);
  padding: 1rem;
  display: grid;
  gap: 1rem;
}

.panel-card {
  border-radius: 22px;
  padding: 1.1rem 1.15rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.03));
  border: 1px solid rgba(255, 255, 255, 0.09);
}

.panel-card--glass {
  background:
    linear-gradient(180deg, rgba(243, 199, 108, 0.12), rgba(255, 255, 255, 0.05)),
    rgba(255, 255, 255, 0.03);
}

.panel-card__label {
  display: inline-flex;
  color: var(--accent-2);
  font-size: 0.74rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 0.55rem;
}

.panel-card strong {
  display: block;
  font-size: 1.3rem;
  margin-bottom: 0.55rem;
}

.panel-card p {
  color: var(--muted);
}

.section {
  margin-top: 1.25rem;
  border-radius: var(--radius-xl);
  padding: clamp(1.2rem, 2.4vw, 2rem);
}

.section--split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.82fr);
  gap: 1.2rem;
}

.section__head {
  display: grid;
  gap: 0.35rem;
  margin-bottom: 1.15rem;
}

.section__head h2 {
  font-size: clamp(1.8rem, 3vw, 2.55rem);
}

.section__head p {
  color: var(--muted);
  max-width: 70ch;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.overview-card {
  border-radius: 22px;
  padding: 1.1rem 1.1rem 1rem;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.overview-card strong {
  display: block;
  font-size: 1.2rem;
  margin-top: 0.3rem;
  margin-bottom: 0.4rem;
}

.overview-card p {
  color: var(--muted);
  font-size: 0.95rem;
}

.stack-list {
  display: grid;
  gap: 0.9rem;
}

.stack-card {
  border-radius: 22px;
  padding: 1.1rem 1.1rem 1rem;
}

.stack-card h3 {
  margin-bottom: 0.35rem;
}

.stack-card p,
.notes-card p {
  color: var(--muted);
}

.notes-card {
  border-radius: 22px;
  padding: 1.2rem;
}

.notes-card--accent {
  background:
    radial-gradient(circle at top right, rgba(243, 199, 108, 0.22), transparent 36%),
    linear-gradient(180deg, rgba(16, 26, 53, 0.95), rgba(8, 16, 31, 0.95));
}

.checklist,
.steps {
  margin: 1rem 0 0;
  padding-left: 1.2rem;
  display: grid;
  gap: 0.6rem;
  color: rgba(240, 245, 255, 0.9);
}

.sample-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.table-card {
  border-radius: 22px;
  padding: 1rem;
}

.table-card__head,
.panel__head,
.workspace__header,
.sidebar__brand,
.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.table-card__head {
  margin-bottom: 0.85rem;
}

.table-card__head span {
  color: var(--muted);
}

.table-wrap {
  width: 100%;
  overflow: auto;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(5, 10, 20, 0.36);
}

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

th,
td {
  padding: 0.82rem 0.9rem;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  vertical-align: top;
}

th {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.03);
}

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

tbody tr:hover {
  background: rgba(255, 255, 255, 0.03);
}

.site-footer {
  margin: 1.2rem auto 0;
  padding: 1rem 0 2rem;
  color: var(--muted);
}

.site-footer__meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.site-footer__meta a {
  color: var(--text);
}

/* Admin shell */

.admin-shell {
  overflow-x: hidden;
}

.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1.5rem;
}

.login-card {
  width: min(480px, 100%);
  padding: 1.5rem;
  border-radius: 28px;
  border: 1px solid var(--line);
  background:
    radial-gradient(circle at top, rgba(243, 199, 108, 0.14), transparent 28%),
    linear-gradient(180deg, rgba(14, 23, 44, 0.98), rgba(8, 16, 31, 0.95));
  box-shadow: var(--shadow);
  display: grid;
  gap: 1rem;
}

.login-card__head h1 {
  margin: 0.45rem 0 0.5rem;
  font-size: clamp(2rem, 5vw, 3rem);
}

.login-card__head p {
  color: var(--muted);
}

.field {
  display: grid;
  gap: 0.42rem;
}

.field > span {
  font-weight: 600;
  color: rgba(240, 245, 255, 0.94);
}

.field input,
.field select,
.field textarea,
.search-box input {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  padding: 0.86rem 0.95rem;
  outline: none;
  transition: border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

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

.field input::placeholder,
.field textarea::placeholder {
  color: rgba(164, 181, 214, 0.72);
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.search-box input:focus {
  border-color: rgba(243, 199, 108, 0.6);
  box-shadow: 0 0 0 4px rgba(243, 199, 108, 0.12);
  background: rgba(255, 255, 255, 0.08);
}

.field--inline {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}

.field--inline input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.dashboard {
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 1.2rem;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(7, 17, 31, 0.98), rgba(9, 18, 35, 0.94));
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 1rem;
}

.sidebar__brand {
  align-items: flex-start;
  padding-bottom: 0.4rem;
}

.sidebar__brand .brand__mark {
  flex: 0 0 auto;
}

.sidebar__brand small {
  display: block;
  margin-top: 0.18rem;
  color: var(--muted);
}

.sidebar__nav {
  display: grid;
  align-content: start;
  gap: 0.45rem;
}

.sidebar__nav button,
.sidebar__nav a {
  text-align: left;
  padding: 0.9rem 1rem;
  border-radius: 14px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  font-weight: 600;
  transition: background 180ms ease, color 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.sidebar__nav button:hover,
.sidebar__nav a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}

.sidebar__nav .is-active {
  color: #0d1320;
  background: linear-gradient(135deg, #f3c76c, #ffe0a0);
}

.sidebar__footer {
  display: grid;
  gap: 0.65rem;
}

.workspace {
  padding: 1.2rem;
  display: grid;
  gap: 1rem;
}

.workspace__header {
  align-items: flex-start;
  padding: 0.2rem 0 0.4rem;
}

.workspace__header h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  margin-top: 0.4rem;
}

.workspace__header p {
  color: var(--muted);
  max-width: 68ch;
}

.workspace__header-actions {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
  gap: 0.4rem;
}

.chip--status {
  color: var(--accent-2);
  border-color: rgba(118, 228, 208, 0.24);
  background: rgba(118, 228, 208, 0.08);
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.8rem;
}

.summary-card {
  border-radius: 22px;
  padding: 1rem 1rem 0.95rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(20, 29, 55, 0.9), rgba(10, 18, 34, 0.92));
}

.summary-card span {
  display: block;
  color: var(--muted);
  font-size: 0.84rem;
}

.summary-card strong {
  display: block;
  margin-top: 0.3rem;
  font-family: "Fraunces", serif;
  font-size: 1.6rem;
}

.workspace-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 1rem;
}

.panel {
  border-radius: 24px;
  padding: 1rem;
}

.panel__head {
  align-items: flex-start;
  margin-bottom: 0.9rem;
}

.panel__head h2 {
  margin-top: 0.35rem;
  font-size: 1.5rem;
}

.panel__actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.search-box input {
  min-width: 230px;
}

.table-wrap--admin {
  max-height: 64vh;
}

.panel--form .form-grid {
  display: grid;
  gap: 0.8rem;
}

.form-grid .field {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  padding: 0.8rem;
}

.form-grid .field--inline {
  background: transparent;
  border: none;
  padding-left: 0.15rem;
}

.field small {
  color: var(--muted);
}

.field--full {
  grid-column: 1 / -1;
}

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

.notice {
  min-height: 1.25rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.notice--wide {
  margin-top: 0.7rem;
  padding: 0.8rem 1rem;
  border-radius: 14px;
  border: 1px dashed rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.03);
}

.notice--error {
  color: #ffd0d0;
  border-color: rgba(242, 126, 126, 0.28);
  background: rgba(242, 126, 126, 0.08);
}

.notice--success {
  color: #c1f8dd;
  border-color: rgba(109, 225, 168, 0.28);
  background: rgba(109, 225, 168, 0.08);
}

.actions-cell {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.mini-btn {
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font-size: 0.84rem;
  font-weight: 700;
}

.mini-btn--danger {
  background: rgba(242, 126, 126, 0.12);
  border-color: rgba(242, 126, 126, 0.22);
  color: #ffd7d7;
}

.cell-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.9rem;
}

.value-muted {
  color: var(--muted);
}

.toast-host {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  display: grid;
  gap: 0.55rem;
  z-index: 60;
}

.toast {
  min-width: 280px;
  max-width: min(420px, calc(100vw - 2rem));
  padding: 0.9rem 1rem;
  border-radius: 16px;
  background: rgba(10, 18, 34, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: var(--shadow);
}

.toast strong {
  display: block;
  margin-bottom: 0.2rem;
}

.toast--success {
  border-color: rgba(109, 225, 168, 0.24);
}

.toast--error {
  border-color: rgba(242, 126, 126, 0.24);
}

@media (max-width: 1180px) {
  .hero,
  .section--split,
  .workspace-grid {
    grid-template-columns: 1fr;
  }

  .summary-grid,
  .card-grid,
  .sample-layout,
  .hero__stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sidebar {
    position: relative;
    height: auto;
  }

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

@media (max-width: 760px) {
  .site-header__inner,
  .site-footer,
  .workspace__header,
  .table-card__head,
  .panel__head {
    flex-direction: column;
    align-items: flex-start;
  }

  .site-nav {
    gap: 0.6rem;
  }

  .site-nav a {
    font-size: 0.95rem;
  }

  .summary-grid,
  .card-grid,
  .sample-layout,
  .hero__stats {
    grid-template-columns: 1fr;
  }

  .hero h1 {
    max-width: none;
  }

  .hero__actions,
  .workspace__header-actions,
  .panel__actions {
    width: 100%;
  }

  .search-box,
  .search-box input,
  .panel__actions .btn,
  .workspace__header-actions .chip {
    width: 100%;
  }

  .sidebar {
    padding: 1rem;
  }

  .panel,
  .hero__copy,
  .hero__panel,
  .section,
  .login-card {
    border-radius: 22px;
  }
}
