:root {
  --bg-deep: #060910;
  --bg-base: #0b0f18;
  --bg-surface: #111622;
  --bg-elevated: #181e2e;
  --border: #1e2740;
  --border-light: #2a3454;
  --mint: #6ee7b7;
  --mint-dim: #3ba882;
  --mint-glow: rgba(110, 231, 183, 0.15);
  --amber: #fbbf24;
  --rose: #fb7185;
  --text: #e8e6e1;
  --text-secondary: #8892a6;
  --text-dim: #556078;
  --font-display: 'Bricolage Grotesque', sans-serif;
  --font-body: 'Outfit', sans-serif;
  --font-mono: 'Fira Code', monospace;
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(110, 231, 183, 0.12), transparent 26%),
    radial-gradient(circle at 84% 0%, rgba(251, 191, 36, 0.1), transparent 20%),
    linear-gradient(180deg, var(--bg-deep) 0%, var(--bg-base) 50%, #070b12 100%);
}

a {
  color: var(--mint);
  text-decoration: none;
}

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

nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  height: 60px;
  padding: 0 2rem;
  border-bottom: 1px solid transparent;
  backdrop-filter: none;
  background: transparent;
  transition: background 0.4s, backdrop-filter 0.4s, border-color 0.4s;
}

.nav-shell,
.page-shell {
  width: min(1200px, 100%);
  margin: 0 auto;
}

.nav-shell {
  height: 100%;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
}

.nav-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text);
  justify-self: start;
}

.nav-brand svg {
  width: 24px;
  height: 24px;
}

.nav-links,
.nav-actions {
  display: flex;
  align-items: center;
}

.nav-links {
  gap: 1.6rem;
  list-style: none;
  margin: 0;
  padding: 0;
  justify-self: center;
}

.nav-actions {
  gap: 0.9rem;
  justify-self: end;
}

.nav-links a,
.nav-ghost,
.nav-primary {
  font-size: 0.88rem;
  transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.nav-links a {
  padding: 0;
  color: var(--text-secondary);
  font-weight: 500;
}

.nav-links a.active,
.nav-links a:hover {
  color: var(--text);
  background: transparent;
}

.nav-ghost,
.nav-primary {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.62rem 0.95rem;
}

.nav-ghost {
  color: var(--text-secondary);
  background: rgba(17, 22, 34, 0.72);
}

.nav-primary {
  color: #04120d;
  background: linear-gradient(135deg, var(--mint), #96f2d7);
  border-color: transparent;
  font-weight: 700;
}

.page-shell {
  padding: 108px 0 88px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid rgba(110, 231, 183, 0.25);
  background: rgba(110, 231, 183, 0.08);
  color: var(--mint);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, 440px);
  gap: 32px;
  align-items: start;
  margin-top: 28px;
}

.hero-copy h1 {
  margin: 18px 0 18px;
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 4vw, 4.5rem);
  line-height: 1.04;
  letter-spacing: -0.04em;
}

.hero-copy p {
  margin: 0;
  max-width: 620px;
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--text-secondary);
}

.brand-panel {
  display: grid;
  gap: 18px;
}

.brand-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(110, 231, 183, 0.24);
  background: rgba(110, 231, 183, 0.08);
  color: var(--mint);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.brand-slogan {
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 1.6vw, 1.45rem);
  line-height: 1.35;
  letter-spacing: -0.03em;
  color: var(--text);
}

.brand-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 8px;
}

.brand-card {
  padding: 18px 20px;
  border-radius: 20px;
  border: 1px solid rgba(42, 52, 84, 0.88);
  background: rgba(17, 22, 34, 0.78);
}

.brand-card strong {
  display: block;
  margin-bottom: 8px;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 1rem;
}

.brand-card span {
  color: var(--text-secondary);
  line-height: 1.7;
}

.hero-points {
  display: grid;
  gap: 14px;
  margin-top: 28px;
}

