/* J Beattie Consulting — PAT Testing Portal */
:root {
  --navy-950: #05080f;
  --navy-900: #0a0f1a;
  --navy-800: #111827;
  --navy-700: #1a2336;
  --surface: #f0f3f7;
  --surface-2: #e4e9f0;
  --panel: #ffffff;
  --ink: #0c1222;
  --ink-soft: #3d4a63;
  --muted: #6b7a94;
  --accent: #0d9488;
  --accent-bright: #14b8a6;
  --accent-dim: rgba(13, 148, 136, 0.12);
  --line: rgba(12, 18, 34, 0.1);
  --pass: #059669;
  --pass-bg: #d1fae5;
  --fail: #dc2626;
  --fail-bg: #fee2e2;
  --attention: #d97706;
  --attention-bg: #fef3c7;
  --overdue: #b45309;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 10px 30px rgba(5, 8, 15, 0.08);
  --shadow-lg: 0 24px 50px rgba(5, 8, 15, 0.14);
  --font-display: "Outfit", system-ui, sans-serif;
  --font-body: "Plus Jakarta Sans", system-ui, sans-serif;
  --sidebar-w: 260px;
  --header-h: 64px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

[data-theme="dark"] {
  --surface: #0a0f1a;
  --surface-2: #111827;
  --panel: #151c2c;
  --ink: #eef2f8;
  --ink-soft: #a8b3c7;
  --muted: #7d8aa3;
  --line: rgba(255, 255, 255, 0.1);
  --accent-dim: rgba(20, 184, 166, 0.16);
  --pass-bg: rgba(5, 150, 105, 0.2);
  --fail-bg: rgba(220, 38, 38, 0.2);
  --attention-bg: rgba(217, 119, 6, 0.2);
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  max-width: 100%;
  overflow-x: hidden;
  overscroll-behavior-x: none;
  touch-action: pan-y;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  position: relative;
  width: 100%;
  max-width: 100%;
  min-height: 100vh;
  overflow-x: hidden;
  overflow-y: visible;
  overscroll-behavior-x: none;
  touch-action: pan-y;
  font-family: var(--font-body);
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--ink);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
}

img, video, iframe, svg, canvas, embed {
  max-width: 100%;
  height: auto;
  display: block;
}

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin: 0 0 0.45em;
}

.muted { color: var(--muted); }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); border: 0;
}

/* ——— Marketing / public ——— */
.public-bg {
  background:
    radial-gradient(900px 420px at 10% -10%, rgba(20, 184, 166, 0.18), transparent 55%),
    radial-gradient(700px 380px at 95% 10%, rgba(15, 23, 42, 0.08), transparent 50%),
    linear-gradient(180deg, #f7f9fc 0%, var(--surface) 40%, #e8eef5 100%);
  min-height: 100vh;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(12px);
  background: rgba(247, 249, 252, 0.85);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0.9rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-display);
}
.logo img { width: 200px; height: auto; }
.logo-mark {
  width: 42px; height: 42px; border-radius: 10px;
  background: var(--navy-900); color: var(--accent-bright);
  display: grid; place-items: center; font-weight: 800; font-size: 1.1rem;
  flex-shrink: 0;
}
.logo-text { display: flex; flex-direction: column; line-height: 1.1; }
.logo-text strong { font-size: 0.95rem; letter-spacing: 0.04em; }
.logo-text span { font-size: 0.72rem; color: var(--muted); letter-spacing: 0.12em; font-weight: 600; }

