:root{
  --bg: #0b1220;
  --panel: rgba(255,255,255,.06);
  --panel2: rgba(255,255,255,.10);
  --text: rgba(255,255,255,.92);
  --muted: rgba(255,255,255,.68);
  --border: rgba(255,255,255,.16);
  --focus: rgba(59,130,246,.55);
  --danger: #ef4444;
  --primary: #2563eb;
  --primaryHover: #1d4ed8;
  --shadow: 0 18px 60px rgba(0,0,0,.40);
  --radius: 16px;
  --radiusSm: 12px;
  --font: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  font-family:var(--font);
  color:var(--text);
  background:
    radial-gradient(1200px 700px at 15% 15%, rgba(37,99,235,.25) 0%, rgba(37,99,235,0) 55%),
    radial-gradient(900px 600px at 85% 20%, rgba(16,185,129,.14) 0%, rgba(16,185,129,0) 55%),
    radial-gradient(900px 700px at 50% 95%, rgba(168,85,247,.10) 0%, rgba(168,85,247,0) 55%),
    var(--bg);
}

a{ color:inherit; }

.auth{
  min-height:100%;
  display:grid;
  grid-template-columns: 1fr;
}

.auth__panel{
  width:min(560px, calc(100% - 32px));
  margin:32px auto;
  background:linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.04));
  border:1px solid var(--border);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  overflow:hidden;
}

.auth__header{
  padding:22px 24px;
  border-bottom:1px solid rgba(255,255,255,.10);
  background:rgba(255,255,255,.03);
}

.auth__body{ padding:24px; }
.auth__footer{
  padding:18px 24px;
  border-top:1px solid rgba(255,255,255,.10);
  background:rgba(255,255,255,.03);
  display:flex;
  justify-content:space-between;
  align-items:center;
}

.brand{ display:flex; gap:14px; align-items:center; }
.brand__mark{
  width:44px; height:44px;
  border-radius:14px;
  display:grid; place-items:center;
  background:linear-gradient(135deg, rgba(37,99,235,.95), rgba(16,185,129,.55));
  color:white;
  font-weight:800;
  letter-spacing:.02em;
  box-shadow: 0 10px 24px rgba(37,99,235,.28);
}
.brand__logo{
  width:26px;
  height:26px;
  object-fit:contain;
  filter: drop-shadow(0 6px 12px rgba(0,0,0,.25));
}
.brand__title{ font-weight:700; }
.brand__subtitle{ color:var(--muted); font-size:13px; margin-top:2px; }

.auth__title{ margin:0; font-size:28px; letter-spacing:-.02em; }
.auth__hint{ margin:8px 0 18px; color:var(--muted); }

.form{ display:grid; gap:14px; }
.form__field{ display:grid; gap:8px; }
.form__row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding-top:2px;
}

.label{ font-weight:600; font-size:14px; }
.help{ color:var(--muted); font-size:12px; }

