﻿/* ============================================================
   AURORA cohesive entry/workspace layer
   Applies across landing, auth, dashboard, and admin entry pages.
   ============================================================ */

:root {
  --aurora-line: rgba(252, 220, 16, 0.16);
  --aurora-line-soft: rgba(229, 230, 232, 0.09);
  --aurora-panel: rgba(17, 17, 20, 0.78);
  --aurora-panel-strong: rgba(10, 10, 12, 0.92);
  --aurora-muted: #a7abb3;
  --aurora-danger: #f87171;
  --workspace-nav-width: 88px;
  --cohesive-display: var(--font-display, var(--display, 'Bebas Neue', sans-serif));
  --cohesive-ui: var(--font-ui, var(--body, 'Syne', sans-serif));
  --cohesive-mono: var(--font-mono, var(--mono, 'Space Mono', monospace));
}

body {
  background:
    radial-gradient(circle at 18% 12%, rgba(252, 220, 16, 0.08), transparent 32rem),
    radial-gradient(circle at 85% 18%, rgba(229, 230, 232, 0.055), transparent 30rem),
    linear-gradient(135deg, #070709 0%, #111114 58%, #09090b 100%);
}

html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,0.45), transparent 82%);
}

body > * {
  position: relative;
}

select {
  color-scheme: dark;
}

