* , *::before , *::after { box-sizing: border-box; margin: 0; padding: 0; }
@font-face {
  font-family: 'Figtree';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("../New branding/Figtree/Figtree-VariableFont_wght.ttf") format('truetype');
}

@font-face {
  font-family: 'Figtree';
  font-style: italic;
  font-weight: 400 600;
  font-display: swap;
  src: url("../New branding/Figtree/Figtree-Italic-VariableFont_wght.ttf") format('truetype');
}

:root {
  --bg: #182430; --surface: rgba(44,58,72,0.92); --surface2: rgba(36,50,64,0.72);
  --border: rgba(255,255,255,0.10); --border2: rgba(255,255,255,0.14);
  --text: #f8fafc; --muted: #a2a8b6; --faint: #66748a;
  --black: #182430; --white: #ffffff;
  --green: #22c55e; --green-bg: rgba(34,197,94,0.10); --green-dim: rgba(34,197,94,0.06);
  --blue: #60a5fa; --blue-bg: rgba(96,165,250,0.10); --blue-dim: rgba(96,165,250,0.06);
  --red: #ff7759; --red-bg: rgba(255,119,89,0.10); --red-dim: rgba(255,119,89,0.06);
  --accent: #ffcc33; --accent-bg: rgba(255,204,51,0.16);
  --card-bg: rgba(44,58,72,0.92);
  --card-border: rgba(255,255,255,0.10);
  --radius: 14px; --radius-lg: 22px;
  --font: 'Figtree', sans-serif; --mono: 'IBM Plex Mono', monospace;
}
:root[data-theme="light"] {
  --bg: #FAF8F2; --surface: #F6F5F1; --surface2: #FAF4F2;
  --border: rgba(24,58,72,0.08); --border2: rgba(24,58,72,0.12);
  --text: #182430; --muted: #475569; --faint: #6B7A8D;
  --green-bg: rgba(178,234,224,0.25); --green-dim: rgba(178,234,224,0.14);
  --blue-bg: rgba(96,165,250,0.15); --blue-dim: rgba(96,165,250,0.08);
  --red: #ff7759; --red-bg: rgba(255,119,89,0.12); --red-dim: rgba(255,119,89,0.06);
  --accent: #ffcc33; --accent-bg: rgba(255,204,51,0.16);
  --card-bg: rgba(246,245,241,0.92);
  --card-border: rgba(24,58,72,0.10);
}
html, body { height: 100%; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 15px; line-height: 1.65; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
#app { min-height: 100vh; display: flex; flex-direction: column; }
.topbar { height: 58px; display: flex; align-items: center; padding: 0 26px; gap: 12px; flex-shrink: 0; background: var(--surface2); border-bottom: 1px solid var(--border); backdrop-filter: blur(22px); -webkit-backdrop-filter: blur(22px); position: relative; z-index: 10; }
.topbar-logo { display: flex; align-items: center; gap: 10px; }
.topbar-logo img, .topbar-logo svg { width: 24px; height: 24px; opacity: 0.9; }
.topbar-wordmark { font-size: 14px; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase; color: var(--text); }
.topbar-sep { flex: 1; }
.topbar-user { display: flex; align-items: center; gap: 10px; opacity: 0; transition: opacity 0.3s; }
.topbar-user.visible { opacity: 1; }
.topbar-tenant { font-size: 11px; letter-spacing: 0.14em; color: var(--text); background: var(--surface2); border: 1px solid var(--border); padding: 4px 10px; border-radius: 20px; font-family: var(--mono); text-transform: uppercase; }
.topbar-email { font-size: 13px; color: var(--muted); font-family: var(--font); }
.signout-btn { background: none; border: 1px solid var(--border2); color: var(--muted); font-family: var(--font); font-size: 12px; padding: 5px 12px; border-radius: 6px; cursor: pointer; transition: border-color 0.15s, color 0.15s; }
.signout-btn:hover { border-color: var(--accent); color: var(--text); }
/* Topbar back button (shown when form is fullscreen) */
.topbar-back { display: inline-flex; align-items: center; justify-content: center; background: none; border: none; color: var(--muted); padding: 6px 8px; margin-left: 8px; cursor: pointer; }
.topbar-back svg { width: 16px; height: 16px; }
.topbar-theme-toggle { display: inline-flex; align-items: center; justify-content: center; background: none; border: 1px solid var(--border2); color: var(--muted); border-radius: 8px; font-size: 14px; padding: 6px 10px; cursor: pointer; transition: background 0.15s, border-color 0.15s, color 0.15s; }
.topbar-theme-toggle:hover { background: var(--accent-bg); border-color: var(--accent); color: var(--text); }
main { flex: 1; display: flex; align-items: center; justify-content: center; padding: 52px 24px; min-height: calc(100vh - 58px); background: url("./BG 2.svg") top center/cover scroll no-repeat; background-color: var(--bg); }
.screen { display: none; width: 100%; max-width: 440px; animation: fadeUp 0.3s ease; }
.screen.wide-screen { max-width: 900px; }
.notice { color: var(--muted); background: var(--surface2); border: 1px solid var(--border); border-radius: 14px; padding: 22px; text-align: center; font-size: 14px; }
.screen.active { display: block; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 34px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 30px 80px rgba(0,0,0,0.18);
}
.centered-card { text-align: center; }
.progress { display: flex; gap: 6px; margin-bottom: 28px; }
.progress-step { height: 3px; flex: 1; border-radius: 2px; background: var(--faint); transition: background 0.4s; }
.progress-step.done { background: var(--text); }
.progress-step.active { background: var(--accent); }
.login-header { text-align: center; margin-bottom: 34px; }
.login-icon { width: 56px; height: 56px; border-radius: 16px; background: var(--surface2); border: 1px solid var(--border2); display: flex; align-items: center; justify-content: center; margin: 0 auto 18px; }
.login-icon svg { width: 24px; height: 24px; opacity: 0.7; }
h1 { font-size: 26px; font-weight: 600; margin-bottom: 8px; letter-spacing: -0.01em; }
.login-sub { font-size: 14px; color: var(--muted); }
.ms-btn { width: 100%; display: flex; align-items: center; justify-content: center; gap: 12px; background: var(--accent); border: 1px solid transparent; color: var(--black); font-family: var(--font); font-size: 14px; font-weight: 600; padding: 14px 22px; border-radius: var(--radius); cursor: pointer; transition: transform 0.15s, background 0.15s, color 0.15s; margin-bottom: 16px; }
.ms-btn:hover { transform: translateY(-1px); background: rgba(255,204,51,0.95); }
.ms-btn:active { transform: scale(0.99); }
.ms-logo { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5px; width: 18px; height: 18px; flex-shrink: 0; }
.ms-logo-dot { width: 100%; height: 100%; display: block; border-radius: 1px; }
.ms-logo-dot-1 { background: #f25022; }
.ms-logo-dot-2 { background: #7fba00; }
.ms-logo-dot-3 { background: #00a4ef; }
.ms-logo-dot-4 { background: #ffb900; }
.form-footer-icon { width: 14px; height: 14px; flex-shrink: 0; }
.login-note { font-size: 11px; color: var(--muted); text-align: center; line-height: 1.7; }
.login-note a { color: var(--muted); text-decoration: underline; }
.denied-icon { width: 52px; height: 52px; border-radius: 14px; background: var(--red-bg); border: 1px solid rgba(248,113,113,0.25); display: flex; align-items: center; justify-content: center; margin: 0 auto 16px; }
.denied-icon svg { width: 24px; height: 24px; stroke: var(--red); opacity: 0.8; }
.denied-email { font-family: var(--mono); font-size: 12px; color: var(--text); background: var(--surface2); border: 1px solid var(--border); border-radius: 6px; padding: 6px 12px; display: inline-block; margin: 8px 0 20px; }
.denied-title { font-size: 18px; font-weight: 500; margin-bottom: 6px; }
.denied-subtitle { font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.denied-note { font-size: 12px; color: var(--faint); margin-bottom: 24px; line-height: 1.7; }
.screen-heading { margin-bottom: 20px; }
.screen-heading h2 { font-size: 20px; font-weight: 600; margin-bottom: 6px; }
.screen-heading p { font-size: 13px; color: var(--muted); }
.jml-options { display: flex; flex-direction: column; gap: 10px; }
.jml-btn { display: flex; align-items: center; gap: 16px; padding: 20px 22px; background: var(--surface); border: 1px solid var(--border); border-radius: 18px; cursor: pointer; transition: border-color 0.2s, background 0.2s, transform 0.15s; text-align: left; width: 100%; font-family: var(--font); color: var(--text); position: relative; overflow: hidden; }
.jml-btn:hover { transform: translateY(-1px); }
.jml-btn::before { content: ''; position: absolute; inset: 0; opacity: 0; transition: opacity 0.2s; }
.jml-btn:hover::before { opacity: 1; background: var(--accent-bg); }
.jml-btn.joiner { --clr: var(--green); --bg-clr: var(--green-bg); --dim: var(--green-dim); }
.jml-btn.mover { --clr: var(--blue); --bg-clr: var(--blue-bg); --dim: var(--blue-dim); }
.jml-btn.leaver { --clr: var(--red); --bg-clr: var(--red-bg); --dim: var(--red-dim); }
.jml-btn::before { background: var(--dim); }
.jml-btn:hover { border-color: var(--clr); }
.jml-dot { width: 40px; height: 40px; border-radius: 10px; background: var(--bg-clr); border: 1px solid var(--clr); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.jml-dot svg { width: 18px; height: 18px; stroke: var(--clr); }
.jml-label { font-size: 15px; font-weight: 500; }
.jml-desc { font-size: 12px; color: var(--muted); margin-top: 1px; }
.jml-arrow { margin-left: auto; color: var(--muted); flex-shrink: 0; font-size: 18px; }
.jml-btn.disabled { opacity: 0.3; cursor: not-allowed; pointer-events: none; }
.jml-btn.disabled:hover { border-color: var(--border); }
.jml-btn.disabled::before { display: none; }
.form-chrome { background: var(--surface2); border: none; border-radius: var(--radius-lg); overflow: hidden; box-shadow: 0 24px 60px rgba(0,0,0,0.18); transition: border-color 0.2s, background 0.2s; }
.form-chrome.joiner { background: linear-gradient(180deg, rgba(34,197,94,0.10), rgba(24,24,28,0.95)); border: 1px solid rgba(34,197,94,0.22); }
.form-chrome.mover  { background: linear-gradient(180deg, rgba(96,165,250,0.10), rgba(24,24,28,0.95)); border: 1px solid rgba(96,165,250,0.22); }
.form-chrome.leaver { background: linear-gradient(180deg, rgba(248,113,113,0.10), rgba(24,24,28,0.95)); border: 1px solid rgba(248,113,113,0.22); }
#form-iframe { width: 100%; min-height: 76vh; max-height: 860px; border: none; display: block; background: #fff; }
.form-footer { background: transparent; border-top: none; padding: 16px 20px; display: flex; align-items: center; gap: 10px; color: var(--muted); }
.form-chrome.joiner .form-footer-note { color: #c8f7d1; }
.form-chrome.mover .form-footer-note  { color: #c7e5ff; }
.form-chrome.leaver .form-footer-note { color: #f8c9c9; }

/* Fullscreen form panel */
.form-chrome.fullscreen { position: fixed; top: 52px; left: 0; right: 0; bottom: 0; border-radius: 0; box-shadow: none; z-index: 400; }
.form-chrome.fullscreen #form-iframe { height: calc(100vh - 52px); min-height: calc(100vh - 52px); max-height: none; }
.back-btn.hidden { display: none; }
.form-footer-note { font-size: 11px; color: var(--muted); }
.back-btn { display: flex; align-items: center; gap: 6px; background: none; border: none; color: var(--muted); font-family: var(--font); font-size: 13px; cursor: pointer; padding: 0; margin-bottom: 16px; transition: color 0.15s; }
.back-btn:hover { color: var(--text); }
.back-btn svg { width: 14px; height: 14px; }
.btn-outline { width: 100%; background: none; color: var(--muted); border: 1px solid var(--border2); border-radius: var(--radius); padding: 13px; font-family: var(--font); font-size: 14px; cursor: pointer; transition: border-color 0.15s, color 0.15s; }
.btn-outline:hover { border-color: var(--accent); color: var(--text); }
#error-banner { opacity: 0; pointer-events: none; position: fixed; top: 60px; left: 50%; transform: translateX(-50%) translateY(-8px); background: var(--red-bg); border: 1px solid rgba(248,113,113,0.25); color: var(--red); font-size: 13px; padding: 10px 20px; border-radius: 8px; z-index: 999; white-space: nowrap; transition: opacity 0.2s ease, transform 0.2s ease; }
#error-banner.visible { opacity: 1; transform: translateX(-50%) translateY(0); pointer-events: auto; }
#loading-overlay { display: none; position: fixed; inset: 0; background: rgba(15,15,17,0.7); backdrop-filter: blur(4px); z-index: 500; align-items: center; justify-content: center; }
#loading-overlay.active { display: flex; }
.spinner { width: 28px; height: 28px; border: 2px solid var(--faint); border-top-color: var(--text); border-radius: 50%; animation: spin 0.7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (max-width: 500px) { .card { padding: 24px 20px; } #form-iframe { min-height: 56vh; max-height: 620px; } .topbar-email { display: none; } }

