/* Dashmon public page polish layer
   Applies the richer dark-card visual direction without rewriting page content. */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  --dm-bg: #080d1a;
  --dm-bg-2: #0d1525;
  --dm-panel: rgba(13, 21, 37, 0.78);
  --dm-panel-strong: rgba(15, 23, 42, 0.9);
  --dm-border: rgba(255, 255, 255, 0.11);
  --dm-border-soft: rgba(255, 255, 255, 0.07);
  --dm-cyan: #00d4ff;
  --dm-blue: #3b82f6;
  --dm-violet: #8b5cf6;
  --dm-emerald: #10d98c;
  --dm-amber: #f59e0b;
  --dm-rose: #f43f5e;
  --dm-text: #e2e8f0;
  --dm-muted: #94a3b8;
  --dm-muted-2: #64748b;
  --dm-radius: 20px;
  --dm-radius-sm: 12px;
}

html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
  background:
    radial-gradient(900px 560px at 6% 10%, rgba(0, 212, 255, 0.075), transparent 68%),
    radial-gradient(700px 520px at 96% 18%, rgba(139, 92, 246, 0.08), transparent 70%),
    radial-gradient(640px 420px at 58% 92%, rgba(16, 217, 140, 0.035), transparent 74%),
    linear-gradient(135deg, #080d1a 0%, #0d1525 45%, #111827 100%) !important;
  color: var(--dm-text) !important;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,.72), transparent 78%);
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(circle at 18% 18%, rgba(59,130,246,.08), transparent 22%),
    radial-gradient(circle at 78% 14%, rgba(139,92,246,.08), transparent 24%),
    radial-gradient(circle at 70% 86%, rgba(0,212,255,.05), transparent 28%);
}

/* Typography */
h1, h2, h3, h4, .font-bold, .font-extrabold { letter-spacing: -0.02em; }
h1 {
  color: #fff !important;
  text-wrap: balance;
}
p, li, .text-gray-300, .text-slate-300, .text-gray-400, .text-slate-400 { line-height: 1.75; }
a { text-underline-offset: 4px; }

/* Shell */
.site-shell-page, .page-shell, main.max-w-6xl, .max-w-7xl {
  position: relative;
  z-index: 1;
}
.site-shell-header, .header {
  border: 1px solid var(--dm-border-soft) !important;
  background: rgba(8, 13, 26, 0.78) !important;
  backdrop-filter: blur(18px);
  border-radius: 24px;
  padding: 12px 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,.22);
}
.header {
  position: sticky;
  top: 12px;
  z-index: 50;
  margin: 12px auto 0;
  max-width: 1160px;
}
.header .topbar { min-height: 52px; }
.site-shell-brand, .brand { color: var(--dm-text) !important; text-decoration: none !important; }
.site-shell-brand img, .brand img { filter: drop-shadow(0 10px 22px rgba(59,130,246,.22)); }
.site-shell-nav a, .nav a {
  border-radius: 999px !important;
  transition: background .18s ease, color .18s ease, border-color .18s ease, transform .18s ease !important;
}
.site-shell-nav a:hover, .nav a:hover {
  background: rgba(255,255,255,.075) !important;
  color: #fff !important;
  transform: translateY(-1px);
}
.site-shell-nav a[href*='login'], .nav-button, .nav .nav-button, .nav .nav-btn, .nav a.nav-button {
  color: var(--dm-cyan) !important;
  border: 1px solid rgba(0,212,255,.28) !important;
  background: rgba(0,212,255,.1) !important;
}