.input{
  width:100%;
  border-radius:var(--radiusSm);
  border:1px solid rgba(255,255,255,.14);
  background:rgba(0,0,0,.20);
  color:var(--text);
  padding:12px 12px;
  outline:none;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.input::placeholder{ color:rgba(255,255,255,.45); }
.input:focus{
  border-color: rgba(59,130,246,.55);
  box-shadow: 0 0 0 4px var(--focus);
  background:rgba(0,0,0,.26);
}
.input:-webkit-autofill,
.input:-webkit-autofill:hover,
.input:-webkit-autofill:focus,
.input:-webkit-autofill:active{
  -webkit-text-fill-color:var(--text) !important;
  caret-color:var(--text);
  border:1px solid rgba(255,255,255,.14);
  -webkit-box-shadow:0 0 0 1000px rgba(15,23,42,.92) inset !important;
  box-shadow:0 0 0 1000px rgba(15,23,42,.92) inset !important;
  transition:background-color 9999s ease-out, color 9999s ease-out;
}
.input.is-invalid{ border-color: rgba(239,68,68,.65); }

.password-field{
  position:relative;
  display:block;
}
.password-field .input{ padding-right:46px; }

.password-field > .password-toggle{
  position:absolute;
  right:10px;
  top:50%;
  transform:translateY(-50%);
  z-index:3;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:30px;
  height:30px;
  padding:0;
  border:1px solid rgba(96,165,250,.35);
  border-radius:50%;
  background:rgba(8,15,30,.82);
  color:#60a5fa;
  cursor:pointer;
  box-shadow:0 2px 8px rgba(0,0,0,.35);
  transition:color .15s ease, background .15s ease, border-color .15s ease;
}
.password-field > .password-toggle:hover,
.password-field > .password-toggle:focus{
  color:#fff;
  border-color:rgba(96,165,250,.7);
  background:rgba(59,130,246,.22);
  outline:none;
}
.password-toggle__icon{
  display:block;
  pointer-events:none;
}

.inputGroup{
  display:flex;
  gap:10px;
  align-items:stretch;
}
.inputGroup__input{ flex:1; }
.inputGroup__btn{
  white-space:nowrap;
  padding:10px 12px;
}

.checkbox{
  display:flex;
  align-items:center;
  gap:10px;
  font-size:14px;
  color:rgba(255,255,255,.86);
}
.checkbox input{ width:16px; height:16px; }

.link{
  color:rgba(255,255,255,.82);
  text-decoration:none;
  font-size:14px;
}
.link:hover{ text-decoration:underline; }

.btn{
  border:1px solid rgba(255,255,255,.18);
  background:rgba(255,255,255,.06);
  color:var(--text);
  border-radius:var(--radiusSm);
  padding:12px 14px;
  font-weight:700;
  cursor:pointer;
  transition: transform .05s ease, background .15s ease, border-color .15s ease, opacity .15s ease;
}
.btn:active{ transform: translateY(1px); }
.btn:disabled{ opacity:.55; cursor:not-allowed; }

.btn--primary{
  border-color: rgba(37,99,235,.55);
  background: linear-gradient(180deg, rgba(37,99,235,.95), rgba(29,78,216,.95));
}
.btn--primary:hover{ background: linear-gradient(180deg, rgba(29,78,216,.98), rgba(29,78,216,.92)); }
.btn--ghost{
  background: rgba(255,255,255,.04);
}
.btn--ghost:hover{ background: rgba(255,255,255,.08); }

.form__actions{ display:grid; gap:10px; margin-top:4px; }

.error{
  min-height: 18px;
  font-size:12px;
  color: rgba(255,255,255,.92);
}
.error:empty{ display:none; }
.error--block{
  background: rgba(239,68,68,.12);
  border:1px solid rgba(239,68,68,.22);
  padding:10px 12px;
  border-radius:12px;
}
.muted{ color:var(--muted); font-size:13px; }

.auth__side{
  display:none;
}

@media (min-width: 980px){
  .auth{
    grid-template-columns: 1.05fr .95fr;
    align-items:stretch;
  }
  .auth__panel{
    margin:48px 24px 48px auto;
  }
  .auth__side{
    display:flex;
    margin:48px auto 48px 24px;
    width:min(560px, calc(100% - 48px));
    border-radius: var(--radius);
    border:1px solid rgba(255,255,255,.12);
    background: rgba(255,255,255,.03);
    box-shadow: var(--shadow);
  }
  .auth__sideInner{ padding:28px; }
  .side__title{ margin:0; font-size:22px; letter-spacing:-.01em; }
  .side__text{ margin:10px 0 14px; color:var(--muted); line-height:1.5; }
  .side__list{
    margin:0;
    padding-left:18px;
    color:rgba(255,255,255,.86);
    display:grid;
    gap:8px;
  }
}

@media (prefers-reduced-motion: reduce){
  *{ transition:none !important; scroll-behavior:auto !important; }
}

