/* InboxOrbit v3.3.0 - shared design system (formerly Master Inbox).
   Royal slate / indigo chrome with emerald + gold accents. No CDN. */

:root {
  --ink: #141a2e;            /* royal slate ink */
  --ink-2: #333b57;
  --muted: #6a7392;
  --line: #e4e7f1;
  --paper: #f4f5fb;
  --card: #ffffff;
  --indigo: #4f46e5;
  --indigo-2: #6366f1;
  --indigo-ink: #312e81;
  --emerald: #0f9d78;
  --emerald-2: #10b981;
  --gold: #c08a2d;
  --gold-2: #e3b34e;
  --danger: #dc2626;
  --amber: #c2570c;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(20, 26, 46, .08);
  --shadow-sm: 0 2px 8px rgba(20, 26, 46, .07);
  --accent: var(--indigo);        /* shifts per section */
  --accent-soft: #eef0fd;
  font-synthesis-weight: none;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  color: var(--ink); background: var(--paper);
  -webkit-font-smoothing: antialiased; font-size: 14px; line-height: 1.5;
}
a { color: var(--indigo); text-decoration: none; }
h1, h2, h3 { letter-spacing: -0.02em; margin: 0; }
.mono { font-family: "SFMono-Regular", ui-monospace, "Cascadia Mono", Consolas, monospace; }
.muted { color: var(--muted); }
.tabular { font-variant-numeric: tabular-nums; }