/* Hero and main panels */
.glass-card, .card, .hero-card, .section-card, .content-card, .cta-card,
.rounded-3xl, .rounded-2xl, .mini-panel, .footer-card {
  box-shadow: 0 24px 80px rgba(0,0,0,.23);
}
.glass-card, .card, .section-card, .content-card, .mini-panel,
.rounded-3xl.border, .rounded-2xl.border {
  background:
    linear-gradient(135deg, rgba(13,21,37,.88), rgba(17,28,48,.72)) !important;
  border-color: var(--dm-border) !important;
  backdrop-filter: blur(18px);
}
.hero-card, .glass-card.rounded-3xl:first-of-type, section.glass-card:first-of-type {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.13) !important;
  background:
    radial-gradient(360px 220px at 82% 18%, rgba(0,212,255,.12), transparent 72%),
    radial-gradient(320px 240px at 18% 8%, rgba(139,92,246,.12), transparent 72%),
    linear-gradient(135deg, rgba(13,21,37,.94), rgba(17,28,48,.84)) !important;
}
.hero-card::before,
.glass-card.rounded-3xl:first-of-type::before,
section.glass-card:first-of-type::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--dm-cyan), var(--dm-violet), transparent);
}

/* Colored mini windows */
.grid > .card:nth-child(1), .grid > a:nth-child(1), .grid-3 > article:nth-child(1), .metric:nth-child(1) { border-left: 3px solid var(--dm-cyan) !important; }
.grid > .card:nth-child(2), .grid > a:nth-child(2), .grid-3 > article:nth-child(2), .metric:nth-child(2) { border-left: 3px solid var(--dm-violet) !important; }
.grid > .card:nth-child(3), .grid > a:nth-child(3), .grid-3 > article:nth-child(3), .metric:nth-child(3) { border-left: 3px solid var(--dm-emerald) !important; }
.grid > .card:nth-child(4), .grid > a:nth-child(4), .metric:nth-child(4) { border-left: 3px solid var(--dm-amber) !important; }
.grid > a:nth-child(5) { border-left: 3px solid var(--dm-blue) !important; }
.grid > a:nth-child(6) { border-left: 3px solid var(--dm-rose) !important; }

.card:hover, .glass-card:hover, .section-card:hover, .content-card:hover,
.grid a:hover, .related-link:hover, .mini-panel:hover {
  border-color: rgba(0,212,255,.25) !important;
  box-shadow: 0 26px 82px rgba(0,0,0,.26), 0 0 34px rgba(0,212,255,.045);
}

/* Badges / chips / buttons */
.eyebrow, .badge, .chip, .kicker,
.inline-flex.rounded-full, .text-xs.uppercase, .text-sm.uppercase {
  letter-spacing: .08em;
}
.eyebrow, .chip, .inline-flex.rounded-full, .badge {
  border: 1px solid rgba(0,212,255,.22) !important;
  background: rgba(0,212,255,.09) !important;
  color: var(--dm-cyan) !important;
}
.kicker { color: var(--dm-cyan) !important; }
.button-primary, .btn-primary, a[href='/auth/google'].bg-gradient-to-r,
a.bg-gradient-to-r, button.bg-gradient-to-r {
  background: linear-gradient(135deg, var(--dm-blue), var(--dm-violet)) !important;
  box-shadow: 0 18px 40px rgba(59,130,246,.22) !important;
}
.button-primary:hover, .btn-primary:hover, a.bg-gradient-to-r:hover, button.bg-gradient-to-r:hover {
  transform: translateY(-1px);
  box-shadow: 0 22px 50px rgba(59,130,246,.34) !important;
}
.button-secondary, .button-ghost, .btn-secondary,
a.border, button.border, .toc a, .site-shell-footer a {
  transition: background .18s ease, border-color .18s ease, color .18s ease, transform .18s ease !important;
}
.button-secondary:hover, .button-ghost:hover, .btn-secondary:hover, a.border:hover, button.border:hover, .toc a:hover {
  transform: translateY(-1px);
}

/* Legal / docs TOC */
.toc {
  background: linear-gradient(135deg, rgba(13,21,37,.9), rgba(17,28,48,.78)) !important;
  border: 1px solid var(--dm-border) !important;
}
.toc a.active {
  color: #fff !important;
  background: rgba(0,212,255,.10) !important;
  border-color: rgba(0,212,255,.25) !important;
}

