/* --- Reset & base --- */
* { box-sizing: border-box; }
:root{
  --bg1:#ffffff; --bg2:#ffffff; --accent:#1d1d1f; --accent2:#3a3a3c;
  --text:#333333; --muted:#6e6e73; --card:#ffffff; --ring:#8e8e93;
  --ok:#17b26a; --err:#ff4d4f;
}
html,body{ height:100%; }
body{
  margin:0; font-family: ui-sans-serif,system-ui,Segoe UI,Roboto,Arial;
  color:var(--text); background:#ffffff;
  display:grid; place-items:center; padding:24px;
}

/* --- Background glow layer --- */
.bg-aurora{
  display:none;
}

/* --- Card --- */
.login-container{
  width:min(410px, 92vw); padding:28px 24px 22px; border-radius:18px;
  box-shadow: 0 10px 30px rgba(0,0,0,.08);
  position:relative; overflow:hidden;
}
.glass{ background: var(--card); border:1px solid rgba(0,0,0,.08); }

/* --- Branding --- */
.logo-container{ display:flex; justify-content:center; margin-bottom:8px; }
.logo-img{ width:180px; height:auto; filter: drop-shadow(0 4px 16px rgba(0,0,0,.35)); }

.title{ text-align:center; margin:6px 0 4px; font-weight:700; letter-spacing:.2px; }
.subtitle{ text-align:center; margin:0 0 14px; color:var(--muted); font-size:.95rem; }

/* --- Form --- */
.form{ display:flex; flex-direction:column; gap:10px; }
label{ font-size:.85rem; color:var(--muted); margin-top:6px; }

.input-wrap{ position:relative; }
.input-wrap input{
  width:100%; background:#ffffff; color:var(--text); border:1px solid #d2d2d7;
  border-radius:12px; padding:14px 14px; outline:0; font-size:1rem; transition:.2s border, .2s box-shadow, .2s transform, .2s background;
}
.input-wrap.has-icon input{ padding-right:44px; }
.icon-btn{
  position:absolute; right:8px; top:50%; transform:translateY(-50%); border:0; background:transparent;
  width:32px; height:32px; display:grid; place-items:center; cursor:pointer; opacity:.8;
}
.icon{ width:20px; height:20px; fill:#8e8e93; }
.icon-btn:hover .icon{ fill:#5c5c62; }

.input-wrap input:focus{
  border-color:var(--ring);
  box-shadow:0 0 0 4px rgba(142,142,147,.18);
}
.focus-ring{ position:absolute; inset:-2px; border-radius:14px; pointer-events:none; }

/* --- Buttons --- */
.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  border:1px solid #d2d2d7; border-radius:12px; padding:12px 14px;
  font-weight:600; cursor:pointer; transition:.2s transform, .25s background, .25s border, .25s opacity, .25s box-shadow;
  background: #f5f5f7;
  color:#1d1d1f;
}
.btn:hover{ transform: translateY(-1px); }
.btn:active{ transform: translateY(0); }

.btn.primary{
  background: #1d1d1f;
  color: #ffffff;
  border-color: #1d1d1f;
}
.btn.primary:disabled{ opacity:.65; cursor:not-allowed; }

.btn.ghost{
  background: transparent; color:var(--text);
  border-color: #d2d2d7;
}

.btn-label{ position:relative; z-index:1; }
.spinner{
  width:16px; height:16px; border-radius:50%;
  border:2px solid rgba(0,0,0,.35); border-top-color: transparent;
  display:none; animation: spin 0.8s linear infinite;
}
@keyframes spin{ to{ transform: rotate(360deg); } }

/* --- Links / helper text --- */
.links{ display:flex; justify-content:center; margin:10px 0 0; }
.link-btn{
  background:none; border:0; color:#6e6e73; cursor:pointer; font-size:.95rem; padding:6px 8px;
}
.link-btn:hover{ color:#1d1d1f; text-decoration:underline; }

.inline-error{ margin-top:10px; min-height:20px; text-align:center; color:var(--err); }

/* --- Footer --- */
.powered-by{ margin-top:18px; text-align:center; color:#9aa3b2; font-size:.85rem; }
.powered-by strong{ color:#dfe3f3; }

/* --- Modal --- */
.modal{ position:fixed; inset:0; display:none; place-items:center; background: rgba(6,10,20,.6); padding:16px; }
.modal[aria-hidden="false"]{ display:grid; }
.modal-card{
  width:min(420px,92vw); background:#ffffff; color:var(--text);
  border:1px solid #e5e5ea; border-radius:16px; padding:18px; box-shadow:0 12px 40px rgba(0,0,0,.12);
}
.modal-card h3{ margin:0 0 6px; }
.modal-card p{ margin:0 0 12px; color:var(--muted); }
.modal-actions{ display:flex; gap:10px; justify-content:flex-end; margin-top:12px; }

/* --- Toast --- */
.toast{
  position:fixed; left:50%; bottom:22px; transform:translateX(-50%) translateY(20px);
  background:#ffffff; color:#1d1d1f; border:1px solid #e5e5ea;
  padding:10px 14px; border-radius:12px; box-shadow:0 8px 30px rgba(0,0,0,.12);
  opacity:0; pointer-events:none; transition:.25s transform, .25s opacity;
}
.toast.show{ opacity:1; transform:translateX(-50%) translateY(0); }
.toast.ok{ border-color: rgba(23,178,106,.5); }
.toast.err{ border-color: rgba(255,77,79,.5); }

.powered-by .powered-link{
  color: #14b935;
  text-decoration: none;
}
.powered-by .powered-link:hover{
  text-decoration: underline;
  opacity: .9;
}