/* ============================================================
   NIZHEALTH REDESIGN v3 — FINAL SLEEK DARK THEME
   All primary text forced pure / near-white.
   Navy / cyan atmosphere. Motion imported separately.
   ============================================================ */

@import url("/hc/assets/css/nizhealth-motion.css?v=3");

:root {
  --nh-dark: #020817;
  --nh-bg: #020817;
  --nh-surface: #07182c;
  --nh-surface2: #0b2341;
  --nh-surface3: #0e2d52;
  --nh-border: rgba(125, 190, 230, .20);
  --nh-border-strong: rgba(56, 189, 248, .55);
  --nh-text: #ffffff;
  --nh-text-soft: #e8f2fc;
  --nh-muted: #b8d0e6;
  --nh-blue: #38bdf8;
  --nh-cyan: #67e8f9;
  --nh-teal: #2dd4bf;
  --nh-focus: #7dd3fc;
  --nh-danger: #fb7185;
  --nh-success: #4ade80;
  --nh-shadow: 0 20px 50px rgba(0, 0, 0, .32);
  --nh-radius: 18px;
  --nh-radius-sm: 12px;
  --nh-font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

/* ---------- Global base — pure white text ---------- */
html {
  color-scheme: dark;
}
body {
  background:
    radial-gradient(ellipse at 8% -8%, rgba(56, 189, 248, .18), transparent 32%),
    radial-gradient(ellipse at 92% 0%, rgba(45, 212, 191, .10), transparent 28%),
    linear-gradient(155deg, #020817 0%, #04101f 45%, #07182b 100%) !important;
  color: #ffffff !important;
  font-family: var(--nh-font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Force almost everything to white / soft white */
h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6,
.hero h1, .hero h2, .hero h3,
.section-head h1, .section-head h2,
.panel h2, .panel h3, .card h3, .feature h3,
.nh-hero h1, .nh-hero-title,
p, span, li, label, td, th, dt, dd,
.container, .narrow, .content, .main,
.health-brand, .nh-brand,
.muted, .text-muted, .section-intro {
  color: #ffffff !important;
}

/* Soft secondary text (still very light) */
.muted, .text-muted, .section-intro, p.muted,
.nh-hero p, .hero p, .food-hero p, .medical-hero p,
.support-hero p, .ai-hero p, small, .small {
  color: #c5d9ec !important;
}

/* Links */
a:not(.btn):not(.health-nav-link):not(.health-mobile-link):not(.nh-links a) {
  color: #7dd3fc !important;
  text-decoration-color: rgba(125, 211, 252, .45);
  text-underline-offset: .2em;
}
a:not(.btn):not(.health-nav-link):not(.health-mobile-link):hover {
  color: #a5f3fc !important;
}

/* ---------- Surfaces ---------- */
.panel, .card, .feature, .metric, .info, .trust, .hero,
.documents-card, .stats-card, .insight-card, .food-card,
.medical-card, .support-card, .tile, .summary-card,
.goal-card, .reminder-card, .document-card, .measurement-card,
.ai-dashboard-card, .offcanvas, .modal-content, .dropdown-menu,
.popover, .toast, .accordion-item {
  background: linear-gradient(155deg, #07182c, #081d36) !important;
  border: 1px solid var(--nh-border) !important;
  border-radius: var(--nh-radius) !important;
  color: #ffffff !important;
  box-shadow: var(--nh-shadow) !important;
}

.hero, .nh-hero, .food-hero, .medical-hero, .ai-hero,
.profile-hero, .support-hero {
  background: linear-gradient(145deg, #071a30, #0a294a) !important;
  border: 1px solid rgba(56, 189, 248, .28) !important;
  box-shadow: 0 28px 70px rgba(0, 0, 0, .38) !important;
}

/* ---------- Navbar ---------- */
.health-navbar, .nh-nav, .niz-mobile-topbar {
  background: rgba(2, 8, 23, .96) !important;
  border-bottom: 1px solid rgba(98, 230, 224, .14) !important;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.health-nav-link, .nh-links a {
  color: #e2eef9 !important;
}
.health-nav-link:hover, .health-nav-link.active,
.nh-links a:hover, .nh-links a.active {
  background: rgba(56, 189, 248, .14) !important;
  color: #ffffff !important;
}
.health-brand, .health-brand:hover, .nh-brand, .nh-brand span {
  color: #ffffff !important;
}
.health-mobile-link {
  color: #e8f2fc !important;
}
.health-mobile-link:hover, .health-mobile-link.active {
  background: #0b2445 !important;
  color: #ffffff !important;
}

/* ---------- Forms ---------- */
.form-control, .form-select, input, select, textarea,
input[type="text"], input[type="email"], input[type="password"],
input[type="number"], input[type="search"], input[type="tel"] {
  background: #06172a !important;
  color: #ffffff !important;
  border: 1px solid #244867 !important;
  border-radius: var(--nh-radius-sm) !important;
}
.form-control::placeholder, input::placeholder, textarea::placeholder {
  color: #8ba8c2 !important;
}
.form-label, label {
  color: #e8f2fc !important;
}

/* ---------- Buttons ---------- */
.btn-primary, .btn-blue, button[type="submit"],
.btn.btn-primary {
  background: linear-gradient(135deg, #0ea5e9, #38bdf8) !important;
  color: #ffffff !important;
  border: 0 !important;
  font-weight: 700;
  border-radius: 13px !important;
  box-shadow: 0 8px 22px rgba(14, 165, 233, .28);
}
.btn-outline, .btn-secondary {
  background: #0a1d35 !important;
  border: 1px solid #2a5578 !important;
  color: #e8f2fc !important;
}
.btn-danger, .btn-outline-danger {
  background: rgba(251, 113, 133, .12) !important;
  border-color: rgba(251, 113, 133, .45) !important;
  color: #fecdd3 !important;
}

/* ---------- Tables ---------- */
table, .table {
  color: #ffffff !important;
}
.table th {
  color: #c5d9ec !important;
  border-color: rgba(125, 190, 230, .18) !important;
}
.table td {
  border-color: rgba(125, 190, 230, .12) !important;
  color: #f0f7ff !important;
}
.table-striped > tbody > tr:nth-of-type(odd) > * {
  background-color: rgba(7, 24, 44, .55) !important;
  color: #ffffff !important;
}

/* ---------- Alerts & badges ---------- */
.alert {
  border-color: #2a4c69 !important;
  color: #e8f2fc !important;
}
.badge {
  color: #ffffff !important;
}

/* ---------- Mobile nav refinements ---------- */
.health-offcanvas, .offcanvas {
  background: #061225 !important;
  color: #ffffff !important;
}
.health-offcanvas .btn-close {
  filter: invert(1);
}

/* ---------- Utility: ensure white text on dark surfaces ---------- */
.nh-page-index, .nh-family-public, .dashboard-page,
.subscription-page, .health-page, .support-page {
  color: #ffffff;
}

/* Logo sizing polish */
.nh-brand img, .health-brand img, img[alt*="NizHealth logo"],
img[src*="nizhealth-brand"], img[src*="nizhealth-mark"],
img[src*="nizhealth-logo"] {
  width: 40px;
  height: 40px;
  object-fit: contain;
  border-radius: 10px;
}

/* Homepage hero refinements */
.nh-hero-grid {
  align-items: center;
  gap: clamp(28px, 5vw, 70px);
}
.nh-hero h1, .nh-hero-title {
  color: #ffffff !important;
  letter-spacing: -.055em;
  line-height: 1.02;
  text-wrap: balance;
}
.nh-hero h1 span, .nh-hero-title span {
  background: linear-gradient(100deg, #c3f2ff 4%, #68caff 45%, #6398ff 95%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent !important;
}
.nh-hero-visual {
  position: relative;
  isolation: isolate;
  min-height: clamp(340px, 42vw, 530px);
  display: grid;
  place-items: center;
  overflow: visible;
  border: 1px solid rgba(104, 184, 255, .22);
  border-radius: 30px;
  background:
    radial-gradient(ellipse at 50% 43%, rgba(35, 128, 255, .22), transparent 55%),
    linear-gradient(145deg, rgba(14, 36, 69, .94), rgba(5, 13, 29, .97));
  box-shadow: 0 35px 100px rgba(0, 0, 0, .3), inset 0 1px rgba(210, 242, 255, .08);
}
.nh-hero-art img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 24px 36px rgba(0, 0, 0, .35));
}

/* Subscription plan cards polish */
.subscription-page .plan-card,
.subscription-page .pricing-card,
.subscription-page .card {
  transition: transform .28s ease, box-shadow .28s ease, border-color .28s ease;
}
.subscription-page .plan-card:hover,
.subscription-page .pricing-card:hover {
  transform: translateY(-6px);
  border-color: rgba(56, 189, 248, .5) !important;
  box-shadow: 0 28px 60px rgba(0, 0, 0, .4) !important;
}

/* Focus visible for a11y */
:focus-visible {
  outline: 2px solid #7dd3fc !important;
  outline-offset: 3px;
}

/* Reduced motion already handled in motion.css */

/* ---------- Subscription page forced dark + white text ---------- */
.nh-page-subscription .plans-head h1,
.nh-page-subscription .plans-head p,
.nh-page-subscription .plan,
.nh-page-subscription .plan h2,
.nh-page-subscription .plan h3,
.nh-page-subscription .price,
.nh-page-subscription .features,
.nh-page-subscription .features li,
.nh-page-subscription .badge,
.nh-page-subscription .active-note,
.nh-page-subscription .notice,
.nh-page-subscription .legal,
.nh-page-subscription .recurring-choice {
  color: #ffffff !important;
}
.nh-page-subscription .plans-head p,
.nh-page-subscription .legal,
.nh-page-subscription .recurring-choice {
  color: #c5d9ec !important;
}
.nh-page-subscription .plan {
  background: linear-gradient(155deg, #07182c, #0a2039) !important;
  border: 1px solid rgba(56, 189, 248, .22) !important;
  box-shadow: 0 18px 48px rgba(0,0,0,.28) !important;
}
.nh-page-subscription .plan.featured {
  border: 2px solid #38bdf8 !important;
  box-shadow: 0 24px 60px rgba(56, 189, 248, .18) !important;
}
.nh-page-subscription .price {
  color: #ffffff !important;
}
.nh-page-subscription .price small {
  color: #a7bdd2 !important;
}
.nh-page-subscription .badge {
  color: #67e8f9 !important;
}
.nh-page-subscription .buy {
  background: linear-gradient(135deg, #0ea5e9, #38bdf8) !important;
  color: #ffffff !important;
}
.nh-page-subscription .active-note {
  background: rgba(14, 165, 233, .12) !important;
  border: 1px solid rgba(56, 189, 248, .25) !important;
  color: #e8f2fc !important;
}
.nh-page-subscription .currency button {
  background: #0a1d35 !important;
  border-color: #2a5578 !important;
  color: #e8f2fc !important;
}
.nh-page-subscription .currency button.active {
  background: #0ea5e9 !important;
  color: #ffffff !important;
  border-color: #38bdf8 !important;
}

/* ---------- Color riot accents (sleek multi-color) ---------- */
:root {
  --nh-accent-cyan: #22d3ee;
  --nh-accent-blue: #38bdf8;
  --nh-accent-indigo: #818cf8;
  --nh-accent-violet: #a78bfa;
  --nh-accent-fuchsia: #e879f9;
  --nh-accent-pink: #f472b6;
  --nh-accent-rose: #fb7185;
  --nh-accent-orange: #fb923c;
  --nh-accent-amber: #fbbf24;
  --nh-accent-lime: #a3e635;
  --nh-accent-green: #4ade80;
  --nh-accent-teal: #2dd4bf;
}

/* Gradient text utility */
.nh-gradient-text,
.gradient-text {
  background: linear-gradient(100deg, #22d3ee, #38bdf8 30%, #a78bfa 65%, #f472b6);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent !important;
}

/* Multi-color hover borders on cards */
.panel:nth-child(5n+1):hover,
.card:nth-child(5n+1):hover { border-color: rgba(34, 211, 238, .5) !important; }
.panel:nth-child(5n+2):hover,
.card:nth-child(5n+2):hover { border-color: rgba(167, 139, 250, .5) !important; }
.panel:nth-child(5n+3):hover,
.card:nth-child(5n+3):hover { border-color: rgba(74, 222, 128, .5) !important; }
.panel:nth-child(5n+4):hover,
.card:nth-child(5n+4):hover { border-color: rgba(251, 191, 36, .5) !important; }
.panel:nth-child(5n+5):hover,
.card:nth-child(5n+5):hover { border-color: rgba(244, 114, 182, .5) !important; }

/* Buttons get richer gradients */
.btn-primary, .btn-blue {
  background: linear-gradient(135deg, #0ea5e9, #38bdf8 55%, #818cf8) !important;
  box-shadow: 0 8px 22px rgba(14, 165, 233, .28) !important;
}
.btn-primary:hover, .btn-blue:hover {
  box-shadow: 0 12px 28px rgba(129, 140, 248, .35) !important;
}

/* Nav active / accent */
.health-nav-link.active,
.nh-links a.active {
  background: linear-gradient(135deg, rgba(14, 165, 233, .2), rgba(167, 139, 250, .12)) !important;
}

/* Logo sizing global */
.nh-brand img, .health-brand img, .nh-logo img,
img[src*="nizhealth-brand"], img[src*="nizhealth-mark"],
img[src*="nizhealth-logo"] {
  width: 40px !important;
  height: 40px !important;
  max-width: 40px !important;
  max-height: 40px !important;
  object-fit: contain !important;
  border-radius: 11px !important;
}

/* Prevent runaway images site-wide */
img {
  max-width: 100%;
  height: auto;
}
.hero img, .nh-hero img, .nh-visual img {
  max-height: 480px;
  width: auto;
  object-fit: contain;
}