select,
select option,
select optgroup {
  color: var(--silver, #E5E6E8);
}

select option,
select optgroup {
  background-color: #101013;
}

select option:checked {
  color: var(--gold, #FCDC10);
  background-color: #24210a;
}

select option:disabled {
  color: #6f7278;
  background-color: #101013;
}

select:disabled {
  color: var(--aurora-muted, #a7abb3);
}

body.has-workspace-nav {
  padding-left: var(--workspace-nav-width);
}

.aurora-workspace-nav {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 1000;
  width: var(--workspace-nav-width);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.8rem;
  padding: 0.8rem 0.55rem;
  background:
    linear-gradient(180deg, rgba(8,8,10,0.98), rgba(14,14,17,0.94)),
    var(--void-2, #0A0A0C);
  border-right: 1px solid var(--aurora-line-soft);
  box-shadow: 12px 0 38px rgba(0,0,0,0.32);
}

.workspace-nav-brand {
  width: 42px;
  height: 42px;
  margin: 0 auto;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--gold, #FCDC10);
  color: var(--void, #050505);
  font-family: var(--cohesive-display);
  font-size: 1.55rem;
  line-height: 1;
  text-decoration: none;
  box-shadow: 0 16px 28px rgba(252,220,16,0.12);
}

.workspace-nav-project {
  min-height: 58px;
  border: 1px solid var(--aurora-line-soft);
  border-radius: 8px;
  padding: 0.55rem 0.45rem;
  background: rgba(255,255,255,0.025);
}

.workspace-nav-project span,
.workspace-nav-label {
  display: block;
  font-family: var(--cohesive-mono);
  font-size: 0.55rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.workspace-nav-project span {
  color: var(--aurora-muted);
  margin-bottom: 0.25rem;
}

.workspace-nav-project strong {
  display: block;
  color: var(--silver, #E5E6E8);
  font-size: 0.72rem;
  line-height: 1.25;
  max-height: 2.5em;
  overflow: hidden;
  text-overflow: ellipsis;
}

.workspace-nav-items {
  display: grid;
  gap: 0.35rem;
}

.workspace-nav-item,
.workspace-nav-exit {
  position: relative;
  min-height: 58px;
  display: grid;
  place-items: center;
  gap: 0.28rem;
  color: var(--aurora-muted);
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: 8px;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.workspace-nav-exit {
  margin-top: auto;
}

.workspace-nav-item:hover,
.workspace-nav-exit:hover,
.workspace-nav-item.active {
  color: var(--gold, #FCDC10);
  border-color: var(--aurora-line);
  background: rgba(252,220,16,0.07);
}

.workspace-nav-item.active::before {
  content: "";
  position: absolute;
  left: -0.58rem;
  top: 12px;
  bottom: 12px;
  width: 3px;
  border-radius: 999px;
  background: var(--gold, #FCDC10);
}

.workspace-nav-item.is-disabled {
  opacity: 0.38;
  pointer-events: none;
}

.workspace-nav-icon {
  position: relative;
  width: 22px;
  height: 22px;
  display: block;
}

.workspace-nav-icon::before,
.workspace-nav-icon::after {
  content: "";
  position: absolute;
  box-sizing: border-box;
}

.icon-dashboard::before {
  inset: 3px;
  border: 2px solid currentColor;
  border-radius: 3px;
  box-shadow: inset 0 -7px 0 rgba(252,220,16,0.16);
}

.icon-dashboard::after {
  left: 7px;
  right: 7px;
  top: 3px;
  bottom: 3px;
  border-left: 2px solid currentColor;
  border-right: 2px solid currentColor;
}

.icon-builder::before {
  width: 8px;
  height: 8px;
  left: 2px;
  top: 2px;
  border: 2px solid currentColor;
  border-radius: 50%;
  box-shadow: 10px 10px 0 -2px transparent, 10px 10px 0 0 currentColor;
}

.icon-builder::after {
  left: 8px;
  top: 9px;
  width: 8px;
  height: 2px;
  background: currentColor;
  transform: rotate(45deg);
  transform-origin: left center;
}

.icon-training::before {
  left: 4px;
  right: 4px;
  bottom: 4px;
  height: 14px;
  border-left: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
}

.icon-training::after {
  left: 7px;
  bottom: 7px;
  width: 11px;
  height: 8px;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  transform: skew(-20deg);
}

.icon-router::before {
  left: 3px;
  right: 3px;
  top: 5px;
  height: 12px;
  border-top: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
}

.icon-router::after {
  right: 2px;
  top: 2px;
  width: 8px;
  height: 8px;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  transform: rotate(45deg);
  box-shadow: 0 12px 0 -2px var(--void, #050505), 0 12px 0 0 currentColor;
}

.icon-query::before {
  left: 3px;
  top: 4px;
  width: 16px;
  height: 12px;
  border: 2px solid currentColor;
  border-radius: 4px;
}

.icon-query::after {
  left: 8px;
  bottom: 3px;
  width: 7px;
  height: 7px;
  border-left: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
}

.icon-api::before {
  left: 3px;
  right: 3px;
  top: 5px;
  height: 12px;
  border: 2px solid currentColor;
  border-radius: 4px;
}

.icon-api::after {
  left: 7px;
  top: 9px;
  width: 8px;
  height: 2px;
  background: currentColor;
  box-shadow: 0 -4px 0 currentColor, 0 4px 0 currentColor;
}

.icon-exit::before {
  left: 3px;
  top: 5px;
  width: 12px;
  height: 12px;
  border: 2px solid currentColor;
  border-right: 0;
  border-radius: 3px 0 0 3px;
}

.icon-exit::after {
  right: 2px;
  top: 7px;
  width: 10px;
  height: 10px;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  transform: rotate(45deg);
}

.aurora-wordmark {
  display: inline-flex;
  align-items: baseline;
  gap: 0.15rem;
  font-family: var(--cohesive-display);
  color: var(--silver);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.aurora-wordmark .mark-dot {
  color: var(--gold);
  opacity: 0.9;
}

.aurora-wordmark .mark-sub {
  margin-left: 0.45rem;
  padding: 2px 7px;
  border: 1px solid var(--aurora-line);
  color: var(--gold);
  font-family: var(--cohesive-mono);
  font-size: 0.58rem;
  letter-spacing: 0.18em;
}

.entry-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  width: fit-content;
  border: 1px solid var(--aurora-line);
  border-radius: 999px;
  color: var(--gold);
  background: rgba(252, 220, 16, 0.06);
  padding: 0.42rem 0.72rem;
  font-family: var(--cohesive-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.entry-pill::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 16px rgba(252,220,16,0.55);
}

.nav-auth {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.nav-link.nav-login {
  color: var(--silver);
  border: 1px solid var(--aurora-line-soft);
  border-radius: 5px;
  padding: 0.5rem 1rem;
}

.nav-link.nav-login:hover {
  border-color: var(--aurora-line);
  color: var(--gold);
}

.entry-section {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

/* Landing */
body.entry-landing #hero {
  min-height: 92vh;
  padding: 7.5rem 0 3rem;
}

body.entry-landing .hero-content {
  width: min(1040px, calc(100% - 40px));
  margin: 0 auto;
}

body.entry-landing .hero-title {
  max-width: 980px;
}

body.entry-landing .hero-sub {
  max-width: 740px;
  color: var(--aurora-muted);
}

body.entry-landing .hero-actions {
  align-items: center;
}

body.entry-landing .hero-stats {
  width: min(860px, 100%);
  background: rgba(10, 10, 12, 0.58);
  border: 1px solid var(--aurora-line-soft);
  border-radius: 8px;
  padding: 1rem 1.25rem;
  backdrop-filter: blur(18px);
}

.entry-flow-band {
  padding: 4.5rem 0;
  border-top: 1px solid var(--aurora-line-soft);
  border-bottom: 1px solid var(--aurora-line-soft);
  background: rgba(255,255,255,0.018);
}

.entry-flow-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 1.5rem;
}

.entry-flow-title {
  font-family: var(--cohesive-display);
  font-size: clamp(2.2rem, 5vw, 4.25rem);
  line-height: 0.95;
  color: var(--silver);
  letter-spacing: 0.02em;
}

.entry-flow-copy {
  max-width: 520px;
  color: var(--aurora-muted);
  font-size: 0.98rem;
}

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

.entry-flow-step {
  border: 1px solid var(--aurora-line-soft);
  border-radius: 8px;
  background: var(--aurora-panel);
  padding: 1.15rem;
}

.entry-flow-step span {
  display: block;
  margin-bottom: 1rem;
  color: var(--gold);
  font-family: var(--cohesive-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.entry-flow-step h3 {
  color: var(--silver);
  font-size: 1rem;
  margin-bottom: 0.45rem;
}

.entry-flow-step p {
  color: var(--text-dim);
  font-size: 0.88rem;
  line-height: 1.65;
}

/* Login */
body.entry-login {
  min-height: 100vh;
}

.login-wrapper {
  align-items: stretch;
  justify-content: center;
  padding: 2rem;
  background: transparent;
}

.login-shell {
  width: min(1120px, 100%);
  min-height: min(760px, calc(100vh - 4rem));
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(380px, 0.72fr);
  border: 1px solid var(--aurora-line-soft);
  border-radius: 10px;
  background: rgba(10, 10, 12, 0.68);
  overflow: hidden;
  box-shadow: 0 28px 80px rgba(0,0,0,0.38);
}

.login-story {
  position: relative;
  padding: clamp(2rem, 5vw, 4.5rem);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 620px;
  border-right: 1px solid var(--aurora-line-soft);
}

.login-story::after {
  content: "";
  position: absolute;
  inset: auto 8% 10% auto;
  width: 320px;
  height: 320px;
  border: 1px solid rgba(252,220,16,0.18);
  border-radius: 50%;
  background:
    repeating-conic-gradient(from 20deg, rgba(252,220,16,0.18) 0deg 8deg, transparent 8deg 20deg);
  opacity: 0.22;
  pointer-events: none;
}

.login-story-main {
  position: relative;
  z-index: 1;
}

.login-story h1 {
  margin-top: 2rem;
  max-width: 640px;
  font-family: var(--cohesive-display);
  font-size: clamp(3rem, 8vw, 6.2rem);
  line-height: 0.9;
  color: var(--silver);
  letter-spacing: 0.02em;
}

.login-story h1 em {
  color: var(--gold);
  font-style: normal;
}

.login-story p {
  margin-top: 1.2rem;
  max-width: 570px;
  color: var(--aurora-muted);
  font-size: 1.02rem;
}

.login-story-metrics {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.login-story-metrics div {
  border: 1px solid var(--aurora-line-soft);
  border-radius: 8px;
  padding: 0.9rem;
  background: rgba(255,255,255,0.025);
}

.login-story-metrics strong {
  display: block;
  color: var(--gold);
  font-family: var(--cohesive-mono);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
}

.login-story-metrics span {
  display: block;
  margin-top: 0.35rem;
  color: var(--text-dim);
  font-size: 0.8rem;
}

.login-container {
  max-width: none;
  width: 100%;
  min-height: 100%;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: var(--aurora-panel-strong);
  padding: clamp(2rem, 4vw, 3.5rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
  animation: none;
  opacity: 1;
}

.login-logo {
  justify-content: flex-start;
  margin-bottom: 2rem;
  font-size: 2rem;
}

.login-heading,
.login-subheading {
  text-align: left;
}

.login-heading {
  font-size: clamp(2.2rem, 4vw, 3rem);
}

.login-heading em {
  display: inline;
}

.google-login-wrapper,
.login-form .form-group input,
.projects-empty,
.project-card,
.modal-content,
.admin-signin-box {
  border-radius: 8px;
}

.login-demo {
  border: 1px solid var(--aurora-line-soft);
  border-radius: 8px;
  padding: 1rem;
  background: rgba(255,255,255,0.025);
}

/* Dashboard */
.dashboard-header {
  background: rgba(10,10,12,0.86);
  border-bottom: 1px solid var(--aurora-line-soft);
}

.dashboard-header .header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.dashboard-sidebar,
.dashboard-content {
  background: transparent;
}

body.has-workspace-nav.entry-dashboard .dashboard-sidebar {
  display: none;
}

.dashboard-main {
  min-height: calc(100vh - 72px);
}

.dashboard-content {
  padding: 2.2rem;
}

body.has-workspace-nav.entry-dashboard .dashboard-content {
  width: min(1360px, 100%);
  margin: 0 auto;
}

.dashboard-sidebar {
  border-right: 1px solid var(--aurora-line-soft);
  background: rgba(17,17,20,0.66);
}

.content-header {
  padding: 1.2rem 1.2rem 1.5rem;
  border: 1px solid var(--aurora-line-soft);
  border-radius: 10px;
  background: rgba(10,10,12,0.48);
}

.content-title {
  letter-spacing: 0.02em;
}

.content-subtitle::before {
  content: "AURORA workspace / ";
  color: var(--gold);
}

.projects-empty,
.project-card,
.modal-content {
  background: var(--aurora-panel);
  border-color: var(--aurora-line-soft);
}

.project-open-hint {
  color: var(--gold);
  font-family: var(--cohesive-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  align-self: center;
}

.project-cues {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.2rem 0 1rem;
}

.project-cue {
  border: 1px solid var(--aurora-line-soft);
  border-radius: 999px;
  padding: 0.24rem 0.55rem;
  color: var(--aurora-muted);
  background: rgba(255,255,255,0.025);
  font-family: var(--cohesive-mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.project-cue.ok {
  border-color: rgba(126, 255, 181, 0.42);
  color: #9cffc4;
}

.project-cue.warn {
  border-color: rgba(252, 220, 16, 0.5);
  color: var(--gold);
}

.project-cue.info {
  border-color: rgba(126, 184, 255, 0.42);
  color: #9fd0ff;
}

.project-cue.muted {
  color: var(--aurora-muted);
}

.dashboard-content.project-detail-open > .content-header,
.dashboard-content.project-detail-open > .project-toolbar,
.dashboard-content.project-detail-open > #projectsGrid,
.dashboard-content.project-detail-open > #projectsList {
  display: none !important;
}

.project-detail-view[hidden] {
  display: none;
}

.project-detail-view {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.project-detail-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem;
  border: 1px solid var(--aurora-line-soft);
  border-radius: 8px;
  background: rgba(10,10,12,0.54);
  padding: 1rem;
}

.project-detail-title-group {
  min-width: 0;
}

.project-detail-title-group h2 {
  margin: 0.65rem 0 0.25rem;
  color: var(--silver);
  font-family: var(--cohesive-display);
  font-size: 2.4rem;
  line-height: 0.95;
  letter-spacing: 0.02em;
  overflow-wrap: anywhere;
}

.project-detail-title-group p {
  color: var(--aurora-muted);
  font-family: var(--cohesive-mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

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

.project-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(320px, 0.8fr);
  gap: 1rem;
  align-items: start;
}

.wireframe-panel,
.model-query-panel {
  border: 1px solid var(--aurora-line-soft);
  border-radius: 8px;
  background: rgba(10,10,12,0.58);
  min-width: 0;
}

.wireframe-panel {
  overflow: hidden;
}

.wireframe-panel-head,
.model-query-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem;
  border-bottom: 1px solid var(--aurora-line-soft);
}

.wireframe-panel-head h3,
.model-query-head h3 {
  margin: 0 0 0.35rem;
  color: var(--silver);
  font-size: 1.05rem;
}

.wireframe-panel-head p,
.model-query-head p {
  margin: 0;
  color: var(--aurora-muted);
  font-size: 0.85rem;
  line-height: 1.5;
}

.wireframe-canvas {
  position: relative;
  min-height: 420px;
  overflow: auto;
  background:
    linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px),
    rgba(255,255,255,0.018);
  background-size: 36px 36px;
}

.wireframe-svg {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
  pointer-events: none;
}

.wireframe-nodes {
  position: relative;
  z-index: 2;
  min-width: 100%;
  min-height: 100%;
}

.wireframe-link {
  fill: none;
  stroke: rgba(252,220,16,0.52);
  stroke-width: 2;
  stroke-linecap: round;
  filter: drop-shadow(0 0 8px rgba(252,220,16,0.16));
}

.wireframe-node {
  position: absolute;
  width: 184px;
  min-height: 82px;
  display: block;
  text-align: left;
  border: 1px solid rgba(229,230,232,0.15);
  border-radius: 8px;
  background: rgba(17,17,20,0.92);
  color: var(--silver);
  padding: 0.75rem 0.8rem;
  box-shadow: 0 14px 28px rgba(0,0,0,0.24);
}

button.wireframe-node {
  cursor: pointer;
}

button.wireframe-node:hover,
.wireframe-node.selected {
  border-color: rgba(252,220,16,0.78);
  background: rgba(252,220,16,0.08);
}

.wireframe-node.trained {
  border-color: rgba(82,196,126,0.42);
}

.wireframe-node-index {
  display: inline-flex;
  margin-bottom: 0.45rem;
  color: var(--gold);
  font-family: var(--cohesive-mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
}

.wireframe-node strong {
  display: block;
  color: var(--silver);
  font-size: 0.9rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.wireframe-node small {
  display: block;
  margin-top: 0.35rem;
  color: var(--aurora-muted);
  font-size: 0.72rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.wireframe-empty {
  min-height: 360px;
  display: grid;
  place-items: center;
  padding: 2rem;
  color: var(--aurora-muted);
  text-align: center;
}

.model-query-panel {
  padding-bottom: 1rem;
}

.model-query-head {
  display: block;
}

.model-query-form {
  display: grid;
  gap: 0.65rem;
  padding: 1rem;
}

.model-query-form label {
  color: var(--aurora-muted);
  font-family: var(--cohesive-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.model-query-form select,
.model-query-form textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--aurora-line-soft);
  border-radius: 6px;
  background: rgba(255,255,255,0.045);
  color: var(--silver);
  padding: 0.85rem;
  font-family: var(--cohesive-ui);
  font-size: 0.9rem;
}

.model-query-form select:focus,
.model-query-form textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(252,220,16,0.1);
}

.query-mode-wrap {
  display: grid;
  gap: 0.45rem;
}

.query-mode-wrap[hidden],
.query-image-upload[hidden] {
  display: none;
}

.query-mode-wrap > span,
.query-image-upload small {
  color: var(--aurora-muted);
  font-family: var(--cohesive-mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.query-mode-toggle {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.query-mode-toggle label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border: 1px solid var(--aurora-line-soft);
  border-radius: 999px;
  padding: 0.35rem 0.7rem;
  color: var(--silver);
  cursor: pointer;
}

.query-mode-toggle input {
  accent-color: var(--gold);
}

.query-image-upload {
  display: grid;
  gap: 0.45rem;
}

.query-image-upload input[type="file"] {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--aurora-line-soft);
  border-radius: 6px;
  background: rgba(255,255,255,0.045);
  color: var(--silver);
  padding: 0.75rem;
  font-family: var(--cohesive-ui);
}

.model-query-form textarea {
  resize: vertical;
  line-height: 1.55;
}

.model-query-output {
  margin: 0 1rem;
  max-height: 300px;
  overflow: auto;
  white-space: pre-wrap;
  border: 1px solid var(--aurora-line-soft);
  border-radius: 8px;
  background: rgba(0,0,0,0.22);
  color: var(--silver);
  padding: 0.9rem;
  font-family: var(--cohesive-mono);
  font-size: 0.78rem;
  line-height: 1.55;
}

.model-training-links {
  display: grid;
  gap: 0.6rem;
  padding: 1rem 1rem 0;
}

.model-training-links p {
  margin: 0;
  color: var(--aurora-muted);
  font-size: 0.85rem;
  line-height: 1.5;
}

.model-link-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  border: 1px solid var(--aurora-line-soft);
  border-radius: 8px;
  background: rgba(255,255,255,0.025);
  padding: 0.75rem;
}

.model-link-row span {
  min-width: 0;
}

.model-link-row strong,
.model-link-row small {
  display: block;
  overflow-wrap: anywhere;
}

.model-link-row strong {
  color: var(--silver);
  font-size: 0.84rem;
}

.model-link-row small {
  margin-top: 0.25rem;
  color: var(--aurora-muted);
  font-size: 0.72rem;
}

.model-link-row a {
  flex-shrink: 0;
  color: var(--gold);
  font-family: var(--cohesive-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Builder */
body.has-workspace-nav .builder-header {
  background: rgba(10,10,12,0.9);
  border-bottom-color: var(--aurora-line-soft);
  box-shadow: 0 12px 32px rgba(0,0,0,0.22);
}

body.has-workspace-nav .components-panel {
  background: rgba(12,12,15,0.88);
  border-right-color: var(--aurora-line-soft);
}

body.has-workspace-nav .builder-canvas {
  background:
    radial-gradient(circle at 50% 0%, rgba(252,220,16,0.035), transparent 34rem),
    var(--void, #050505);
}

body.has-workspace-nav .canvas-toolbar,
body.has-workspace-nav .component-section,
body.has-workspace-nav .modal-content {
  border-color: var(--aurora-line-soft);
}

body.has-workspace-nav .component-icon {
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  display: grid;
  place-items: center;
  border: 1px solid var(--aurora-line-soft);
  border-radius: 7px;
  color: var(--gold);
  background: rgba(252,220,16,0.055);
  font-family: var(--cohesive-mono);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0;
}

/* Admin sign in */
.admin-signin-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.admin-signin-box {
  width: min(420px, 100%);
  border: 1px solid var(--aurora-line-soft);
  background: var(--aurora-panel-strong);
  padding: 2rem;
  box-shadow: 0 28px 80px rgba(0,0,0,0.34);
}

.admin-signin-box .signin-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.admin-signin-box .logo-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  background: var(--gold);
  color: var(--void);
  border-radius: 6px;
  font-family: var(--cohesive-mono);
  font-weight: 700;
}

.admin-signin-box .brand-name {
  font-family: var(--cohesive-display);
  font-size: 2rem;
  color: var(--silver);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.admin-signin-box .form-group {
  margin-bottom: 1rem;
}

.admin-signin-box .form-label {
  display: block;
  margin-bottom: 0.45rem;
  color: var(--text-dim);
  font-family: var(--cohesive-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.admin-signin-box .form-input {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1px solid var(--aurora-line-soft);
  border-radius: 6px;
  background: rgba(255,255,255,0.04);
  color: var(--silver);
}

.admin-signin-box .btn-full {
  width: 100%;
  margin-top: 0.5rem;
  padding: 0.9rem 1rem;
  border-radius: 6px;
  background: var(--gold);
  color: var(--void);
  font-weight: 700;
  text-transform: uppercase;
}

.alert-error {
  margin-bottom: 1rem;
  border: 1px solid rgba(248,113,113,0.38);
  background: rgba(248,113,113,0.08);
  color: var(--aurora-danger);
  border-radius: 8px;
  padding: 0.85rem 1rem;
}

@media (max-width: 940px) {
  body.has-workspace-nav {
    padding-left: 0;
    padding-bottom: 72px;
  }

  .aurora-workspace-nav {
    inset: auto 0 0 0;
    width: auto;
    height: 72px;
    display: grid;
    grid-template-columns: 52px repeat(6, minmax(0, 1fr));
    align-items: center;
    gap: 0.25rem;
    padding: 0.45rem 0.5rem;
    border-right: 0;
    border-top: 1px solid var(--aurora-line-soft);
    box-shadow: 0 -14px 38px rgba(0,0,0,0.34);
  }

  .workspace-nav-brand {
    width: 38px;
    height: 38px;
  }

  .workspace-nav-project,
  .workspace-nav-exit {
    display: none;
  }

  .workspace-nav-items {
    display: contents;
  }

  .workspace-nav-item {
    min-height: 56px;
    border-radius: 7px;
  }

  .workspace-nav-item.active::before {
    left: 18px;
    right: 18px;
    top: auto;
    bottom: -0.46rem;
    width: auto;
    height: 3px;
  }

  .login-shell {
    grid-template-columns: 1fr;
  }

  .login-story {
    min-height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--aurora-line-soft);
  }

  .entry-flow-head,
  .content-header,
  .project-detail-head {
    align-items: stretch;
    flex-direction: column;
  }

  .project-detail-head {
    display: flex;
  }

  .project-detail-grid {
    grid-template-columns: 1fr;
  }

  .entry-flow-grid,
  .login-story-metrics {
    grid-template-columns: 1fr;
  }

  .dashboard-main {
    flex-direction: column;
  }

  .dashboard-sidebar {
    width: 100%;
    padding: 0.75rem;
    border-right: 0;
    border-bottom: 1px solid var(--aurora-line-soft);
  }
}

@media (max-width: 720px) {
  .login-wrapper {
    padding: 1rem;
  }

  .login-shell {
    min-height: auto;
  }

  .hero-actions,
  .nav-auth {
    flex-wrap: wrap;
  }
}

@media (max-width: 1180px) {
  .project-detail-grid {
    grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.9fr);
  }

  .wireframe-canvas {
    min-height: 360px;
  }
}

@media (max-width: 940px) {
  .dashboard-header .header-inner {
    padding-left: 1rem;
    padding-right: 1rem;
    gap: 0.75rem;
  }

  .dashboard-header .header-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  body.has-workspace-nav.entry-dashboard .dashboard-content {
    width: 100%;
  }

  .project-detail-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .project-detail-actions .btn-secondary,
  .project-detail-actions .btn-primary,
  .project-detail-head > .btn-secondary {
    min-height: 42px;
  }

  .wireframe-canvas {
    max-height: 58vh;
  }

  .model-query-output {
    max-height: 260px;
  }
}

@media (max-width: 620px) {
  body.has-workspace-nav {
    padding-bottom: 66px;
  }

  .aurora-workspace-nav {
    height: 66px;
    grid-template-columns: 42px repeat(6, minmax(0, 1fr));
    padding: 0.36rem 0.38rem;
  }

  .workspace-nav-brand {
    width: 34px;
    height: 34px;
    font-size: 1.3rem;
    border-radius: 7px;
  }

  .workspace-nav-item {
    min-height: 50px;
    gap: 0;
  }

  .workspace-nav-label {
    display: none;
  }

  .workspace-nav-icon {
    width: 21px;
    height: 21px;
  }

  .workspace-nav-item.active::before {
    left: 13px;
    right: 13px;
    bottom: -0.37rem;
  }

  .dashboard-header {
    padding: 0.75rem 0;
  }

  .dashboard-header .entry-pill,
  .dashboard-header .nav-login {
    display: none;
  }

  .content-header,
  .project-detail-head {
    padding: 0.9rem;
  }

  .project-detail-title-group h2 {
    font-size: 1.8rem;
  }

  .project-detail-title-group p,
  .content-subtitle {
    font-size: 0.68rem;
    line-height: 1.45;
  }

  .wireframe-panel-head,
  .model-query-head {
    padding: 0.85rem;
  }

  .wireframe-canvas {
    min-height: 300px;
    max-height: 48vh;
  }

  .wireframe-node {
    width: 164px;
    min-height: 76px;
    padding: 0.65rem;
  }

  .model-query-form {
    padding: 0.85rem;
  }

  .model-query-output {
    margin: 0 0.85rem;
    font-size: 0.72rem;
  }
}

@media (max-width: 380px) {
  .aurora-workspace-nav {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .workspace-nav-brand {
    display: none;
  }
}

@media (max-height: 560px) and (orientation: landscape) and (max-width: 940px) {
  body.has-workspace-nav {
    padding-bottom: 56px;
  }

  .aurora-workspace-nav {
    height: 56px;
    padding-top: 0.25rem;
    padding-bottom: 0.25rem;
  }

  .workspace-nav-item {
    min-height: 44px;
  }

  .workspace-nav-label,
  .workspace-nav-project,
  .workspace-nav-exit {
    display: none;
  }

  .wireframe-canvas {
    max-height: 52vh;
  }
}
