/* Qube Accountants · Summit Replay — shared styles */
:root {
  --blue: #004aad;
  --blue-600: #003f94;
  --blue-700: #00347a;
  --navy: #0b2350;
  --navy-2: #0f2c63;
  --yellow: #ffc72c;
  --yellow-600: #f0b400;
  --sky: #bdd0ee;
  --bg: #eef3fc;
  --card: #ffffff;
  --line: #d9e2f1;
  --line-2: #e8eef8;
  --chip: #e9f0fb;
  --ink: #0b2350;
  --ink-2: #3c4f72;
  --muted: #6a7b99;
  --green: #12805c;
  --green-bg: #e3f5ee;
  --red: #c0392b;
  --red-bg: #fdecea;
  --amber-bg: #fff6d9;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(11, 35, 80, .06), 0 6px 22px rgba(11, 35, 80, .06);
  --font-head: 'Poppins', system-ui, sans-serif;
  --font-body: 'Source Sans 3', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font-body); font-size: 16px; line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { font-family: var(--font-head); color: var(--navy); margin: 0; line-height: 1.25; letter-spacing: -.01em; }
a { color: var(--blue); }
img { max-width: 100%; display: block; }
button { font: inherit; }
[hidden] { display: none !important; }
.wrap { width: 100%; max-width: 1220px; margin: 0 auto; padding: 0 20px; }
@media (max-width: 600px) { .wrap { padding: 0 16px; } }

