/*
 * Shared styles for the public pages (landing, activation, privacy, admin).
 * Brand colours live in the variables below — swap them for XGuard's
 * official palette in one place.
 */
:root {
  --brand: #0f2a4a;        /* navy — headers, dark surfaces */
  --brand-ink: #ffffff;
  --action: #2563eb;       /* primary buttons */
  --action-hover: #1d4ed8;
  --accent: #f5b400;       /* highlights */
  --ink: #111827;
  --muted: #4b5563;
  --line: #e5e7eb;
  --surface: #ffffff;
  --page: #f3f4f6;
  --ok: #065f46;
  --ok-bg: #ecfdf5;
  --warn-bg: #fef3c7;
  --warn: #92400e;
  --error: #b91c1c;
  --error-bg: #fef2f2;
  --radius: 14px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--page);
  color: var(--ink);
  line-height: 1.55;
  -webkit-text-size-adjust: 100%;
}

a { color: var(--action); }

.topbar {
  background: var(--brand);
  color: var(--brand-ink);
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.topbar .logo { font-weight: 800; letter-spacing: 0.5px; font-size: 18px; color: inherit; text-decoration: none; }
.topbar .logo span { color: var(--accent); }
.topbar .spacer { flex: 1; }
.topbar a.link { color: #cbd5e1; text-decoration: none; font-size: 14px; }

.wrap { max-width: 980px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 520px; margin: 0 auto; padding: 0 20px; }

.card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.07);
  padding: 28px;
}

h1 { font-size: 30px; line-height: 1.2; margin-bottom: 10px; }
h2 { font-size: 22px; margin-bottom: 10px; }
h3 { font-size: 17px; margin-bottom: 6px; }
p { margin-bottom: 12px; }
.lead { font-size: 18px; color: var(--muted); }
.muted { color: var(--muted); }
.small { font-size: 14px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  padding: 14px 24px;
  border: 0;
  border-radius: 12px;
  font: 600 17px/1.2 inherit;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease, transform 0.05s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--action); color: #fff; }
.btn-primary:hover { background: var(--action-hover); }
.btn-primary:disabled { opacity: 0.6; cursor: wait; }
.btn-ghost { background: #fff; color: var(--ink); border: 1px solid #d1d5db; }
.btn-ghost:hover { background: #f9fafb; }
.btn-block { width: 100%; }
.btn-sm { min-height: 38px; padding: 8px 14px; font-size: 14px; }
.btn-danger { background: #fff; color: var(--error); border: 1px solid #fecaca; }

label.field { display: block; font-weight: 600; margin-bottom: 8px; }
input[type="text"], input[type="password"], input[type="number"], select, textarea {
  width: 100%;
  padding: 14px;
  border: 1.5px solid #d1d5db;
  border-radius: 10px;
  font-size: 17px;
  font-family: inherit;
  background: #fff;
}
input:focus, select:focus, textarea:focus { outline: 3px solid rgba(37, 99, 235, 0.25); border-color: var(--action); }

.code-input {
  text-align: center;
  font-size: 26px !important;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
}

.notice { border-radius: 10px; padding: 12px 14px; font-size: 15px; margin-top: 14px; }
.notice.error { background: var(--error-bg); color: var(--error); }
.notice.ok { background: var(--ok-bg); color: var(--ok); }
.notice.warn { background: var(--warn-bg); color: var(--warn); }
.notice[hidden] { display: none; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.step { background: var(--surface); border-radius: var(--radius); padding: 20px; border: 1px solid var(--line); }
.step .num {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--brand); color: var(--brand-ink);
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; margin-bottom: 10px;
}

.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 18px; margin-bottom: 10px; }
.faq summary { font-weight: 600; cursor: pointer; }
.faq details p { margin: 10px 0 0; color: var(--muted); }

footer.site { padding: 28px 20px; text-align: center; color: var(--muted); font-size: 14px; }
footer.site a { color: var(--muted); }

table.data { width: 100%; border-collapse: collapse; font-size: 14px; }
table.data th, table.data td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.data th { color: var(--muted); font-weight: 600; }

.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }

@media (max-width: 720px) {
  h1 { font-size: 25px; }
  .lead { font-size: 16px; }
  .steps { grid-template-columns: 1fr; }
  .card { padding: 22px 18px; }
}