.nav-links { display: flex; gap: 1.25rem; align-items: center; flex-wrap: wrap; }
.nav-links a { color: var(--ink-soft); font-weight: 600; font-size: 0.9rem; }
.nav-links a:hover { color: var(--accent); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.45rem;
  border: 1px solid transparent; border-radius: 10px;
  padding: 0.7rem 1.15rem; font-weight: 700; font-size: 0.9rem;
  cursor: pointer; transition: transform 0.2s var(--ease), background 0.2s, border-color 0.2s, box-shadow 0.2s;
  background: var(--panel); color: var(--ink); border-color: var(--line);
  text-align: center; white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary {
  background: linear-gradient(135deg, #0f766e, #14b8a6);
  color: #fff; border-color: transparent;
  box-shadow: 0 8px 20px rgba(13, 148, 136, 0.28);
}
.btn-primary:hover { box-shadow: 0 12px 28px rgba(13, 148, 136, 0.35); }
.btn-danger { background: var(--fail); color: #fff; border-color: transparent; }
.btn-pass { background: var(--pass); color: #fff; border-color: transparent; }
.btn-attention { background: var(--attention); color: #fff; border-color: transparent; }
.btn-ghost { background: transparent; }
.btn-sm { padding: 0.45rem 0.8rem; font-size: 0.82rem; border-radius: 8px; }
.btn-lg { padding: 0.95rem 1.4rem; font-size: 1rem; }
.btn-block { width: 100%; }
.btn-icon { width: 42px; height: 42px; padding: 0; }

.hero {
  max-width: 1120px;
  margin: 0 auto;
  padding: 3.5rem 1.25rem 2.5rem;
  display: grid;
  gap: 2rem;
  align-items: center;
}
@media (min-width: 900px) {
  .hero { grid-template-columns: 1.1fr 0.9fr; padding-top: 4.5rem; }
}
.hero-brand {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  letter-spacing: -0.04em;
  margin: 0 0 0.35rem;
  background: linear-gradient(120deg, var(--navy-900), #134e4a 60%, var(--accent));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero h1 {
  font-size: clamp(1.55rem, 3vw, 2.1rem);
  color: var(--ink);
  max-width: 18ch;
}
.hero p { color: var(--ink-soft); max-width: 42ch; margin: 0 0 1.5rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.hero-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
  padding: 1.25rem;
  position: relative;
  overflow: hidden;
  animation: rise 0.7s var(--ease) both;
}
.hero-panel::before {
  content: "";
  position: absolute; inset: 0 0 auto 0; height: 4px;
  background: linear-gradient(90deg, #0f766e, #14b8a6, #5eead4);
}
.stat-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem;
}
.stat-tile {
  background: var(--surface);
  border-radius: 12px;
  padding: 0.9rem;
}
.stat-tile strong {
  display: block; font-family: var(--font-display);
  font-size: 1.45rem; letter-spacing: -0.03em;
}
.stat-tile span { font-size: 0.78rem; color: var(--muted); font-weight: 600; }

.section {
  max-width: 1120px;
  margin: 0 auto;
  padding: 2.5rem 1.25rem;
}
.section h2 { font-size: 1.65rem; }
.feature-grid {
  display: grid; gap: 1rem;
  grid-template-columns: 1fr;
}
@media (min-width: 720px) {
  .feature-grid { grid-template-columns: repeat(3, 1fr); }
}
.feature {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem;
  transition: transform 0.25s var(--ease), box-shadow 0.25s;
}
.feature:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.feature h3 { font-size: 1.05rem; margin-bottom: 0.35rem; }
.feature p { margin: 0; color: var(--ink-soft); font-size: 0.9rem; }
.feature .icon {
  width: 40px; height: 40px; border-radius: 10px;
  background: var(--accent-dim); color: var(--accent);
  display: grid; place-items: center; margin-bottom: 0.85rem; font-weight: 800;
}

.form-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: var(--shadow);
  max-width: 560px;
}
.form-row { margin-bottom: 1rem; }
.form-row label {
  display: block; font-weight: 600; font-size: 0.85rem;
  margin-bottom: 0.35rem; color: var(--ink-soft);
}
.form-row input, .form-row select, .form-row textarea,
.field input, .field select, .field textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 10px;
  padding: 0.7rem 0.85rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.form-row input:focus, .form-row select:focus, .form-row textarea:focus,
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}
.form-row textarea, .field textarea { min-height: 110px; resize: vertical; }
.form-grid-2 { display: grid; gap: 0.85rem; }
@media (min-width: 560px) { .form-grid-2 { grid-template-columns: 1fr 1fr; } }

.site-footer {
  margin-top: 3rem;
  border-top: 1px solid var(--line);
  padding: 1.5rem 1.25rem 2rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
}
.beattie-designer-credit {
  margin: 0.7rem 0 0;
  font-size: 0.78rem;
  line-height: 1.45;
  opacity: 0.82;
}
.beattie-designer-credit a {
  color: inherit;
  text-underline-offset: 0.16em;
  text-decoration: underline;
}

/* ——— Auth ——— */
.auth-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  background:
    radial-gradient(700px 360px at 20% 0%, rgba(20, 184, 166, 0.16), transparent 55%),
    var(--surface);
}
.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1.75rem;
  box-shadow: var(--shadow-lg);
  animation: rise 0.55s var(--ease) both;
}
/* ——— App shell ——— */
.app-shell {
  display: grid;
  min-height: 100vh;
  grid-template-columns: 1fr;
}
@media (min-width: 960px) {
  .app-shell { grid-template-columns: var(--sidebar-w) 1fr; }
}

.sidebar {
  background: var(--navy-900);
  color: #e8eef8;
  padding: 1rem 0.85rem 1.5rem;
  display: none;
  flex-direction: column;
  gap: 0.35rem;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
}
@media (min-width: 960px) { .sidebar { display: flex; } }
.sidebar.open {
  display: flex;
  position: fixed;
  inset: 0 auto 0 0;
  width: min(280px, 88%);
  z-index: 60;
  box-shadow: var(--shadow-lg);
  animation: slideIn 0.28s var(--ease);
}
.sidebar-backdrop {
  display: none;
  position: fixed; inset: 0; background: rgba(5, 8, 15, 0.45); z-index: 50;
}
.sidebar-backdrop.show { display: block; }

.sidebar .brand {
  display: flex; align-items: center; gap: 0.65rem;
  padding: 0.5rem 0.65rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  margin-bottom: 0.75rem;
}
.sidebar .brand strong { display: block; font-family: var(--font-display); font-size: 0.95rem; }
.sidebar .brand span { font-size: 0.72rem; color: #8b98b0; }
.nav-section {
  font-size: 0.68rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: #6b7a94; padding: 0.75rem 0.75rem 0.35rem; font-weight: 700;
}
.nav-item {
  display: flex; align-items: center; gap: 0.65rem;
  padding: 0.65rem 0.75rem; border-radius: 10px;
  color: #c5d0e2; font-weight: 600; font-size: 0.9rem;
  border: 0; background: transparent; width: 100%; cursor: pointer; text-align: left;
}
.nav-item:hover { background: rgba(255,255,255,0.06); color: #fff; }
.nav-item.active {
  background: linear-gradient(135deg, rgba(15,118,110,0.55), rgba(20,184,166,0.35));
  color: #fff;
}
.nav-item .dot {
  width: 8px; height: 8px; border-radius: 50%; background: currentColor; opacity: 0.55;
}

.main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
.topbar {
  height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between; gap: 0.75rem;
  padding: 0 1rem;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 30;
}
.topbar h1 { font-size: 1.1rem; margin: 0; }
.topbar-actions { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.content {
  padding: 1.15rem;
  flex: 1;
  max-width: 1400px;
  width: 100%;
}

.cards {
  display: grid;
  gap: 0.85rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (min-width: 720px) {
  .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 1100px) {
  .cards { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
  min-width: 0;
}
.card .label { font-size: 0.75rem; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; }
.card .value {
  font-family: var(--font-display);
  font-size: 1.65rem;
  letter-spacing: -0.03em;
  margin-top: 0.25rem;
}
.card .hint { font-size: 0.78rem; color: var(--ink-soft); margin-top: 0.25rem; }

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 1rem;
  overflow: hidden;
}
.panel-h {
  display: flex; align-items: center; justify-content: space-between; gap: 0.75rem;
  padding: 0.95rem 1.1rem;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}
.panel-h h2, .panel-h h3 { margin: 0; font-size: 1.05rem; }
.panel-b { padding: 1.1rem; }
.toolbar {
  display: flex; flex-wrap: wrap; gap: 0.55rem; align-items: center;
  margin-bottom: 1rem;
}
.toolbar .grow { flex: 1; min-width: 160px; }
.toolbar input, .toolbar select {
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 10px;
  padding: 0.6rem 0.8rem;
  width: 100%;
}

.table-wrap { overflow-x: auto; max-width: 100%; -webkit-overflow-scrolling: touch; }
table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  min-width: 640px;
}
table.data th, table.data td {
  text-align: left;
  padding: 0.7rem 0.75rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
table.data th {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  font-weight: 700;
  background: var(--surface);
}
table.data tr:hover td { background: var(--accent-dim); }
table.data .actions { display: flex; flex-wrap: wrap; gap: 0.35rem; }

.badge {
  display: inline-flex; align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.badge-pass { background: var(--pass-bg); color: var(--pass); }
.badge-fail { background: var(--fail-bg); color: var(--fail); }
.badge-attention { background: var(--attention-bg); color: var(--attention); }
.badge-overdue { background: #ffedd5; color: var(--overdue); }
.badge-neutral { background: var(--surface-2); color: var(--ink-soft); }
.badge-info { background: #dbeafe; color: #1d4ed8; }
[data-theme="dark"] .badge-overdue { background: rgba(180, 83, 9, 0.25); }
[data-theme="dark"] .badge-info { background: rgba(29, 78, 216, 0.25); color: #93c5fd; }

.split {
  display: grid; gap: 1rem;
}
@media (min-width: 900px) {
  .split-2 { grid-template-columns: 1.2fr 1fr; }
  .split-3 { grid-template-columns: 1fr 1fr 1fr; }
}

.chart {
  display: flex; align-items: flex-end; gap: 0.45rem;
  height: 160px; padding-top: 0.5rem;
}
.chart .bar {
  flex: 1;
  background: linear-gradient(180deg, var(--accent-bright), #0f766e);
  border-radius: 8px 8px 4px 4px;
  min-width: 0;
  position: relative;
  animation: grow 0.7s var(--ease) both;
}
.chart .bar span {
  position: absolute; bottom: -1.4rem; left: 50%; transform: translateX(-50%);
  font-size: 0.65rem; color: var(--muted); font-weight: 700; white-space: nowrap;
}

.list-activity { list-style: none; margin: 0; padding: 0; }
.list-activity li {
  display: grid; gap: 0.15rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.88rem;
}
.list-activity time { font-size: 0.75rem; color: var(--muted); }

.quick-actions {
  display: grid; gap: 0.65rem;
  grid-template-columns: 1fr 1fr;
}
.quick-actions .btn { justify-content: flex-start; padding: 0.9rem; }

/* Modal */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(5, 8, 15, 0.5);
  z-index: 80; display: none; align-items: flex-end; justify-content: center;
  padding: 1rem; overflow-y: auto;
}
@media (min-width: 720px) {
  .modal-backdrop { align-items: center; }
}
.modal-backdrop.show { display: flex; }
.modal {
  background: var(--panel);
  border-radius: 16px;
  width: 100%;
  max-width: 640px;
  max-height: min(90vh, 900px);
  overflow: auto;
  box-shadow: var(--shadow-lg);
  animation: rise 0.3s var(--ease);
}
.modal-h {
  display: flex; justify-content: space-between; align-items: center;
  padding: 1rem 1.15rem; border-bottom: 1px solid var(--line);
  position: sticky; top: 0; background: var(--panel); z-index: 1;
}
.modal-h h3 { margin: 0; font-size: 1.1rem; }
.modal-b { padding: 1.15rem; }
.modal-f {
  padding: 0.9rem 1.15rem; border-top: 1px solid var(--line);
  display: flex; justify-content: flex-end; gap: 0.5rem; flex-wrap: wrap;
  position: sticky; bottom: 0; background: var(--panel);
}
.field { margin-bottom: 0.85rem; }
.field label { display: block; font-size: 0.82rem; font-weight: 700; color: var(--ink-soft); margin-bottom: 0.3rem; }
.field-row { display: grid; gap: 0.75rem; }
@media (min-width: 560px) { .field-row.cols-2 { grid-template-columns: 1fr 1fr; } .field-row.cols-3 { grid-template-columns: 1fr 1fr 1fr; } }

/* Testing UI — mobile first */
.testing-shell {
  display: grid; gap: 0.85rem;
}
.test-stepper {
  display: flex; gap: 0.35rem; overflow-x: auto; padding-bottom: 0.25rem;
  max-width: 100%;
}
.test-stepper .step {
  flex: 0 0 auto;
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
  background: var(--surface-2);
  font-size: 0.75rem; font-weight: 700; color: var(--muted);
}
.test-stepper .step.on { background: var(--accent); color: #fff; }

.result-pad {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0.65rem;
}
.result-pad .btn {
  min-height: 64px;
  font-size: 1.05rem;
  letter-spacing: 0.04em;
}

.measure-grid {
  display: grid;
  gap: 0.65rem;
  grid-template-columns: 1fr 1fr;
}
.visual-checks {
  display: grid;
  gap: 0.5rem;
}
.visual-checks label {
  display: flex; align-items: center; justify-content: space-between;
  gap: 0.75rem;
  background: var(--surface);
  border-radius: 10px;
  padding: 0.7rem 0.85rem;
  font-weight: 600;
}
.visual-checks select { width: auto; min-width: 110px; }

.qr-box {
  width: 140px; height: 140px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  display: grid; place-items: center;
  font-family: var(--font-display);
  font-weight: 800;
  color: var(--navy-900);
  letter-spacing: 0.02em;
  text-align: center;
  padding: 0.5rem;
  font-size: 0.75rem;
  background-image:
    linear-gradient(#0a0f1a 25%, transparent 25%),
    linear-gradient(#0a0f1a 25%, transparent 25%),
    linear-gradient(#0a0f1a 25%, transparent 25%),
    linear-gradient(#0a0f1a 25%, transparent 25%);
  background-size: 12px 12px;
  background-position: 8px 8px, 120px 8px, 8px 120px, 120px 120px;
  background-repeat: no-repeat;
}

.calendar {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.35rem;
  font-size: 0.78rem;
}
.calendar .day-h { text-align: center; color: var(--muted); font-weight: 700; padding: 0.35rem; }
.calendar .day {
  min-height: 64px;
  background: var(--surface);
  border-radius: 8px;
  padding: 0.35rem;
  border: 1px solid transparent;
}
.calendar .day.has { border-color: var(--accent); background: var(--accent-dim); }
.calendar .day .n { font-weight: 800; font-size: 0.75rem; }
.calendar .day .ev { font-size: 0.65rem; color: var(--ink-soft); margin-top: 0.2rem; line-height: 1.25; }

/* Certificate print */
.certificate {
  background: #fff;
  color: #0c1222;
  border: 1px solid #d5dbe6;
  border-radius: 12px;
  padding: 1.5rem;
}
.certificate .cert-head {
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  border-bottom: 3px solid #0d9488; padding-bottom: 1rem; margin-bottom: 1rem;
}
.certificate table { width: 100%; border-collapse: collapse; font-size: 0.82rem; }
.certificate th, .certificate td { border: 1px solid #d5dbe6; padding: 0.45rem 0.5rem; text-align: left; }
.certificate th { background: #f0f3f7; }
.certificate .disclaimer {
  margin-top: 1rem; font-size: 0.75rem; color: #5b6780; border-top: 1px solid #d5dbe6; padding-top: 0.75rem;
}
.page-num { text-align: right; font-size: 0.75rem; color: #6b7a94; margin-top: 0.75rem; }

.empty {
  text-align: center; padding: 2rem 1rem; color: var(--muted);
}

.toast {
  position: fixed; bottom: 1.25rem; left: 50%; transform: translateX(-50%) translateY(120%);
  background: var(--navy-900); color: #fff;
  padding: 0.75rem 1.15rem; border-radius: 999px;
  z-index: 100; font-weight: 600; font-size: 0.88rem;
  transition: transform 0.3s var(--ease);
  max-width: 92%;
  text-align: center;
}
.toast.show { transform: translateX(-50%) translateY(0); }

.tabs {
  display: flex; gap: 0.35rem; flex-wrap: wrap; margin-bottom: 1rem;
}
.tabs button {
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 999px;
  padding: 0.45rem 0.9rem;
  font-weight: 700;
  font-size: 0.82rem;
  cursor: pointer;
  color: var(--ink-soft);
}
.tabs button.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.settings-grid {
  display: grid; gap: 1rem;
}
@media (min-width: 800px) {
  .settings-grid { grid-template-columns: 1fr 1fr; }
}

@keyframes rise {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes slideIn {
  from { transform: translateX(-12px); opacity: 0.6; }
  to { transform: translateX(0); opacity: 1; }
}
@keyframes grow {
  from { transform: scaleY(0.2); transform-origin: bottom; }
  to { transform: scaleY(1); transform-origin: bottom; }
}

@media print {
  .sidebar, .topbar, .toolbar, .btn, .site-footer, .no-print, .sidebar-backdrop { display: none !important; }
  .app-shell { display: block; }
  .main, .content { padding: 0; max-width: none; }
  .certificate { border: 0; box-shadow: none; }
  body { background: #fff; }
}

@media (max-width: 900px) {
  html, body {
    overflow-x: hidden !important;
    overscroll-behavior-x: none;
  }
  .content { padding: 0.9rem; }
  .cards { grid-template-columns: 1fr 1fr; }
  .card .value { font-size: 1.35rem; }
}