.hero-points li {
  list-style: none;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(42, 52, 84, 0.84);
  background: rgba(17, 22, 34, 0.78);
  color: var(--text-secondary);
}

.hero-points strong {
  display: block;
  margin-bottom: 4px;
  color: var(--text);
}

.auth-card,
.auth-summary {
  border: 1px solid rgba(42, 52, 84, 0.9);
  border-radius: 28px;
  background: rgba(17, 22, 34, 0.9);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
}

.auth-card {
  padding: 28px;
}

.auth-summary {
  margin-top: 24px;
  padding: 18px 20px;
}

.auth-card h2,
.auth-summary h3 {
  margin: 0 0 10px;
  font-family: var(--font-display);
  letter-spacing: -0.03em;
}

.auth-card p,
.auth-summary p {
  margin: 0;
  color: var(--text-secondary);
  line-height: 1.75;
}

.status-pill {
  margin-top: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(42, 52, 84, 0.85);
}

.status-pill span {
  color: var(--text-secondary);
}

.status-pill strong {
  color: var(--text);
}

.auth-form {
  display: grid;
  gap: 16px;
  margin-top: 24px;
}

.field {
  display: grid;
  gap: 8px;
}

.field label {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text);
}

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

.field input {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px 16px;
  background: rgba(24, 30, 46, 0.88);
  color: var(--text);
  font: inherit;
}

.field input:focus {
  outline: none;
  border-color: var(--mint);
  box-shadow: 0 0 0 4px rgba(110, 231, 183, 0.12);
}

.auth-submit,
.logout-button {
  border: none;
  border-radius: 16px;
  padding: 14px 18px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.auth-submit {
  background: linear-gradient(135deg, var(--mint), #92f0d1);
  color: #04120d;
}

.logout-button {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  border: 1px solid rgba(42, 52, 84, 0.9);
}

.auth-message {
  min-height: 24px;
  margin-top: 4px;
  font-size: 0.95rem;
}

.auth-message.error {
  color: var(--rose);
}

.auth-message.success {
  color: var(--mint);
}

.auth-footer {
  margin-top: 18px;
  color: var(--text-secondary);
  line-height: 1.7;
}

.auth-footer a {
  font-weight: 700;
}

.auth-meta {
  margin-top: 24px;
  display: grid;
  gap: 12px;
}

.auth-meta-item {
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(42, 52, 84, 0.85);
}

.auth-meta-item strong {
  display: block;
  margin-bottom: 6px;
  color: var(--text);
}

.auth-meta-item span {
  color: var(--text-secondary);
}

.account-shell {
  padding-top: 108px;
}

.account-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-top: 24px;
}

.account-header h1 {
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 3.5vw, 3.2rem);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.account-header p {
  max-width: 720px;
  margin: 0;
  color: var(--text-secondary);
  line-height: 1.8;
}

.account-pill {
  min-width: 220px;
}

.account-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
  margin-top: 28px;
}

.account-sidebar,
.account-panel {
  border: 1px solid rgba(42, 52, 84, 0.9);
  border-radius: 28px;
  background: rgba(17, 22, 34, 0.9);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
}

.account-sidebar {
  position: sticky;
  top: 92px;
  padding: 22px;
  display: grid;
  gap: 18px;
}

.account-sidebar-card {
  display: grid;
  gap: 8px;
  padding: 18px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(42, 52, 84, 0.85);
}

