:root {
  --bg: #efe8dc;
  --ink: #13212f;
  --muted: #677787;
  --panel: rgba(255, 250, 244, 0.84);
  --line: rgba(19, 33, 47, 0.12);
  --red: #c84d34;
  --gold: #b6851d;
  --blue: #2e6d8f;
  --green: #2f7c63;
  --shadow: 0 24px 60px rgba(32, 29, 24, 0.12);
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  color: var(--ink);
  font-family: "IBM Plex Sans", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(200, 77, 52, 0.18), transparent 24rem),
    radial-gradient(circle at bottom right, rgba(46, 109, 143, 0.14), transparent 26rem),
    linear-gradient(160deg, #f4ecdf 0%, #ebe2d4 52%, #e6dccf 100%);
}

button,
input,
select {
  font: inherit;
}

a {
  color: inherit;
}

.hidden {
  display: none !important;
}

.card-like,
.panel,
.stat-card,
.auth-copy {
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.56);
  box-shadow: var(--shadow);
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.72rem;
  color: var(--muted);
}

.primary-button,
.ghost-button,
.app-nav-item,
.avatar-button,
.avatar-menu-item,
.modal-close {
  border: 0;
  cursor: pointer;
  font: inherit;
}

.primary-button,
.ghost-button,
.app-nav-item,
.avatar-menu-item,
.modal-close {
  transition: transform 140ms ease, background 140ms ease, color 140ms ease;
}

.primary-button:hover,
.ghost-button:hover,
.app-nav-item:hover,
.avatar-menu-item:hover,
.modal-close:hover {
  transform: translateY(-1px);
}

.primary-button,
.ghost-button {
  padding: 12px 16px;
  border-radius: 14px;
}

.primary-button {
  color: white;
  background: linear-gradient(140deg, #c84d34, #da7d35);
}

.ghost-button {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid var(--line);
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 20px;
}

.auth-shell--full {
  min-height: 100vh;
}

.auth-stage {
  width: min(900px, 100%);
  display: grid;
  grid-template-columns: minmax(240px, 320px) minmax(0, 520px);
  gap: 18px;
  align-items: start;
  justify-content: center;
}

.auth-stage--single {
  width: min(560px, 100%);
  grid-template-columns: minmax(0, 1fr);
}

.auth-copy,
.auth-card {
  padding: 24px;
  border-radius: 28px;
}

.auth-copy {
  background: linear-gradient(140deg, rgba(19, 33, 47, 0.92), rgba(45, 63, 83, 0.88));
  color: white;
  min-height: 100%;
}

.auth-copy .eyebrow,
.auth-copy p {
  color: rgba(255, 255, 255, 0.72);
}

.auth-copy h1,
.auth-card h2,
.panel h3,
.modal h3,
.section-header h1,
.section-header h2 {
  margin: 6px 0 0;
  font-family: "Space Grotesk", sans-serif;
  line-height: 1.05;
}

.auth-copy h1 {
  margin-top: 10px;
  font-size: clamp(2rem, 4vw, 3rem);
}

.auth-card h2 {
  font-size: clamp(1.8rem, 3vw, 2.6rem);
}

.auth-card p,
.auth-copy p,
.panel p,
.stat-card p,
.modal p {
  margin: 0;
  line-height: 1.45;
}

.auth-headline-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}

.auth-headline-row--card {
  margin-bottom: 18px;
}

.language-switch {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.language-switch--dark {
  color: var(--muted);
}

.language-switch select {
  min-width: 88px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px 10px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.8);
}

.auth-card .stack-form {
  margin-top: 16px;
}

.auth-footer {
  margin-top: 14px;
  display: grid;
  gap: 10px;
}

.auth-warning {
  padding: 16px;
  border-radius: 18px;
  background: rgba(201, 89, 52, 0.08);
  border: 1px solid rgba(201, 89, 52, 0.2);
}

.auth-warning p {
  margin: 0;
}

.auth-success-box {
  margin-top: 10px;
  padding: 18px;
  border-radius: 20px;
  background: rgba(47, 124, 99, 0.08);
  border: 1px solid rgba(47, 124, 99, 0.2);
}

.auth-success-box h3 {
  margin: 8px 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.5rem;
}

.stack-form {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.stack-form label {
  display: grid;
  gap: 8px;
}

.stack-form span {
  font-size: 0.92rem;
  color: var(--muted);
}

.stack-form input,
.stack-form select {
  width: 100%;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.75);
}

