:root {
  --hq-bg: #f4f7fb;
  --hq-bg-elev: #ffffff;
  --hq-text: #0f172a;
  --hq-muted: #64748b;
  --hq-border: #e2e8f0;
  --hq-brand: #0f766e;
  --hq-brand-2: #0891b2;
  --hq-brand-soft: rgba(15, 118, 110, 0.1);
  --hq-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
  --hq-shadow-hover: 0 18px 40px rgba(15, 118, 110, 0.14);
  --hq-input: #ffffff;
  --hq-glow: rgba(15, 118, 110, 0.08);
}
html.dark {
  --hq-bg: #070b14;
  --hq-bg-elev: #101826;
  --hq-text: #e8eef7;
  --hq-muted: #94a3b8;
  --hq-border: #1e2a3c;
  --hq-brand: #2dd4bf;
  --hq-brand-2: #38bdf8;
  --hq-brand-soft: rgba(45, 212, 191, 0.12);
  --hq-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
  --hq-shadow-hover: 0 18px 44px rgba(45, 212, 191, 0.12);
  --hq-input: #0c1320;
  --hq-glow: rgba(45, 212, 191, 0.06);
  color-scheme: dark;
}
html, body { height: 100%; font-family: Inter, ui-sans-serif, system-ui, sans-serif; }
body { background: var(--hq-bg); color: var(--hq-text); transition: background 0.3s ease, color 0.3s ease; }

/* ── Cards ── */
.hq-card {
  position: relative;
  border: 1px solid var(--hq-border);
  background: linear-gradient(180deg, color-mix(in srgb, var(--hq-bg-elev) 92%, white), var(--hq-bg-elev));
  border-radius: 1.1rem;
  box-shadow: var(--hq-shadow);
  transition: transform 0.28s cubic-bezier(.4,0,.2,1), box-shadow 0.28s ease, border-color 0.28s ease;
  animation: hq-card-in 0.5s cubic-bezier(.4,0,.2,1) both;
  overflow: hidden;
}
.hq-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(15,118,110,.12), transparent 42%);
  opacity: 0.65;
  transition: opacity 0.28s ease;
}
html.dark .hq-card::after { background: linear-gradient(135deg, rgba(45,212,191,.14), transparent 46%); }
.hq-card > * { position: relative; z-index: 1; }
.hq-card.hq-empty { border-style: dashed; box-shadow: none; }
.hq-card.hq-empty:hover { transform: none; box-shadow: none; }
.hq-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--hq-shadow-hover);
  border-color: color-mix(in srgb, var(--hq-brand) 40%, var(--hq-border));
}
.hq-card:hover::after { opacity: 1; }
.hq-card::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--hq-brand), var(--hq-brand-2));
  animation: hq-bar 1.1s cubic-bezier(.4,0,.2,1) both;
}
.hq-kpi { overflow: hidden; }

/* Staggered card entrance for grids */
.hq-card:nth-child(1) { animation-delay: 0.04s; }
.hq-card:nth-child(2) { animation-delay: 0.08s; }
.hq-card:nth-child(3) { animation-delay: 0.12s; }
.hq-card:nth-child(4) { animation-delay: 0.16s; }
.hq-card:nth-child(5) { animation-delay: 0.20s; }
.hq-card:nth-child(6) { animation-delay: 0.24s; }
.hq-card:nth-child(7) { animation-delay: 0.28s; }
.hq-card:nth-child(8) { animation-delay: 0.32s; }
.hq-card:nth-child(9) { animation-delay: 0.36s; }
.hq-card:nth-child(10) { animation-delay: 0.40s; }

@keyframes hq-card-in {
  from { opacity: 0; transform: translateY(14px) scale(0.98); }
  to { opacity: 1; transform: none; }
}
@keyframes hq-bar {
  from { transform: scaleY(0); transform-origin: top; }
  to { transform: scaleY(1); transform-origin: top; }
}
@keyframes hq-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
@keyframes hq-shimmer {
  0% { background-position: -200% center; }
  100% { background-position: 200% center; }
}

/* ── Buttons & icons ── */
.hq-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 0.75rem;
  border: 1px solid var(--hq-border);
  background: var(--hq-bg-elev);
  color: var(--hq-text);
  transition: border-color 0.2s ease, color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
}
.hq-icon-btn:hover {
  border-color: var(--hq-brand);
  color: var(--hq-brand);
  transform: scale(1.05);
  box-shadow: 0 4px 12px var(--hq-glow);
}