.account-sidebar-label {
  color: var(--text-dim);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.account-sidebar-card strong {
  font-family: var(--font-display);
  font-size: 1.2rem;
}

.account-nav {
  display: grid;
  gap: 10px;
}

.account-nav button {
  width: 100%;
  border: 1px solid rgba(42, 52, 84, 0.88);
  border-radius: 18px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-secondary);
  text-align: left;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.account-nav button.active,
.account-nav button:hover {
  color: var(--text);
  border-color: rgba(110, 231, 183, 0.38);
  background: rgba(110, 231, 183, 0.08);
}

.account-logout {
  width: 100%;
}

.account-content {
  display: grid;
  gap: 22px;
}

.account-panel {
  padding: 24px 26px;
}

.account-panel h2 {
  margin: 0 0 10px;
  font-family: var(--font-display);
  letter-spacing: -0.03em;
}

.account-panel p {
  margin: 0;
  color: var(--text-secondary);
  line-height: 1.75;
}

.account-empty-state {
  margin-top: 18px;
  display: grid;
  gap: 10px;
  padding: 20px;
  border-radius: 22px;
  border: 1px dashed rgba(110, 231, 183, 0.24);
  background: rgba(110, 231, 183, 0.05);
}

.account-empty-state strong {
  color: var(--text);
}

.account-empty-state span {
  color: var(--text-secondary);
  line-height: 1.7;
}

.account-empty-state .skill-history-link {
  width: fit-content;
}

.account-admin-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.account-admin-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  margin-top: 18px;
}

.account-admin-search input {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px 16px;
  background: rgba(24, 30, 46, 0.88);
  color: var(--text);
  font: inherit;
}

.account-admin-search input:focus {
  outline: none;
  border-color: var(--mint);
  box-shadow: 0 0 0 4px rgba(110, 231, 183, 0.12);
}

.account-admin-list {
  display: grid;
  gap: 16px;
  margin-top: 18px;
}

.account-admin-card {
  display: grid;
  gap: 16px;
  padding: 20px;
  border-radius: 22px;
  border: 1px solid rgba(42, 52, 84, 0.85);
  background: rgba(255, 255, 255, 0.03);
}

.account-admin-card-header,
.account-admin-title-group,
.account-admin-badges,
.account-admin-actions,
.account-admin-pagination {
  display: flex;
  align-items: center;
  gap: 10px;
}

.account-admin-card-header,
.account-admin-pagination {
  justify-content: space-between;
}

.account-admin-title-group {
  flex-wrap: wrap;
}

.account-admin-name {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--text);
}

.account-admin-badges {
  flex-wrap: wrap;
}

.account-admin-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(184, 197, 214, 0.18);
  background: rgba(184, 197, 214, 0.12);
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 600;
}

.account-admin-badge.is-admin {
  border-color: rgba(110, 231, 183, 0.24);
  background: rgba(110, 231, 183, 0.12);
  color: var(--mint);
}

.account-admin-badge.is-super {
  border-color: rgba(251, 191, 36, 0.24);
  background: rgba(251, 191, 36, 0.12);
  color: var(--amber);
}

.account-admin-meta,
.account-admin-limits-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.account-admin-meta-item {
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(42, 52, 84, 0.72);
}

.account-admin-meta-item strong {
  color: var(--text);
}