.two-columns {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

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

.honeypot-field {
  position: absolute !important;
  left: -9999px !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-feedback {
  min-height: 20px;
  margin: 16px 0 0;
  color: var(--blue);
}

.app-shell {
  width: calc(100% - 32px);
  max-width: none;
  margin: 16px;
}

.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 14px 18px;
  border-radius: 24px;
}

.brand-lockup {
  display: grid;
  gap: 4px;
}

.app-brand {
  margin: 0;
  flex: 0 0 auto;
}

.brand-domain,
.brand-tagline {
  margin: 0;
}

.brand-tagline {
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.9rem;
  color: var(--muted);
}

.app-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex: 1 1 auto;
  flex-wrap: wrap;
}

.app-nav-item {
  padding: 9px 13px;
  border-radius: 12px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.45);
  border: 1px solid var(--line);
}

.app-nav-item.is-active {
  color: white;
  background: linear-gradient(140deg, #1d3044, #345d7d);
}

.app-header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
}

.avatar-menu-wrap {
  position: relative;
}

.avatar-button {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: white;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  background: linear-gradient(140deg, #13212f, #c84d34);
}

.avatar-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 220px;
  display: grid;
  gap: 6px;
  padding: 10px;
  border-radius: 18px;
  background: rgba(255, 250, 244, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.56);
  box-shadow: var(--shadow);
  z-index: 30;
}

.avatar-menu-item {
  text-align: left;
  padding: 11px 12px;
  border-radius: 12px;
  color: var(--ink);
  background: transparent;
}

.avatar-menu-item:hover {
  background: rgba(19, 33, 47, 0.06);
}

.avatar-menu-item--danger {
  color: var(--red);
}

.app-main {
  padding: 16px 0 0;
}

.view {
  display: none;
}

.view.is-active {
  display: block;
}

.panel-list,
.stats-grid,
.dashboard-grid {
  display: grid;
  gap: 18px;
}

.stats-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin-bottom: 14px;
}

.dashboard-grid {
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.panel,
.stat-card {
  border-radius: 26px;
  padding: 16px 18px;
}

.panel h3,
.stat-card strong {
  font-family: "Space Grotesk", sans-serif;
}

.stat-card span {
  display: block;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.72rem;
  color: var(--muted);
}

.stat-card strong {
  display: block;
  margin-top: 6px;
  font-size: 1.35rem;
}

.accent-red {
  border-top: 5px solid var(--red);
}

.accent-gold {
  border-top: 5px solid var(--gold);
}

.accent-blue {
  border-top: 5px solid var(--blue);
}

.accent-green {
  border-top: 5px solid var(--green);
}

.section-header,
.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
}

.section-header {
  margin-bottom: 12px;
}

.panel-actions {
  margin-top: 16px;
  display: flex;
  justify-content: flex-start;
}

.checklist,
.timeline,
.info-list {
  display: grid;
  gap: 12px;
}

.timeline {
  padding: 0;
  margin: 0;
  list-style: none;
}

.timeline li {
  display: grid;
  gap: 3px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.timeline strong {
  font-weight: 600;
}

.timeline span,
.check-row,
.info-list dd {
  color: var(--muted);
}

.check-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.check-row input {
  margin: 0;
}

.info-list {
  margin: 0;
}

.info-list div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.info-list dt,
.info-list dd {
  margin: 0;
}

.overlay {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(17, 24, 32, 0.42);
  backdrop-filter: blur(10px);
  z-index: 50;
}

.overlay.hidden {
  display: none;
}

.modal {
  position: relative;
  width: min(520px, 100%);
  padding: 26px;
  border-radius: 30px;
}

.modal.wide {
  width: min(860px, 100%);
}

.modal-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 18px;
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  color: var(--ink);
  background: rgba(19, 33, 47, 0.08);
}

@media (max-width: 980px) {
  .app-header {
    flex-wrap: wrap;
  }

  .app-nav {
    order: 3;
    width: 100%;
    justify-content: flex-start;
  }

  .two-columns,
  .auth-stage {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .auth-shell {
    padding: 12px;
  }

  .auth-stage {
    width: 100%;
    gap: 12px;
  }

  .auth-copy,
  .auth-card {
    padding: 18px;
    border-radius: 22px;
  }

  .auth-headline-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .language-switch {
    width: 100%;
    justify-content: space-between;
  }

  .auth-card h2 {
    font-size: 1.7rem;
  }

  .app-shell {
    width: calc(100% - 20px);
    margin: 10px;
  }

  .app-header {
    padding: 14px;
    border-radius: 20px;
  }

  .app-header-actions {
    width: 100%;
    justify-content: space-between;
  }

  .app-nav {
    gap: 8px;
  }

  .app-nav-item,
  .ghost-button,
  .primary-button {
    width: 100%;
    justify-content: center;
  }

  .modal-actions {
    flex-direction: column-reverse;
  }

  .avatar-menu {
    width: min(220px, calc(100vw - 44px));
  }
}