/* ── Footer ── */
.hq-footer {
  margin-top: auto;
  padding: 1.5rem 1.5rem;
  text-align: center;
  font-size: 0.8rem;
  letter-spacing: 0.03em;
  color: var(--hq-muted);
  border-top: 1px solid var(--hq-border);
  background: color-mix(in srgb, var(--hq-bg-elev) 60%, transparent);
  backdrop-filter: blur(8px);
}
.hq-footer::before {
  content: "";
  display: block;
  width: 2.5rem;
  height: 2px;
  margin: 0 auto 0.75rem;
  border-radius: 1px;
  background: linear-gradient(90deg, var(--hq-brand), var(--hq-brand-2));
}

.hq-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.8rem;
  background: linear-gradient(135deg, #0f766e, #0e7490);
  color: #fff;
  font-weight: 600;
  font-size: 0.875rem;
  padding: 0.55rem 1rem;
  box-shadow: 0 8px 20px rgba(15, 118, 110, 0.25);
  transition: filter 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  border: none;
  cursor: pointer;
}
html.dark .hq-btn-primary {
  background: linear-gradient(135deg, #0d9488, #0891b2);
  box-shadow: 0 8px 24px rgba(45, 212, 191, 0.18);
}
.hq-btn-primary:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(15, 118, 110, 0.32);
}
.hq-btn-ghost {
  display: inline-flex;
  align-items: center;
  border-radius: 0.8rem;
  border: 1px solid var(--hq-border);
  padding: 0.55rem 1rem;
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--hq-text);
  background: transparent;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.hq-btn-ghost:hover {
  border-color: var(--hq-brand);
  background: var(--hq-brand-soft);
}
.hq-btn-lg { padding: 0.75rem 1.2rem; }

.hq-mark {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.85rem;
  background: linear-gradient(135deg, #0f766e, #0369a1);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  box-shadow: 0 4px 14px rgba(15, 118, 110, 0.3);
}

/* ── Landing page ── */
.hq-landing {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: hidden;
}
.hq-landing-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 60% at 10% 0%, rgba(15,118,110,0.12), transparent 60%),
    radial-gradient(ellipse 60% 50% at 90% 10%, rgba(8,145,178,0.10), transparent 55%),
    radial-gradient(ellipse 50% 40% at 50% 100%, rgba(15,118,110,0.06), transparent 50%);
}
html.dark .hq-landing-bg {
  background:
    radial-gradient(ellipse 80% 60% at 10% 0%, rgba(45,212,191,0.08), transparent 60%),
    radial-gradient(ellipse 60% 50% at 90% 10%, rgba(56,189,248,0.06), transparent 55%),
    radial-gradient(ellipse 50% 40% at 50% 100%, rgba(45,212,191,0.04), transparent 50%);
}
.hq-landing > *:not(.hq-landing-bg) { position: relative; z-index: 1; }

.hq-landing-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 1.5rem;
  border-bottom: 1px solid var(--hq-border);
  background: color-mix(in srgb, var(--hq-bg-elev) 82%, transparent);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 20;
}
.hq-landing-brand { display: flex; align-items: center; gap: 0.75rem; text-decoration: none; color: inherit; }
.hq-landing-logo { font-weight: 800; letter-spacing: -0.03em; font-size: 1.1rem; }
.hq-landing-tag { font-size: 0.7rem; color: var(--hq-muted); }