.account-admin-meta-label {
  color: var(--text-dim);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.account-admin-limits-form {
  display: grid;
  gap: 14px;
}

.account-admin-limits-form .field span {
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 600;
}

.account-admin-pagination {
  margin-top: 18px;
}

[data-account-section][hidden] {
  display: none !important;
}

html[data-theme='light'] nav {
  border-bottom-color: transparent;
  background: transparent;
  box-shadow: none;
}

html[data-theme='light'] .nav-links a.active,
html[data-theme='light'] .nav-links a:hover {
  background: rgba(15, 23, 42, 0.05);
}

html[data-theme='light'] .nav-ghost {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(184, 197, 214, 0.9);
}

html[data-theme='light'] .eyebrow {
  border-color: rgba(79, 70, 229, 0.16);
  background: rgba(79, 70, 229, 0.08);
  color: var(--indigo);
}

html[data-theme='light'] .brand-kicker {
  border-color: rgba(79, 70, 229, 0.16);
  background: rgba(79, 70, 229, 0.08);
  color: var(--indigo);
}

html[data-theme='light'] .hero-points li,
html[data-theme='light'] .auth-card,
html[data-theme='light'] .auth-summary,
html[data-theme='light'] .status-pill,
html[data-theme='light'] .auth-meta-item,
html[data-theme='light'] .brand-card,
html[data-theme='light'] .account-sidebar,
html[data-theme='light'] .account-panel,
html[data-theme='light'] .account-sidebar-card {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(184, 197, 214, 0.88);
  box-shadow: 0 20px 50px rgba(148, 163, 184, 0.16);
}

html[data-theme='light'] .status-pill,
html[data-theme='light'] .auth-meta-item,
html[data-theme='light'] .hero-points li {
  box-shadow: none;
}

html[data-theme='light'] .field input {
  background: rgba(255, 255, 255, 0.96);
  border-color: rgba(184, 197, 214, 0.9);
}

html[data-theme='light'] .account-admin-search input {
  background: rgba(255, 255, 255, 0.96);
  border-color: rgba(184, 197, 214, 0.9);
  color: var(--text);
}

html[data-theme='light'] .field input:focus {
  box-shadow: 0 0 0 4px rgba(15, 157, 106, 0.12);
}

html[data-theme='light'] .account-admin-search input:focus {
  box-shadow: 0 0 0 4px rgba(15, 157, 106, 0.12);
}

html[data-theme='light'] .logout-button {
  background: rgba(15, 23, 42, 0.04);
  border-color: rgba(184, 197, 214, 0.9);
  color: var(--text);
}

html[data-theme='light'] .account-nav button {
  background: rgba(15, 23, 42, 0.03);
  border-color: rgba(184, 197, 214, 0.9);
}

html[data-theme='light'] .account-nav button.active,
html[data-theme='light'] .account-nav button:hover {
  background: rgba(15, 157, 106, 0.08);
  border-color: rgba(15, 157, 106, 0.24);
}

html[data-theme='light'] .account-empty-state {
  background: rgba(15, 157, 106, 0.05);
  border-color: rgba(15, 157, 106, 0.18);
}

html[data-theme='light'] .account-admin-card,
html[data-theme='light'] .account-admin-meta-item {
  background: rgba(15, 23, 42, 0.03);
  border-color: rgba(184, 197, 214, 0.88);
}

html[data-theme='light'] .account-admin-badge {
  border-color: rgba(184, 197, 214, 0.88);
  background: rgba(148, 163, 184, 0.14);
  color: #334155;
}

html[data-theme='light'] .logout-button:hover,
html[data-theme='light'] .nav-ghost:hover {
  background: rgba(15, 23, 42, 0.07);
}

html[data-theme='light'] .auth-message.success {
  color: var(--mint-dim);
}

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

  .account-header,
  .account-layout {
    grid-template-columns: 1fr;
    display: grid;
  }

  .account-sidebar {
    position: static;
  }

  .account-admin-meta,
  .account-admin-limits-grid,
  .account-admin-search {
    grid-template-columns: 1fr;
  }

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

  nav {
    height: auto;
    padding: 0 1rem;
  }

  .nav-shell {
    padding: 14px 0;
    height: auto;
    display: flex;
    flex-wrap: wrap;
  }

  .nav-links,
  .nav-actions {
    width: 100%;
    flex-wrap: wrap;
  }

  .nav-links {
    gap: 0.9rem 1.2rem;
  }

  .page-shell {
    width: min(100% - 32px, 1200px);
    padding-top: 148px;
  }
}

@media (max-width: 640px) {
  .page-shell {
    width: min(100% - 24px, 100%);
    padding-top: 32px;
  }

  .auth-card,
  .account-panel,
  .account-sidebar {
    padding: 22px;
  }

  .account-admin-card-header,
  .account-admin-actions,
  .account-admin-pagination {
    align-items: stretch;
    flex-direction: column;
  }
}