:root{
  --bg:#020913;
  --line:rgba(79,143,207,.58);
  --line-hover:rgba(111,173,236,.86);
  --text:#f4f7fb;
  --muted:#b7c5d5;
  --green:#2ee36b;
  --blue:#2f9aff;
  --danger:#ff6262;
}

*{box-sizing:border-box}
html,body{height:100%}

body{
  margin:0;
  min-height:100vh;
  overflow:hidden;
  font-family:Inter,Segoe UI,Roboto,Arial,sans-serif;
  color:var(--text);
  background:
    radial-gradient(circle at 50% 34%, rgba(28,91,148,.24) 0%, rgba(8,34,62,.24) 32%, rgba(1,10,22,.07) 59%, transparent 78%),
    radial-gradient(circle at 50% 0%, rgba(15,57,96,.68) 0%, rgba(4,22,42,.90) 42%, rgba(1,8,18,.98) 78%, #00050b 100%),
    linear-gradient(180deg,#061525,#010814 72%,#00050b);
}

body::before{
  content:"";
  position:fixed;
  inset:0;
  pointer-events:none;
  background:
    linear-gradient(90deg,rgba(0,0,0,.24),transparent 22%,transparent 78%,rgba(0,0,0,.26)),
    radial-gradient(circle at 50% 50%, transparent 0%, rgba(0,0,0,.22) 72%);
}

.login-wrap{
  min-height:100vh;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  padding:42px 18px 78px;
  position:relative;
  z-index:1;
  transform:translateY(-18px);
}

.login-title{
  margin:0 0 46px;
  color:#f7f9ff;
  font-size:clamp(38px,4.1vw,56px);
  line-height:1;
  font-weight:520;
  letter-spacing:.16em;
  text-align:center;
  text-transform:uppercase;
  text-shadow:
    0 1px 0 rgba(255,255,255,.18),
    0 10px 30px rgba(32,96,150,.26);
}

.login-box{
  width:min(390px,calc(100vw - 48px));
  display:grid;
  gap:20px;
  padding:0;
  border:0;
  border-radius:0;
  background:transparent;
  box-shadow:none;
  position:relative;
  transform:none;
}

.brand-row{
  display:none;
}

.icon-wrap{
  width:86px;
  height:86px;
  display:flex;
  align-items:center;
  justify-content:center;
  border:1.35px solid rgba(46,227,107,.62);
  border-radius:50%;
  background:radial-gradient(circle at 50% 50%,rgba(46,227,107,.08),rgba(0,0,0,.03) 62%);
}

.icon-wrap svg{
  width:54px;
  height:54px;
  stroke:var(--green);
  fill:none;
  stroke-width:1.65;
  stroke-linecap:round;
  stroke-linejoin:round;
  filter:drop-shadow(0 0 4px rgba(46,227,107,.18));
}

.brand-title{
  font-size:24px;
  font-weight:600;
  letter-spacing:-.65px;
  text-shadow:0 6px 22px rgba(255,255,255,.08);
}

.field{
  display:grid;
  gap:9px;
}

label{
  color:#f4f7fb;
  font-size:14px;
  font-weight:750;
  letter-spacing:.01em;
  text-shadow:0 3px 12px rgba(0,0,0,.34);
}

input{
  width:100%;
  height:54px;
  border-radius:8px;
  border:1px solid var(--line);
  background:rgba(2,14,28,.36);
  color:#fff;
  font-size:16px;
  padding:0 14px;
  outline:none;
  box-shadow:
    inset 0 0 28px rgba(18,68,113,.12),
    0 0 0 1px rgba(0,0,0,.14);
}

input:focus{
  border-color:var(--line-hover);
  box-shadow:
    0 0 0 3px rgba(68,137,255,.14),
    inset 0 0 28px rgba(18,68,113,.16);
}

button{
  height:54px;
  margin-top:4px;
  border:1px solid rgba(46,227,107,.78);
  border-radius:8px;
  background:rgba(5,17,30,.18);
  color:#69f07c;
  font-size:16px;
  font-weight:760;
  cursor:pointer;
  transition:transform .16s ease,background .16s ease,border-color .16s ease;
}

button:hover{
  transform:translateY(-1px);
  background:rgba(11,31,53,.78);
  border-color:rgba(46,227,107,.82);
}

.error{
  min-height:0;
  position:absolute;
  top:calc(100% + 14px);
  left:0;
  right:0;
  color:var(--danger);
  font-weight:800;
  text-align:center;
}
.reset-copy{color:var(--muted);font-size:14px;line-height:1.5;text-align:center}
.forgot-link{
  display:block;
  margin:2px auto 0;
  color:var(--blue);
  font-size:17px;
  font-weight:450;
  text-align:center;
  text-decoration:none;
  text-shadow:0 3px 20px rgba(47,154,255,.22);
}
.forgot-link:hover{text-decoration:underline}
.login-footer{
  position:fixed;
  left:28px;
  bottom:26px;
  z-index:2;
}
.privacy-link{
  min-width:106px;
  min-height:32px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:0 14px;
  border:1px solid var(--line-hover);
  border-radius:8px;
  color:var(--blue);
  background:rgba(5,17,30,.18);
  font-size:13px;
  font-weight:500;
  text-decoration:none;
}
.established{
  position:fixed;
  right:28px;
  bottom:31px;
  color:#fff;
  font-size:13px;
  font-weight:400;
  text-shadow:0 3px 14px rgba(0,0,0,.42);
}
.privacy-modal{
  display:none;
  position:fixed;
  inset:0;
  z-index:20;
  align-items:center;
  justify-content:center;
  padding:34px 18px;
  background:rgba(0,5,12,.74);
  backdrop-filter:blur(6px);
}
.privacy-modal.show{display:flex}
.privacy-panel{
  width:min(760px,calc(100vw - 36px));
  max-height:min(760px,86vh);
  border:1px solid rgba(79,143,207,.52);
  border-radius:14px;
  background:
    radial-gradient(circle at 50% 0%, rgba(34,91,148,.26), transparent 46%),
    rgba(3,15,29,.96);
  box-shadow:0 26px 90px rgba(0,0,0,.52);
  overflow:hidden;
}
.privacy-panel-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:18px 22px;
  border-bottom:1px solid rgba(79,143,207,.34);
}
.privacy-panel-head h2{
  margin:0;
  color:#f7f9ff;
  font-size:22px;
  font-weight:650;
  letter-spacing:.02em;
}
.privacy-close{
  width:36px;
  height:36px;
  margin:0;
  border:1px solid rgba(79,143,207,.52);
  border-radius:999px;
  background:rgba(5,17,30,.34);
  color:#cfe0ff;
  font-size:20px;
  font-weight:400;
  line-height:1;
}
.privacy-body{
  max-height:calc(min(760px,86vh) - 73px);
  overflow:auto;
  padding:22px 26px 28px;
  color:#dbe7f4;
  font-size:14px;
  line-height:1.58;
}
.privacy-body h3{
  margin:22px 0 8px;
  color:#fff;
  font-size:16px;
  font-weight:800;
}
.privacy-body h3:first-child{margin-top:0}
.privacy-body p{margin:0 0 12px}
.privacy-body ul{
  margin:0 0 14px 20px;
  padding:0;
}
.privacy-body li{margin:4px 0}
.hide{display:none!important}

body.day{
  background:#f3f6fa;
  color:#0e2235;
}

body.day::before{display:none}

body.day .login-box{
  background:transparent;
  border-color:transparent;
  box-shadow:none;
}

body.day .brand-row{border-bottom-color:#d8e1ec}
body.day .login-title{color:#0e2235;text-shadow:none}
body.day .brand-title{color:#000;text-shadow:none}
body.day label{color:#000}

body.day input{
  background:#ffffff;
  color:#000;
  border-color:#cbd8e5;
}

body.day button{
  background:#eaf2ff;
  color:#000;
  border-color:#9fc2ef;
}
body.day input::placeholder{color:#000;opacity:.72}
body.day .forgot-link{color:#1664c7}
body.day .privacy-link{background:#fff;color:#1664c7;border-color:#9fc2ef}
body.day .established{color:#0e2235;text-shadow:none}
body.day .privacy-panel{
  background:#fff;
  color:#0e2235;
  border-color:#cbd8e5;
}
body.day .privacy-panel-head{border-bottom-color:#d8e1ec}
body.day .privacy-panel-head h2,
body.day .privacy-body h3{color:#0e2235}
body.day .privacy-body{color:#334155}
body.day .privacy-close{background:#f3f7fb;color:#0e2235;border-color:#cbd8e5}

@media(max-width:640px){
  html,body{min-width:0}
  body{overflow:auto}
  .login-wrap{align-items:center;justify-content:center;padding:42px 18px 100px;transform:translateY(-10px)}
  .login-title{font-size:30px;letter-spacing:.13em;margin-bottom:40px;font-weight:520}
  .login-box{width:100%;padding:0;transform:none}
  .brand-row{grid-template-columns:84px 1fr;min-height:96px}
  .icon-wrap{width:68px;height:68px}
  .icon-wrap svg{width:42px;height:42px}
  .brand-title{font-size:25px}
  input{height:52px;font-size:15px}
  button{height:52px;font-size:16px}
  label{font-size:14px}
  .forgot-link{font-size:16px}
  .login-footer{left:16px;bottom:16px}
  .privacy-link{min-width:100px;min-height:31px;font-size:12px}
  .established{right:16px;bottom:24px;font-size:12px}
  .privacy-panel{max-height:84vh}
  .privacy-panel-head{padding:15px 16px}
  .privacy-panel-head h2{font-size:18px}
  .privacy-body{padding:18px 18px 22px;font-size:13px}
}
@media(max-width:380px){
  .login-title{font-size:27px;letter-spacing:.1em}
  .brand-row{grid-template-columns:1fr;text-align:center}
  .icon-wrap{margin:0 auto}
  .brand-title{font-size:22px}
}

/* === Desktop + phone usability final pass === */
@media(min-width:641px){
  body{overflow:hidden}
  .login-wrap{
    min-height:100vh;
  }
  .login-box{
    width:min(390px,calc(100vw - 48px));
  }
}
@media(max-width:640px){
  html,body{
    width:100%;
    min-width:0;
    overflow-x:hidden;
  }
  body{
    min-height:100svh;
  }
  .login-wrap{
    min-height:100svh;
    align-items:center;
    justify-content:center;
    padding:42px 18px 100px;
  }
  .login-box{
    max-width:390px;
    margin:0 auto;
    gap:18px;
  }
  input{
    height:52px;
  }
  button{
    height:52px;
  }
}
