/* ============================================================
   LOGIN.CSS - the sign-in screen only
   ------------------------------------------------------------
   index.html is the login page and loads style.css (for the
   colour tokens) plus this file. It deliberately does NOT load
   dashboard.css — none of the feature styling applies here.
   ============================================================ */

body.login{
  display:block;
  background:linear-gradient(160deg,#0d2c50,#0a2140 55%,#123a67);
  min-height:100vh;
  padding:0;
}

.loginwrap{
  min-height:100vh;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:28px 20px;
}

.loginbox{
  width:100%;
  max-width:440px;
  background:var(--panel);
  border-radius:18px;
  box-shadow:0 24px 60px rgba(4,18,38,.45);
  overflow:hidden;
}

.loginhead{
  padding:30px 30px 22px;
  border-bottom:1px solid var(--border);
}
.loginbrand{
  font-size:19px;
  font-weight:800;
  color:var(--text);
  margin-bottom:5px;
}
.loginsub{
  font-size:13px;
  color:var(--muted);
  line-height:1.55;
}

.loginbody{padding:24px 30px 30px}

.loginlabel{
  display:block;
  font-size:11px;
  font-weight:800;
  letter-spacing:.06em;
  text-transform:uppercase;
  color:var(--muted);
  margin-bottom:8px;
}

/* Demo account picker ------------------------------------- */

.acctlist{
  display:flex;
  flex-direction:column;
  gap:7px;
  max-height:330px;
  overflow-y:auto;
  margin-bottom:20px;
}

.acctopt{
  display:flex;
  align-items:center;
  gap:12px;
  width:100%;
  text-align:left;
  padding:11px 13px;
  border:1px solid var(--border);
  border-radius:11px;
  background:var(--panel);
  cursor:pointer;
  font-family:inherit;
  transition:border-color .12s ease,background .12s ease;
}
.acctopt:hover{border-color:var(--accent);background:var(--panel2)}
.acctopt:focus-visible{outline:2px solid var(--accent);outline-offset:1px}
.acctopt.sel{border-color:var(--accent);background:var(--panel2);box-shadow:inset 0 0 0 1px var(--accent)}

.acctav{
  width:36px;height:36px;flex-shrink:0;
  border-radius:50%;
  display:flex;align-items:center;justify-content:center;
  font-size:12.5px;font-weight:800;color:#fff;
  background:linear-gradient(135deg,var(--accent),var(--accent2));
}
.acctav.lv0{background:linear-gradient(135deg,#dc2626,#f87171)}
.acctav.lv2{background:linear-gradient(135deg,#d97706,#fbbf24)}
.acctav.lv3{background:linear-gradient(135deg,#2563eb,#60a5fa)}
.acctav.lv4{background:linear-gradient(135deg,#64748b,#94a3b8)}
.acctav.lv5{background:linear-gradient(135deg,#7c3aed,#a78bfa)}

.acctmeta{min-width:0;flex:1}
.acctnm{font-size:13.5px;font-weight:700;color:var(--text)}
.acctml{
  font-size:11.5px;color:var(--muted);
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
.acctrole{
  font-size:9.5px;font-weight:800;letter-spacing:.04em;
  padding:2px 7px;border-radius:20px;white-space:nowrap;
}

.loginbtn{
  width:100%;
  padding:12px;
  border:0;
  border-radius:10px;
  background:linear-gradient(135deg,var(--accent),var(--accent2));
  color:#fff;
  font-size:14px;
  font-weight:800;
  font-family:inherit;
  cursor:pointer;
}
.loginbtn:disabled{opacity:.45;cursor:not-allowed;filter:grayscale(.6)}

/* Google path (inactive until CLIENT_ID is set) ------------ */

.logindiv{
  display:flex;align-items:center;gap:12px;
  margin:20px 0;
  color:var(--muted);font-size:11px;font-weight:700;letter-spacing:.06em;
}
.logindiv::before,.logindiv::after{
  content:"";flex:1;height:1px;background:var(--border);
}

.gbtn{
  width:100%;
  display:flex;align-items:center;justify-content:center;gap:10px;
  padding:11px;
  border:1px solid var(--border);
  border-radius:10px;
  background:var(--panel);
  font-size:13.5px;font-weight:700;font-family:inherit;
  color:var(--text);
  cursor:pointer;
}
.gbtn:hover:not(:disabled){border-color:var(--accent)}
.gbtn:disabled{opacity:.5;cursor:not-allowed}

.loginerr{
  margin-top:14px;
  padding:10px 12px;
  background:#fef2f2;
  border:1px solid #fecaca;
  border-radius:8px;
  color:#b91c1c;
  font-size:12.5px;
  line-height:1.5;
}

.loginfoot{
  padding:14px 30px;
  background:var(--panel2);
  border-top:1px solid var(--border);
  font-size:11.5px;
  color:var(--muted);
  line-height:1.5;
}

@media(max-width:520px){
  .loginhead,.loginbody{padding-left:20px;padding-right:20px}
  .loginfoot{padding-left:20px;padding-right:20px}
}

  /* The second way in: username and password, open under the divider. */
  .pwfield{position:relative;margin:4px 0 12px}
  .logininput{width:100%;box-sizing:border-box;padding:11px 38px 11px 12px;
    font:inherit;font-size:14px;border:1px solid var(--border);border-radius:10px;
    background:var(--panel2);color:var(--text)}
  .logininput:focus{outline:2px solid var(--accent);outline-offset:-2px}
  #pwForm .loginlabel{margin-top:2px}

  /* Required marker. Red, because that is what a required marker is, and
     the two fields here really are both required. */
  .loginreq{color:#e0533d;font-weight:800}

  /* Filled, NOT verified — see the comment on the handler in index.html.
     Hidden until there is something in the box, so it never sits there
     ticking an empty field. */
  .pwtick{position:absolute;right:10px;top:50%;transform:translateY(-50%);
    width:20px;height:20px;border-radius:50%;background:var(--accent);color:#fff;
    font-size:11px;font-weight:800;line-height:20px;text-align:center;
    opacity:0;transition:opacity .12s ease;pointer-events:none}
  .pwfield.filled .pwtick{opacity:1}
