/* Polar Gate — one-page temporary landing
   Dark corporate theme, responsive, no external deps.
*/

:root{
  --bg0:#070b12;
  --bg1:#0b1220;
  --bg2:#101a2f;
  --text:#e9eefb;
  --muted:#aab6d3;
  --line:rgba(255,255,255,.12);
  --glass:rgba(12,18,32,.62);
  --shadow: 0 30px 80px rgba(0,0,0,.55);
  --radius: 18px;
  --accent: #79a6ff;
  --accent2:#67e8f9;
  --danger:#ff6b6b;
}

*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Noto Sans", "Liberation Sans", sans-serif;
  color:var(--text);
  background: linear-gradient(160deg, var(--bg0), var(--bg1) 45%, var(--bg2));
  overflow-x:hidden;

  /* keep footer at the bottom on short screens */
  min-height:100vh;
  display:flex;
  flex-direction:column;
}

.bg{
  position:fixed;
  inset:-20%;
  background:
    radial-gradient(900px 600px at 15% 20%, rgba(121,166,255,.22), transparent 60%),
    radial-gradient(800px 500px at 85% 30%, rgba(103,232,249,.10), transparent 60%),
    radial-gradient(900px 700px at 45% 85%, rgba(121,166,255,.10), transparent 60%),
    linear-gradient(180deg, rgba(255,255,255,.04), transparent 30%, transparent 70%, rgba(255,255,255,.03));
  pointer-events:none;
}

.topbar{
  position:relative;
  z-index:2;
  max-width: 1100px;
  margin: 0 auto;
  padding: 18px 18px;
  display:flex;
  align-items:center;
  justify-content:flex-start;
  gap:16px;
}

.brand{
  display:flex;
  align-items:center;
  gap:12px;
  min-width: 0;
}
.brand-mark{
  width:44px;
  height:44px;
  border-radius: 14px;
  background:
    radial-gradient(18px 18px at 30% 30%, rgba(103,232,249,.9), transparent 60%),
    radial-gradient(22px 22px at 70% 70%, rgba(121,166,255,.9), transparent 60%),
    linear-gradient(145deg, rgba(255,255,255,.18), rgba(255,255,255,.02));
  border: 1px solid var(--line);
  box-shadow: 0 10px 30px rgba(0,0,0,.35);
}
.brand-text{ min-width:0; }
.brand-name{
  font-weight: 720;
  letter-spacing: .2px;
  font-size: 16px;
  line-height: 1.15;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.brand-sub{
  margin-top: 2px;
  font-size: 12px;
  color: var(--muted);
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.wrap{
  flex: 1 0 auto;
  max-width: 1100px;
  margin: 0 auto;
  padding: 10px 18px 0;
  position:relative;
  z-index:1;
  width:100%;
}

.auth{
  min-height: calc(100vh - 82px - 56px); /* header + footer approx */
  display:grid;
  place-items:center;
  padding: 20px 0 28px;
}

.auth-card{
  width: min(520px, 100%);
  padding: 22px 20px 18px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255,255,255,.07), rgba(255,255,255,.04));
  backdrop-filter: blur(10px);
  box-shadow: 0 20px 60px rgba(0,0,0,.35);
}

.auth-title{
  margin: 0;
  font-size: 26px;
  letter-spacing: -0.2px;
  line-height: 1.15;
}
.auth-subtitle{
  margin: 8px 0 14px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

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

.field{
  display:flex;
  flex-direction:column;
  gap: 6px;
  text-align:left;
}
.field-label{
  font-size: 13px;
  color: var(--muted);
}

input{
  width:100%;
  padding: 12px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(0,0,0,.22);
  color: var(--text);
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
input::placeholder{ color: rgba(170,182,211,.65); }
input:focus{
  border-color: rgba(121,166,255,.55);
  box-shadow: 0 0 0 4px rgba(121,166,255,.18);
}

.form-actions{ margin-top: 4px; }

.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  width:100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  text-decoration:none;
  color: var(--text);
  background: rgba(255,255,255,.06);
  transition: transform .15s ease, background .15s ease, border-color .15s ease, opacity .15s ease;
  user-select:none;
  white-space:nowrap;
  cursor:pointer;
}
.btn:hover{
  transform: translateY(-1px);
  background: rgba(255,255,255,.10);
  border-color: rgba(255,255,255,.18);
}
.btn:active{ transform: translateY(0px); }

.btn-primary{
  background: linear-gradient(180deg, rgba(121,166,255,.22), rgba(255,255,255,.06));
  border-color: rgba(121,166,255,.30);
}
.btn-primary:hover{
  background: linear-gradient(180deg, rgba(121,166,255,.28), rgba(255,255,255,.08));
  border-color: rgba(121,166,255,.42);
}

.btn[disabled]{
  opacity: .78;
  cursor: default;
  transform: none !important;
}

.btn-spinner{
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(233,238,251,.28);
  border-top-color: rgba(233,238,251,.88);
  display:none;
}

.is-loading .btn-spinner{
  display:inline-block;
  animation: spin 0.75s linear infinite;
}

.is-loading .btn-text{
  opacity: .92;
}

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

.form-error{
  display:none;
  margin-top: 6px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255,107,107,.35);
  background: rgba(255,107,107,.10);
  color: rgba(255,220,220,.96);
  font-size: 13px;
  line-height: 1.45;
}

.has-error .form-error{ display:block; }

.has-error input{
  border-color: rgba(255,107,107,.65);
  box-shadow: 0 0 0 4px rgba(255,107,107,.16);
}

.auth-note{
  margin-top: 12px;
  color: rgba(170,182,211,.70);
  font-size: 12px;
}

.footer{
  margin-top: auto;
  border-top: 1px solid rgba(255,255,255,.08);
  background: rgba(0,0,0,.08);
}
.footer-inner{
  max-width: 1100px;
  margin: 0 auto;
  padding: 16px 18px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  color: var(--muted);
  font-size: 13px;
}
.footer-left, .footer-right{
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

@media (max-width: 640px){
  .footer-inner{ flex-direction:column; align-items:flex-start; }
  .auth{ min-height: auto; padding-top: 10px; }
}