.hq-hero {
  display: grid;
  gap: 2rem;
  padding: 3.5rem 1.5rem 2rem;
  max-width: 72rem;
  margin: 0 auto;
  width: 100%;
}
@media (min-width: 900px) {
  .hq-hero { grid-template-columns: 1.2fr 0.8fr; align-items: center; padding-top: 5rem; }
}
.hq-kicker {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--hq-brand);
}
.hq-hero h1 {
  margin: 0.6rem 0 0;
  font-size: clamp(1.8rem, 4vw, 3.1rem);
  line-height: 1.12;
  letter-spacing: -0.035em;
  font-weight: 800;
}
.hq-lede { margin-top: 1rem; font-size: 1.05rem; color: var(--hq-muted); max-width: 38rem; line-height: 1.65; }
.hq-hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.6rem; }
.hq-hero-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--hq-border);
}
.hq-hero-metric strong {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--hq-text);
}
.hq-hero-metric span {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.75rem;
  color: var(--hq-muted);
}
.hq-hero-panel {
  padding: 1.25rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
  animation: hq-float 6s ease-in-out infinite;
}
.hq-hero-stat {
  padding: 0.75rem;
  border-radius: 0.75rem;
  background: var(--hq-brand-soft);
  transition: transform 0.2s ease;
}
.hq-hero-stat:hover { transform: scale(1.03); }
.hq-hero-stat span { display: block; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--hq-muted); }
.hq-hero-stat strong { display: block; margin-top: 0.2rem; font-size: 0.9rem; }

.hq-landing-section {
  padding: 2rem 1.5rem 3rem;
  max-width: 72rem;
  margin: 0 auto;
  width: 100%;
}
.hq-section-head { margin-bottom: 1.5rem; }
.hq-section-head h2 {
  margin-top: 0.5rem;
  font-size: clamp(1.3rem, 2.5vw, 1.75rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}
.hq-landing-grid {
  display: grid;
  gap: 1rem;
}
@media (min-width: 768px) { .hq-landing-grid { grid-template-columns: repeat(3, 1fr); } }
.hq-tile h3 { font-size: 1rem; font-weight: 700; margin-top: 0.75rem; }
.hq-tile p { margin-top: 0.4rem; font-size: 0.875rem; color: var(--hq-muted); line-height: 1.55; }
.hq-tile-icon-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.75rem;
  background: var(--hq-brand-soft);
  color: var(--hq-brand);
}
.hq-tile-icon { width: 1.25rem; height: 1.25rem; }

.hq-cta-band {
  padding: 0 1.5rem 2rem;
  max-width: 72rem;
  margin: 0 auto;
  width: 100%;
}
.hq-cta-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 2rem 2.5rem;
  border-radius: 1.25rem;
  border: 1px solid var(--hq-border);
  background: linear-gradient(135deg, var(--hq-brand-soft), color-mix(in srgb, var(--hq-bg-elev) 90%, transparent));
  box-shadow: var(--hq-shadow);
}
.hq-cta-inner h2 {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.hq-cta-inner p {
  margin-top: 0.4rem;
  font-size: 0.9rem;
  color: var(--hq-muted);
  max-width: 28rem;
}

/* ── Auth pages ── */
.hq-auth-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--hq-bg);
}
.hq-auth-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
}
.hq-auth-back {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--hq-muted);
  transition: color 0.2s ease;
}
.hq-auth-back:hover { color: var(--hq-brand); }

/* ── Datepicker ── */
.hq-dp { position: relative; display: block; width: 100%; min-width: 11rem; }
.hq-dp-native {
  position: absolute !important;
  opacity: 0 !important;
  pointer-events: none !important;
  width: 1px !important;
  height: 1px !important;
}
.hq-dp-trigger {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: 0.25rem;
  border-radius: 0.75rem;
  border: 1px solid var(--hq-border);
  background: var(--hq-input);
  color: var(--hq-text);
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.hq-dp-trigger:hover,
.hq-dp-trigger:focus-visible {
  border-color: var(--hq-brand);
  box-shadow: 0 0 0 3px var(--hq-brand-soft);
  outline: none;
}
.hq-dp-trigger.is-empty .hq-dp-value { color: var(--hq-muted); }
.hq-dp-pop {
  position: fixed;
  z-index: 100;
  width: 300px;
  padding: 0.85rem;
  border-radius: 1rem;
  border: 1px solid var(--hq-border);
  background: var(--hq-bg-elev);
  box-shadow: var(--hq-shadow-hover);
  animation: hq-dp-in 0.22s cubic-bezier(.4,0,.2,1) both;
}
.hq-dp-pop-above {
  animation: hq-dp-in-above 0.22s cubic-bezier(.4,0,.2,1) both;
}
@keyframes hq-dp-in-above {
  from { opacity: 0; transform: translateY(6px) scale(0.97); }
  to { opacity: 1; transform: none; }
}
@keyframes hq-dp-in {
  from { opacity: 0; transform: translateY(-6px) scale(0.97); }
  to { opacity: 1; transform: none; }
}
.hq-dp-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.6rem; }
.hq-dp-title { font-size: 0.9rem; font-weight: 700; }
.hq-dp-head button, .hq-dp-actions button {
  border-radius: 0.5rem;
  border: 1px solid var(--hq-border);
  background: transparent;
  color: var(--hq-text);
  padding: 0.25rem 0.6rem;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.hq-dp-head button:hover, .hq-dp-actions button:hover {
  background: var(--hq-brand-soft);
  border-color: var(--hq-brand);
}
.hq-dp-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 0.2rem; text-align: center; }
.hq-dp-dow { font-size: 0.65rem; font-weight: 700; color: var(--hq-muted); padding: 0.25rem 0; }
.hq-dp-day {
  border: 0;
  background: transparent;
  color: var(--hq-text);
  border-radius: 0.5rem;
  height: 2.1rem;
  font-size: 0.8rem;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}
