:root{
  --brand-1:#1e3a8a;   /* deep indigo */
  --brand-2:#2563eb;   /* primary blue */
  --brand-3:#38bdf8;   /* accent (sky) */
  --bg:#f8fafc;
  --text:#0f172a;
  --muted:#475569;
  --card-bg:rgba(255,255,255,.75);
  --border:rgba(15,23,42,.08);
  --ring:rgba(37,99,235,.45);
}
@media (prefers-color-scheme: dark){
  :root{
    --bg:#0b1220;
    --text:#e5e7eb;
    --muted:#cbd5e1;
    --card-bg:rgba(17,25,40,.72);
    --border:rgba(148,163,184,.18);
    --ring:rgba(56,189,248,.45);
  }
}

/* Prevent iOS text auto-scaling quirks */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font:16px/1.5 ui-sans-serif,system-ui,-apple-system,Segoe UI,Roboto,Inter,Arial,sans-serif;
  color:var(--text);
  background:
    radial-gradient(1200px 600px at 20% -10%, rgba(56,189,248,.25), transparent 60%),
    radial-gradient(1000px 500px at 120% 10%, rgba(37,99,235,.20), transparent 60%),
    var(--bg);
}

/* LAYOUT */
.shell{ min-height:100svh; display:grid; grid-template-columns: 1fr; }
@media (min-width: 960px){ .shell{ grid-template-columns: 1.1fr .9fr; }}

/* HERO (LEFT) */
.hero{ display:none; position:relative; overflow:hidden; }
@media (min-width: 960px){ .hero{ display:block; } }
.hero-inner{
  height:100%;
  padding:64px;
  display:flex; flex-direction:column; justify-content:center; gap:28px;
  background:
    radial-gradient(1200px 600px at 10% 20%, rgba(37,99,235,.18), transparent 60%),
    linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,0));
  border-right:1px solid var(--border);
}
.badge{
  display:inline-flex; align-items:center; gap:10px;
  padding:6px 12px; border-radius:999px;
  border:1px solid var(--border);
  background:rgba(255,255,255,.35);
  backdrop-filter:saturate(140%) blur(6px);
  font-size:14px;
}
.hero h1{ font-weight:800; font-size:42px; line-height:1.15; margin:0;}
.hero p{ max-width:48ch; color:var(--muted); margin:0;}
.list{ margin:6px 0 0; padding:0; list-style:none; display:grid; gap:10px;}
.list li{ display:flex; align-items:center; gap:10px; }

/* AUTH (RIGHT) */
.auth{ display:flex; align-items:center; justify-content:center; padding:36px 20px; }
.card{
  width:100%; max-width:460px;
  padding:28px;
  background:var(--card-bg);
  backdrop-filter:saturate(140%) blur(10px);
  border:1px solid var(--border);
  border-radius:16px;
  box-shadow:0 10px 30px rgba(2,6,23,.15);
}
.card-title{
  margin:6px 0 10px;
  text-align:center;
  font-size:22px;
  font-weight:800;
}

/* BRAND */
.brand{ display:flex; align-items:center; gap:14px; margin-bottom:8px; justify-content:center; }
.brand img{ height:88px; width:auto; }
.brand .name{ display:none; }
.gradient-text{
  background:linear-gradient(135deg,var(--brand-2),var(--brand-3));
  -webkit-background-clip:text;
  background-clip:text;
  color:transparent;
}

/* BUTTONS */
.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:10px;
  padding:12px 16px; border-radius:12px; border:1px solid transparent;
  font-weight:600; text-decoration:none; cursor:pointer; transition:.2s ease;
  user-select:none;
}
.btn-primary{
  background:linear-gradient(135deg, var(--brand-2), var(--brand-3));
  color:white; box-shadow:0 6px 16px rgba(37,99,235,.3);
}
.btn-primary:hover{ transform:translateY(-1px); box-shadow:0 10px 20px rgba(37,99,235,.35); }

/* FORM */
form{ display:grid; gap:16px; margin-top:6px; }
label{ display:block; font-weight:600; font-size:14px; margin-bottom:6px; }
.field{ position:relative; }
.field input{
  width:100%;
  height:48px;
  padding:12px 44px 12px 40px;
  font-size:16px; /* prevent iOS focus-zoom */
  border-radius:12px; border:1px solid var(--border);
  background:rgba(255,255,255,.55);
  color:var(--text);
  outline:none; transition:border .15s, box-shadow .15s, background .15s;
}
.field input::placeholder{ color:#94a3b8; }
.field input:focus{
  border-color:transparent;
  box-shadow:0 0 0 4px var(--ring);
  background:rgba(255,255,255,.8);
}
.icon{
  position:absolute; left:12px; top:50%; transform:translateY(-50%);
  width:20px; display:grid; place-items:center; pointer-events:none;
}
.toggle{
  position:absolute; right:10px; top:50%; transform:translateY(-50%);
  width:28px; background:none; border:0; padding:0; cursor:pointer;
}

.check{ display:inline-flex; align-items:center; gap:8px; cursor:pointer; user-select:none; color:var(--muted); }
.check input{ appearance:none; width:18px; height:18px; border-radius:6px; border:1px solid var(--border); position:relative; }
.check input:checked{ background:linear-gradient(135deg, var(--brand-2), var(--brand-3)); border-color:transparent; }
.check input:checked::after{ content:""; position:absolute; inset:3px; background:white; clip-path:polygon(14% 52%, 0 65%, 43% 100%, 100% 25%, 86% 12%, 43% 71%); }

.hint{ color:#6b7280; font-size:13px; margin-top:6px; }
.error{ color:#ef4444; font-size:13px; margin-top:6px; display:none; }
.field.invalid input{ box-shadow:0 0 0 3px rgba(239,68,68,.25); border-color:rgba(239,68,68,.45); }

/* Error shows when the adjacent field is invalid */
.field.invalid + .error{ display:block; }

.actions{ display:grid; gap:10px; margin-top:6px; }
.actions .btn{ width:100%; padding:12px 16px; }
.muted{ color:var(--muted); font-size:14px; text-align:center; }
.muted a{ color:var(--brand-2); text-decoration:none; }
.muted a:hover{ text-decoration:underline; }

/* Small tweaks for narrow screens */
@media (max-width: 360px){
  .brand img{ height:72px; }
  .hero h1{ font-size:36px; }
}
