:root {
  color-scheme: light;
  --bg: #f5f8fb;
  --panel: #ffffff;
  --ink: #142033;
  --muted: #68768a;
  --line: #d8e0eb;
  --accent: #047c82;
  --accent-strong: #035d61;
  --danger: #b4233a;
  --danger-soft: #ffe2e7;
  --radius: 8px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .92), rgba(245, 248, 251, .96)),
    radial-gradient(circle at 18% 20%, rgba(4, 124, 130, .18), transparent 32%),
    radial-gradient(circle at 82% 76%, rgba(20, 32, 51, .14), transparent 34%);
}

button,
input,
select {
  font: inherit;
}

button {
  min-height: 42px;
  border: 0;
  border-radius: var(--radius);
  color: #fff;
  background: var(--accent);
  cursor: pointer;
}

button:hover {
  background: var(--accent-strong);
}

button:disabled {
  cursor: wait;
  opacity: .7;
}

input,
select {
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  background: #fff;
  outline: none;
}

input:focus,
select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(4, 124, 130, .14);
}

select {
  appearance: auto;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: .9rem;
  font-weight: 700;
}

.auth-shell {
  display: grid;
  grid-template-columns: minmax(260px, .8fr) minmax(320px, 420px);
  align-items: center;
  gap: clamp(20px, 4vw, 54px);
  width: min(980px, calc(100% - 32px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 32px 0;
}

.brand-panel {
  display: grid;
  align-content: center;
  gap: 12px;
}

.brand-panel img {
  display: block;
  width: 86px;
  height: 86px;
  object-fit: contain;
}

.brand-panel h1 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 1;
  letter-spacing: 0;
}

.brand-panel p {
  max-width: 460px;
  margin: 0;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.5;
}

.auth-card {
  display: grid;
  gap: 18px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 22px 70px rgba(20, 32, 51, .14);
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.tab {
  color: var(--ink);
  background: #eef3f8;
  border: 1px solid var(--line);
}

.tab.active {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
}

.auth-form {
  display: none;
  gap: 13px;
}

.auth-form.active {
  display: grid;
}

.auth-form h2 {
  margin: 0 0 2px;
  font-size: 1.2rem;
  letter-spacing: 0;
}

.phone-row {
  display: grid;
  grid-template-columns: minmax(150px, .72fr) minmax(160px, 1fr);
  gap: 8px;
}

.hidden {
  display: none !important;
}

.otp-field input {
  letter-spacing: 0;
  font-weight: 800;
}

.auth-message {
  min-height: 22px;
  margin: 0;
  color: var(--muted);
  font-size: .9rem;
  font-weight: 700;
}

.auth-message.error {
  color: var(--danger);
}

.auth-message.success {
  color: var(--accent-strong);
}

@media (max-width: 760px) {
  .auth-shell {
    grid-template-columns: 1fr;
    align-content: center;
  }

  .brand-panel {
    text-align: center;
    justify-items: center;
  }

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