/* AI Institute GM — sign-in gate, account and team access.
   Built on the board's own tokens (styles.css), so light and dark follow it. */

/* ---------- sign-in gate ---------- */
.gate{min-height:100vh;min-height:100dvh;display:flex;flex-direction:column;align-items:center;
  padding:calc(34px + env(safe-area-inset-top,0px)) 16px calc(28px + env(safe-area-inset-bottom,0px));
  background:
    radial-gradient(120% 60% at 50% -10%,rgba(126,160,255,.35),transparent 60%),
    linear-gradient(165deg,#0B1D5C 0%,#1B3A9C 52%,#2E56D3 100%);
  color:#fff}
.gate[hidden]{display:none}
.gate-brand{display:flex;flex-direction:column;align-items:center;gap:12px;margin:6px 0 24px;text-align:center}
.gate-brand img{height:62px;width:auto;display:block;filter:drop-shadow(0 6px 18px rgba(0,0,0,.25))}
.gate-brand h1{font-size:23px;color:#fff;font-weight:800;letter-spacing:-.02em}
.gate-brand h1 small{display:block;font-family:Archivo,sans-serif;font-weight:500;font-size:13px;color:rgba(255,255,255,.8);letter-spacing:0;margin-top:5px}
.gate-card{background:var(--surface);color:var(--ink);border-radius:18px;width:100%;max-width:430px;
  box-shadow:0 24px 60px -22px rgba(0,0,0,.55);border:1px solid var(--line);overflow:hidden;
  border-top:3px solid var(--gold)}
.gate-tabs{display:grid;grid-template-columns:1fr 1fr;background:var(--surface-2);border-bottom:1px solid var(--line)}
.gate-tabs button{padding:14px 8px 12px;border:0;background:none;font:inherit;font-weight:600;font-size:14px;color:var(--muted);
  cursor:pointer;border-bottom:2.5px solid transparent;min-height:48px}
.gate-tabs button:hover{color:var(--ink)}
.gate-tabs button[aria-selected="true"]{color:var(--brand);border-bottom-color:var(--brand);background:var(--surface)}
.gate-body{padding:20px 20px 22px;display:flex;flex-direction:column;gap:14px;margin:0}
.gate-body h2{font-size:20px;font-weight:800}
.gate-body p.sub{margin:5px 0 0;color:var(--muted);font-size:13.5px;line-height:1.45}
.gfield{display:flex;flex-direction:column;gap:6px}
.gfield label{font-size:12.5px;font-weight:600;color:var(--ink-2)}
.gfield input{height:48px;border:1px solid var(--line);border-radius:11px;padding:0 13px;font-size:16px;
  background:var(--surface);color:var(--ink);width:100%}
.gfield input:focus{outline:none;border-color:var(--brand-2);box-shadow:0 0 0 3px var(--brand-soft)}
.gfield .ghelp{font-size:11.5px;color:var(--muted)}
.pw-wrap{position:relative}
.pw-wrap input{padding-right:48px}
.pw-toggle{position:absolute;right:5px;top:50%;transform:translateY(-50%);width:40px;height:40px;border:0;background:none;
  color:var(--muted);border-radius:9px;cursor:pointer;display:grid;place-content:center}
.pw-toggle:hover,.pw-toggle.on{color:var(--brand);background:var(--brand-soft)}
.gbtn{height:50px;border-radius:12px;border:0;background:linear-gradient(180deg,var(--brand-2),var(--brand));color:#fff;
  font:inherit;font-weight:700;font-size:15.5px;cursor:pointer;box-shadow:0 6px 16px -8px rgba(27,58,156,.7);
  display:inline-flex;align-items:center;justify-content:center;gap:9px}
.gbtn:hover{filter:brightness(1.08)}
.gbtn[disabled]{opacity:.7;cursor:progress}
.glinks{display:flex;justify-content:space-between;gap:10px;flex-wrap:wrap}
.glink{background:none;border:0;color:var(--brand);font:inherit;font-weight:600;font-size:13.5px;cursor:pointer;padding:6px 0;text-align:left}
.glink:hover{text-decoration:underline}
.gmsg{border-radius:10px;padding:11px 13px;font-size:13.5px;line-height:1.45}
.gmsg.err{background:var(--bad-bg);color:var(--bad)}
.gmsg.ok{background:var(--ok-bg);color:var(--ok)}
.gmsg.info{background:var(--brand-soft);color:var(--ink-2)}
.gmsg b{font-weight:700}
.gate-foot{color:rgba(255,255,255,.72);font-size:12px;margin:18px 0 0;text-align:center;max-width:430px}
.gspin,.bspin{border-radius:50%;border:3px solid var(--brand-soft);border-top-color:var(--brand);animation:gspin .8s linear infinite}
.gspin{width:34px;height:34px;margin:6px auto 0}
.bspin{width:16px;height:16px;border-width:2px;border-color:rgba(255,255,255,.35);border-top-color:#fff}
@keyframes gspin{to{transform:rotate(360deg)}}
@media (max-width:480px){
  .gate{padding-top:calc(22px + env(safe-area-inset-top,0px))}
  .gate-brand{margin-bottom:18px}
  .gate-brand img{height:52px}
  .gate-brand h1{font-size:20px}
  .gate-body{padding:18px 16px 20px}
}

/* ---------- masthead: sign out ---------- */
.signout{display:inline-grid;place-content:center;width:32px;height:32px;border-radius:10px;border:1px solid rgba(255,255,255,.3);
  background:rgba(255,255,255,.1);color:#fff;cursor:pointer;flex:none}
.signout:hover{background:rgba(255,255,255,.2)}
.signout svg{width:16px;height:16px}
.signout[hidden]{display:none}
.signout .ic-me{display:none}
@media (max-width:640px){
  .signout{width:38px;height:38px;margin-left:auto}
  .signout .ic-out{display:none}
  .signout .ic-me{display:block;width:18px;height:18px}
}
.accesspill.owner{background:rgba(232,182,90,.28);border-color:rgba(232,182,90,.7)}

/* ---------- team access ---------- */
.acc-tbl td{vertical-align:middle}
.acc-tbl select{width:auto;min-width:150px}
.acc-dot{display:inline-block;width:10px;height:10px;border-radius:50%;margin-right:8px;vertical-align:0}
.acc-off td{opacity:.6}
.acc-pend td{background:var(--gold-soft)}
.invcode{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-weight:800;letter-spacing:.14em;color:var(--ink)}
.invbig{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:34px;font-weight:800;letter-spacing:.24em;text-align:center;
  padding:12px;margin-bottom:12px;border-radius:12px;background:var(--gold-soft);color:var(--ink);border:1px dashed var(--gold)}
.acc-roles{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:9px;margin-top:14px}
.acc-roles div{background:var(--surface-2);border:1px solid var(--line-soft);border-radius:11px;padding:10px 12px;font-size:12.5px;color:var(--muted);line-height:1.45}
.acc-roles b{display:block;color:var(--ink);font-size:13px;margin-bottom:2px}
.acc-roles div.mine{border-color:var(--brand-2);background:var(--brand-soft)}
.acc-actions{display:flex;gap:8px;flex-wrap:wrap}
#access-card .card-bd .tablescroll{margin:0 -16px}
.ownerlock{font-size:11.5px;color:var(--muted);display:flex;align-items:center;gap:6px}
@media (max-width:820px){ #access-card .card-bd .tablescroll{margin:0} }

/* ---------- recovery key ---------- */
.gcheck{display:flex;align-items:center;gap:10px;font-size:13.5px;color:var(--ink-2);cursor:pointer}
.gcheck input{width:20px;height:20px;accent-color:var(--brand)}