::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb { background: #c7cde0; border-radius: 5px; }
::-webkit-scrollbar-track { background: transparent; }

/* ---- buttons ---- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 18px; border-radius: 11px; border: 1px solid var(--line);
  background: var(--card); color: var(--ink); font-weight: 600; font-size: 14px;
  cursor: pointer; transition: all .14s ease; white-space: nowrap; }
.btn:hover { border-color: #b9c0d6; box-shadow: var(--shadow-sm); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: linear-gradient(135deg, var(--indigo), var(--indigo-2));
  color: #fff; border: none; box-shadow: 0 6px 18px rgba(79, 70, 229, .28); }
.btn-primary:hover { filter: brightness(1.05); box-shadow: 0 8px 22px rgba(79, 70, 229, .36); }
.btn-gold { background: linear-gradient(135deg, var(--gold), var(--gold-2)); color: #3a2a06;
  border: none; font-weight: 700; }
.btn-emerald { background: linear-gradient(135deg, var(--emerald), var(--emerald-2));
  color: #fff; border: none; }
.btn-ghost { background: transparent; }
.btn-danger { color: var(--danger); }
.btn-danger:hover { border-color: var(--danger); background: #fef2f2; }
.btn-sm { height: 32px; padding: 0 12px; font-size: 13px; border-radius: 9px; }
.btn-block { width: 100%; }

/* ---- forms ---- */
.field { width: 100%; height: 44px; padding: 0 14px; border: 1px solid var(--line);
  border-radius: 11px; background: #fbfbfe; font-size: 14px; color: var(--ink);
  transition: border-color .14s, box-shadow .14s; }
.field:focus { outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft); background: #fff; }
textarea.field { height: auto; padding: 12px 14px; resize: vertical; min-height: 96px; }
select.field { appearance: none; background-image: none; }
label.lbl { display: block; font-size: 12px; font-weight: 600; color: var(--muted);
  margin: 0 0 6px 2px; text-transform: uppercase; letter-spacing: .05em; }

/* ---- cards / badges ---- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); }
.badge { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 9px;
  border-radius: 7px; font-size: 12px; font-weight: 600; }
.badge-indigo { background: var(--accent-soft); color: var(--indigo-ink); }
.badge-emerald { background: #e6f7f0; color: #0a6b50; }
.badge-gold { background: #fbf2db; color: #7a5a12; }
.badge-amber { background: #fdecd9; color: #8a3d06; }
.badge-red { background: #fef2f2; color: #b91c1c; }
.badge-slate { background: #eef0f6; color: #475069; }
.pill { border-radius: 999px; }

.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.dot-ok { background: var(--emerald-2); }
.dot-warn { background: var(--gold-2); }
.dot-err { background: var(--danger); }
.dot-off { background: #aab2c6; }

.toast-wrap { position: fixed; right: 18px; bottom: 18px; display: flex; flex-direction: column;
  gap: 10px; z-index: 90; }
.toast { background: var(--ink); color: #fff; padding: 12px 16px; border-radius: 12px;
  box-shadow: var(--shadow); font-size: 13px; display: flex; align-items: center; gap: 12px;
  animation: toastIn .18s ease; max-width: 360px; }
.toast .t-accent { color: var(--gold-2); font-weight: 700; }
.toast button { background: rgba(255,255,255,.14); border: none; color: #fff; border-radius: 8px;
  height: 28px; padding: 0 10px; cursor: pointer; font-weight: 600; }
@keyframes toastIn { from { transform: translateY(8px); opacity: 0; } }

/* ---- auth pages ---- */
.auth-wrap { min-height: 100%; display: grid; grid-template-columns: 1.1fr 1fr; }
.auth-art { background:
    radial-gradient(1200px 500px at 20% -10%, rgba(99,102,241,.5), transparent 60%),
    radial-gradient(900px 500px at 90% 110%, rgba(16,185,129,.35), transparent 55%),
    linear-gradient(160deg, #0f1430, #1b1f45 60%, #0c1026);
  color: #eaecfb; padding: 56px; display: flex; flex-direction: column; justify-content: space-between; }
.auth-panel { display: flex; align-items: center; justify-content: center; padding: 40px; }
.auth-card { width: 100%; max-width: 400px; }
.brand { display: flex; align-items: center; gap: 11px; font-weight: 800; font-size: 19px;
  letter-spacing: -.02em; }
.brand .glyph { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--gold), var(--gold-2)); color: #2a1e04; font-weight: 900; }
.auth-art .brand { color: #fff; }
.feat { display: flex; gap: 12px; align-items: flex-start; margin-top: 18px; }
.feat .ic { width: 30px; height: 30px; border-radius: 9px; background: rgba(255,255,255,.1);
  display: grid; place-items: center; color: var(--gold-2); flex-shrink: 0; font-weight: 700; }
.divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 12px;
  margin: 18px 0; }
.divider::before, .divider::after { content: ""; height: 1px; background: var(--line); flex: 1; }
.oauth-btn { display: flex; align-items: center; gap: 10px; justify-content: center; }

/* ---- generic layout helpers ---- */
.row { display: flex; align-items: center; gap: 10px; }
.col { display: flex; flex-direction: column; }
.grow { flex: 1; }
.wrap { flex-wrap: wrap; }
.hidden { display: none !important; }
.spin { width: 16px; height: 16px; border: 2px solid rgba(255,255,255,.4);
  border-top-color: #fff; border-radius: 50%; animation: sp .7s linear infinite; }
@keyframes sp { to { transform: rotate(360deg); } }

@media (max-width: 820px) {
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-art { display: none; }
}

/* ==== InboxOrbit v3.3.0: brand lockup, icons, password fields ============ */
.io-brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.io-mark { display: block; border-radius: 24%; flex-shrink: 0; }
.io-word { font-weight: 800; letter-spacing: -.03em; font-size: 19px; line-height: 1; white-space: nowrap; }
.io-word b { font-weight: 800; color: #0F172A; }
.io-word b.orbit { color: #0AA5D6; background: linear-gradient(90deg, #06B6D4, #2563EB);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.on-dark .io-word b, .io-brand.on-dark .io-word b { color: #FFFFFF; }
.on-dark .io-word b.orbit, .io-brand.on-dark .io-word b.orbit { background: none; color: #22D3EE;
  -webkit-text-fill-color: #22D3EE; }
.io-sub { display: block; font-size: 11px; font-weight: 500; color: #64748B; letter-spacing: 0; margin-top: 3px; }

svg.ico { display: block; flex-shrink: 0; }
[data-ico] { display: inline-flex; align-items: center; justify-content: center; }

/* password field with show/hide eye */
.pw-wrap { position: relative; display: block; }
.pw-wrap > input.field { padding-right: 44px; }
.pw-eye { position: absolute; top: 50%; right: 5px; transform: translateY(-50%); width: 34px; height: 34px;
  display: grid; place-items: center; border: none; background: transparent; color: #64748B;
  border-radius: 8px; cursor: pointer; padding: 0; }
.pw-eye:hover { color: #2563EB; background: #EFF6FF; }
.pw-eye:focus-visible { outline: 2px solid #2563EB; outline-offset: 1px; }
.pw-eye[aria-pressed="true"] { color: #2563EB; }

/* strength meter */
.pw-meter { margin-top: 8px; }
.pw-bars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; }
.pw-bars span { height: 5px; border-radius: 3px; background: #E2E8F0; transition: background .18s; }
.pw-text { display: flex; gap: 8px; align-items: baseline; margin-top: 6px; font-size: 12px; min-height: 18px; }
.pw-label { font-weight: 700; color: #64748B; white-space: nowrap; }
.pw-hint { color: #64748B; }
.pw-meter[data-score="0"]:not(.empty) .pw-bars span:nth-child(-n+1) { background: #DC2626; }
.pw-meter[data-score="0"]:not(.empty) .pw-label { color: #B91C1C; }
.pw-meter[data-score="1"] .pw-bars span:nth-child(-n+1) { background: #EA580C; }
.pw-meter[data-score="1"] .pw-label { color: #C2410C; }
.pw-meter[data-score="2"] .pw-bars span:nth-child(-n+2) { background: #D97706; }
.pw-meter[data-score="2"] .pw-label { color: #B45309; }
.pw-meter[data-score="3"] .pw-bars span:nth-child(-n+3) { background: #2563EB; }
.pw-meter[data-score="3"] .pw-label { color: #1D4ED8; }
.pw-meter[data-score="4"] .pw-bars span { background: #059669; }
.pw-meter[data-score="4"] .pw-label { color: #047857; }
