/* KAST Engineering Portal — public stylesheet.

   P0 gate `preauth_privacy`: everything served from public/ is world-readable,
   so this file carries only design tokens, the base reset and the minimal
   login/unauthorized states. All internal portal styling lives in
   functions/portal/internal.css and is delivered by the kastPortalShell
   callable to allowlisted users only. */

:root{--bg:#f5f4ef;--paper:#fff;--ink:#111;--muted:#74736f;--line:#deddd7;--orange:#f28a1a;--orange-soft:#fff3e3;--green:#277b52;--green-soft:#edf7f1;--red:#ad4848;--red-soft:#fff0ef;--shadow:0 12px 34px rgba(20,20,20,.06)}

*{box-sizing:border-box}
html,body{margin:0;min-height:100%;font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:var(--ink);background:var(--bg)}
button,input,textarea,select{font:inherit}
button{cursor:pointer}

.primary,.secondary{border-radius:9px;padding:10px 14px;font-weight:650}
.primary{border:1px solid #111;background:#111;color:#fff}
.primary:hover{background:#292929}
.primary:disabled{opacity:.45;cursor:not-allowed}
.secondary{background:#fff;border:1px solid var(--line);color:#333}

.gate{position:fixed;inset:0;z-index:1000;background:var(--bg);display:flex;align-items:center;justify-content:center;padding:24px}
.gate[hidden]{display:none}
.card{width:min(430px,100%);background:var(--paper);border:1px solid var(--line);border-radius:24px;padding:34px;box-shadow:0 24px 80px rgba(0,0,0,.08)}
.card img{width:190px;max-height:60px;object-fit:contain;object-position:left center;margin-bottom:32px}
.card h1{font-size:30px;margin:8px 0 10px;letter-spacing:-.02em}
.card p{color:var(--muted);line-height:1.55;margin:0 0 24px}
.card small{display:block;color:var(--muted);margin-top:16px}
.card .primary,.card .secondary{width:100%;justify-content:center;padding:13px 16px}
.card .note{margin:14px 0 0;font-size:12px;color:var(--red)}
/* Bootstrap failure code (SHELL_CALL_FAILED etc.) — a support-safe label, not
   an error message; kept quiet on purpose. */
#loadingCode{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:11px;letter-spacing:.04em;margin-top:6px;margin-bottom:10px}

.spinner{width:22px;height:22px;border-radius:50%;border:2px solid var(--line);border-top-color:var(--orange);animation:spin .8s linear infinite;margin:0 auto}
@keyframes spin{to{transform:rotate(360deg)}}
@media (prefers-reduced-motion:reduce){.spinner{animation-duration:2.4s}}
