/* ============================================================
   RAP Hosting — design system
   Primary: blue. Accent: cyan. Neutrals: white / slate.
   Semantic colors follow AGENTS.md (status mapping).
   ============================================================ */

:root {
  --blue-50: #eff6ff;
  --blue-100: #dbeafe;
  --blue-200: #bfdbfe;
  --blue-500: #3b82f6;
  --blue-600: #2563eb;
  --blue-700: #1d4ed8;
  --blue-900: #1e3a8a;

  --cyan-50: #ecfeff;
  --cyan-100: #cffafe;
  --cyan-500: #06b6d4;
  --cyan-600: #0891b2;

  --ink: #0f172a;
  --ink-soft: #334155;
  --muted: #64748b;
  --line: #e2e8f0;
  --line-soft: #eef2f9;
  --line-strong: #cbd5e1;
  --bg: #f5f8fd;
  --surface: #ffffff;
  --surface-soft: #f8fafc;

  --success: #16a34a;
  --warning: #eab308;
  --danger: #dc2626;
  --critical: #7f1d1d;
  --maintenance: #f97316;
  --unknown: #6b7280;

  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;

  --shadow-xs: 0 1px 2px rgba(15, 23, 42, .06);
  --shadow-sm: 0 4px 12px -6px rgba(15, 23, 42, .14);
  --shadow: 0 18px 40px -24px rgba(15, 23, 42, .28);
  --shadow-blue: 0 26px 60px -28px rgba(37, 99, 235, .55);

  --sidebar-w: 260px;
  --topbar-h: 72px;
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  margin: 0;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.drawer-open { overflow: hidden; }

h1, h2, h3, h4, p { margin: 0; }
a { color: inherit; }
button, input { font: inherit; color: inherit; }
img { max-width: 100%; }
[hidden] { display: none !important; }

:focus-visible {
  outline: 3px solid rgba(37, 99, 235, .4);
  outline-offset: 2px;
  border-radius: 6px;
}

.icon-sprite { display: none; }

.icon {
  width: 18px;
  height: 18px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.skip-link {
  background: var(--blue-600);
  border-radius: 0 0 8px 0;
  color: #fff;
  font-weight: 700;
  left: 0;
  padding: 10px 16px;
  position: absolute;
  top: -60px;
  z-index: 100;
}
.skip-link:focus { top: 0; }

/* ------------------------------------------------------------
   Shell
   ------------------------------------------------------------ */
.app {
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  background: var(--surface);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 22px;
  height: 100vh;
  overflow-y: auto;
  padding: 20px 16px 16px;
  position: sticky;
  top: 0;
  z-index: 40;
  scrollbar-width: thin;
}

.sidebar-head {
  align-items: center;
  display: flex;
  gap: 8px;
  justify-content: space-between;
  padding: 2px 4px 4px;
}

.brand {
  align-items: center;
  border-radius: var(--radius);
  display: flex;
  gap: 11px;
  padding: 4px;
  text-decoration: none;
}

.brand-logo {
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow-xs);
  display: inline-flex;
  flex: none;
  height: 44px;
  justify-content: center;
  overflow: hidden;
  width: 44px;
}

.brand-logo img { display: block; height: 34px; width: 34px; object-fit: contain; }

.brand-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }

.brand-name { color: var(--ink); font-size: 17px; font-weight: 800; letter-spacing: -.4px; line-height: 1.1; }
.brand-name b { color: var(--blue-600); font-weight: 800; }

.brand-text small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.nav { display: flex; flex-direction: column; gap: 4px; }

.nav-label {
  color: #94a3b8;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .12em;
  padding: 0 12px;
  text-transform: uppercase;
}
.nav-label-spaced { margin-top: 16px; }