.hq-dp-day:hover {
  background: var(--hq-brand-soft);
  transform: scale(1.08);
}
.hq-dp-day.is-today { box-shadow: inset 0 0 0 1.5px var(--hq-brand); font-weight: 700; }
.hq-dp-day.is-selected {
  background: linear-gradient(135deg, var(--hq-brand), var(--hq-brand-2));
  color: #fff;
  font-weight: 700;
  box-shadow: 0 4px 12px var(--hq-glow);
}
.hq-dp-actions { display: flex; justify-content: space-between; margin-top: 0.65rem; gap: 0.5rem; }

/* ── Dark mode overrides ── */
html.dark .bg-white { background-color: var(--hq-bg-elev) !important; }
html.dark .bg-slate-50 { background-color: var(--hq-bg) !important; }
html.dark .bg-slate-100 { background-color: #152033 !important; }
html.dark .text-slate-900, html.dark .text-slate-800 { color: var(--hq-text) !important; }
html.dark .text-slate-700 { color: #cbd5e1 !important; }
html.dark .text-slate-600, html.dark .text-slate-500, html.dark .text-slate-400 { color: var(--hq-muted) !important; }
html.dark .border-slate-200, html.dark .border-slate-100 { border-color: var(--hq-border) !important; }
html.dark .hover\:bg-slate-50:hover { background-color: #152033 !important; }
html.dark .text-teal-800, html.dark .text-teal-700 { color: #5eead4 !important; }
html.dark aside, html.dark header { background: color-mix(in srgb, var(--hq-bg-elev) 92%, black) !important; }
html.dark input, html.dark select, html.dark textarea {
  background: var(--hq-input);
  color: var(--hq-text);
  border-color: var(--hq-border);
}
html.dark .bg-rose-50 { background-color: rgba(127, 29, 29, 0.35) !important; }
html.dark .text-rose-800 { color: #fecaca !important; }
html.dark .border-rose-200 { border-color: rgba(251, 113, 133, 0.3) !important; }
html.dark .bg-amber-50 { background-color: rgba(120, 53, 15, 0.35) !important; }
html.dark .text-amber-800 { color: #fde68a !important; }
html.dark .border-amber-200 { border-color: rgba(251, 191, 36, 0.28) !important; }
html.dark .bg-emerald-50 { background-color: rgba(6, 78, 59, 0.4) !important; }
html.dark .text-emerald-800 { color: #a7f3d0 !important; }
html.dark .bg-sky-50 { background-color: rgba(12, 74, 110, 0.4) !important; }
html.dark .text-sky-800 { color: #7dd3fc !important; }
html.dark .bg-indigo-50 { background-color: rgba(49, 46, 129, 0.4) !important; }
html.dark .text-indigo-800 { color: #c7d2fe !important; }
html.dark .bg-violet-50 { background-color: rgba(76, 29, 149, 0.4) !important; }
html.dark .text-violet-800 { color: #ddd6fe !important; }
html.dark .bg-orange-50 { background-color: rgba(124, 45, 18, 0.4) !important; }
html.dark .text-orange-800 { color: #fed7aa !important; }
html.dark .bg-teal-50 { background-color: rgba(15, 118, 110, 0.25) !important; }
html.dark .text-cyan-800 { color: #a5f3fc !important; }
html.dark .bg-cyan-50 { background-color: rgba(14, 116, 144, 0.35) !important; }
html.dark table.hq-responsive tr { background: var(--hq-bg-elev); }
html.dark #hq-search-results { background: var(--hq-bg-elev) !important; }
html.dark .rounded-2xl.border-dashed { background: var(--hq-bg-elev) !important; }

/* ── Modal popups ── */
.hq-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  transition: opacity 0.22s cubic-bezier(.4,0,.2,1);
}
.hq-modal-overlay.hq-modal-open { opacity: 1; }
.hq-modal-overlay.hq-modal-closing { opacity: 0; pointer-events: none; }
.hq-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(6px);
}
html.dark .hq-modal-backdrop { background: rgba(0, 0, 0, 0.65); }
.hq-modal-panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-height: min(90vh, 860px);
  display: flex;
  flex-direction: column;
  border-radius: 1.25rem;
  border: 1px solid var(--hq-border);
  background: var(--hq-bg-elev);
  box-shadow: var(--hq-shadow-hover);
  transform: translateY(12px) scale(0.97);
  opacity: 0;
  transition: transform 0.28s cubic-bezier(.4,0,.2,1), opacity 0.28s ease;
  overflow: hidden;
}
.hq-modal-open .hq-modal-panel {
  transform: none;
  opacity: 1;
}
.hq-modal-closing .hq-modal-panel {
  transform: translateY(8px) scale(0.98);
  opacity: 0;
}
.hq-modal-sm { max-width: 24rem; }
.hq-modal-md { max-width: 28rem; }
.hq-modal-lg { max-width: 36rem; }
.hq-modal-xl { max-width: 48rem; }
.hq-modal-2xl { max-width: 56rem; }
.hq-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.5rem 0.75rem;
  border-bottom: 1px solid var(--hq-border);
  background: linear-gradient(180deg, color-mix(in srgb, var(--hq-bg-elev) 88%, var(--hq-brand-soft)), var(--hq-bg-elev));
}
.hq-modal-title {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--hq-text);
}
.hq-modal-sub {
  margin-top: 0.25rem;
  font-size: 0.85rem;
  color: var(--hq-muted);
  line-height: 1.45;
}
.hq-modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 1.25rem 1.5rem;
  animation: hq-modal-body-in 0.35s cubic-bezier(.4,0,.2,1) both;
}
@keyframes hq-modal-body-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}
.hq-modal-body form { display: flex; flex-direction: column; gap: 0.75rem; }
.hq-modal-body .hq-form-grid { display: grid; gap: 0.75rem; }
@media (min-width: 640px) {
  .hq-modal-body .hq-form-grid-2 { grid-template-columns: repeat(2, 1fr); }
}
.hq-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  padding-top: 1rem;
  margin-top: 0.5rem;
  border-top: 1px solid var(--hq-border);
}
.hq-modal-trigger {
  cursor: pointer;
}

/* ── Responsive tables ── */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  .hq-card:hover { transform: none; }
  .hq-hero-panel { animation: none; }
}
.hq-table-wrap { overflow-x: auto; }
@media (max-width: 767px) {
  table.hq-responsive thead { display: none; }
  table.hq-responsive tr {
    display: block;
    margin-bottom: 0.75rem;
    border: 1px solid var(--hq-border);
    border-radius: 0.75rem;
    padding: 0.75rem;
    background: var(--hq-bg-elev);
  }
  table.hq-responsive td {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    border: 0;
    padding: 0.35rem 0;
  }
  table.hq-responsive td::before {
    content: attr(data-label);
    font-weight: 600;
    color: var(--hq-muted);
    font-size: 0.75rem;
  }
}
.hq-ai-banner {
  animation: hq-card-in 0.45s cubic-bezier(.4,0,.2,1) both;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.08), var(--hq-bg-elev) 42%, rgba(15, 118, 110, 0.08));
  border-color: color-mix(in srgb, #8b5cf6 28%, var(--hq-border));
}
.hq-ai-eyebrow {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #6d28d9;
}
html.dark .hq-ai-eyebrow { color: #c4b5fd; }
.hq-ai-summary { color: var(--hq-text); }
.hq-ai-meta {
  border: 1px solid color-mix(in srgb, #8b5cf6 22%, var(--hq-border));
  background: color-mix(in srgb, var(--hq-bg-elev) 88%, #8b5cf6 4%);
  color: var(--hq-muted);
}
.hq-ai-meta strong { color: var(--hq-text); }
.hq-ai-meta-cached { color: #6d28d9; }
html.dark .hq-ai-meta-cached { color: #c4b5fd; }
.hq-ai-card {
  animation: hq-card-in 0.45s cubic-bezier(.4,0,.2,1) both;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.hq-ai-card:hover {
  box-shadow: var(--hq-shadow-hover);
  transform: translateY(-1px);
}
.hq-ai-rec {
  animation: hq-card-in 0.5s cubic-bezier(.4,0,.2,1) both;
  border-left: 4px solid var(--hq-brand);
}
.hq-ai-section-title { color: var(--hq-text); }
.hq-ai-section-title--positive { color: #047857; }
html.dark .hq-ai-section-title--positive { color: #6ee7b7; }
.hq-ai-section-title--risk { color: #be123c; }
html.dark .hq-ai-section-title--risk { color: #fda4af; }
.hq-ai-positive {
  border-color: color-mix(in srgb, #10b981 30%, var(--hq-border));
  background: color-mix(in srgb, #10b981 10%, var(--hq-bg-elev));
  color: var(--hq-text);
}
.hq-ai-risk {
  border-color: color-mix(in srgb, #f43f5e 30%, var(--hq-border));
  background: color-mix(in srgb, #f43f5e 10%, var(--hq-bg-elev));
  color: var(--hq-text);
}
.hq-ai-notice {
  border: 1px solid color-mix(in srgb, #f59e0b 35%, var(--hq-border));
  background: color-mix(in srgb, #f59e0b 12%, var(--hq-bg-elev));
  color: var(--hq-text);
}
.hq-ai-notice code {
  background: var(--hq-input);
  border: 1px solid var(--hq-border);
  color: var(--hq-text);
}
.hq-ai-sev {
  display: inline-flex;
  border-radius: 999px;
  padding: 0.125rem 0.5rem;
  font-size: 11px;
  font-weight: 600;
  text-transform: capitalize;
}
.hq-ai-sev--high {
  background: color-mix(in srgb, #f43f5e 18%, var(--hq-bg-elev));
  color: #be123c;
}
html.dark .hq-ai-sev--high { color: #fda4af; }
.hq-ai-sev--medium {
  background: color-mix(in srgb, #f59e0b 18%, var(--hq-bg-elev));
  color: #b45309;
}
html.dark .hq-ai-sev--medium { color: #fde68a; }
.hq-ai-sev--low {
  background: color-mix(in srgb, #10b981 18%, var(--hq-bg-elev));
  color: #047857;
}
html.dark .hq-ai-sev--low { color: #6ee7b7; }
.hq-ai-timeframe {
  border-radius: 999px;
  background: color-mix(in srgb, var(--hq-muted) 12%, var(--hq-bg-elev));
  padding: 0.125rem 0.5rem;
  font-size: 11px;
  font-weight: 600;
  color: var(--hq-muted);
}
.hq-ai-tab {
  border: 1px solid color-mix(in srgb, #8b5cf6 28%, var(--hq-border));
  background: color-mix(in srgb, #8b5cf6 10%, var(--hq-bg-elev));
  color: var(--hq-text);
}
.hq-ai-tab--active {
  border-color: transparent;
  background: linear-gradient(135deg, #6d28d9, #0f766e);
  color: #fff;
  box-shadow: var(--hq-shadow);
}
.hq-ai-btn {
  border: 1px solid color-mix(in srgb, #8b5cf6 28%, var(--hq-border));
  background: color-mix(in srgb, #8b5cf6 10%, var(--hq-bg-elev));
  color: var(--hq-text);
}
.hq-ai-btn:hover {
  background: color-mix(in srgb, #8b5cf6 16%, var(--hq-bg-elev));
}
@media print {
  html.dark { color-scheme: light; }
  aside, header, #hq-drawer, #toast-root, .hq-no-print, .hq-footer, .hq-icon-btn { display: none !important; }
  .hq-print-only { display: block !important; }
  main { padding: 0.5rem !important; }
  body, .hq-card { background: #fff !important; color: #0f172a !important; box-shadow: none; transform: none; }
}
