:root {
  --bg: #f7f3ec;
  --ink: #1f2933;
  --muted: #5d6b78;
  --line: #d8d0c5;
  --panel: #fffaf2;
  --teal: #0f766e;
  --teal-dark: #115e59;
  --rust: #a8442f;
  --amber: #c88719;
  --shadow: 0 22px 60px rgba(31, 41, 51, 0.14);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(120deg, rgba(15, 118, 110, 0.12), transparent 34%),
    linear-gradient(300deg, rgba(168, 68, 47, 0.12), transparent 38%),
    var(--bg);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.shell {
  width: min(1120px, calc(100% - 32px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 24px 0;
}

.topbar,
.brand,
.brand-mark,
.pill,
.primary,
.ghost,
.complete {
  display: flex;
  align-items: center;
}

.topbar {
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0 28px;
}

.brand {
  gap: 10px;
  font-weight: 800;
}

.brand-mark {
  width: 36px;
  height: 36px;
  justify-content: center;
  border-radius: 8px;
  background: var(--teal);
  color: white;
}

.brand-mark svg,
.primary svg,
.flow-item svg,
.complete svg {
  width: 20px;
  height: 20px;
}

.pill {
  min-height: 34px;
  border-radius: 999px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  font-size: 14px;
  font-weight: 700;
}

.pill.ok {
  color: var(--teal-dark);
  background: rgba(15, 118, 110, 0.1);
}

.pill.warn {
  color: #8a5b00;
  background: rgba(200, 135, 25, 0.16);
}

.grid {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(360px, 1.05fr);
  gap: 24px;
  align-items: stretch;
}

.auth-panel,
.dashboard {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 250, 242, 0.86);
  box-shadow: var(--shadow);
}

.auth-panel {
  padding: 28px;
}

.panel-header {
  display: grid;
  gap: 12px;
}

.eyebrow {
  margin: 0;
  color: var(--rust);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  max-width: 620px;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.02;
  letter-spacing: 0;
}

h2 {
  font-size: 28px;
  letter-spacing: 0;
}

.panel-header p:last-child {
  max-width: 620px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.55;
}

.switcher {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 28px 0 18px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f0e8dd;
}

.switcher button {
  min-height: 42px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
}

.switcher button.active {
  background: white;
  color: var(--ink);
  box-shadow: 0 8px 20px rgba(31, 41, 51, 0.1);
}

.form {
  display: grid;
  gap: 14px;
}

label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

input {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  background: white;
  color: var(--ink);
  outline: none;
}

input:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.14);
}

.primary,
.ghost {
  justify-content: center;
  gap: 10px;
  border-radius: 8px;
  font-weight: 900;
}

.primary {
  min-height: 50px;
  margin-top: 4px;
  border: 0;
  background: var(--teal);
  color: white;
}

.primary:hover {
  background: var(--teal-dark);
}

.primary:disabled {
  cursor: wait;
  opacity: 0.72;
}

.status {
  margin-top: 16px;
  padding: 12px 14px;
  border: 1px solid rgba(168, 68, 47, 0.25);
  border-radius: 8px;
  background: rgba(168, 68, 47, 0.08);
  color: #6c2e20;
  line-height: 1.45;
}

.hidden {
  display: none !important;
}

.dashboard {
  display: grid;
  align-content: start;
  gap: 18px;
  padding: 24px;
  background: rgba(255, 255, 255, 0.78);
}

.dash-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.ghost {
  min-height: 38px;
  border: 1px solid var(--line);
  background: white;
  color: var(--ink);
  padding: 0 14px;
}

.metric-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.metric-row div,
.flow-item,
.complete {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.metric-row div {
  display: grid;
  gap: 6px;
  padding: 16px;
}

.metric-row span,
.flow-item p {
  color: var(--muted);
  font-size: 14px;
}

.metric-row strong {
  font-size: 24px;
}

.flow {
  display: grid;
  gap: 10px;
}

.flow-item {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 12px;
  align-items: center;
  min-height: 68px;
  padding: 12px;
}

.flow-item > span {
  display: inline-flex;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: rgba(15, 118, 110, 0.12);
  color: var(--teal-dark);
}

.flow-item strong {
  display: block;
  margin-bottom: 2px;
}

.complete {
  gap: 10px;
  padding: 14px;
  color: var(--teal-dark);
  font-weight: 800;
}

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

  .auth-panel,
  .dashboard {
    padding: 20px;
  }
}

@media (max-width: 520px) {
  .shell {
    width: min(100% - 20px, 1120px);
    padding-top: 12px;
  }

  .topbar,
  .dash-header {
    align-items: flex-start;
    flex-direction: column;
  }

  h1 {
    font-size: 34px;
  }

  .metric-row {
    grid-template-columns: 1fr;
  }
}