.nav-link {
  align-items: center;
  border-radius: 10px;
  color: var(--muted);
  display: flex;
  font-size: 14px;
  font-weight: 600;
  gap: 11px;
  padding: 10px 12px;
  position: relative;
  text-decoration: none;
  transition: background .16s ease, color .16s ease;
}
.nav-link .icon { color: #94a3b8; height: 18px; width: 18px; }
.nav-link:hover { background: var(--blue-50); color: var(--blue-700); }
.nav-link:hover .icon { color: var(--blue-600); }
.nav-link.active { background: var(--blue-50); color: var(--blue-700); font-weight: 700; }
.nav-link.active::before {
  background: var(--blue-600);
  border-radius: 0 4px 4px 0;
  content: "";
  height: 20px;
  left: -16px;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
}
.nav-link.active .icon { color: var(--blue-600); }

.sidebar-card {
  background: linear-gradient(150deg, var(--blue-50), var(--cyan-50));
  border: 1px solid #cfe3ff;
  border-radius: var(--radius);
  display: flex;
  gap: 10px;
  margin-top: auto;
  padding: 14px;
}
.sidebar-card strong { display: block; font-size: 12.5px; }
.sidebar-card span:not(.sidebar-check) { color: var(--muted); display: block; font-size: 11.5px; line-height: 1.45; margin-top: 3px; }
.sidebar-check {
  align-items: center;
  background: #fff;
  border-radius: 8px;
  color: var(--blue-600);
  display: inline-flex;
  flex: none;
  height: 28px;
  justify-content: center;
  width: 28px;
}
.sidebar-check .icon { height: 15px; width: 15px; }

.sidebar-foot { color: #94a3b8; font-size: 11px; padding: 0 4px; }

.sidebar-overlay {
  backdrop-filter: blur(2px);
  background: rgba(15, 23, 42, .48);
  inset: 0;
  position: fixed;
  z-index: 45;
}

.main { display: flex; flex-direction: column; min-height: 100vh; min-width: 0; }

/* ------------------------------------------------------------
   Topbar
   ------------------------------------------------------------ */
.topbar {
  backdrop-filter: saturate(180%) blur(14px);
  background: rgba(255, 255, 255, .86);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 30;
}

.topbar-inner {
  align-items: center;
  display: flex;
  gap: 16px;
  margin: 0 auto;
  max-width: 1200px;
  min-height: var(--topbar-h);
  padding: 10px 32px;
}

.topbar .menu-btn { display: none; }

.icon-btn {
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink-soft);
  cursor: pointer;
  display: inline-flex;
  flex: none;
  height: 38px;
  justify-content: center;
  transition: background .16s ease, border-color .16s ease, color .16s ease, transform .16s ease;
  width: 38px;
}
.icon-btn:hover { background: var(--blue-50); border-color: var(--blue-200); color: var(--blue-700); }
.icon-btn:active { transform: scale(.97); }
.icon-btn .icon { height: 18px; width: 18px; }

.sidebar-close { display: none; }

.topbar-brand {
  align-items: center;
  display: none;
  gap: 8px;
  text-decoration: none;
}
.topbar-brand img { height: 30px; width: 30px; object-fit: contain; }
.topbar-brand span { color: var(--ink); font-size: 16px; font-weight: 800; letter-spacing: -.3px; }

.page-title { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.eyebrow { color: var(--blue-600); font-size: 10.5px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.page-title h1 { font-size: 20px; font-weight: 800; letter-spacing: -.5px; line-height: 1.15; }
.page-title .eyebrow { color: var(--muted); font-size: 9.5px; }

.topbar-actions { align-items: center; display: flex; gap: 12px; margin-left: auto; }

.health {
  align-items: center;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  display: inline-flex;
  font-size: 11.5px;
  font-weight: 700;
  gap: 7px;
  padding: 6px 11px;
  white-space: nowrap;
}
.health .dot { background: var(--unknown); border-radius: 50%; height: 7px; width: 7px; }
.health[data-state="ok"] { background: #f0fdf4; border-color: #bbf7d0; color: #15803d; }
.health[data-state="ok"] .dot { background: var(--success); box-shadow: 0 0 0 3px rgba(22, 163, 74, .16); }
.health[data-state="warning"] { background: #fefce8; border-color: #fde68a; color: #854d0e; }
.health[data-state="warning"] .dot { background: var(--warning); box-shadow: 0 0 0 3px rgba(234, 179, 8, .18); }
.health[data-state="down"] { background: #fef2f2; border-color: #fecaca; color: #b91c1c; }
.health[data-state="down"] .dot { background: var(--danger); box-shadow: 0 0 0 3px rgba(220, 38, 38, .16); }
.health[data-state="checking"] .dot { animation: pulse 1.4s ease-in-out infinite; }

/* ------------------------------------------------------------
   Buttons & links
   ------------------------------------------------------------ */
.btn {
  align-items: center;
  border: 1px solid transparent;
  border-radius: 10px;
  cursor: pointer;
  display: inline-flex;
  font-size: 14px;
  font-weight: 700;
  gap: 8px;
  justify-content: center;
  padding: 11px 18px;
  text-decoration: none;
  transition: background .16s ease, border-color .16s ease, color .16s ease, box-shadow .16s ease, transform .16s ease;
  white-space: nowrap;
}
.btn .icon { height: 16px; width: 16px; }
.btn:active { transform: translateY(1px); }
.btn[disabled] { cursor: not-allowed; opacity: .65; transform: none; }

.btn-primary {
  background: var(--blue-600);
  border-color: var(--blue-600);
  box-shadow: 0 12px 24px -14px rgba(37, 99, 235, .9);
  color: #fff;
}
.btn-primary:hover { background: var(--blue-700); border-color: var(--blue-700); }

.btn-secondary { background: #fff; border-color: var(--line-strong); color: var(--ink-soft); }
.btn-secondary:hover { background: var(--blue-50); border-color: var(--blue-200); color: var(--blue-700); }

.btn-light { background: #fff; border-color: #fff; color: var(--blue-700); }
.btn-light:hover { background: #effcff; border-color: #effcff; }

.btn-outline-light { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .45); color: #fff; }
.btn-outline-light:hover { background: rgba(255, 255, 255, .18); border-color: rgba(255, 255, 255, .7); }

.btn-sm { border-radius: 9px; font-size: 13px; padding: 8px 13px; }
.btn-sm .icon { height: 15px; width: 15px; }
.btn-block { width: 100%; }

.topbar-cta .icon { transition: transform .16s ease; }
.topbar-cta:hover .icon { transform: translateX(2px); }

.back-link {
  align-items: center;
  color: var(--muted);
  display: inline-flex;
  font-size: 13px;
  font-weight: 650;
  gap: 6px;
  margin-bottom: 16px;
  text-decoration: none;
}
.back-link:hover { color: var(--blue-700); }
.back-link .icon { height: 15px; width: 15px; }

/* ------------------------------------------------------------
   Content & shared blocks
   ------------------------------------------------------------ */
.content {
  flex: 1;
  margin: 0 auto;
  max-width: 1200px;
  padding: 28px 32px 48px;
  width: 100%;
}

.page { animation: page-in .25s ease both; }

.page-head { margin-bottom: 22px; }
.page-head h2, .section-head h2 { font-size: 26px; font-weight: 800; letter-spacing: -.8px; line-height: 1.15; margin-top: 5px; }
.page-head p, .section-head p { color: var(--muted); font-size: 14px; margin-top: 7px; max-width: 640px; }

.section { margin-top: 44px; }
.section-head { margin-bottom: 18px; }

.notice {
  align-items: flex-start;
  border-radius: var(--radius);
  display: flex;
  font-size: 13px;
  gap: 10px;
  padding: 13px 15px;
}
.notice .icon { height: 17px; margin-top: 1px; width: 17px; }
.notice p { margin: 0; }
.notice a { font-weight: 700; text-decoration: underline; }
.notice-info { background: var(--blue-50); border: 1px solid var(--blue-200); color: #1e40af; }
.notice-danger { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; }
.notice-warning { background: #fefce8; border: 1px solid #fde68a; color: #854d0e; }
.notice-success { background: #f0fdf4; border: 1px solid #bbf7d0; color: #166534; }

code {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 6px;
  font-family: var(--mono);
  font-size: 12px;
  padding: 1px 5px;
}

/* ------------------------------------------------------------
   Home
   ------------------------------------------------------------ */
.hero {
  background:
    radial-gradient(900px 460px at 108% -18%, rgba(34, 211, 238, .5), transparent 62%),
    radial-gradient(760px 420px at -12% 112%, rgba(30, 64, 175, .9), transparent 64%),
    linear-gradient(118deg, #1d4ed8 0%, #2563eb 52%, #0891b2 100%);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-blue);
  color: #fff;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  overflow: hidden;
  padding: 44px 40px;
  position: relative;
}
.hero::before {
  background-image:
    linear-gradient(rgba(255, 255, 255, .07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .07) 1px, transparent 1px);
  background-size: 46px 46px;
  content: "";
  inset: 0;
  mask-image: radial-gradient(120% 120% at 100% 0, #000 18%, transparent 72%);
  pointer-events: none;
  position: absolute;
}
.hero::after {
  background: radial-gradient(circle, rgba(34, 211, 238, .5), transparent 62%);
  border-radius: 50%;
  content: "";
  filter: blur(8px);
  height: 380px;
  pointer-events: none;
  position: absolute;
  right: -130px;
  top: -150px;
  width: 380px;
}
.hero > * { position: relative; z-index: 1; }

.hero-copy { align-self: center; max-width: 680px; }

.hero-badge {
  align-items: center;
  background: rgba(255, 255, 255, .14);
  border: 1px solid rgba(255, 255, 255, .26);
  border-radius: 999px;
  display: inline-flex;
  font-size: 11.5px;
  font-weight: 650;
  gap: 7px;
  letter-spacing: .02em;
  padding: 7px 12px;
}
.hero-badge .icon { color: #a5f3fc; height: 14px; width: 14px; }

.hero h2 {
  font-size: clamp(30px, 3.5vw, 46px);
  font-weight: 800;
  letter-spacing: -1.6px;
  line-height: 1.06;
  margin: 16px 0 14px;
}
.hero-copy > p { color: #dbeafe; font-size: 14.5px; line-height: 1.7; max-width: 480px; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }

.hero-points {
  color: #dbeafe;
  display: flex;
  flex-wrap: wrap;
  font-size: 12px;
  gap: 8px 18px;
  list-style: none;
  margin: 22px 0 0;
  padding: 0;
}
.hero-points li { align-items: center; display: inline-flex; gap: 6px; }
.hero-points .icon { color: #67e8f9; height: 14px; width: 14px; }

.stats { display: grid; gap: 14px; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 18px; }
.stat {
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-xs);
  display: flex;
  gap: 12px;
  padding: 15px 16px;
}
.stat-icon {
  align-items: center;
  background: var(--blue-50);
  border-radius: 10px;
  color: var(--blue-600);
  display: inline-flex;
  flex: none;
  height: 38px;
  justify-content: center;
  width: 38px;
}
.stat-icon .icon { height: 18px; width: 18px; }
.stat b { display: block; font-size: 15px; font-weight: 800; letter-spacing: -.2px; }
.stat > div > span { color: var(--muted); display: block; font-size: 11.5px; }

.steps { display: grid; gap: 16px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.step {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 22px;
  position: relative;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.step:hover { border-color: var(--blue-200); box-shadow: var(--shadow); transform: translateY(-2px); }
.step-num {
  background: var(--blue-50);
  border-radius: 7px;
  color: var(--blue-600);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .04em;
  padding: 4px 8px;
  position: absolute;
  right: 18px;
  top: 18px;
}
.step-icon {
  align-items: center;
  background: linear-gradient(145deg, var(--blue-50), var(--cyan-50));
  border: 1px solid var(--blue-100);
  border-radius: 11px;
  color: var(--blue-600);
  display: inline-flex;
  height: 42px;
  justify-content: center;
  width: 42px;
}
.step-icon .icon { height: 20px; width: 20px; }
.step h3 { font-size: 16px; font-weight: 800; margin: 15px 0 6px; }
.step p { color: var(--muted); font-size: 13px; line-height: 1.6; }

.trust { display: grid; gap: 16px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.trust-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 22px;
}
.trust-icon {
  align-items: center;
  background: var(--cyan-50);
  border: 1px solid #cffafe;
  border-radius: 11px;
  color: var(--cyan-600);
  display: inline-flex;
  height: 40px;
  justify-content: center;
  width: 40px;
}
.trust-icon .icon { height: 19px; width: 19px; }
.trust-card h3 { font-size: 15.5px; font-weight: 800; margin: 14px 0 6px; }
.trust-card p { color: var(--muted); font-size: 13px; line-height: 1.6; }

.cta {
  align-items: center;
  background: linear-gradient(115deg, var(--blue-50), var(--cyan-50));
  border: 1px solid var(--blue-200);
  border-radius: var(--radius-lg);
  display: flex;
  gap: 20px;
  justify-content: space-between;
  margin-top: 44px;
  padding: 26px 30px;
}
.cta h2 { font-size: 21px; font-weight: 800; letter-spacing: -.5px; }
.cta p { color: var(--muted); font-size: 13.5px; margin-top: 4px; }

/* ------------------------------------------------------------
   Packages
   ------------------------------------------------------------ */
.package-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }

.package-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  padding: 22px 20px;
  position: relative;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.package-card:hover { border-color: var(--blue-200); box-shadow: var(--shadow); transform: translateY(-3px); }
.package-card.featured { border-color: var(--blue-500); box-shadow: 0 20px 44px -26px rgba(37, 99, 235, .75); }

.package-badge {
  align-items: center;
  background: var(--blue-600);
  border-radius: 999px;
  box-shadow: 0 6px 14px -6px rgba(37, 99, 235, .9);
  color: #fff;
  display: inline-flex;
  font-size: 10px;
  font-weight: 800;
  gap: 4px;
  left: 50%;
  letter-spacing: .05em;
  padding: 5px 10px;
  position: absolute;
  text-transform: uppercase;
  top: -12px;
  transform: translateX(-50%);
  white-space: nowrap;
}
.package-badge .icon { height: 12px; width: 12px; }

.package-card h3 { font-size: 16px; font-weight: 800; }
.package-price { align-items: baseline; display: flex; gap: 4px; margin: 10px 0 16px; }
.package-price span { font-size: 26px; font-weight: 800; letter-spacing: -1px; }
.package-price small { color: var(--muted); font-size: 11px; font-weight: 600; }

.spec-list { display: grid; gap: 2px; list-style: none; margin: 0 0 20px; padding: 0; }
.spec { align-items: center; color: var(--muted); display: flex; font-size: 12.5px; gap: 8px; padding: 5px 0; }
.spec .icon { color: #94a3b8; height: 15px; width: 15px; }
.spec b { color: var(--ink-soft); font-weight: 700; margin-left: auto; }
.package-card .btn { margin-top: auto; width: 100%; }

.package-note { margin-top: 18px; }

/* ------------------------------------------------------------
   Forms & lookup
   ------------------------------------------------------------ */
.field-label { display: block; font-size: 12px; font-weight: 750; margin-bottom: 7px; }

.input {
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  box-shadow: var(--shadow-xs);
  display: block;
  font-size: 14px;
  padding: 11px 13px;
  transition: border-color .16s ease, box-shadow .16s ease;
  width: 100%;
}
.input::placeholder { color: #94a3b8; }
.input:focus { border-color: var(--blue-500); box-shadow: 0 0 0 4px rgba(37, 99, 235, .14); outline: none; }
.input[aria-invalid="true"] { border-color: var(--danger); }

.field-help { color: var(--muted); font-size: 11.5px; margin-top: 7px; }

.input-row { display: flex; gap: 10px; }
.input-row .input { flex: 1; min-width: 0; }

.lookup-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  max-width: 780px;
  padding: 24px;
}

.saved-order {
  align-items: center;
  background: var(--blue-50);
  border: 1px solid var(--blue-200);
  border-radius: var(--radius);
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  margin-top: 18px;
  padding: 14px 16px;
}
.saved-order .saved-label { color: var(--blue-700); display: block; font-size: 10.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.saved-order code { background: #fff; font-size: 12.5px; }
.saved-actions { display: flex; flex-wrap: wrap; gap: 8px; }

.order-result { margin-top: 18px; max-width: 780px; }
.result-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 22px;
}
.result-head { align-items: flex-start; display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; }
.result-head h3 { font-size: 17px; font-weight: 800; letter-spacing: -.3px; }
.result-head p { color: var(--muted); font-size: 12.5px; margin-top: 3px; }
.result-list { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin: 18px 0; }
.result-list div { background: var(--surface-soft); border: 1px solid var(--line-soft); border-radius: 10px; padding: 10px 12px; }
.result-list span { color: var(--muted); display: block; font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.result-list b { display: block; font-size: 13.5px; margin-top: 3px; }
.result-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.result-msg { color: var(--muted); font-size: 13px; margin-top: 10px; }

.loading-card {
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  color: var(--muted);
  display: flex;
  font-size: 13px;
  gap: 10px;
  padding: 22px;
}

/* ------------------------------------------------------------
   Support
   ------------------------------------------------------------ */
.support-grid { align-items: start; display: grid; gap: 18px; grid-template-columns: 1.05fr .95fr; }

.support-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 26px;
}
.support-icon {
  align-items: center;
  background: linear-gradient(145deg, var(--blue-50), var(--cyan-50));
  border: 1px solid var(--blue-100);
  border-radius: 12px;
  color: var(--blue-600);
  display: inline-flex;
  height: 46px;
  justify-content: center;
  width: 46px;
}
.support-icon .icon { height: 22px; width: 22px; }
.support-card h3 { font-size: 18px; font-weight: 800; margin: 14px 0 6px; }
.support-card > p { color: var(--muted); font-size: 13.5px; line-height: 1.65; max-width: 380px; }
.support-card .btn { margin-top: 18px; }
.support-number { align-items: center; color: var(--muted); display: flex; font-size: 12.5px; gap: 7px; margin-top: 14px; }
.support-number .icon { height: 14px; width: 14px; }

.support-side { display: grid; gap: 14px; }
.mini-card {
  align-items: flex-start;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: flex;
  gap: 12px;
  padding: 18px;
}
.mini-icon {
  align-items: center;
  background: var(--cyan-50);
  border-radius: 9px;
  color: var(--cyan-600);
  display: inline-flex;
  flex: none;
  height: 34px;
  justify-content: center;
  width: 34px;
}
.mini-icon .icon { height: 17px; width: 17px; }
.mini-card h3 { font-size: 14px; font-weight: 800; }
.mini-card p { color: var(--muted); font-size: 12.5px; line-height: 1.55; margin-top: 3px; }

.faq { max-width: 780px; margin-top: 26px; }
.faq > h3 { font-size: 17px; font-weight: 800; margin-bottom: 12px; }
.faq details {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 10px;
  overflow: hidden;
}
.faq summary {
  align-items: center;
  cursor: pointer;
  display: flex;
  font-size: 13.5px;
  font-weight: 700;
  gap: 12px;
  justify-content: space-between;
  list-style: none;
  padding: 15px 18px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary .icon { color: var(--muted); height: 16px; transition: transform .18s ease; width: 16px; }
.faq details[open] summary .icon { transform: rotate(90deg); }
.faq details[open] summary { color: var(--blue-700); }
.faq details p { color: var(--muted); font-size: 13px; line-height: 1.65; padding: 0 18px 16px; }

/* ------------------------------------------------------------
   Checkout
   ------------------------------------------------------------ */
.checkout-grid { display: grid; gap: 18px; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); }

.summary-card, .form-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 26px;
}
.summary-card h2 { font-size: 21px; font-weight: 800; letter-spacing: -.5px; margin-top: 6px; }
.summary-price { align-items: baseline; display: flex; gap: 5px; margin: 8px 0 16px; }
.summary-price span { font-size: 28px; font-weight: 800; letter-spacing: -1px; }
.summary-price small { color: var(--muted); font-size: 11.5px; }

.summary-specs { border-top: 1px solid var(--line-soft); list-style: none; margin: 0; padding: 10px 0 0; }
.summary-specs li { align-items: center; color: var(--muted); display: flex; font-size: 13px; gap: 9px; padding: 7px 0; }
.summary-specs .icon { height: 15px; width: 15px; color: #94a3b8; }
.summary-specs b { color: var(--ink-soft); margin-left: auto; }

.summary-total {
  align-items: center;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 10px;
  display: flex;
  font-size: 13px;
  justify-content: space-between;
  margin-top: 14px;
  padding: 13px 14px;
}
.summary-total b { font-size: 16px; }
.summary-note { align-items: center; color: var(--muted); display: flex; font-size: 11.5px; gap: 6px; margin-top: 14px; }
.summary-note .icon { color: var(--success); height: 14px; width: 14px; }

.steps-mini { align-items: center; display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 16px; }
.steps-mini span {
  align-items: center;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  display: inline-flex;
  font-size: 11px;
  font-weight: 700;
  gap: 5px;
  padding: 4px 10px;
}
.steps-mini .done { background: #f0fdf4; border-color: #bbf7d0; color: #15803d; }
.steps-mini .active { background: var(--blue-50); border-color: var(--blue-200); color: var(--blue-700); }
.steps-mini .icon { height: 12px; width: 12px; }

.form-card h2 { font-size: 21px; font-weight: 800; letter-spacing: -.5px; }
.form-lead { color: var(--muted); font-size: 13px; line-height: 1.6; margin: 6px 0 18px; }
.form-foot { align-items: center; color: var(--muted); display: flex; font-size: 11.5px; gap: 6px; margin-top: 14px; }
.form-foot .icon { height: 13px; width: 13px; }
#form-error { margin: 12px 0; }
#order-submit { margin-top: 16px; }

/* ------------------------------------------------------------
   Payment
   ------------------------------------------------------------ */
.pay-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
  margin: 0 auto;
  max-width: 560px;
  padding: 30px;
}
.pay-head { text-align: center; }
.pay-head h2 { font-size: 23px; font-weight: 800; letter-spacing: -.7px; margin: 12px 0 4px; }
.pay-head p { color: var(--muted); font-family: var(--mono); font-size: 12px; overflow-wrap: anywhere; }

.badge {
  align-items: center;
  border-radius: 999px;
  display: inline-flex;
  font-size: 11px;
  font-weight: 800;
  gap: 6px;
  letter-spacing: .02em;
  padding: 6px 11px;
}
.badge .icon { height: 13px; width: 13px; }
.badge-warning, .badge-pending { background: #fef9c3; color: #713f12; }
.badge-success { background: #dcfce7; color: #166534; }
.badge-danger { background: #fee2e2; color: #991b1b; }
.badge-info { background: var(--blue-50); color: var(--blue-700); }
.badge-neutral, .badge-unknown { background: #f1f5f9; color: #475569; }
.badge-critical { background: #fee2e2; color: var(--critical); }

.qr-frame {
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  display: flex;
  justify-content: center;
  margin: 22px auto 14px;
  max-width: 320px;
  min-height: 240px;
  padding: 14px;
}
.qr-frame img { border-radius: 8px; display: block; height: auto; width: 100%; }
.qr-empty { color: var(--muted); padding: 22px; text-align: center; }
.qr-empty .icon { color: #94a3b8; height: 34px; margin-bottom: 8px; width: 34px; }
.qr-empty p { font-size: 12px; line-height: 1.55; }

.qr-frame.is-static {
  background: var(--surface-soft);
  border-style: dashed;
  min-height: 0;
  padding: 22px 18px;
}

.pay-amount { font-size: 24px; font-weight: 800; letter-spacing: -1px; text-align: center; }

.pay-steps { color: var(--muted); font-size: 12.5px; line-height: 1.7; margin: 18px 0; padding-left: 20px; text-align: left; }
.pay-steps li { margin-bottom: 4px; }

#qr-link, #payment-cta { display: flex; margin: 0 auto; width: fit-content; }

.polling {
  align-items: center;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--muted);
  display: flex;
  font-size: 12px;
  gap: 8px;
  justify-content: center;
  margin-top: 18px;
  padding: 10px 14px;
}
.polling .icon { height: 15px; width: 15px; }

.spin { animation: spin 1s linear infinite; }

/* ------------------------------------------------------------
   Credentials
   ------------------------------------------------------------ */
.cred-success {
  align-items: flex-start;
  background: linear-gradient(120deg, #f0fdf4, var(--blue-50));
  border: 1px solid #bbf7d0;
  border-radius: var(--radius-lg);
  display: flex;
  gap: 14px;
  margin: 0 auto 18px;
  max-width: 760px;
  padding: 22px;
}
.cred-success-icon {
  align-items: center;
  background: #fff;
  border-radius: 12px;
  color: var(--success);
  display: inline-flex;
  flex: none;
  height: 46px;
  justify-content: center;
  width: 46px;
}
.cred-success-icon .icon { height: 24px; width: 24px; }
.cred-success h2 { font-size: 22px; font-weight: 800; letter-spacing: -.6px; margin: 4px 0 5px; }
.cred-success p { color: var(--muted); font-size: 13px; line-height: 1.6; max-width: 560px; }

.cred-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  margin: 0 auto;
  max-width: 760px;
  padding: 10px 24px;
}

.cred-panel {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 12px;
  padding: 18px 0;
}
.cred-panel-icon {
  align-items: center;
  background: var(--blue-50);
  border-radius: 10px;
  color: var(--blue-600);
  display: inline-flex;
  flex: none;
  height: 38px;
  justify-content: center;
  width: 38px;
}
.cred-panel-icon .icon { height: 18px; width: 18px; }
.cred-panel span:not(.cred-panel-icon) { color: var(--muted); display: block; font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.cred-panel a { align-items: center; color: var(--blue-700); display: inline-flex; font-size: 14px; font-weight: 750; gap: 5px; margin-top: 2px; text-decoration: none; }
.cred-panel a:hover { text-decoration: underline; }
.cred-panel a .icon { height: 13px; width: 13px; }

.cred-row {
  align-items: center;
  border-bottom: 1px solid var(--line-soft);
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: space-between;
  padding: 14px 0;
}
.cred-row:last-child { border-bottom: 0; }
.cred-key { align-items: center; color: var(--muted); display: inline-flex; font-size: 12px; font-weight: 650; gap: 7px; }
.cred-key .icon { height: 15px; width: 15px; }
.cred-value { align-items: center; display: flex; gap: 7px; justify-content: flex-end; min-width: 0; }
.cred-value code { background: var(--surface-soft); font-size: 12.5px; overflow-wrap: anywhere; padding: 6px 9px; }
.copy-btn { height: 32px; width: 32px; }
.copy-btn .icon { height: 14px; width: 14px; }
.copy-btn.copied { background: #f0fdf4; border-color: #bbf7d0; color: var(--success); }

.cred-note { margin: 18px auto 0; max-width: 760px; }

/* ------------------------------------------------------------
   Not found, footer, toast
   ------------------------------------------------------------ */
.notfound {
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  display: flex;
  flex-direction: column;
  margin: 40px auto;
  max-width: 560px;
  padding: 48px 32px;
  text-align: center;
}
.notfound-icon {
  align-items: center;
  background: var(--blue-50);
  border-radius: 16px;
  color: var(--blue-600);
  display: inline-flex;
  height: 60px;
  justify-content: center;
  width: 60px;
}
.notfound-icon .icon { height: 30px; width: 30px; }
.notfound h2 { font-size: 24px; font-weight: 800; letter-spacing: -.7px; margin-top: 18px; }
.notfound p { color: var(--muted); font-size: 13.5px; margin-top: 7px; max-width: 380px; }
.notfound-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 22px; }

.footer {
  border-top: 1px solid var(--line);
  color: var(--muted);
  display: flex;
  font-size: 11.5px;
  gap: 12px;
  justify-content: space-between;
  margin: 0 auto;
  max-width: 1200px;
  padding: 20px 32px 26px;
  width: 100%;
}

.toast {
  align-items: center;
  background: #0f172a;
  border-radius: 10px;
  bottom: 24px;
  box-shadow: 0 18px 40px -16px rgba(15, 23, 42, .7);
  color: #fff;
  display: flex;
  font-size: 13px;
  font-weight: 600;
  gap: 8px;
  left: 50%;
  max-width: calc(100vw - 32px);
  opacity: 0;
  padding: 12px 16px;
  pointer-events: none;
  position: fixed;
  transform: translate(-50%, 14px);
  transition: opacity .2s ease, transform .2s ease;
  z-index: 90;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast .icon { color: #67e8f9; height: 16px; width: 16px; }

.noscript {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 10px;
  color: #991b1b;
  left: 50%;
  max-width: 440px;
  padding: 14px 18px;
  position: fixed;
  text-align: center;
  top: 16px;
  transform: translateX(-50%);
  z-index: 100;
}

/* ------------------------------------------------------------
   Loading skeletons
   ------------------------------------------------------------ */
.skeleton-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 22px 20px;
}
.skeleton {
  animation: shimmer 1.4s linear infinite;
  background: linear-gradient(90deg, #eef4fb 25%, #e3edfa 37%, #eef4fb 63%);
  background-size: 200% 100%;
  border-radius: 7px;
}
.skeleton-line { height: 12px; margin-bottom: 10px; }
.skeleton-line.w40 { width: 40%; }
.skeleton-line.w60 { width: 60%; }
.skeleton-line.w80 { width: 80%; }
.skeleton-price { height: 26px; margin: 16px 0; width: 55%; }
.skeleton-btn { height: 38px; margin-top: 18px; }

/* ------------------------------------------------------------
   Responsive
   ------------------------------------------------------------ */
@media (max-width: 1080px) {
  .hero { padding: 34px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps, .trust { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .checkout-grid { grid-template-columns: 1fr; }
  .support-grid { grid-template-columns: 1fr; }
}

@media (max-width: 1024px) {
  .app { display: block; }

  .sidebar {
    bottom: 0;
    box-shadow: 18px 0 50px -20px rgba(15, 23, 42, .4);
    left: 0;
    position: fixed;
    top: 0;
    transform: translateX(-102%);
    transition: transform .24s ease;
    width: min(300px, 86vw);
    z-index: 60;
  }
  .sidebar.open { transform: translateX(0); }
  .sidebar-close { display: inline-flex; }

  .topbar .menu-btn { display: inline-flex; }
  .topbar-brand { display: inline-flex; }
  .page-title { display: none; }

  .topbar-inner { min-height: 64px; padding: 10px 16px; }
  .content { padding: 20px 16px 40px; }
  .footer { padding: 18px 16px 24px; }


  .health { display: none; }
}

@media (max-width: 760px) {
  .hero { border-radius: var(--radius-lg); padding: 26px; }
  .hero h2 { font-size: 32px; letter-spacing: -1.1px; }
  .hero-actions .btn { flex: 1 1 auto; }

  .section { margin-top: 34px; }
  .page-head h2, .section-head h2 { font-size: 23px; }

  .steps, .trust, .support-grid { grid-template-columns: 1fr; }
  .cta { align-items: flex-start; flex-direction: column; padding: 22px; }
  .cta .btn { width: 100%; }

  .input-row { flex-direction: column; }
  .input-row .btn { width: 100%; }

  .lookup-card, .support-card, .summary-card, .form-card, .pay-card { padding: 20px; }
  .pay-card { border-radius: var(--radius-lg); }
  .cred-card { padding: 6px 18px; }
  .cred-success { padding: 18px; }
  .cred-success h2 { font-size: 19px; }
  .cred-row { align-items: flex-start; flex-direction: column; }
  .cred-value { justify-content: flex-start; width: 100%; }

  .result-head { flex-direction: column; }
  .saved-order { align-items: flex-start; flex-direction: column; }
  .saved-actions { width: 100%; }
  .saved-actions .btn { flex: 1; }

  .footer { flex-direction: column; gap: 4px; }
}

@media (max-width: 560px) {
  .content { padding: 16px 14px 36px; }
  .topbar-inner { padding: 8px 14px; }
  .topbar-cta { font-size: 12px; padding: 8px 12px; }
  .topbar-cta .icon { height: 15px; width: 15px; }

  .hero { padding: 22px; }
  .hero h2 { font-size: 28px; }
  .hero-copy > p { font-size: 13.5px; }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; }
  .hero-points { gap: 6px 14px; }

  .stats { gap: 10px; }
  .stat { padding: 12px; }
  .stat-icon { height: 34px; width: 34px; }
  .stat b { font-size: 13.5px; }
  .stat > div > span { font-size: 10.5px; }

  .package-grid { grid-template-columns: 1fr; }
  .pay-card { padding: 18px; }
  .notfound { margin: 20px auto; padding: 34px 20px; }
  .notfound-actions { width: 100%; }
  .notfound-actions .btn { width: 100%; }

  .badge { font-size: 10px; }
  .polling { align-items: flex-start; text-align: left; }
}

/* ------------------------------------------------------------
   Motion
   ------------------------------------------------------------ */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
@keyframes page-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .001ms !important;
  }
  .spin { animation: none; }
}
