/* Coral Web Tester: login / signup (split layout from the design reference) */
:root {
  --page: #eef2f7;
  --card: #ffffff;
  --card-line: #e3e8ef;
  --ink: #12213b;
  --ink-2: #1f2d45;
  --muted: #5b6b82;
  --label: #3b4a63;
  --field-line: #cdd5e1;
  --primary: #2f5bd3;
  --primary-hover: #2449b8;
  --primary-ring: rgba(47, 91, 211, 0.18);
  --info-bg: #f1f4f9;
  --danger: #c4323d;
  --danger-bg: #fdecee;
  --ok: #1e7a46;
  --ok-bg: #e7f5ec;
  --navy-1: #1b2f4c;
  --navy-2: #2a4466;
  --accent: #b9e4b0;
  --orange: #ef7d2d;
  --radius: 14px;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font: 15px/1.5 Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
.hidden { display: none !important; }
a { color: var(--primary); font-weight: 600; text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- split layout ---------- */
.auth { display: grid; grid-template-columns: minmax(0, 54fr) minmax(0, 46fr); min-height: 100vh; }

.hero { position: relative; overflow: hidden; color: #fff; background: var(--navy-1); }
.hero-bg { position: absolute; inset: 0; background: linear-gradient(140deg, #22395b 0%, #1b2f4c 45%, #2c4a6b 100%); }
.hero-bg::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(20, 34, 56, 0.35) 0%, rgba(20, 34, 56, 0.75) 100%);
}
.blob { position: absolute; border-radius: 50%; filter: blur(60px); opacity: 0.55; }
.b1 { width: 420px; height: 420px; left: 48%; top: 22%; background: #5d7ea6; }
.b2 { width: 320px; height: 320px; left: -6%; top: 58%; background: #3d5f86; }
.b3 { width: 260px; height: 260px; left: 70%; top: 70%; background: #8aa3bf; opacity: 0.35; }
.glass-hint {
  position: absolute; left: 49%; top: 2.5%; width: 46%; height: 16%;
  border-radius: 14px; background: rgba(40, 110, 120, 0.35); filter: blur(3px);
}
.hero-inner { position: relative; z-index: 1; padding: 46px 52px 40px; max-width: 760px; }

.brand-row { display: flex; align-items: center; gap: 12px; }
.logo-tile { width: 42px; height: 42px; border-radius: 9px; background: #fff; display: grid; place-items: center; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15); }
.logo-tile img { width: 30px; height: 30px; }
.brand-name { font-weight: 700; font-size: 17px; letter-spacing: 0.1px; }

.hero-title { margin: 60px 0 0; font-size: clamp(36px, 4.1vw, 58px); line-height: 1.08; font-weight: 800; letter-spacing: -1.2px; }
.hero-title .accent { color: var(--accent); }
.hero-sub { margin: 42px 0 16px; font-size: 20px; font-weight: 700; }

.steps-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; max-width: 620px; }
.steps-grid li {
  display: flex; align-items: center; gap: 12px; min-height: 57px; padding: 10px 14px;
  border-radius: 10px; border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.08); backdrop-filter: blur(6px);
  font-size: 13.5px; font-weight: 600;
}
.steps-grid .num {
  flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(255, 255, 255, 0.2); font-size: 12px; font-weight: 700;
}

/* ---------- right side + card ---------- */
.auth-side { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px 24px; }
.mobile-brand { display: none; }

.card {
  width: 100%; max-width: 446px; background: var(--card); border: 1px solid var(--card-line);
  border-radius: var(--radius); padding: 30px 36px 26px; box-shadow: 0 8px 28px rgba(18, 33, 59, 0.06);
}
.card.wide { max-width: 720px; }
.card-logo { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.card-logo img { width: 34px; height: 34px; }
.card-logo-text { font-size: 10px; font-weight: 700; color: var(--orange); letter-spacing: 0.2px; }
.card-logo-text b { color: var(--ink-2); font-weight: 700; margin-left: 2px; }
.card-product { margin: 12px 0 0; text-align: center; font-size: 19px; font-weight: 700; color: var(--ink); }
.card-title { margin: 18px 0 0; text-align: center; font-size: 17px; font-weight: 700; color: var(--ink); }
.card-lead { margin: 8px auto 0; max-width: 340px; text-align: center; font-size: 13.5px; color: var(--muted); }
.card-lead b { color: var(--ink-2); font-weight: 600; display: inline-block; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; vertical-align: bottom; }

form { margin-top: 26px; }
.label {
  display: block; margin: 14px 0 6px; font-size: 11px; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--label);
}
form .label:first-child { margin-top: 0; }
.field { position: relative; }
.field-icon {
  position: absolute; left: 14px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%);
  fill: none; stroke: #7d8aa0; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; pointer-events: none;
}
.field input {
  width: 100%; height: 46px; padding: 0 14px 0 42px; font: inherit; font-size: 14px; color: var(--ink);
  background: #fff; border: 1px solid var(--field-line); border-radius: 8px; outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.field input::placeholder { color: #8f9bb0; }
.field input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-ring); }
.field input[aria-invalid="true"] { border-color: var(--danger); }
.code-input { letter-spacing: 0.5em; font-weight: 600; font-variant-numeric: tabular-nums; }
.field-error { margin: 5px 0 0; min-height: 0; font-size: 12.5px; color: var(--danger); }
.field-error:empty { display: none; }

.btn-primary {
  width: 100%; height: 44px; margin-top: 22px; border: 0; border-radius: 7px; cursor: pointer;
  background: var(--primary); color: #fff; font: inherit; font-size: 14.5px; font-weight: 600;
  display: flex; align-items: center; justify-content: center; gap: 8px; transition: background 0.15s;
}
.btn-primary:hover { background: var(--primary-hover); }
.btn-primary:focus-visible { outline: 3px solid var(--primary-ring); outline-offset: 2px; }
.btn-primary:disabled { opacity: 0.65; cursor: progress; }
.btn-primary.loading::before {
  content: ""; width: 15px; height: 15px; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.45); border-top-color: #fff; animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.info {
  display: flex; gap: 10px; align-items: flex-start; margin-top: 24px; padding: 12px 14px;
  border-radius: 8px; background: var(--info-bg); color: var(--muted); font-size: 12.5px; line-height: 1.5;
}
.info svg { flex: none; width: 17px; height: 17px; margin-top: 1px; fill: none; stroke: #7d8aa0; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

.notice { margin-top: 18px; padding: 10px 12px; border-radius: 8px; font-size: 13px; }
.notice.ok { background: var(--ok-bg); color: var(--ok); }
.notice.bad { background: var(--danger-bg); color: var(--danger); }

#signupForm { margin-top: 20px; }
#signupForm .label { margin-top: 11px; }
#signupForm .btn-primary { margin-top: 18px; }
.switch { margin: 18px 0 0; text-align: center; font-size: 13.5px; color: var(--muted); }
.code-actions { display: flex; justify-content: space-between; gap: 10px; margin-top: 14px; }
.link-btn { border: 0; background: none; padding: 0; font: inherit; font-size: 13px; font-weight: 600; color: var(--primary); cursor: pointer; }
.link-btn:disabled { color: var(--muted); font-weight: 500; cursor: default; }
.link-btn:not(:disabled):hover { text-decoration: underline; }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); max-width: calc(100% - 32px);
  padding: 10px 16px; border-radius: 8px; background: var(--ink); color: #fff; font-size: 13.5px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .hero-inner { padding: 38px 36px; }
  .steps-grid { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .auth { grid-template-columns: 1fr; }
  .hero { display: none; }
  .auth-side { justify-content: flex-start; padding: 24px 16px 40px; }
  .card { padding: 26px 20px 22px; }
}