/* ---------- buttons & form ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1.5px solid transparent; border-radius: 10px; padding: 11px 18px;
  font-family: var(--font-head); font-weight: 600; font-size: 14.5px; line-height: 1.2;
  cursor: pointer; text-decoration: none; transition: background .15s, border-color .15s, color .15s, transform .05s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.primary { background: var(--blue); color: #fff; }
.btn.primary:hover:not(:disabled) { background: var(--blue-600); }
.btn.yellow { background: var(--yellow); color: var(--navy); }
.btn.yellow:hover:not(:disabled) { background: var(--yellow-600); }
.btn.ghost { background: #fff; color: var(--navy); border-color: var(--line); }
.btn.ghost:hover:not(:disabled) { border-color: var(--blue); color: var(--blue); }
.btn.danger { background: var(--red); color: #fff; }
.btn.danger:hover:not(:disabled) { background: #a3301f; }
.btn.link { background: none; border: 0; padding: 4px 2px; color: var(--blue); font-weight: 600; }
.btn.link:hover { text-decoration: underline; }
.btn.sm { padding: 7px 12px; font-size: 13px; border-radius: 8px; }
.btn.block { width: 100%; }
.btn .spin { width: 15px; height: 15px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

label.field { display: block; margin-bottom: 14px; }
label.field > span { display: block; font-weight: 600; font-size: 14px; color: var(--ink-2); margin-bottom: 6px; }
.input, textarea.input, select.input {
  width: 100%; border: 1.5px solid var(--line); border-radius: 10px; background: #fff;
  padding: 11px 13px; font: inherit; color: var(--ink); outline: none; transition: border-color .15s, box-shadow .15s;
}
.input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(0, 74, 173, .14); }
textarea.input { resize: vertical; min-height: 90px; line-height: 1.45; }
.input.code { font-family: var(--font-head); font-size: 26px; font-weight: 600; letter-spacing: .32em; text-align: center; padding: 12px 8px; }
.hint { font-size: 13.5px; color: var(--muted); }
.err { color: var(--red); font-size: 14px; margin: -4px 0 12px; }

.chip {
  display: inline-block; background: var(--chip); color: var(--ink-2); border-radius: 7px;
  padding: 4px 10px; font-size: 13.5px; line-height: 1.35;
}
.pill { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 3px 10px; font-size: 12.5px; font-weight: 700; font-family: var(--font-head); }
.pill.green { background: var(--green-bg); color: var(--green); }
.pill.red { background: var(--red-bg); color: var(--red); }
.pill.grey { background: var(--line-2); color: var(--muted); }
.pill.amber { background: var(--amber-bg); color: #8a6200; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: #b6c2d6; display: inline-block; flex: none; }
.dot.live { background: #18b47b; box-shadow: 0 0 0 3px rgba(24, 180, 123, .2); }

.kicker { font-family: var(--font-head); font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }

/* ---------- preview banner ---------- */
.demo-bar {
  background: var(--yellow); color: var(--navy); font-size: 14px; padding: 9px 16px;
  display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; justify-content: center; text-align: center;
}
.demo-bar b { font-family: var(--font-head); }
.demo-bar button { background: var(--navy); color: #fff; border: 0; border-radius: 7px; padding: 5px 11px; font-size: 13px; font-weight: 600; cursor: pointer; }

/* ---------- auth screens ---------- */
.auth {
  min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr;
}
.auth-brand {
  background: var(--blue); color: #fff; padding: 48px 56px; display: flex; flex-direction: column; justify-content: space-between;
  position: relative; overflow: hidden;
}
.auth-brand::after {
  content: ''; position: absolute; right: -140px; bottom: -160px; width: 480px; height: 480px;
  background: url('assets/qube-mark.svg') center/contain no-repeat; opacity: .07; pointer-events: none;
}
.auth-brand .presents { font-family: var(--font-head); font-weight: 600; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--yellow); }
.auth-brand .summit { max-width: 440px; width: 100%; margin: 36px 0 22px; }
.auth-brand h1 { color: #fff; font-size: clamp(26px, 3vw, 36px); max-width: 15em; }
.auth-brand p { color: var(--sky); font-size: 17px; max-width: 30em; margin: 14px 0 0; }
.auth-brand .meta { font-family: var(--font-head); letter-spacing: .14em; text-transform: uppercase; font-size: 13px; color: var(--sky); font-weight: 600; }
.auth-panel { display: flex; align-items: center; justify-content: center; padding: 40px 24px; }
.auth-card { width: 100%; max-width: 420px; }
.auth-card h2 { font-size: 26px; margin-bottom: 8px; }
.auth-card .lede { color: var(--ink-2); margin: 0 0 24px; }
.auth-card .foot { margin-top: 22px; font-size: 14px; color: var(--muted); }
.auth-card .note {
  display: flex; gap: 10px; align-items: flex-start; background: #fff; border: 1px solid var(--line);
  border-radius: 10px; padding: 12px 14px; font-size: 14px; color: var(--ink-2); margin-top: 22px;
}
.auth-card .note svg { flex: none; margin-top: 2px; color: var(--blue); }
.noaccess { background: var(--amber-bg); border: 1px solid #f3dc8f; border-radius: 10px; padding: 12px 14px; font-size: 14.5px; margin-bottom: 14px; }
@media (max-width: 860px) {
  .auth { grid-template-columns: 1fr; }
  .auth-brand { padding: 28px 20px 30px; }
  .auth-brand .summit { margin: 22px 0 14px; max-width: 320px; }
  .auth-brand p { font-size: 15.5px; }
  .auth-brand .meta { display: none; }
  .auth-panel { align-items: flex-start; padding: 28px 16px 48px; }
}

/* ---------- status screens (kicked / revoked) ---------- */
.status-screen { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px 16px; }
.status-card { background: #fff; border-radius: 18px; box-shadow: var(--shadow); max-width: 480px; width: 100%; padding: 36px 32px; text-align: center; }
.status-card .icon { width: 64px; height: 64px; border-radius: 50%; margin: 0 auto 18px; display: grid; place-items: center; background: var(--chip); color: var(--blue); }
.status-card .icon.warn { background: var(--amber-bg); color: #9a6c00; }
.status-card .icon.stop { background: var(--red-bg); color: var(--red); }
.status-card h2 { font-size: 23px; margin-bottom: 10px; }
.status-card p { color: var(--ink-2); margin: 0 0 22px; }
.status-card .actions { display: flex; flex-direction: column; gap: 10px; }

/* ---------- top bar ---------- */
.topbar { background: var(--navy); color: #fff; position: sticky; top: 0; z-index: 30; }
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.topbar .brand { display: flex; align-items: center; gap: 14px; text-decoration: none; min-width: 0; }
.topbar .brand img.logo { height: 34px; width: auto; }
.topbar .brand .sep { width: 1px; height: 26px; background: rgba(255, 255, 255, .2); }
.topbar .brand .label { font-family: var(--font-head); font-weight: 600; color: #fff; font-size: 15px; white-space: nowrap; }
.topbar .who { display: flex; align-items: center; gap: 14px; font-size: 14px; color: var(--sky); min-width: 0; }
.topbar .who .email { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 240px; }
.topbar .btn.out { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .28); padding: 7px 13px; font-size: 13px; }
.topbar .btn.out:hover { border-color: #fff; }
@media (max-width: 700px) {
  .topbar .who .email, .topbar .brand .sep, .topbar .brand .label { display: none; }
  .topbar .brand img.logo { height: 28px; }
}

/* ---------- toasts & modal ---------- */
#toasts { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 100; display: flex; flex-direction: column; gap: 8px; align-items: center; width: calc(100% - 32px); max-width: 440px; pointer-events: none; }
.toast { background: var(--navy); color: #fff; padding: 11px 16px; border-radius: 10px; font-size: 14.5px; box-shadow: 0 8px 26px rgba(11, 35, 80, .3); animation: tin .2s ease-out; transition: opacity .3s, transform .3s; }
.toast.error { background: var(--red); }
.toast.ok { background: var(--green); }
.toast.out { opacity: 0; transform: translateY(6px); }
@keyframes tin { from { opacity: 0; transform: translateY(8px); } }
.modal-back { position: fixed; inset: 0; background: rgba(11, 35, 80, .48); z-index: 90; display: grid; place-items: center; padding: 16px; animation: fade .15s; }
@keyframes fade { from { opacity: 0; } }
.modal { background: #fff; border-radius: 16px; padding: 26px 24px 20px; max-width: 460px; width: 100%; box-shadow: 0 24px 60px rgba(11, 35, 80, .3); }
.modal.wide { max-width: 560px; }
.modal h3 { font-size: 19px; margin-bottom: 8px; }
.modal p { color: var(--ink-2); margin: 0 0 20px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }

.loading-screen { min-height: 100vh; display: grid; place-items: center; color: var(--muted); }
.loading-screen .spin { width: 32px; height: 32px; border: 3px solid var(--line); border-top-color: var(--blue); border-radius: 50%; animation: spin .8s linear infinite; margin: 0 auto 12px; }

/* password show/hide */
.pw-wrap { display: block; position: relative; }
.pw-wrap .input { padding-right: 70px; }
.pw-show { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); background: none; border: 0; color: var(--blue); font-weight: 700; font-size: 13.5px; padding: 6px 10px; cursor: pointer; border-radius: 6px; }
.pw-show:hover { background: var(--chip); }
label.field > span.hint { font-weight: 400; font-size: 13.5px; color: var(--muted); margin: 6px 0 0; }
label.field > span.pw-wrap { font-weight: 400; margin: 0; color: inherit; font-size: inherit; }