/* Demo page */
canvas { max-width: 100%; }
#deviceList button {
  border: 1px solid transparent;
}
#deviceList button:hover {
  border-color: rgba(0,212,255,.18);
  background: rgba(255,255,255,.045) !important;
}
input, select, textarea {
  background: rgba(2,6,23,.42) !important;
  border-color: rgba(148,163,184,.22) !important;
  color: #e2e8f0 !important;
}
input:focus, select:focus, textarea:focus {
  border-color: rgba(0,212,255,.55) !important;
  box-shadow: 0 0 0 3px rgba(0,212,255,.10) !important;
  outline: none !important;
}

/* Landing-page CSS enhancement */
.footer, .site-shell-footer {
  border-color: rgba(255,255,255,.09) !important;
}
.footer-card {
  background: linear-gradient(135deg, rgba(13,21,37,.82), rgba(17,28,48,.7)) !important;
  border: 1px solid var(--dm-border) !important;
}

/* Accessibility */
.skip-link {
  position: absolute;
  left: 16px;
  top: -80px;
  z-index: 999;
  background: #fff;
  color: #020617;
  padding: 10px 14px;
  border-radius: 999px;
  font-weight: 700;
  transition: top .18s ease;
}
.skip-link:focus { top: 16px; }
:focus-visible {
  outline: 3px solid rgba(0,212,255,.65) !important;
  outline-offset: 3px !important;
  border-radius: 10px;
}

@media (max-width: 760px) {
  .site-shell-header, .header { border-radius: 18px; }
  .site-shell-nav, .nav { gap: 6px !important; }
  .site-shell-nav a, .nav a { padding: 7px 10px !important; }
  .glass-card, .hero-card, .section-card, .content-card, .cta-card { padding: 22px !important; }
}

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

/* Public special-page polish: status viewer, auth recovery, and 404 pages. */
body.auth-recovery-page,
body.status-viewer-page,
body.not-found-page {
  min-height: 100vh;
  background:
    radial-gradient(760px 500px at 12% 10%, rgba(0, 212, 255, .10), transparent 70%),
    radial-gradient(760px 520px at 90% 8%, rgba(139, 92, 246, .11), transparent 72%),
    linear-gradient(135deg, #080d1a 0%, #0d1525 48%, #111827 100%) !important;
}
body.auth-recovery-page .glass,
body.not-found-page .card,
body.status-viewer-page header,
body.status-viewer-page section,
body.status-viewer-page #emptyState,
body.status-viewer-page #selectionState,
body.status-viewer-page #errorState {
  background: linear-gradient(135deg, rgba(13,21,37,.88), rgba(17,28,48,.74)) !important;
  border-color: rgba(255,255,255,.12) !important;
  box-shadow: 0 24px 80px rgba(0,0,0,.28);
  backdrop-filter: blur(18px);
}
body.auth-recovery-page .glass,
body.not-found-page .card,
body.status-viewer-page header {
  position: relative;
  overflow: hidden;
}
body.auth-recovery-page .glass::before,
body.not-found-page .card::before,
body.status-viewer-page header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--dm-cyan), var(--dm-violet), transparent);
}
body.auth-recovery-page button,
body.auth-recovery-page .bg-blue-600,
body.status-viewer-page .bg-sky-600,
body.not-found-page .cta-primary {
  background: linear-gradient(135deg, var(--dm-blue), var(--dm-violet)) !important;
  box-shadow: 0 18px 42px rgba(59,130,246,.24) !important;
}
body.auth-recovery-page img,
body.not-found-page img,
body.status-viewer-page .fas {
  filter: drop-shadow(0 14px 26px rgba(59,130,246,.18));
}
body.status-viewer-page table {
  border-collapse: separate;
  border-spacing: 0;
}
body.status-viewer-page tr:hover td {
  background: rgba(255,255,255,.035);
}
body.not-found-page .linkcard:hover {
  border-color: rgba(0,212,255,.28) !important;
  background: rgba(0,212,255,.055) !important;
  transform: translateY(-1px);
}

