/* New Look — Hex Honeycomb Layout (NL.18)
   Replaces the rectangular tile grid with a hexagonal honeycomb.
   Source design: somni_landing(8).html

   Accent tokens are still used by popup chart series (newlook-popup.js).
*/

/* ─── Accent color tokens (shared with popups) ─────────────────────── */
:root {
  --nl-accent-ahi: #e57373;
  --nl-accent-events: #ffb74d;
  --nl-accent-leaks: #64b5f6;
  --nl-accent-sessions: #81c784;
  --nl-accent-pressure: #ba68c8;
  --nl-accent-usage: #fff176;
  --nl-accent-somnidoc: #9575cd;
  --nl-accent-somnipattern: #f06292;
  --nl-accent-somniscan: #ffa726;
  --nl-accent-compliance: #4fc3f7;
}

/* ─── Text color tokens ────────────────────────────────────────────── */
:root[data-bs-theme="light"], :root:not([data-bs-theme="dark"]) {
  --nl-text: #1a1a1a;
  --nl-text-muted: #555;
  --nl-bg-ahi:          #ffe0e0;
  --nl-bg-events:       #ffe8cc;
  --nl-bg-leaks:        #e0f2ff;
  --nl-bg-sessions:     #e1f5e1;
  --nl-bg-pressure:     #f0e0ff;
  --nl-bg-usage:        #fff9cc;
  --nl-bg-somnidoc:     #e8d7ff;
  --nl-bg-somnipattern: #ffd7e8;
  --nl-bg-somniscan:    #fff0d7;
  --nl-bg-compliance:   #d7f0ff;
}
:root[data-bs-theme="dark"] {
  --nl-text: #f0f0f0;
  --nl-text-muted: #c0c0c0;
  --nl-bg-ahi:          #5a1f1f;
  --nl-bg-events:       #5a3a10;
  --nl-bg-leaks:        #12395a;
  --nl-bg-sessions:     #1e4a20;
  --nl-bg-pressure:     #3e1d52;
  --nl-bg-usage:        #574f10;
  --nl-bg-somnidoc:     #2e1e5a;
  --nl-bg-somnipattern: #52163a;
  --nl-bg-somniscan:    #5c3810;
  --nl-bg-compliance:   #13405a;
}

/* ─── Hex App Shell — CSS Grid ─────────────────────────────────────── */
.hex-app {
  position: fixed;
  inset: 0;
  display: grid;
  grid-template-columns: 1fr 64px;
  grid-template-rows: 80px 1fr 32px;
  grid-template-areas:
    "header header"
    "stage  side"
    "footer footer";
  font-family: "Agency FB", "AgencyFB", "Haettenschweiler", "Impact", "Oswald", "Arial Narrow", sans-serif;
  font-stretch: condensed;
  letter-spacing: 0.02em;
  z-index: 10;
}

/* ─── Dark mode background ─────────────────────────────────────────── */
:root[data-bs-theme="dark"] .hex-app,
:root:not([data-bs-theme="light"]):not([data-bs-theme]) .hex-app {
  background: #000;
  color: #fff;
}
:root[data-bs-theme="light"] .hex-app {
  background: #f0f2f5;
  color: #1a1a1a;
}

/* Hide legacy navbar and footer when hex layout is active.
   IMPORTANT: do NOT hide .container — it's the ancestor of .newlook-root
   which contains .hex-app. Instead, collapse it visually and let the
   fixed-position .hex-app render on top of everything. */
html.is-hex-layout #mainNavbar { display: none !important; }
html.is-hex-layout body > footer { display: none !important; }
html.is-hex-layout .newlook-root {
  padding: 0 !important;
}
html.is-hex-layout body {
  overflow: hidden;
  margin: 0;
  /* Neutralize Google Translate's injected body styles which break
     position:fixed children (adds position:relative + min-height) */
  position: static !important;
  min-height: auto !important;
  top: auto !important;
}

/* ─── HEADER ZONE ──────────────────────────────────────────────────── */
.hex-zone-header {
  grid-area: header;
  border-bottom: 1px solid rgba(255,255,255,0.18);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.25rem;
}
:root[data-bs-theme="light"] .hex-zone-header {
  border-bottom-color: rgba(0,0,0,0.12);
}

.hex-header__brand {
  display: flex;
  align-items: center;
}
.hex-header__brand a {
  display: flex;
  align-items: center;
  text-decoration: none;
  gap: 0.5rem;
}
.hex-header__logo-icon { height: 48px; }
.hex-header__logo-text { height: 56px; }

/* Logo text: show dark variant by default, swap in light mode */
:root[data-bs-theme="dark"] .hex-header__logo-text--light,
:root:not([data-bs-theme="light"]):not([data-bs-theme]) .hex-header__logo-text--light {
  display: none;
}
:root[data-bs-theme="light"] .hex-header__logo-text--dark { display: none; }
:root[data-bs-theme="light"] .hex-header__logo-text--light { display: inline; }

