/* Intra Phone site: landing, sign-in, account and admin pages. */
:root {
  --navy-0: #020a24;
  --navy-1: #041a4a;
  --navy-2: #0a2766;
  --line: rgba(120, 170, 255, 0.18);
  --glow: #4da3ff;
  --cyan: #38c8ff;
  --violet: #8a6bff;
  --text: #eaf1ff;
  --muted: #9fb3d9;
  --card: rgba(8, 26, 72, 0.72);
  --card-solid: #0b2160;
  --field: rgba(2, 12, 40, 0.65);
  --ok: #3ddc97;
  --warn: #ffcc66;
  --danger: #ff6b6b;
  --radius: 14px;
  --font: "Outfit", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--navy-0);
  line-height: 1.5;
  min-height: 100vh;
}
body::before {
  content: '';
  position: fixed; inset: 0; z-index: -1;
  background:
    url('/bg-phone.jpg?v=20261120b') right top / cover no-repeat,
    linear-gradient(180deg, #000e29 0%, #011a4f 100%);
}
body.plain::before { background: radial-gradient(1200px 700px at 80% -10%, #0d3a9a 0%, transparent 60%), linear-gradient(180deg, #020c2b, #03174a); }
a { color: var(--cyan); }
a:hover { color: #8fe0ff; }
h1, h2, h3 { line-height: 1.15; margin: 0 0 0.5em; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }
.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 16px; }

/* ---------- top bar */
.topbar { position: sticky; top: 0; z-index: 10; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); background: rgba(2, 10, 36, 0.55); border-bottom: 1px solid var(--line); }
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 600; }
.brand img { height: 40px; width: auto; border-radius: 8px; display: block; }
.nav { display: flex; align-items: center; gap: 8px; }
.nav a.link { color: var(--muted); text-decoration: none; padding: 8px 10px; border-radius: 8px; font-size: 0.95rem; }
.nav a.link:hover { color: var(--text); background: rgba(255,255,255,0.05); }
@media (max-width: 640px) { .nav a.link { display: none; } }

/* ---------- buttons & fields */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-weight: 600; font-size: 0.98rem;
  padding: 11px 20px; border-radius: 10px; border: 1px solid transparent;
  cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: transform .08s ease, box-shadow .2s ease, background .2s ease;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn-primary { color: #fff; background: linear-gradient(135deg, #2f7dff, #1a5fe0); box-shadow: 0 0 0 1px rgba(77,163,255,.4), 0 6px 24px rgba(47,125,255,.35); }
.btn-primary:hover { color: #fff; box-shadow: 0 0 0 1px rgba(77,163,255,.7), 0 8px 30px rgba(47,125,255,.5); }
.btn-ghost { color: var(--text); background: rgba(255,255,255,0.04); border-color: var(--line); }
.btn-ghost:hover { color: var(--text); background: rgba(255,255,255,0.09); }
.btn-danger { color: #fff; background: rgba(255,107,107,.16); border-color: rgba(255,107,107,.45); }
.btn-danger:hover { background: rgba(255,107,107,.28); color: #fff; }
.btn-sm { padding: 7px 12px; font-size: 0.85rem; border-radius: 8px; }
.btn-block { width: 100%; }

label.field { display: block; margin: 0 0 14px; font-size: 0.88rem; color: var(--muted); }
label.field span.lbl { display: block; margin-bottom: 6px; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=search], select {
  width: 100%; font: inherit; font-size: 1rem; color: var(--text);
  background: var(--field); border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px;
  outline: none;
}
select option { background: var(--card-solid); color: var(--text); }
input:focus, select:focus { border-color: var(--glow); box-shadow: 0 0 0 3px rgba(77,163,255,.25); }
input.code { letter-spacing: 0.35em; font-size: 1.4rem; text-align: center; font-variant-numeric: tabular-nums; }
.check { display: flex; align-items: flex-start; gap: 10px; font-size: 0.92rem; color: var(--muted); margin: 4px 0 16px; cursor: pointer; }
.check input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: #2f7dff; flex: none; }

/* ---------- cards & messages */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: 0 20px 60px rgba(0,0,0,.35); }
.msg { border-radius: 10px; padding: 10px 12px; font-size: 0.92rem; margin: 0 0 14px; }
.msg.err { background: rgba(255,107,107,.12); border: 1px solid rgba(255,107,107,.4); color: #ffd0d0; }
.msg.ok { background: rgba(61,220,151,.1); border: 1px solid rgba(61,220,151,.4); color: #c9f7e2; }
.msg.info { background: rgba(77,163,255,.1); border: 1px solid rgba(77,163,255,.35); color: #d3e6ff; }
.muted { color: var(--muted); }
.small { font-size: 0.85rem; }
.hidden { display: none !important; }
.divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 0.85rem; margin: 18px 0; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.pill { display: inline-block; font-size: 0.75rem; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: rgba(77,163,255,.15); color: #bfe0ff; border: 1px solid rgba(77,163,255,.35); }
.pill.ok { background: rgba(61,220,151,.12); color: #b8f3d8; border-color: rgba(61,220,151,.4); }
.pill.warn { background: rgba(255,204,102,.12); color: #ffe3a6; border-color: rgba(255,204,102,.4); }
.pill.off { background: rgba(255,107,107,.12); color: #ffc4c4; border-color: rgba(255,107,107,.4); }

/* ---------- auth pages (sign-in, set-up) */
.auth-shell { min-height: calc(100vh - 64px); display: flex; align-items: center; justify-content: center; padding: 32px 16px 48px; }
.auth-card { width: 100%; max-width: 420px; }
.auth-card h1 { font-size: 1.6rem; }
.steps { display: flex; gap: 6px; margin: 0 0 18px; }
.steps i { flex: 1; height: 4px; border-radius: 4px; background: rgba(255,255,255,.1); }
.steps i.on { background: linear-gradient(90deg, var(--cyan), #2f7dff); }
.choice { display: grid; gap: 10px; margin: 0 0 8px; }
.choice button { text-align: left; display: block; width: 100%; font: inherit; color: var(--text); background: rgba(255,255,255,.04); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; cursor: pointer; }
.choice button:hover { border-color: var(--glow); background: rgba(77,163,255,.08); }
.choice b { display: block; margin-bottom: 2px; }
.choice small { color: var(--muted); }
.qr { background: #fff; padding: 12px; border-radius: 12px; width: max-content; margin: 0 auto 12px; }
.qr img, .qr svg { display: block; width: 200px; height: 200px; }
.secret { font-family: ui-monospace, Consolas, monospace; font-size: 0.85rem; word-break: break-all; background: var(--field); border: 1px dashed var(--line); padding: 8px 10px; border-radius: 8px; user-select: all; }

/* ---------- tables (account / admin) */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
table.list { width: 100%; border-collapse: collapse; font-size: 0.92rem; min-width: 640px; }
table.list th { text-align: left; font-weight: 600; color: var(--muted); font-size: 0.8rem; text-transform: uppercase; letter-spacing: .04em; padding: 10px 12px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.02); }
table.list td { padding: 10px 12px; border-bottom: 1px solid rgba(120,170,255,.08); vertical-align: middle; }
table.list tr:last-child td { border-bottom: 0; }
.row-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }

dialog { color: var(--text); background: var(--card-solid); border: 1px solid var(--line); border-radius: 16px; padding: 24px; width: min(520px, calc(100vw - 32px)); box-shadow: 0 30px 90px rgba(0,0,0,.6); }
dialog::backdrop { background: rgba(0, 4, 20, .7); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
@media (max-width: 520px) { .grid2 { grid-template-columns: 1fr; } }

.footer { border-top: 1px solid var(--line); color: var(--muted); font-size: 0.85rem; padding: 22px 0 34px; background: rgba(2,10,36,.6); }
.footer .wrap { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.footer a { color: var(--muted); }
