:root {
  --bg-deep: #0b1218;
  --bg-mid: #13202c;
  --ink: #e8eef4;
  --muted: #93a4b5;
  --accent: #3d9a8b;
  --accent-soft: rgba(61, 154, 139, 0.22);
  --line: rgba(232, 238, 244, 0.08);
  --font-display: "Cormorant Garamond", Georgia, serif;
  --font-body: "Outfit", "Segoe UI", sans-serif;
}

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

html,
body {
  min-height: 100%;
}

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg-deep);
  -webkit-font-smoothing: antialiased;
}

.stage {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 2rem 1.5rem;
}

.atmosphere {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 18% 20%, rgba(61, 154, 139, 0.18), transparent 55%),
    radial-gradient(ellipse 70% 50% at 88% 78%, rgba(45, 90, 130, 0.28), transparent 50%),
    linear-gradient(165deg, var(--bg-deep) 0%, var(--bg-mid) 48%, #0a1016 100%);
  animation: drift 18s ease-in-out infinite alternate;
}

.grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 45%, black 20%, transparent 75%);
  opacity: 0.55;
  pointer-events: none;
}

.hero {
  position: relative;
  z-index: 1;
  max-width: 40rem;
  text-align: center;
  animation: rise 1.1s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.brand {
  font-family: var(--font-display);
  font-size: clamp(3.25rem, 9vw, 5.5rem);
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1;
  margin-bottom: 1.75rem;
  color: var(--ink);
}

.headline {
  font-family: var(--font-display);
  font-size: clamp(1.65rem, 4.2vw, 2.35rem);
  font-weight: 500;
  font-style: italic;
  line-height: 1.25;
  letter-spacing: 0.01em;
  margin-bottom: 1.15rem;
  color: var(--ink);
}

.lede {
  font-size: clamp(1rem, 2.2vw, 1.125rem);
  font-weight: 300;
  line-height: 1.65;
  color: var(--muted);
  max-width: 28rem;
  margin: 0 auto 2rem;
}

.cta-group {
  display: flex;
  justify-content: center;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  padding: 0.65rem 1.15rem;
  border: 1px solid var(--accent-soft);
  background: rgba(61, 154, 139, 0.08);
}

.pulse {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 var(--accent-soft);
  animation: pulse 2.2s ease-out infinite;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(1.25rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes drift {
  from {
    transform: scale(1) translate(0, 0);
  }
  to {
    transform: scale(1.04) translate(-1.5%, 1%);
  }
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(61, 154, 139, 0.55);
  }
  70% {
    box-shadow: 0 0 0 0.65rem rgba(61, 154, 139, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(61, 154, 139, 0);
  }
}

@media (max-width: 480px) {
  .stage {
    padding: 1.5rem 1.15rem;
  }

  .brand {
    margin-bottom: 1.35rem;
  }
}

/* Auth */
.stage--auth {
  align-items: center;
}

.auth-panel {
  position: relative;
  z-index: 1;
  width: min(100%, 24rem);
  animation: rise 1.1s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.auth-brand {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1;
  margin-bottom: 1.25rem;
}

.auth-title {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 500;
  font-style: italic;
  margin-bottom: 0.5rem;
}

.auth-lede {
  font-size: 0.95rem;
  font-weight: 300;
  color: var(--muted);
  margin-bottom: 1.75rem;
  line-height: 1.55;
}

.auth-form {
  display: grid;
  gap: 1rem;
}

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

.field-label {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.field-input {
  width: 100%;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
  padding: 0.85rem 0.95rem;
  outline: none;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.field-input:focus {
  border-color: rgba(61, 154, 139, 0.55);
  background: rgba(61, 154, 139, 0.06);
}

.btn-primary,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
}

.btn-icon {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
}

.btn-primary {
  margin-top: 0.35rem;
  border: 0;
  background: var(--accent);
  color: #04110f;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.95rem 1.1rem;
  cursor: pointer;
  transition: filter 0.2s ease, transform 0.2s ease;
}

.btn-primary:hover {
  filter: brightness(1.08);
}

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

.form-error {
  margin-bottom: 1rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid rgba(196, 92, 92, 0.35);
  background: rgba(196, 92, 92, 0.1);
  color: #f0b4b4;
  font-size: 0.9rem;
}

.flash-list {
  list-style: none;
  margin-bottom: 1rem;
  display: grid;
  gap: 0.5rem;
}

.flash {
  padding: 0.75rem 0.9rem;
  font-size: 0.9rem;
  border: 1px solid var(--accent-soft);
  background: rgba(61, 154, 139, 0.08);
  color: var(--accent);
}

/* Dashboard */
.dashboard-body {
  min-height: 100vh;
  background:
    radial-gradient(ellipse 70% 45% at 10% 0%, rgba(61, 154, 139, 0.12), transparent 50%),
    linear-gradient(180deg, var(--bg-deep), var(--bg-mid));
}

.dash-header {
  border-bottom: 1px solid var(--line);
  background: rgba(11, 18, 24, 0.72);
  backdrop-filter: blur(10px);
}

.dash-header-inner {
  max-width: 56rem;
  margin: 0 auto;
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.dash-brand {
  font-family: var(--font-display);
  font-size: 1.65rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1;
}

.dash-sub {
  margin-top: 0.3rem;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.btn-ghost {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.65rem 0.95rem;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.btn-ghost:hover {
  border-color: rgba(61, 154, 139, 0.45);
  color: var(--accent);
}

.dash-header-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

a.btn-ghost {
  text-decoration: none;
}

.dash-main {
  max-width: 56rem;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 3.5rem;
  animation: rise 0.9s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.dash-intro {
  margin-bottom: 2.25rem;
}

.dash-title {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 4vw, 2.5rem);
  font-weight: 500;
  margin-bottom: 0.65rem;
}

.dash-lede {
  max-width: 36rem;
  color: var(--muted);
  font-weight: 300;
  line-height: 1.65;
}

.dash-actions {
  display: grid;
  gap: 0.85rem;
  border-top: 1px solid var(--line);
  padding-top: 1.75rem;
}

.dash-action {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem 1rem;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
  color: inherit;
  text-decoration: none;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.dash-action:hover {
  border-color: rgba(61, 154, 139, 0.45);
  background: rgba(61, 154, 139, 0.06);
  transform: translateY(-1px);
}

.dash-action-icon {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  color: var(--accent);
  border: 1px solid var(--accent-soft);
  background: rgba(61, 154, 139, 0.08);
}

.dash-action-icon svg,
.dash-action-arrow {
  width: 1.15rem;
  height: 1.15rem;
}

.dash-action-arrow {
  color: var(--muted);
  transition: color 0.2s ease, transform 0.2s ease;
}

.dash-action:hover .dash-action-arrow {
  color: var(--accent);
  transform: translateX(2px);
}

.dash-action-copy {
  display: grid;
  gap: 0.25rem;
  min-width: 0;
}

.dash-action-title {
  font-size: 1.05rem;
  font-weight: 500;
}

.dash-action-desc {
  font-size: 0.9rem;
  font-weight: 300;
  color: var(--muted);
  line-height: 1.45;
}

@media (max-width: 640px) {
  .dash-header-inner {
    flex-wrap: wrap;
  }

  .dash-action {
    grid-template-columns: auto 1fr;
  }

  .dash-action-arrow {
    display: none;
  }
}