.hex-header__profile {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.15rem;
}
.hex-header__profile-name {
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}
.hex-header__profile-meta {
  font-size: 0.72rem;
  opacity: 0.6;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ─── FOOTER ZONE ──────────────────────────────────────────────────── */
.hex-zone-footer {
  grid-area: footer;
  border-top: 1px solid rgba(255,255,255,0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.45);
}
:root[data-bs-theme="light"] .hex-zone-footer {
  border-top-color: rgba(0,0,0,0.12);
  color: rgba(0,0,0,0.4);
}
.hex-zone-footer a {
  color: inherit;
  text-decoration: none;
}
.hex-zone-footer a:hover {
  color: rgba(255,255,255,0.75);
  text-decoration: underline;
}
:root[data-bs-theme="light"] .hex-zone-footer a:hover {
  color: rgba(0,0,0,0.7);
}
.hex-footer__sep { opacity: 0.5; }

/* ─── SIDEBAR ZONE ─────────────────────────────────────────────────── */
.hex-zone-side {
  grid-area: side;
  border-left: 1px solid rgba(255,255,255,0.18);
  overflow-y: auto;
}
:root[data-bs-theme="light"] .hex-zone-side {
  border-left-color: rgba(0,0,0,0.12);
  background: #f6f6f6;
}

.hex-side__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  padding: 0.5rem 0;
  gap: 0.35rem;
}
.hex-side__group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
}
.hex-side__group--middle {
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid rgba(128,128,128,0.18);
  width: 100%;
}
.hex-side__group--bottom {
  margin-top: auto;
  padding-top: 0.5rem;
  border-top: 1px solid rgba(128,128,128,0.18);
  width: 100%;
}
.hex-side__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: rgba(255,255,255,0.55);
  cursor: pointer;
  font-size: 1rem;
  text-decoration: none;
  transition: background 120ms ease, color 120ms ease;
}
:root[data-bs-theme="light"] .hex-side__btn {
  color: rgba(0,0,0,0.45);
}
.hex-side__btn:hover:not(:disabled):not(.is-active) {
  background: rgba(128,128,128,0.15);
  color: #fff;
}
:root[data-bs-theme="light"] .hex-side__btn:hover:not(:disabled):not(.is-active) {
  color: #1a1a1a;
}
.hex-side__btn.is-active {
  background: var(--nl-accent-pressure);
  color: #fff;
}
.hex-side__btn:disabled {
  opacity: 0.3;
  cursor: default;
}

/* NL.142 — Rail icons get semantic colours at rest. Hover + active states
   keep the existing white-on-grey / white-on-accent behaviour because the
   `.hex-side__btn:hover ... { color: #fff }` rule above wins on specificity
   for the button itself, but we drive colour through the inner <i> glyph
   so the hover cascade still overrides. Tokens match the .c-* hex palette
   so rail icons feel like siblings of the hive below. */
