/* ═══════════════════════════════════════════════════════════════════════
   RWA Auth UI — IBM Plex Sans · Institutional theme · Light + Dark
   ═══════════════════════════════════════════════════════════════════════ */

/* Auth overlay */
.auth-overlay { position:fixed;inset:0;z-index:9900;background:rgba(15,23,42,.45);backdrop-filter:blur(3px);display:none;align-items:center;justify-content:center;padding:20px; }
body.dark .auth-overlay { background:rgba(0,0,0,.65); }
.auth-overlay.open { display:flex; }

/* Auth modal */
.auth-modal { background:var(--bg-panel);border:1px solid var(--border-mid);border-radius:var(--r-lg);width:min(100%,420px);box-shadow:var(--sh5);overflow:hidden;position:relative;max-height:90vh;overflow-y:auto;transition:background .2s ease; }
.auth-modal-top { display:flex;align-items:center;justify-content:space-between;padding:18px 22px 0; }
.auth-logo-wrap { display:flex;align-items:center;gap:8px;font-size:13px;font-weight:600;color:var(--text-primary); }
.auth-logo-icon { font-size:18px; }
.auth-x { width:28px;height:28px;border-radius:var(--r);background:var(--bg-hover);border:none;cursor:pointer;font-size:12px;color:var(--text-tertiary);transition:background .15s;display:flex;align-items:center;justify-content:center; }
.auth-x:hover { background:var(--border-mid);color:var(--text-primary); }

/* Tabs */
.auth-tabs { display:flex;padding:14px 22px 0;border-bottom:1px solid var(--border); }
.auth-tab { flex:1;padding:8px 4px;text-align:center;font-size:12.5px;font-weight:500;color:var(--text-muted);cursor:pointer;border-bottom:2px solid transparent;margin-bottom:-1px;transition:all .15s;background:none;border-top:none;border-left:none;border-right:none; }
.auth-tab:hover:not(.active) { color:var(--text-tertiary); }
.auth-tab.active { color:var(--text-primary);border-bottom-color:var(--accent); }

/* Messages */
.auth-msg { margin:10px 22px 0;padding:10px 12px;border-radius:var(--r);font-size:12px;line-height:1.5; }
.auth-msg.error   { background:var(--risk-high-bg);color:var(--risk-high-text);border:1px solid var(--risk-high-border); }
.auth-msg.success { background:var(--risk-low-bg);color:var(--risk-low-text);border:1px solid var(--risk-low-border); }

/* Form */
.auth-pane { padding:18px 22px 22px; }
.auth-pane label { display:block;margin-bottom:14px;font-size:11.5px;font-weight:500;color:var(--text-secondary); }
.auth-pane input { display:block;width:100%;margin-top:5px;padding:9px 11px;border:1px solid var(--border);border-radius:var(--r);font-size:13px;color:var(--text-primary);background:var(--bg-base);transition:border-color .15s,background .2s;box-sizing:border-box;font-family:var(--body); }
.auth-pane input:focus { outline:none;border-color:var(--border-mid); }
.auth-link-sm { display:block;text-align:right;margin-top:4px;font-size:11px;color:var(--accent);cursor:pointer;font-weight:400; }
.auth-link-sm:hover { text-decoration:underline; }

/* Google button */
.google-btn { width:100%;padding:10px 14px;margin-bottom:2px;display:flex;align-items:center;justify-content:center;gap:10px;background:var(--bg-panel);color:var(--text-primary);border:1px solid var(--border);border-radius:var(--r);font-size:13px;font-weight:500;cursor:pointer;transition:all .15s;box-shadow:var(--sh1);font-family:var(--body); }
.google-btn:hover { border-color:var(--border-mid);box-shadow:var(--sh2);background:var(--bg-hover); }
.google-btn:disabled { opacity:.55;cursor:not-allowed; }

/* Divider */
.auth-or { display:flex;align-items:center;gap:10px;margin:14px 0;color:var(--text-muted);font-size:11px; }
.auth-or::before,.auth-or::after { content:'';flex:1;height:1px;background:var(--border); }

/* Submit */
.auth-submit { width:100%;padding:10px;margin-top:4px;background:var(--text-primary);color:var(--bg-panel);border:none;border-radius:var(--r);font-size:13px;font-weight:600;cursor:pointer;transition:opacity .15s;font-family:var(--body); }
.auth-submit:hover    { opacity:.88; }
.auth-submit:disabled { opacity:.50;cursor:not-allowed; }

/* Footer note */
.auth-foot-note { margin-top:13px;text-align:center;font-size:11px;color:var(--text-muted);line-height:1.6; }
.auth-foot-note a { color:var(--accent);text-decoration:none; }
.auth-foot-note a:hover { text-decoration:underline; }
