:root{
  --bg-page:#f4f6fb;
  --bg-card:#fff;
  --border:#e6eaf2;
  --text:#0b1220;
  --muted:#5b6476;
  --soft:#7a859a;
  --brand:#0b1f3b;
  --brand-2:#163a66;
  --danger:#b42318;
  --ok:#0f766e;
  --radius-lg:18px;
  --radius-md:14px;
  --radius-pill:999px;
  --shadow:0 16px 40px rgba(11,31,59,.08);
  --shadow-soft:0 10px 22px rgba(11,31,59,.06);
  --ring:0 0 0 4px rgba(43,105,201,.14);
}

*,
*::before,
*::after{ box-sizing:border-box; }

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

body{
  margin:0;
  background:
    radial-gradient(900px 450px at 20% -10%, rgba(43,105,201,.10), transparent 60%),
    radial-gradient(900px 450px at 90% 0%, rgba(11,31,59,.08), transparent 55%),
    var(--bg-page);
  color:var(--text);
  font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
  -webkit-font-smoothing:antialiased;
  font-weight:400;
}

.wrap{
  min-height:100svh;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  padding:28px 16px 22px;
  gap:14px;
}

.card{
  width:100%;
  max-width:540px;
  margin:0 auto;
  border-radius:22px;
  background:rgba(255,255,255,.96);
  border:1px solid var(--border);
  box-shadow:var(--shadow);
  overflow:hidden;
  position:relative;
}

.head{
  padding:22px 22px 14px;
  border-bottom:1px solid rgba(230,234,242,.9);
  background:linear-gradient(180deg, rgba(11,31,59,.03), transparent);
}

.head h1{
  margin:0;
  font-size:20px;
  font-weight:950;
  letter-spacing:-.02em;
  color:var(--brand);
}

.head p{
  margin:8px 0 0;
  font-size:13.5px;
  color:var(--muted);
  line-height:1.45;
}

.modebar{
  display:flex;
  gap:10px;
  padding:16px 22px 0;
}

.modebtn{
  flex:1;
  height:44px;
  border-radius:999px;
  border:1px solid var(--border);
  background:#fff;
  cursor:pointer;
  font-weight:950;
  color:var(--muted);
  transition:background .15s ease, color .15s ease, transform .12s ease, box-shadow .12s ease, border-color .15s ease;
  box-shadow:var(--shadow-soft);
}

.modebtn:hover{ border-color:rgba(11,31,59,.18); color:var(--brand); }
.modebtn:active{ transform:translateY(1px); }
.modebtn.active{
  background:var(--brand);
  color:#fff;
  border-color:var(--brand);
  box-shadow:0 14px 30px rgba(11,31,59,.16);
}

.form{
  padding:16px 22px 22px;
  display:flex;
  flex-direction:column;
  gap:16px;
}

.lbl{
  display:flex;
  flex-direction:column;
  gap:12px;
}

.lbl span{
  display:block;
  font-size:11px;
  text-transform:uppercase;
  letter-spacing:.12em;
  color:var(--soft);
  font-weight:950;
  margin:0;
}

input,select{
  width:100%;
  border-radius:999px;
  border:1px solid var(--border);
  background:#fbfcff;
  color:var(--text);
  font-size:14px;
  outline:none;
  padding:13px 16px;
  transition:box-shadow .15s ease, border-color .15s ease, background .15s ease;
}

select{ padding-right:44px; }

input:hover,select:hover{ border-color:rgba(11,31,59,.25); }
input:focus-visible,select:focus-visible{
  border-color:rgba(43,105,201,.55);
  box-shadow:var(--ring);
  background:#fff;
}

.pass{ position:relative; }

.eye{
  position:absolute;
  right:10px;
  top:50%;
  transform:translateY(-50%);
  width:42px;
  height:42px;
  border-radius:999px;
  border:1px solid transparent;
  background:transparent;
  cursor:pointer;
}

.eye::before{
  content:"";
  display:block;
  width:18px;
  height:18px;
  margin:0 auto;
  opacity:.65;
  background:
    radial-gradient(circle at 50% 50%, rgba(11,31,59,.5) 0 2px, transparent 3px),
    radial-gradient(closest-side, transparent 55%, rgba(11,31,59,.55) 56% 65%, transparent 66%);
}

.small{
  display:block;
  margin-top:-2px;
  color:var(--muted);
  font-size:12.5px;
  line-height:1.35;
}

.row{
  display:flex;
  gap:12px;
  align-items:center;
  margin-top:2px;
}

.btn{
  height:46px;
  border-radius:999px;
  border:1px solid transparent;
  font-size:13px;
  font-weight:950;
  padding:0 16px;
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  transition:transform .12s ease, box-shadow .12s ease, background .12s ease, border-color .12s ease;
  user-select:none;
  width:100%;
}

.btn:active{ transform:translateY(1px); }
.btn:focus-visible{ box-shadow:var(--ring); }

.btn.primary{
  background:var(--brand);
  color:#fff;
  box-shadow:0 10px 22px rgba(11,31,59,.18);
}

.btn.primary:hover{ background:var(--brand-2); }

.btn.ghost{
  background:#fff;
  border-color:rgba(230,234,242,.95);
  color:var(--brand);
  box-shadow:var(--shadow-soft);
}

.btn.ghost:hover{
  border-color:rgba(11,31,59,.18);
  background:rgba(11,31,59,.02);
}

.hint{
  min-height:20px;
  font-size:13px;
  margin-top:2px;
  color:var(--muted);
  line-height:1.35;
}

.hint.err{ color:var(--danger); font-weight:950; }
.hint.ok{ color:var(--ok); font-weight:950; }

.profile{
  border-top:1px solid rgba(230,234,242,.9);
  padding:18px 22px 22px;
  background:rgba(11,31,59,.01);
}

.profile h2{
  margin:0;
  font-size:15px;
  font-weight:950;
  color:var(--brand);
}

.profile p{
  margin:8px 0 14px;
  color:var(--muted);
  font-size:13.5px;
  line-height:1.45;
}

.loading{
  position:absolute;
  inset:0;
  display:none;
  align-items:center;
  justify-content:center;
  gap:10px;
  background:rgba(255,255,255,.72);
  backdrop-filter:blur(8px);
}

.loading.show{ display:flex; }

.spinner{
  width:14px;
  height:14px;
  border-radius:50%;
  border:2px solid rgba(11,31,59,.20);
  border-top-color: rgba(11,31,59,.75);
  animation:spin .75s linear infinite;
}

@keyframes spin{ to{ transform:rotate(360deg); } }

.loadingtxt{
  font-weight:950;
  color:var(--brand);
  font-size:13px;
}

.foot{
  font-size:12px;
  color:var(--muted);
}

@media (max-width: 520px){
  .wrap{
    min-height:100svh;
    justify-content:center;
    padding:22px 14px 18px;
  }

  .card{ border-radius:18px; }

  .row{ flex-direction:column; }

  .head{ padding:18px 14px 12px; }
  .modebar{ padding:14px 14px 0; gap:8px; }
  .modebtn{ height:42px; }

  .form{ padding:16px 14px 16px; gap:16px; }
  .lbl{ gap:12px; }

  input,select{ padding:13px 14px; }

  .profile{ padding:16px 14px 16px; }
}