.hex-side__btn[id="newlookThemeToggle"] i         { color: #9c88ff; } /* moon/sun — violet */
.hex-side__btn[data-visibility-trigger] i         { color: #4dd0e1; } /* eye — cyan */
.hex-side__btn[data-profile-trigger] i            { color: #5b9cff; } /* id-card — blue */
.hex-side__btn[data-upload-trigger] i             { color: #3ddc97; } /* upload — green */
.hex-side__btn[data-dropbox-trigger] i            { color: #ff9f43; } /* box-open — orange */
.hex-side__btn[data-feedback-dashboard-trigger] i { color: #b388ff; } /* clipboard — violet */
.hex-side__btn[data-admin-dashboard-trigger] i    { color: #ff5370; } /* shield — red */
.hex-side__btn[data-help-trigger] i               { color: #3aa7ff; } /* ? — NL blue */
.hex-side__btn[data-toggle-legacy] i              { color: #26a69a; } /* columns — teal */
.hex-side__btn[data-account-trigger] i            { color: #ffb74d; } /* user-shield — amber */
.hex-side__btn[href*="logout"] i                  { color: #ff8a80; } /* sign-out — red-soft */

/* Hover still wins — existing .hex-side__btn:hover { color: #fff } inherits
   to the <i>, so coloured rest state transitions to white on hover. But
   ensure the coloured icons re-appear off-hover: no extra rule needed,
   :hover naturally releases the white override. */

/* Light-mode tweaks — the mid-saturation colours above render fine on a
   white backdrop, but bump the alpha-lightness slightly for the yellowest
   / cyanest icons so they stay legible. */
:root[data-bs-theme="light"] .hex-side__btn[data-visibility-trigger] i { color: #0097a7; }
:root[data-bs-theme="light"] .hex-side__btn[data-upload-trigger] i     { color: #1e9c6b; }
:root[data-bs-theme="light"] .hex-side__btn[data-account-trigger] i    { color: #d88d1f; }
.hex-side__avatar {
  border-radius: 50%;
  border: 2px solid rgba(128,128,128,0.25);
  overflow: hidden;
}
.hex-side__avatar i { font-size: 1.25rem; }
.hex-side__flag-wrap {
  cursor: pointer;
  padding: 0;
  overflow: visible;
}
.hex-side__flag-wrap .somni-lang-selector { margin: 0 !important; }
/* NL.52 — Language dropdown positioning is handled in JS (newlook-rail.js):
   when the menu opens, it's re-pinned with position:fixed relative to the
   rail button's bounding rect so it escapes the rail's overflow clipping.
   No CSS !important overrides here — they'd fight the JS-set inline styles
   and push the menu off-screen. */

/* ─── Onboarding ribbon (Task 14) ──────────────────────────────────── */
/* Dim overlay behind the ribbon so it stands out on first visit */
.hex-onboarding-dim {
  position: absolute;
  inset: 0;
  z-index: 25;
  background: rgba(0, 0, 0, 0.6);
  animation: hex-dim-in 400ms ease-out;
}
:root[data-bs-theme="light"] .hex-onboarding-dim {
  background: rgba(0, 0, 0, 0.45);
}
@keyframes hex-dim-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.hex-onboarding {
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.6rem 1.25rem;
  border-radius: 10px;
  background: rgba(37, 99, 235, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.2);
  box-shadow: 0 4px 20px rgba(0,0,0,0.35);
  color: #fff;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 0.82rem;
  line-height: 1.4;
  max-width: 680px;
  animation: hex-pop-in 300ms ease-out;
}
:root[data-bs-theme="light"] .hex-onboarding {
  background: rgba(37, 99, 235, 0.92);
}
.hex-onboarding__msg {
  flex: 1;
}
.hex-onboarding__msg strong {
  display: block;
  font-size: 0.9rem;
  margin-bottom: 0.15rem;
}
.hex-onboarding__msg i {
  font-size: 0.8em;
  opacity: 0.85;
}
.hex-onboarding__dismiss {
  flex-shrink: 0;
  padding: 0.35rem 1rem;
  border: 1px solid rgba(255,255,255,0.4);
  border-radius: 6px;
  background: rgba(255,255,255,0.15);
  color: #fff;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  transition: background 120ms ease;
}
.hex-onboarding__dismiss:hover {
  background: rgba(255,255,255,0.3);
}

/* ─── Device button — top-right of stage ────────────────────────────── */
.hex-device-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 20;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 8px;
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.7);
  cursor: pointer;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 150ms ease, color 150ms ease, border-color 150ms ease;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.hex-device-btn:hover {
  background: rgba(255,255,255,0.18);
  color: #fff;
  border-color: rgba(255,255,255,0.5);
}
:root[data-bs-theme="light"] .hex-device-btn {
  border-color: rgba(0,0,0,0.2);
  background: rgba(0,0,0,0.05);
  color: rgba(0,0,0,0.5);
}
:root[data-bs-theme="light"] .hex-device-btn:hover {
  background: rgba(0,0,0,0.1);
  color: #1a1a1a;
  border-color: rgba(0,0,0,0.35);
}

/* ─── STAGE ZONE (hexagon container) ───────────────────────────────── */
.hex-zone-stage {
  grid-area: stage;
  position: relative;
}
.hex-stage {
  position: absolute;
  inset: 0;
  container-type: size;
  overflow: hidden;
}
.hex-slide {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  /* NL.86 — shrunk to 80 % of max 16:9 fit so side hexes (BG processing on
   * the left, Device Settings on the right) can sit in the freed margins
   * without overlapping the hive. The hive tiles stay at their existing
   * percentage coords inside this now-smaller slide, so every tile scales
   * down uniformly — preserving the honeycomb geometry. */
  width: calc(min(100cqw, 100cqh * 16 / 9) * 0.80);
  height: calc(min(100cqh, 100cqw * 9 / 16) * 0.80);
}

/* ─── SIDE HEX TILES (NL.87) ──────────────────────────────────────────
 * Margin-placed hexes that live in hex-zone-stage (siblings of .hex-stage),
 * NOT inside .hex-slide. Use explicit percentage width/height against the
 * stage so they match the visual footprint of an inside-slide tile after
 * the slide's 0.80 scale: tile is 20.32% × 30.11% of slide, slide is 80%
 * of stage → tile absolute = 16.26% × 24.09% of stage. We use slightly
 * smaller (14% × 24%) so there's a clean gap from the hive's rightmost /
 * leftmost column tiles and from the stage edge. */
.newlook-side-hex {
  position: absolute;
  /* Default left/top are provided via inline style in home.html so the drag
   * handler can read and write style.left / style.top directly. Width/height
   * below. */
  width: 14%;
  height: 24%;
  box-sizing: border-box;
  clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%);
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 6%;
  font-weight: 700;
  font-size: clamp(13px, 1.6vw, 24px);
  line-height: 1.05;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0,0,0,0.35);
  filter: saturate(0.8);
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
  transition: transform 200ms ease, filter 200ms ease;
}
.newlook-side-hex:hover {
  transform: scale(1.04);
  filter: saturate(0.8) brightness(1.1);
}
.newlook-side-hex.dragging {
  cursor: grabbing;
  transition: none;
  transform: scale(1.08);
  filter: saturate(1) brightness(1.15) drop-shadow(0 8px 16px rgba(0,0,0,0.6));
  z-index: 5;
}
:root[data-bs-theme="light"] .newlook-side-hex {
  text-shadow: 0 1px 2px rgba(0,0,0,0.15);
}
/* Visibility: extend the .hex.is-hidden rule to cover side hexes and the
 * processing-feed so the visibility checklist can hide/show them too. */
.newlook-side-hex.is-hidden,
.newlook-processing-feed.is-hidden { display: none !important; }

/* ─── HEX TILES ────────────────────────────────────────────────────── */
.hex {
  position: absolute;
  width: 20.32%;
  height: 30.11%;
  clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 6%;
  font-weight: 700;
  font-size: clamp(13px, 2vw, 28px);
  line-height: 1.05;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0,0,0,0.35);
  transition: transform 200ms ease, filter 200ms ease;
  cursor: grab;
  filter: saturate(0.8);
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
}
.hex:hover {
  transform: scale(1.04);
  filter: saturate(0.8) brightness(1.1);
}
.hex.dragging {
  cursor: grabbing;
  transition: none;
  transform: scale(1.08);
  filter: saturate(1) brightness(1.15) drop-shadow(0 8px 16px rgba(0,0,0,0.6));
  z-index: 5;
}

/* Light mode: slightly less saturation desaturation, subtle text shadow */
:root[data-bs-theme="light"] .hex {
  text-shadow: 0 1px 2px rgba(0,0,0,0.15);
}

/* ─── CENTER TILE (SomniDoc) — 20% larger, locked ──────────────────── */
.hex.center {
  width: calc(20.32% * 1.2);
  height: calc(30.11% * 1.2);
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-size: clamp(17px, 2.7vw, 38px);
  z-index: 2;
  filter: saturate(1);
  cursor: pointer;
  box-shadow: 0 0 0 0 rgba(215,38,61,0.6);
  animation: hex-pulse 2.4s ease-in-out infinite;
}
.hex.center:hover {
  transform: translate(-50%, -50%) scale(1.04);
  filter: saturate(1) brightness(1.1);
}
@keyframes hex-pulse {
  0%, 100% { filter: brightness(1); }
  50%      { filter: brightness(1.18); }
}

/* ─── Hex content elements ─────────────────────────────────────────── */
.hex__label {
  display: block;
  line-height: 1.1;
}
.hex__value {
  display: block;
  font-size: 1.4em;
  font-weight: 800;
  margin-top: 0.15em;
}
.hex__sub {
  display: block;
  font-size: 0.55em;
  font-weight: 500;
  opacity: 0.9;
  margin-top: 0.35em;
  letter-spacing: 0.02em;
}
.hex__hint {
  display: block;
  font-size: 0.5em;
  font-weight: 400;
  opacity: 0.7;
  margin-top: 0.2em;
}

/* ─── DATE TILE special layout ─────────────────────────────────────── */
.hex-tile--date {
  cursor: default;
  gap: 0;
  padding: 1% 3% 1%;
  justify-content: flex-start;
  /* NL.120 — content sits near the top of the hex face, grid gets max
     vertical room so 31-day months fit without clipping (31 cells in a
     7-col grid = 5 rows). */
}

/* NL.120 — Date-tile calendar: only days-with-data, packed tightly.
   DOW header and grid-nav were removed; month context lives in the date
   row above. Cells auto-flow in a 7-col grid so rows stay aligned. Sized
   so a 31-day month (5 rows) fits the hex face without clipping. */
.hex__cal {
  width: 100%;
  margin-top: 0;
  font-weight: 500;
}
.hex__cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1.5px;
  font-size: 0.32em;
  line-height: 1;
}
.hex__cal-day {
  aspect-ratio: 1.25;
  min-width: 0;
  background: rgba(255, 255, 255, 0.22);
  border: 0;
  padding: 0;
  color: inherit;
  font: inherit;
  font-size: inherit;
  font-weight: 700;
  cursor: pointer;
  border-radius: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: background 120ms ease, transform 120ms ease;
  text-shadow: inherit;
}
.hex__cal-day:hover {
  background: rgba(255, 255, 255, 0.45);
  transform: scale(1.08);
}
.hex__cal-day.is-active {
  background: rgba(255, 255, 255, 0.65);
  color: #111;
  outline: 1.5px solid rgba(255, 255, 255, 0.95);
  text-shadow: none;
}
:root[data-bs-theme="light"] .hex__cal-day {
  background: rgba(0, 0, 0, 0.18);
}
:root[data-bs-theme="light"] .hex__cal-day:hover {
  background: rgba(0, 0, 0, 0.32);
}
:root[data-bs-theme="light"] .hex__cal-day.is-active {
  background: rgba(255, 255, 255, 0.95);
  color: #111;
}
.hex__day-name {
  display: block;
  font-size: 0.5em;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.85;
  margin-bottom: 0;
  line-height: 1.1;
}
.hex__date-row {
  display: flex;
  align-items: center;
  gap: 0.15em;
  font-size: 0.75em;
  line-height: 1.1;
  margin-bottom: 0.15em;
}
.hex__arrow {
  background: transparent;
  border: 0;
  color: inherit;
  cursor: pointer;
  font-size: 0.55em;
  padding: 0.15em 0.2em;
  opacity: 0.6;
  transition: opacity 150ms ease;
  text-shadow: inherit;
  line-height: 1;
}
.hex__arrow:hover:not(:disabled) { opacity: 1; }
.hex__arrow:disabled { opacity: 0.2; cursor: default; }
.hex__date-segments {
  display: flex;
  gap: 0.25em;
}
.hex__date-seg {
  cursor: pointer;
  padding: 0.05em 0.2em;
  border-radius: 4px;
  transition: background 120ms ease;
}
.hex__date-seg:hover {
  background: rgba(255,255,255,0.2);
}
:root[data-bs-theme="light"] .hex__date-seg:hover {
  background: rgba(0,0,0,0.1);
}

/* ─── Gradient fills (radial, from-center) ─────────────────────────── */
/* Dark mode defaults */
.c-teal    { background: radial-gradient(ellipse at 35% 30%, #5EE9DC 0%, #14B8A6 45%, #064E47 100%); }
.c-blue    { background: radial-gradient(ellipse at 35% 30%, #7BA8FF 0%, #2E6FD9 45%, #0B2358 100%); }
.c-magenta { background: radial-gradient(ellipse at 35% 30%, #FF7CC4 0%, #C8348C 45%, #4A0E33 100%); }
.c-orange  { background: radial-gradient(ellipse at 35% 30%, #FFC089 0%, #E8743B 45%, #5C2607 100%); }
.c-green   { background: radial-gradient(ellipse at 35% 30%, #7BE5A8 0%, #2BB673 45%, #0B3F26 100%); }
.c-red     { background: radial-gradient(ellipse at 35% 30%, #FF6B7E 0%, #D7263D 45%, #4A0810 100%); }
.c-lime    { background: radial-gradient(ellipse at 35% 30%, #C8F58E 0%, #7BC74D 45%, #2E4A18 100%); }
.c-sky     { background: radial-gradient(ellipse at 35% 30%, #D6F0FF 0%, #7BC8F0 45%, #1E4A66 100%); }

/* Light mode — softer, higher-lightness gradients for a bright background */
:root[data-bs-theme="light"] .c-teal    { background: radial-gradient(ellipse at 35% 30%, #B2F5EA 0%, #38D9C5 45%, #0D9488 100%); }
:root[data-bs-theme="light"] .c-blue    { background: radial-gradient(ellipse at 35% 30%, #BFDBFE 0%, #60A5FA 45%, #2563EB 100%); }
:root[data-bs-theme="light"] .c-magenta { background: radial-gradient(ellipse at 35% 30%, #FBCFE8 0%, #EC4899 45%, #BE185D 100%); }
:root[data-bs-theme="light"] .c-orange  { background: radial-gradient(ellipse at 35% 30%, #FED7AA 0%, #FB923C 45%, #EA580C 100%); }
:root[data-bs-theme="light"] .c-green   { background: radial-gradient(ellipse at 35% 30%, #BBF7D0 0%, #4ADE80 45%, #16A34A 100%); }
:root[data-bs-theme="light"] .c-red     { background: radial-gradient(ellipse at 35% 30%, #FECACA 0%, #F87171 45%, #DC2626 100%); }
:root[data-bs-theme="light"] .c-lime    { background: radial-gradient(ellipse at 35% 30%, #ECFCCB 0%, #A3E635 45%, #65A30D 100%); }
:root[data-bs-theme="light"] .c-sky     { background: radial-gradient(ellipse at 35% 30%, #E0F2FE 0%, #7DD3FC 45%, #0EA5E9 100%); }

/* When user has customized a tile color and it's light, flip text to dark */
.hex.text-dark { color: #111; text-shadow: 0 1px 2px rgba(255,255,255,0.4); }

/* ─── Color picker popover ─────────────────────────────────────────── */
.hex-swatch-popover {
  position: fixed;
  z-index: 100;
  padding: 12px;
  background: rgba(20, 20, 24, 0.95);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 14px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.6);
  display: none;
  grid-template-columns: repeat(6, 28px);
  gap: 8px;
  animation: hex-pop-in 160ms ease-out;
}
:root[data-bs-theme="light"] .hex-swatch-popover {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(0,0,0,0.15);
  box-shadow: 0 12px 32px rgba(0,0,0,0.2);
}
.hex-swatch-popover.open { display: grid; }
@keyframes hex-pop-in {
  from { opacity: 0; transform: scale(0.85); }
  to   { opacity: 1; transform: scale(1); }
}
.hex-swatch {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.25);
  cursor: pointer;
  transition: transform 120ms ease, border-color 120ms ease;
  padding: 0;
}
:root[data-bs-theme="light"] .hex-swatch {
  border-color: rgba(0,0,0,0.2);
}
.hex-swatch:hover {
  transform: scale(1.15);
  border-color: rgba(255,255,255,0.8);
}
:root[data-bs-theme="light"] .hex-swatch:hover {
  border-color: rgba(0,0,0,0.6);
}
.hex-swatch.reset {
  background: transparent !important;
  border-style: dashed;
  color: rgba(255,255,255,0.7);
  font-size: 14px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
:root[data-bs-theme="light"] .hex-swatch.reset {
  color: rgba(0,0,0,0.5);
}

/* ─── Reset button ─────────────────────────────────────────────────── */
.hex-reset-btn {
  position: fixed;
  right: 72px;
  bottom: 40px;
  z-index: 10;
  padding: 10px 18px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 999px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  cursor: pointer;
  transition: background 200ms ease, transform 200ms ease, border-color 200ms ease;
}
:root[data-bs-theme="light"] .hex-reset-btn {
  color: #333;
  background: rgba(0,0,0,0.05);
  border-color: rgba(0,0,0,0.2);
}
.hex-reset-btn:hover {
  background: rgba(255,255,255,0.18);
  border-color: rgba(255,255,255,0.5);
  transform: translateY(-2px);
}
:root[data-bs-theme="light"] .hex-reset-btn:hover {
  background: rgba(0,0,0,0.1);
  border-color: rgba(0,0,0,0.35);
}
.hex-reset-btn:active { transform: translateY(0); }

/* ─── Calendar Dropdowns (Phase 4) ─────────────────────────────────── */
.hex-cal-dropdown {
  position: fixed;
  z-index: 200;
  padding: 10px;
  background: rgba(20, 20, 24, 0.96);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 12px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.6);
  animation: hex-pop-in 160ms ease-out;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 0.85rem;
  color: #e0e0e0;
}
:root[data-bs-theme="light"] .hex-cal-dropdown {
  background: rgba(255, 255, 255, 0.97);
  border-color: rgba(0,0,0,0.12);
  box-shadow: 0 12px 32px rgba(0,0,0,0.18);
  color: #1a1a1a;
}

/* ─── Day grid ─────────────────────────────────────────────────────── */
.hex-cal-days { width: 260px; }
.hex-cal-days__header {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(255,255,255,0.45);
  padding-bottom: 4px;
  margin-bottom: 4px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
:root[data-bs-theme="light"] .hex-cal-days__header {
  color: rgba(0,0,0,0.4);
  border-bottom-color: rgba(0,0,0,0.08);
}
.hex-cal-days__grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}
.hex-cal-day {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: rgba(255,255,255,0.5);
  cursor: pointer;
  font-size: 0.8rem;
  transition: background 100ms ease;
}
:root[data-bs-theme="light"] .hex-cal-day {
  color: rgba(0,0,0,0.4);
}
.hex-cal-day--empty {
  cursor: default;
}
.hex-cal-day--has-data {
  color: #60a5fa;
  font-weight: 700;
}
:root[data-bs-theme="light"] .hex-cal-day--has-data {
  color: #2563eb;
}
.hex-cal-day--selected {
  background: #2563eb;
  color: #fff !important;
  font-weight: 700;
  border-radius: 6px;
}
.hex-cal-day--disabled {
  color: rgba(255,255,255,0.15) !important;
  cursor: default;
}
:root[data-bs-theme="light"] .hex-cal-day--disabled {
  color: rgba(0,0,0,0.15) !important;
}
.hex-cal-day:hover:not(:disabled):not(.hex-cal-day--empty) {
  background: rgba(255,255,255,0.12);
}
:root[data-bs-theme="light"] .hex-cal-day:hover:not(:disabled):not(.hex-cal-day--empty) {
  background: rgba(0,0,0,0.06);
}

/* ─── Month list ───────────────────────────────────────────────────── */
.hex-cal-months {
  width: 180px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.hex-cal-month {
  padding: 6px 12px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: rgba(255,255,255,0.5);
  cursor: pointer;
  text-align: left;
  font-size: 0.85rem;
  transition: background 100ms ease;
}
:root[data-bs-theme="light"] .hex-cal-month {
  color: rgba(0,0,0,0.45);
}
.hex-cal-month--has-data {
  color: #60a5fa;
  font-weight: 600;
}
:root[data-bs-theme="light"] .hex-cal-month--has-data {
  color: #2563eb;
}
.hex-cal-month--selected {
  background: #2563eb;
  color: #fff !important;
  font-weight: 700;
}
.hex-cal-month:hover {
  background: rgba(255,255,255,0.1);
}
:root[data-bs-theme="light"] .hex-cal-month:hover {
  background: rgba(0,0,0,0.06);
}

/* ─── Year list ────────────────────────────────────────────────────── */
.hex-cal-years {
  width: 120px;
  max-height: 320px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.hex-cal-year {
  padding: 6px 12px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: rgba(255,255,255,0.5);
  cursor: pointer;
  text-align: left;
  font-size: 0.85rem;
  transition: background 100ms ease;
}
:root[data-bs-theme="light"] .hex-cal-year {
  color: rgba(0,0,0,0.45);
}
.hex-cal-year--has-data {
  color: #60a5fa;
  font-weight: 600;
}
:root[data-bs-theme="light"] .hex-cal-year--has-data {
  color: #2563eb;
}
.hex-cal-year--selected {
  background: #2563eb;
  color: #fff !important;
  font-weight: 700;
}
.hex-cal-year:hover {
  background: rgba(255,255,255,0.1);
}
:root[data-bs-theme="light"] .hex-cal-year:hover {
  background: rgba(0,0,0,0.06);
}

/* ─── Date confirm/cancel row (staged month/year editing) ──────── */
.hex-date-confirm {
  display: flex;
  justify-content: center;
  gap: 0.4rem;
  margin-top: 0.3rem;
  animation: hex-confirm-in 150ms ease;
}
@keyframes hex-confirm-in {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}
.hex-date-confirm__go {
  padding: 0.15rem 0.6rem;
  border: none;
  border-radius: 6px;
  background: #4caf50;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 120ms;
}
.hex-date-confirm__go:hover { background: #388e3c; }
.hex-date-confirm__cancel {
  padding: 0.15rem 0.4rem;
  border: none;
  border-radius: 6px;
  background: rgba(244, 67, 54, 0.7);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 120ms;
}
.hex-date-confirm__cancel:hover { background: #d32f2f; }

/* ─── Legacy rectangular tile styles (kept for popup reference) ───── */
/* The popup system still references --nl-bg-* / --nl-accent-* tokens
   for chart series colors. Those are defined above. The old .newlook-tile
   and .newlook-grid classes are no longer rendered in home.html but the
   tokens remain load-bearing for newlook-popup.js. */

/* Trends tile label — 15% larger per user request (NL.48) */
.hex[data-tile-key="trends"] .hex__label {
  font-size: 1.15em;
}

/* ═══════════════════════════════════════════════════════════════════
 * NL.49 — Neutral tile defaults (first paint, pre-JS).
 * Placed AFTER the .c-* rules so they win at equal specificity.
 * JS (newlook-home.js) re-applies saved palette picks or the same
 * neutral defaults on load; these rules prevent the rainbow flash.
 * ═══════════════════════════════════════════════════════════════════ */
.is-hex-layout .hex-tile {
  background: radial-gradient(ellipse at 35% 30%, #B0B9C7 0%, #64748B 45%, #1F2937 100%);
}
.is-hex-layout .hex-tile[data-tile-key="somnidoc"] {
  background: radial-gradient(ellipse at 35% 30%, #B0C5DC 0%, #4A6FA5 45%, #1A2A44 100%);
}

/* ═══════════════════════════════════════════════════════════════════
 * NL.50 — Tile visibility (hybrid per-tile Hide + global checklist)
 * ═══════════════════════════════════════════════════════════════════ */

/* Hidden tiles simply vanish from the hive; positions are absolute so
   there's no reflow. The gap is intentional — user opted to hide. */
.hex.is-hidden { display: none !important; }

/* "Hide tile" button at the top of the color-picker popover. Spans the
   full grid row so it visually separates from the 6-column swatch grid. */
.hex-hide-btn {
  grid-column: 1 / -1;
  width: auto;
  height: auto;
  padding: 6px 10px;
  margin-bottom: 2px;
  border-radius: 6px;
  background: rgba(220, 38, 38, 0.15);
  border: 1px solid rgba(220, 38, 38, 0.45);
  color: #fecaca;
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: background 120ms ease, border-color 120ms ease;
}
.hex-hide-btn:hover {
  background: rgba(220, 38, 38, 0.28);
  border-color: rgba(220, 38, 38, 0.7);
}
:root[data-bs-theme="light"] .hex-hide-btn {
  background: rgba(220, 38, 38, 0.08);
  border-color: rgba(220, 38, 38, 0.35);
  color: #991b1b;
}
:root[data-bs-theme="light"] .hex-hide-btn:hover {
  background: rgba(220, 38, 38, 0.16);
  border-color: rgba(220, 38, 38, 0.55);
}

/* Global "Visible tiles" checklist popover (fa-eye right-rail icon). */
.newlook-visibility-popover {
  position: fixed;
  z-index: 100;
  width: 260px;
  max-height: min(70vh, 480px);
  background: rgba(20, 20, 24, 0.97);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 14px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.6);
  display: none;
  flex-direction: column;
  color: #f5f5f5;
  font-size: 0.85rem;
  overflow: hidden;
  animation: hex-pop-in 160ms ease-out;
}
.newlook-visibility-popover.open { display: flex; }
:root[data-bs-theme="light"] .newlook-visibility-popover {
  background: rgba(255, 255, 255, 0.97);
  color: #111;
  border-color: rgba(0,0,0,0.15);
  box-shadow: 0 12px 32px rgba(0,0,0,0.2);
}
.newlook-visibility-popover__header {
  padding: 12px 16px;
  font-weight: 600;
  font-size: 0.9rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  letter-spacing: 0.02em;
}
:root[data-bs-theme="light"] .newlook-visibility-popover__header {
  border-bottom-color: rgba(0,0,0,0.1);
}
.newlook-visibility-popover__list {
  flex: 1;
  overflow-y: auto;
  padding: 6px 0;
}
.newlook-visibility-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 16px;
  cursor: pointer;
  user-select: none;
}
.newlook-visibility-row:hover { background: rgba(255,255,255,0.06); }
:root[data-bs-theme="light"] .newlook-visibility-row:hover {
  background: rgba(0,0,0,0.05);
}
.newlook-visibility-row input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: #1976d2;
  cursor: pointer;
  flex: 0 0 auto;
}
.newlook-visibility-popover__footer {
  display: flex;
  gap: 8px;
  padding: 10px 14px;
  border-top: 1px solid rgba(255,255,255,0.1);
}
:root[data-bs-theme="light"] .newlook-visibility-popover__footer {
  border-top-color: rgba(0,0,0,0.1);
}
.newlook-visibility-popover__footer button {
  flex: 1;
  padding: 6px 10px;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.22);
  color: inherit;
  border-radius: 6px;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 500;
  transition: background 120ms ease, border-color 120ms ease;
}
.newlook-visibility-popover__footer button:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.4);
}
:root[data-bs-theme="light"] .newlook-visibility-popover__footer button {
  border-color: rgba(0,0,0,0.2);
}
:root[data-bs-theme="light"] .newlook-visibility-popover__footer button:hover {
  background: rgba(0,0,0,0.05);
  border-color: rgba(0,0,0,0.4);
}

/* ═══════════════════════════════════════════════════════════════════════
 * NL.59 — Per-popover Feedback icon (B7 follow-up v2)
 * Tile-face icons removed — they competed with tile aesthetics. The icon
 * now lives only inside popovers/overlays, where the user is already focused
 * on a specific surface and context is most actionable.
 *
 * Two placements:
 *   1) Metric popup (.newlook-popup__header-actions) — uses the existing
 *      .newlook-popup__icon-btn class to sit next to Print/Email/Close.
 *   2) Overlay popovers (Trends, Charts, Analysis, Profile, Account, Upload)
 *      — absolute-positioned teal button in the top-right of __inner.
 * ═══════════════════════════════════════════════════════════════════════ */

/* When the feedback icon rides the metric-popup header action row, adopt
   the existing icon-btn chrome and just tint the icon teal so it reads as
   "not a primary action, something to communicate with." */
.newlook-popup__icon-btn.nl-feedback-icon.is-header-action {
  color: #14b8a6;
}
.newlook-popup__icon-btn.nl-feedback-icon.is-header-action:hover {
  color: #fff;
  background: #14b8a6;
  border-color: #14b8a6;
}

/* ── Absolute placement on overlay popovers (top-right, sibling to ×) ──
   High z-index so any lazy-rendered content inside __content cannot
   visually cover the button. pointer-events: auto is defensive — some
   overlay styles disable pointer events on backdrops. */
.nl-feedback-icon.is-popover {
  position: absolute;
  top: 0.75rem;
  right: 3rem;                            /* sits just left of the × close */
  width: 30px;
  height: 30px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(20, 184, 166, 0.12);
  color: #0d9488;                         /* teal-600 on light bg */
  font-size: 0.85rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  pointer-events: auto;
  transition: background 140ms ease, color 140ms ease, transform 140ms ease;
  z-index: 10000;
}
.nl-feedback-icon.is-popover:hover,
.nl-feedback-icon.is-popover:focus-visible {
  background: #14b8a6;
  color: #fff;
  transform: scale(1.06);
}
.nl-feedback-icon.is-popover:focus-visible {
  outline: 2px solid #99f6e4;
  outline-offset: 2px;
}
:root[data-bs-theme="dark"] .nl-feedback-icon.is-popover {
  background: rgba(20, 184, 166, 0.22);
  color: #5eead4;                         /* teal-300 on dark bg */
}
:root[data-bs-theme="dark"] .nl-feedback-icon.is-popover:hover,
:root[data-bs-theme="dark"] .nl-feedback-icon.is-popover:focus-visible {
  background: #14b8a6;
  color: #fff;
}
.nl-feedback-icon.is-popover i { pointer-events: none; }

/* Upload modal has its own dark header with an elapsed-timer chip at the
   right. Offset further left so we don't collide with it. */
#cpapUploadModal .nl-feedback-icon.is-popover {
  top: 0.55rem;
  right: 4.5rem;
  color: #5eead4;
  background: rgba(20, 184, 166, 0.22);
}
#cpapUploadModal .nl-feedback-icon.is-popover:hover {
  color: #fff;
  background: #14b8a6;
}

/* ═══════════════════════════════════════════════════════════════════════
 * NL.70 — Tier gating (Silver → SomniScan / SomniPattern / Charts View locked)
 * Greyscale filter + subtle opacity + gold crown badge in the top-right.
 * Click opens a small popover explaining the Gold feature + link to upgrade.
 * ═══════════════════════════════════════════════════════════════════════ */
.hex-tile.is-locked {
  filter: grayscale(70%) brightness(0.6);
  cursor: pointer;
  transition: filter 180ms ease, brightness 180ms ease, transform 180ms ease;
}
.hex-tile.is-locked:hover {
  filter: grayscale(50%) brightness(0.72);
  transform: scale(1.02);
}
.hex-tile.is-locked .hex__label,
.hex-tile.is-locked .hex__hint {
  color: rgba(255, 255, 255, 0.6);
}

/* Gold crown badge overlay — small, top-center of the hex (matches the
   per-tile-icon approach used briefly in NL.58, but only appears on locked
   tiles for Silver users). */
.hex-tile .nl-tier-lock {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: linear-gradient(135deg, #fbbf24 0%, #d97706 100%);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  box-shadow: 0 2px 8px rgba(217, 119, 6, 0.45),
              0 0 0 1px rgba(255, 255, 255, 0.15) inset;
  pointer-events: none;            /* whole tile handles the click */
  z-index: 3;
}
.hex-tile .nl-tier-lock i { filter: drop-shadow(0 1px 1px rgba(0,0,0,0.35)); }

/* ── Lock popover (shown when locked tile is clicked) ─────────────────── */
.nl-tier-lock-popover {
  position: fixed;
  inset: 0;
  z-index: 1055;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  background: rgba(0, 0, 0, 0.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}
.nl-tier-lock-popover.is-open {
  opacity: 1;
  pointer-events: auto;
}
.nl-tier-lock-popover__inner {
  width: 100%;
  max-width: 420px;
  background: var(--bs-body-bg, #fff);
  border-radius: 14px;
  padding: 1.6rem 1.4rem 1.2rem;
  text-align: center;
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.55);
  animation: hex-pop-in 220ms ease;
}
:root[data-bs-theme="dark"] .nl-tier-lock-popover__inner {
  background: #1a1d21;
  color: #f0f0f0;
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.nl-tier-lock-popover__crown {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, #fbbf24, #d97706);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.7rem;
  margin: 0 auto 1rem;
  box-shadow: 0 8px 18px rgba(217, 119, 6, 0.35);
}
.nl-tier-lock-popover__title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  letter-spacing: 0.01em;
}
.nl-tier-lock-popover__body {
  font-size: 0.9rem;
  color: var(--nl-text-muted, #8a8a8a);
  line-height: 1.45;
  margin-bottom: 1.2rem;
}
.nl-tier-lock-popover__footer {
  display: flex;
  gap: 0.6rem;
  justify-content: center;
}
.nl-tier-lock-popover__footer .nl-profile-btn.is-gold {
  background: linear-gradient(135deg, #fbbf24, #d97706);
  border-color: #d97706;
  color: #fff;
  font-weight: 600;
}
.nl-tier-lock-popover__footer .nl-profile-btn.is-gold:hover {
  background: linear-gradient(135deg, #f59e0b, #b45309);
}

/* ═══════════════════════════════════════════════════════════════════════
 * NL.71 — First-time user onboarding welcome popup
 * Shown when /home is loaded with data-onboarding-state="needs_profile"
 * or "needs_data". Non-blocking (can be dismissed); the CTA opens the
 * Profile or Upload popover directly.
 * ═══════════════════════════════════════════════════════════════════════ */
.newlook-onboarding {
  position: fixed;
  inset: 0;
  z-index: 1090;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms ease;
}
.newlook-onboarding.is-open {
  opacity: 1;
  pointer-events: auto;
}
.newlook-onboarding__inner {
  width: 100%;
  max-width: 460px;
  background: var(--bs-body-bg, #fff);
  border-radius: 14px;
  padding: 1.75rem 1.5rem 1.3rem;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.55);
  animation: hex-pop-in 260ms ease;
}
:root[data-bs-theme="dark"] .newlook-onboarding__inner {
  background: #1a1d21;
  color: #f0f0f0;
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.newlook-onboarding__icon {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: linear-gradient(135deg, #14b8a6 0%, #0d9488 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.9rem;
  margin: 0 auto 1rem;
  box-shadow: 0 10px 24px rgba(20, 184, 166, 0.35);
}
.newlook-onboarding__title {
  font-size: 1.2rem;
  font-weight: 600;
  margin: 0 0 0.6rem 0;
  letter-spacing: 0.01em;
}
.newlook-onboarding__body {
  font-size: 0.93rem;
  line-height: 1.5;
  color: var(--nl-text-muted, #666);
  margin: 0 0 1.3rem 0;
}
:root[data-bs-theme="dark"] .newlook-onboarding__body { color: #c0c6cc; }
.newlook-onboarding__footer {
  display: flex;
  gap: 0.65rem;
  justify-content: center;
  align-items: center;
}
.newlook-onboarding__footer .nl-profile-btn.is-primary {
  background: linear-gradient(135deg, #14b8a6, #0d9488);
  border-color: #0d9488;
  color: #fff;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.newlook-onboarding__footer .nl-profile-btn.is-primary:hover {
  background: linear-gradient(135deg, #0d9488, #115e59);
}
