:root {
  --bg: #081120;
  --panel: #0f1b31;
  --panel-2: #14233f;
  --line: rgba(148, 163, 184, 0.16);
  --text: #e5eefc;
  --muted: #9fb1cd;
  --primary: #4f8cff;
  --primary-2: #7c5cff;
  --ok: #22c55e;
  --warn: #f59e0b;
  --danger: #f87171;
  --shadow: 0 20px 50px rgba(2, 6, 23, 0.35);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Inter', system-ui, sans-serif;
  background:
    radial-gradient(circle at top, rgba(79, 140, 255, 0.14), transparent 30%),
    linear-gradient(180deg, #081120 0%, #0a1326 100%);
  color: var(--text);
}
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
code {
  display: inline-block;
  margin-top: 0.45rem;
  padding: 0.4rem 0.7rem;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid var(--line);
  color: #bcd1ff;
}
.hidden { display: none !important; }
.card {
  background: linear-gradient(180deg, rgba(15, 27, 49, 0.92), rgba(10, 19, 38, 0.96));
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 1.4rem;
  box-shadow: var(--shadow);
}
.glass-card {
  background: linear-gradient(180deg, rgba(15, 27, 49, 0.72), rgba(10, 19, 38, 0.78));
  backdrop-filter: blur(16px);
}
.label, .eyebrow {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #8db1ff;
}
.small, .muted, .brand span { color: var(--muted); }
.button {
  border: 0;
  border-radius: 12px;
  padding: 0.9rem 1.15rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.button--primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: white;
}
.button--ghost, .button--small {
  background: rgba(255,255,255,0.04);
  color: var(--text);
  border: 1px solid var(--line);
}
.button--small { padding: 0.65rem 0.85rem; }
.button--full { width: 100%; }

.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.15fr minmax(360px, 440px);
  gap: 1.5rem;
  padding: 2rem;
  align-items: stretch;
}
.auth-hero,
.auth-card {
  min-height: calc(100vh - 4rem);
}
.auth-hero {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 1rem 0.5rem;
}
.auth-hero__badge {
  display: inline-flex;
  width: fit-content;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  background: rgba(79, 140, 255, 0.14);
  border: 1px solid rgba(79, 140, 255, 0.18);
  color: #cfe0ff;
  margin-bottom: 1.2rem;
}
.auth-hero h1 {
  font-size: clamp(2.5rem, 6vw, 4.8rem);
  line-height: 0.98;
  letter-spacing: -0.05em;
  margin: 0 0 1rem;
  max-width: 11ch;
}
.auth-hero p {
  color: #c7d5ef;
  line-height: 1.75;
  max-width: 62ch;
}
.auth-highlights {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}
.auth-highlight strong,
.brand strong,
h1,
h2,
h3 { letter-spacing: -0.03em; }
.auth-highlight strong {
  display: block;
  margin: 0.5rem 0;
  font-size: 1.15rem;
}
.auth-highlight p,
.module-card p,
.integration-card p,
.checklist li { color: var(--muted); line-height: 1.65; }
.auth-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.auth-card__head h2 {
  margin: 0.25rem 0 0.65rem;
  font-size: 2rem;
}
.auth-form {
  display: grid;
  gap: 1rem;
  margin-top: 1rem;
}
.field {
  display: grid;
  gap: 0.55rem;
}
.field span {
  font-size: 0.95rem;
  color: #dce9ff;
}
.field input {
  width: 100%;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.03);
  padding: 0.95rem 1rem;
  color: var(--text);
  outline: none;
}
.field input:focus {
  border-color: rgba(79, 140, 255, 0.7);
  box-shadow: 0 0 0 4px rgba(79, 140, 255, 0.12);
}
.auth-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
}
.checkbox {
  display: inline-flex;
  gap: 0.65rem;
  align-items: center;
  color: var(--muted);
}
.checkbox input { accent-color: var(--primary); }
.auth-link {
  color: #bcd1ff;
  font-size: 0.95rem;
}
.auth-message {
  min-height: 48px;
  margin-top: 1rem;
  border-radius: 14px;
  padding: 0.85rem 1rem;
  border: 1px solid transparent;
  color: var(--muted);
  background: rgba(255,255,255,0.03);
}
.auth-message.is-error {
  color: #ffd4d4;
  background: rgba(248, 113, 113, 0.08);
  border-color: rgba(248, 113, 113, 0.22);
}
.auth-message.is-success {
  color: #b9f6cf;
  background: rgba(34, 197, 94, 0.08);
  border-color: rgba(34, 197, 94, 0.2);
}
.demo-credentials {
  display: grid;
  gap: 0.7rem;
  margin-top: 1.25rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--line);
}
.credential-chip {
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.03);
  color: var(--text);
  text-align: left;
  padding: 0.9rem 1rem;
  cursor: pointer;
}
.credential-chip:hover,
.quick-action:hover,
.queue-item:hover { border-color: rgba(79, 140, 255, 0.34); }

.layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  min-height: 100vh;
}
.sidebar {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1.5rem;
  border-right: 1px solid var(--line);
  background: rgba(8, 17, 32, 0.75);
  backdrop-filter: blur(18px);
  position: sticky;
  top: 0;
  height: 100vh;
}
.brand {
  display: flex;
  gap: 0.9rem;
  align-items: center;
  margin-bottom: 1rem;
}
.brand__icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
}
.session-card--compact {
  margin-bottom: 1.25rem;
  padding: 1rem;
  border-radius: 18px;
}
.session-card--compact strong {
  display: block;
  margin: 0.4rem 0 0.2rem;
}
.nav { display: grid; gap: 0.5rem; }
.nav__item {
  padding: 0.85rem 1rem;
  border-radius: 12px;
  color: #d5e2ff;
}
.nav__item:hover, .nav__item--active {
  background: rgba(79, 140, 255, 0.12);
  border: 1px solid rgba(79, 140, 255, 0.22);
}
.sidebar__footer { border-top: 1px solid var(--line); padding-top: 1rem; }
.content { padding: 2rem; }
.hero {
  display: grid;
  grid-template-columns: 1.8fr 1fr;
  gap: 1.5rem;
  align-items: stretch;
}
.hero h1 {
  font-size: clamp(2rem, 5vw, 3.7rem);
  margin: 0.2rem 0 1rem;
  max-width: 12ch;
}
.hero__text { max-width: 66ch; color: #c7d5ef; line-height: 1.65; }
.hero__actions { display: flex; gap: 0.8rem; margin-top: 1.25rem; flex-wrap: wrap; }
.hero__panel { display: flex; flex-direction: column; justify-content: center; }
.hero__metric { font-size: 2.6rem; font-weight: 800; margin: 0.5rem 0 1rem; }
.stats-grid, .module-grid, .integration-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}
.stat-card strong { display: block; font-size: 2rem; margin: 0.55rem 0 0.35rem; }
.delta { color: var(--muted); }
.delta--up { color: #7ee2a8; }
.delta--warn { color: #ffd089; }
.two-column {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 1rem;
  margin-top: 1rem;
}
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}
.queue { display: grid; gap: 0.9rem; }
.queue-item {
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.02);
  border-radius: 18px;
  padding: 1rem;
}
.queue-item__top {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
}
.queue-item p { margin: 0.35rem 0 0; color: var(--muted); }
.badge, .status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: #d8e4ff;
  background: rgba(255,255,255,0.03);
}
.status-pill--ok { color: #8ef0b0; }
.quick-actions { display: grid; align-content: start; gap: 0.75rem; }
.quick-action {
  text-align: left;
  padding: 0.95rem 1rem;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.03);
  color: var(--text);
  cursor: pointer;
}
.module-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td {
  text-align: left;
  padding: 0.9rem 0.8rem;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
th { color: #90a9d4; font-size: 0.9rem; }
.integration-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 2rem; }

@media (max-width: 1100px) {
  .auth-shell,
  .layout,
  .hero,
  .two-column,
  .stats-grid,
  .module-grid,
  .integration-grid,
  .auth-highlights {
    grid-template-columns: 1fr;
  }
  .auth-shell {
    padding: 1rem;
  }
  .auth-hero,
  .auth-card {
    min-height: auto;
  }
  .sidebar {
    position: relative;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
}
@media (max-width: 640px) {
  .content { padding: 1rem; }
  .card { border-radius: 18px; }
  .hero h1,
  .auth-hero h1 { max-width: 100%; }
  .auth-row {
    align-items: flex-start;
    flex-direction: column;
  }
}
