/* ==========================================================================
   Arewa Nexgen — shared product UI
   One visual language for the public site, the team portal and admin.
   Loaded after each layout's own styles; components are namespaced `nx-`.
   ========================================================================== */

:root {
  --nx-accent: var(--accent, var(--admin-accent, var(--team-accent, #16a34a)));
  --nx-accent-strong: var(--accent-hover, var(--admin-accent-strong, var(--team-accent-strong, #15803d)));
  --nx-accent-soft: var(--accent-bg, var(--admin-accent-soft, var(--team-accent-soft, #f0fdf4)));
  --nx-accent-border: var(--accent-light, var(--admin-accent-border, var(--team-accent-border, #dcfce7)));
  --nx-surface: var(--surface, var(--admin-surface, var(--team-surface, #ffffff)));
  --nx-surface-2: var(--surface-2, var(--admin-surface-2, var(--team-surface-2, #f1f5f9)));
  --nx-border: var(--border, var(--admin-border, var(--team-border, #e2e8f0)));
  --nx-text: var(--text-1, var(--admin-text, var(--team-text, #0f172a)));
  --nx-text-2: var(--text-2, var(--admin-text-soft, var(--team-text-soft, #475569)));
  --nx-text-3: var(--text-3, var(--admin-text-muted, var(--team-text-muted, #94a3b8)));
  --nx-danger: var(--admin-danger-text, var(--team-danger-text, #b42318));
  --nx-warn: #b45309;
  --nx-info: #0e7490;
  --nx-radius: 18px;
  --nx-radius-sm: 12px;
  --nx-shadow: 0 1px 2px rgba(16, 36, 24, .04), 0 8px 24px -18px rgba(16, 36, 24, .28);
  --nx-shadow-lg: 0 24px 60px -28px rgba(16, 36, 24, .35);
}

/* ── Type scale ─────────────────────────────────────────────────────────── */
.nx-eyebrow {
  display: inline-flex; align-items: center; gap: .4rem;
  font-size: .68rem; font-weight: 800; letter-spacing: .12em;
  text-transform: uppercase; color: var(--nx-accent);
}
.nx-title { font-size: clamp(1.5rem, 2.4vw, 2.15rem); line-height: 1.15; font-weight: 800; letter-spacing: -.02em; color: var(--nx-text); margin: 0; }
.nx-sub { font-size: .92rem; line-height: 1.6; color: var(--nx-text-2); margin: .4rem 0 0; max-width: 62ch; }
.nx-muted { color: var(--nx-text-3); }
.nx-small { font-size: .78rem; }

/* ── Layout ─────────────────────────────────────────────────────────────── */
.nx-stack { display: flex; flex-direction: column; gap: 1.25rem; }
.nx-row { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; }
.nx-between { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.nx-grid { display: grid; gap: 1.1rem; }
.nx-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.nx-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.nx-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.nx-main-side { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: 1.5rem; align-items: start; }
@media (max-width: 1024px) { .nx-main-side { grid-template-columns: 1fr; } .nx-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 720px) { .nx-grid-2, .nx-grid-3, .nx-grid-4 { grid-template-columns: 1fr; } }

/* ── Cards ──────────────────────────────────────────────────────────────── */
.nx-card {
  background: var(--nx-surface);
  border: 1px solid var(--nx-border);
  border-radius: var(--nx-radius);
  box-shadow: var(--nx-shadow);
  padding: 1.35rem;
  position: relative;
}
.nx-card-flush { padding: 0; overflow: hidden; }
.nx-card-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem;
  padding-bottom: .9rem; margin-bottom: 1rem; border-bottom: 1px solid var(--nx-border);
}
.nx-card-flush .nx-card-head { padding: 1.2rem 1.35rem; margin: 0; }
.nx-card-title { font-size: .95rem; font-weight: 800; color: var(--nx-text); margin: 0; display: flex; align-items: center; gap: .5rem; }
.nx-card-title i { color: var(--nx-accent); font-size: 1.05rem; }
.nx-card-hint { font-size: .74rem; color: var(--nx-text-3); margin: .15rem 0 0; }
.nx-link {
  display: inline-flex; align-items: center; gap: .25rem;
  font-size: .78rem; font-weight: 700; color: var(--nx-accent);
  text-decoration: none; white-space: nowrap;
}
.nx-link:hover { color: var(--nx-accent-strong); text-decoration: underline; text-underline-offset: 3px; }

/* ── Buttons ────────────────────────────────────────────────────────────── */
.nx-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  font-family: inherit; font-size: .84rem; font-weight: 700; line-height: 1;
  padding: .72rem 1.1rem; border-radius: 11px; border: 1px solid transparent;
  cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background .18s, border-color .18s, color .18s, transform .18s, box-shadow .18s;
}
.nx-btn:active { transform: translateY(1px); }
.nx-btn-primary { background: var(--nx-accent); color: #fff; }
.nx-btn-primary:hover { background: var(--nx-accent-strong); box-shadow: 0 10px 22px -12px color-mix(in srgb, var(--nx-accent) 70%, transparent); }
.nx-btn-soft { background: var(--nx-accent-soft); color: var(--nx-accent-strong); border-color: var(--nx-accent-border); }
.nx-btn-soft:hover { background: color-mix(in srgb, var(--nx-accent-soft) 70%, var(--nx-accent) 8%); }
.nx-btn-ghost { background: transparent; border-color: var(--nx-border); color: var(--nx-text-2); }
.nx-btn-ghost:hover { background: var(--nx-surface-2); color: var(--nx-text); }
.nx-btn-danger { background: #fef2f2; border-color: #fecaca; color: var(--nx-danger); }
.nx-btn-danger:hover { background: #fee2e2; }
.nx-btn-lg { padding: .95rem 1.35rem; font-size: .92rem; border-radius: 13px; }
.nx-btn-sm { padding: .5rem .8rem; font-size: .76rem; border-radius: 9px; }
.nx-btn-block { width: 100%; }
.nx-btn:disabled { opacity: .55; cursor: not-allowed; }

/* ── Chips & badges ─────────────────────────────────────────────────────── */
.nx-chip {
  display: inline-flex; align-items: center; gap: .35rem;
  font-size: .72rem; font-weight: 700; padding: .32rem .62rem;
  border-radius: 999px; background: var(--nx-surface-2); color: var(--nx-text-2);
  border: 1px solid var(--nx-border); text-decoration: none;
}
.nx-chip i { font-size: .85rem; }
.nx-chip-accent { background: var(--nx-accent-soft); color: var(--nx-accent-strong); border-color: var(--nx-accent-border); }
.nx-chip-warn { background: #fffbeb; color: var(--nx-warn); border-color: #fde68a; }
.nx-chip-danger { background: #fef2f2; color: var(--nx-danger); border-color: #fecaca; }
.nx-chip-info { background: #ecfeff; color: var(--nx-info); border-color: #a5f3fc; }
.nx-dot { width: .5rem; height: .5rem; border-radius: 50%; background: currentColor; display: inline-block; }

/* ── KPI tiles ──────────────────────────────────────────────────────────── */
.nx-kpi { display: flex; flex-direction: column; gap: .55rem; padding: 1.15rem 1.2rem; min-height: 128px; }
.nx-kpi-top { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.nx-kpi-icon {
  width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center;
  font-size: 1.05rem; background: var(--nx-accent-soft); color: var(--nx-accent-strong);
}
.nx-kpi-icon.amber { background: #fffbeb; color: #b45309; }
.nx-kpi-icon.blue { background: #eff6ff; color: #1d4ed8; }
.nx-kpi-icon.rose { background: #fff1f2; color: #be123c; }
.nx-kpi-icon.violet { background: #f5f3ff; color: #6d28d9; }
.nx-kpi-value { font-size: 1.9rem; line-height: 1; font-weight: 800; letter-spacing: -.03em; color: var(--nx-text); font-variant-numeric: tabular-nums; }
.nx-kpi-label { font-size: .73rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--nx-text-3); }
.nx-kpi-foot { display: flex; align-items: center; gap: .35rem; font-size: .74rem; font-weight: 600; color: var(--nx-text-3); margin-top: auto; }
.nx-kpi-foot.up { color: #15803d; }
.nx-kpi-foot.down { color: var(--nx-danger); }

/* ── Hero / greeting ────────────────────────────────────────────────────── */
.nx-hero {
  position: relative; overflow: hidden; border-radius: 22px;
  padding: clamp(1.4rem, 3vw, 2.2rem);
  background:
    radial-gradient(120% 180% at 100% 0%, color-mix(in srgb, var(--nx-accent) 22%, transparent) 0%, transparent 55%),
    linear-gradient(135deg, #0d2a1b 0%, #14532d 55%, #0f766e 100%);
  color: #fff; box-shadow: var(--nx-shadow-lg);
}
.nx-hero::after {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255,255,255,.14) 1px, transparent 1px);
  background-size: 22px 22px; opacity: .5; pointer-events: none;
}
.nx-hero > * { position: relative; z-index: 1; }
.nx-hero h1 { font-size: clamp(1.5rem, 3vw, 2.2rem); font-weight: 800; letter-spacing: -.02em; margin: .55rem 0 .3rem; }
.nx-hero p { color: rgba(255,255,255,.75); font-size: .9rem; line-height: 1.6; max-width: 54ch; margin: 0; }
.nx-hero .nx-eyebrow { color: #bbf7d0; }
.nx-hero-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.15rem; }
.nx-hero .nx-btn-primary { background: #fff; color: #14532d; }
.nx-hero .nx-btn-primary:hover { background: #f0fdf4; }
.nx-hero .nx-btn-ghost { border-color: rgba(255,255,255,.28); color: #fff; background: rgba(255,255,255,.08); }
.nx-hero .nx-btn-ghost:hover { background: rgba(255,255,255,.16); }

/* ── Charts ─────────────────────────────────────────────────────────────── */
.nx-chart-wrap { position: relative; width: 100%; }
.nx-chart { width: 100%; display: block; overflow: visible; }
.nx-chart text { font-family: inherit; }
.nx-chart .nx-gridline { stroke: var(--nx-border); stroke-width: 1; }
.nx-chart .nx-axis { fill: var(--nx-text-3); font-size: 9.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.nx-chart .nx-line { fill: none; stroke: var(--nx-accent); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.nx-chart .nx-area { fill: url(#nx-area-fill); }
.nx-chart .nx-point { fill: var(--nx-surface); stroke: var(--nx-accent); stroke-width: 2.5; }
.nx-chart .nx-bar { fill: var(--nx-accent); opacity: .18; transition: opacity .15s; }
.nx-chart .nx-bar.is-peak, .nx-chart .nx-bar:hover { opacity: 1; }
.nx-chart .nx-bar-label { fill: var(--nx-text-3); font-size: 10px; font-weight: 700; }
.nx-legend { display: flex; flex-wrap: wrap; gap: .9rem; font-size: .75rem; font-weight: 600; color: var(--nx-text-2); }
.nx-legend span { display: inline-flex; align-items: center; gap: .35rem; }
.nx-legend i { width: .55rem; height: .55rem; border-radius: 3px; display: inline-block; }

/* ── Tables ─────────────────────────────────────────────────────────────── */
.nx-table-wrap { overflow-x: auto; }
.nx-table { width: 100%; border-collapse: collapse; font-size: .84rem; }
.nx-table th {
  text-align: left; padding: .7rem 1rem; background: var(--nx-surface-2);
  font-size: .68rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--nx-text-3);
  border-bottom: 1px solid var(--nx-border); white-space: nowrap;
}
.nx-table td { padding: .8rem 1rem; border-bottom: 1px solid var(--nx-border); color: var(--nx-text-2); vertical-align: middle; }
.nx-table tbody tr:last-child td { border-bottom: none; }
.nx-table tbody tr:hover { background: color-mix(in srgb, var(--nx-accent) 4%, var(--nx-surface)); }
.nx-table .nx-strong { color: var(--nx-text); font-weight: 700; }
.nx-table .nx-num { text-align: right; font-variant-numeric: tabular-nums; }

/* ── Feed / timeline ────────────────────────────────────────────────────── */
.nx-feed { display: flex; flex-direction: column; gap: .25rem; }
.nx-feed-item { display: flex; gap: .8rem; padding: .7rem .25rem; border-radius: 10px; text-decoration: none; color: inherit; }
.nx-feed-item:hover { background: var(--nx-surface-2); }
.nx-feed-icon {
  width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
  flex: 0 0 auto; font-size: .95rem; background: var(--nx-accent-soft); color: var(--nx-accent-strong);
}
.nx-feed-icon.blue { background: #eff6ff; color: #1d4ed8; }
.nx-feed-icon.amber { background: #fffbeb; color: #b45309; }
.nx-feed-icon.slate { background: var(--nx-surface-2); color: var(--nx-text-2); }
.nx-feed-body { min-width: 0; flex: 1; }
.nx-feed-title { font-size: .84rem; font-weight: 700; color: var(--nx-text); margin: 0; }
.nx-feed-meta { display: flex; gap: .45rem; align-items: center; font-size: .72rem; color: var(--nx-text-3); margin-top: .12rem; }
.nx-feed-meta span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nx-feed-time { flex: 0 0 auto; font-size: .7rem; color: var(--nx-text-3); font-weight: 600; }

/* ── Calendar ───────────────────────────────────────────────────────────── */
.nx-cal-head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: .75rem; }
.nx-cal-title { font-size: .92rem; font-weight: 800; color: var(--nx-text); }
.nx-cal-nav { display: flex; gap: .25rem; }
.nx-cal-nav button {
  width: 28px; height: 28px; border-radius: 8px; border: 1px solid var(--nx-border);
  background: var(--nx-surface); color: var(--nx-text-2); cursor: pointer; display: grid; place-items: center;
}
.nx-cal-nav button:hover { background: var(--nx-surface-2); }
.nx-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.nx-cal-dow { text-align: center; font-size: .62rem; font-weight: 800; letter-spacing: .08em; color: var(--nx-text-3); padding: .3rem 0; text-transform: uppercase; }
.nx-cal-day {
  position: relative; aspect-ratio: 1 / 1; min-height: 34px; border-radius: 9px;
  display: grid; place-items: center; font-size: .78rem; font-weight: 600; color: var(--nx-text-2);
  background: transparent; border: 1px solid transparent; cursor: default;
}
.nx-cal-day.is-out { color: var(--nx-text-3); opacity: .45; }
.nx-cal-day.is-today { background: var(--nx-accent-soft); color: var(--nx-accent-strong); border-color: var(--nx-accent-border); font-weight: 800; }
.nx-cal-day.has-event { cursor: pointer; }
.nx-cal-day.has-event:hover { background: var(--nx-surface-2); }
.nx-cal-day.has-event::after {
  content: ""; position: absolute; bottom: 3px; left: 50%; transform: translateX(-50%);
  width: 5px; height: 5px; border-radius: 50%; background: var(--nx-accent);
}
.nx-cal-day.is-selected { outline: 2px solid var(--nx-accent); outline-offset: -2px; }
.nx-cal-list { margin-top: .9rem; border-top: 1px solid var(--nx-border); padding-top: .8rem; display: flex; flex-direction: column; gap: .45rem; }
.nx-cal-event {
  display: flex; gap: .6rem; align-items: flex-start; padding: .55rem .6rem; border-radius: 10px;
  text-decoration: none; color: inherit; border: 1px solid var(--nx-border); background: var(--nx-surface);
}
.nx-cal-event:hover { border-color: var(--nx-accent-border); background: var(--nx-accent-soft); }
.nx-cal-event time { flex: 0 0 auto; font-size: .68rem; font-weight: 800; color: var(--nx-accent-strong); padding-top: .1rem; }
.nx-cal-event p { margin: 0; font-size: .79rem; font-weight: 600; color: var(--nx-text); line-height: 1.35; }
.nx-cal-event small { color: var(--nx-text-3); font-size: .7rem; }

/* Dark statistics calendar used on the dashboard. */
.nx-dash-widget[data-id="calendar"] { background: #0b0b10; border-color: #23232d; }
.nx-dash-widget[data-id="calendar"] .nx-dash-widget-head { background: #0b0b10; border-bottom-color: #23232d; }
.nx-dash-widget[data-id="calendar"] .nx-dash-widget-head .nx-card-title { color: #f4f4f5; }
.nx-dash-widget[data-id="calendar"] .nx-dash-widget-head .nx-card-title i { color: #c4b5fd; }
.nx-dash-widget[data-id="calendar"] .nx-dash-widget-tools button { background: #17171f; border-color: #2a2a36; color: #a1a1aa; }
.nx-dash-widget[data-id="calendar"] .nx-dash-widget-body { padding: 0; }
.nx-cal-stats { padding: .9rem 1rem 1rem; color: #e4e4e7; }
.nx-cal-stats-top { display: flex; align-items: flex-start; justify-content: space-between; gap: .75rem; }
.nx-cal-stats-kicker { font-size: .6rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: #8b8b98; }
.nx-cal-stats h3 { margin: .1rem 0 0; font-size: 1.15rem; line-height: 1.1; font-weight: 800; letter-spacing: -.03em; color: #fff; }
.nx-cal-range { flex-shrink: 0; border: 1px solid #2a2a36; border-radius: 999px; padding: .22rem .55rem; font-size: .62rem; font-weight: 700; color: #c4b5fd; }
.nx-cal-strip { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(42px, 1fr); gap: .38rem; overflow-x: auto; padding: .15rem 0 .35rem; margin-top: .7rem; scrollbar-width: thin; }
.nx-cal-daycard { appearance: none; border: 1px solid #24242e; border-radius: 12px; background: #191920; color: #a1a1aa; padding: .42rem .15rem .35rem; text-align: center; cursor: pointer; transition: background .16s, border-color .16s, color .16s; }
.nx-cal-daycard:hover { border-color: #3f3f4d; background: #20202a; }
.nx-cal-daycard strong { display: block; font-size: .82rem; font-weight: 800; line-height: 1.1; color: #f4f4f5; }
.nx-cal-daycard span { display: block; margin-top: .12rem; font-size: .58rem; font-weight: 700; }
.nx-cal-daycard em { display: block; margin-top: .12rem; font-style: normal; font-size: .56rem; font-weight: 800; color: #c4b5fd; }
.nx-cal-daycard.is-selected { background: #c4b5fd; border-color: #c4b5fd; color: #3b1d73; }
.nx-cal-daycard.is-selected strong, .nx-cal-daycard.is-selected span, .nx-cal-daycard.is-selected em { color: #2e1065; }
.nx-cal-legend { display: flex; align-items: center; gap: .9rem; margin-top: .55rem; font-size: .6rem; font-weight: 600; color: #9b9baa; }
.nx-cal-legend span { display: inline-flex; align-items: center; gap: .3rem; }
.nx-cal-dot { width: 7px; height: 7px; border-radius: 50%; background: #a78bfa; }
.nx-cal-dot.is-prev { background: transparent; border: 1.5px dashed #facc15; }
.nx-cal-chart { display: flex; gap: .45rem; margin-top: .45rem; }
.nx-cal-y { display: flex; flex-direction: column; justify-content: space-between; height: 180px; padding: .1rem 0 1.05rem; font-size: .56rem; color: #71717a; text-align: right; }
.nx-cal-plot { flex: 1; min-width: 0; }
.nx-cal-plot svg { display: block; width: 100%; height: 180px; overflow: visible; }
.nx-cal-x { display: grid; grid-template-columns: repeat(13, minmax(0, 1fr)); margin-top: .25rem; font-size: .54rem; color: #71717a; text-align: center; }
.nx-cal-events { display: flex; flex-direction: column; gap: .3rem; margin-top: .6rem; padding-top: .55rem; border-top: 1px solid #23232d; max-height: 8.5rem; overflow: auto; }
.nx-cal-stats .nx-cal-event { display: flex; gap: .5rem; align-items: flex-start; padding: .45rem .5rem; border: 1px solid #24242e; border-radius: 8px; background: #121218; text-decoration: none; color: #e4e4e7; }
.nx-cal-stats .nx-cal-event:hover { border-color: #4c3f8f; background: #171425; }
.nx-cal-stats .nx-cal-event[hidden] { display: none !important; }
.nx-cal-stats .nx-cal-event time { flex: 0 0 auto; padding-top: .08rem; font-size: .58rem; font-weight: 800; color: #c4b5fd; }
.nx-cal-stats .nx-cal-event strong { display: block; font-size: .72rem; font-weight: 650; line-height: 1.3; color: #f4f4f5; }
.nx-cal-stats .nx-cal-event small { display: block; margin-top: .08rem; font-size: .58rem; color: #8b8b98; }
.nx-cal-empty { margin: .25rem 0; padding: .6rem .5rem; border: 1px dashed #2a2a36; border-radius: 8px; font-size: .68rem; color: #8b8b98; text-align: center; }
.nx-cal-empty[hidden] { display: none !important; }
.nx-cal-summary { margin-top: .45rem; font-size: .58rem; font-weight: 600; color: #71717a; }
.nx-cal-summary:empty { display: none; }
@media (max-width: 720px) {
  .nx-cal-stats { padding: .8rem .75rem .9rem; }
  .nx-cal-plot svg, .nx-cal-y { height: 150px; }
  .nx-cal-strip { grid-auto-columns: minmax(38px, 1fr); }
}

/* ── Segmented progress ─────────────────────────────────────────────────── */
.nx-meter { height: 7px; background: var(--nx-surface-2); border-radius: 999px; overflow: hidden; }
.nx-meter > span { display: block; height: 100%; border-radius: inherit; background: var(--nx-accent); transition: width .5s ease; }

/* ── Layout ─────────────────────────────────────────────────────────────── */
.nx-container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 1.25rem; }

/* ── Media gallery ──────────────────────────────────────────────────────── */
.nx-gallery { display: flex; flex-direction: column; gap: .75rem; }
.nx-stage {
  position: relative; border-radius: 18px; overflow: hidden; background: #0b1510;
  border: 1px solid var(--nx-border); aspect-ratio: 16 / 9; max-height: 520px;
}
@media (max-width: 768px) { .nx-stage { max-height: 320px; } }
.nx-stage img, .nx-stage video { width: 100%; height: 100%; object-fit: cover; display: block; }
.nx-stage-nav {
  display: flex; align-items: center; justify-content: center; gap: .75rem;
  color: var(--nx-text-2);
}
.nx-stage-count { font-size: .72rem; font-weight: 700; color: var(--nx-text-3); }
.nx-thumbs { display: flex; gap: .5rem; overflow-x: auto; padding-bottom: .2rem; scrollbar-width: thin; }
.nx-thumb {
  flex: 0 0 auto; width: 88px; aspect-ratio: 4 / 3; border-radius: 9px; overflow: hidden;
  border: 2px solid transparent; background: var(--nx-surface-2); cursor: pointer; padding: 0;
}
.nx-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.nx-thumb.is-active { border-color: var(--nx-accent); }

/* ── Commerce / pricing ─────────────────────────────────────────────────── */
.nx-price { font-size: 2rem; font-weight: 800; letter-spacing: -.03em; color: var(--nx-text); line-height: 1; }
.nx-price small { font-size: .85rem; font-weight: 600; color: var(--nx-text-3); }
.nx-buy-card { position: sticky; top: 92px; }
.nx-facts { display: flex; flex-direction: column; gap: .55rem; margin: 0; }
.nx-facts > div { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; padding-bottom: .55rem; border-bottom: 1px dashed var(--nx-border); }
.nx-facts > div:last-child { border-bottom: none; padding-bottom: 0; }
.nx-facts dt { font-size: .78rem; color: var(--nx-text-3); font-weight: 600; }
.nx-facts dd { margin: 0; font-size: .8rem; font-weight: 700; color: var(--nx-text); text-align: right; }
.nx-facts span { font-size: .78rem; color: var(--nx-text-3); font-weight: 600; }
.nx-facts strong { font-size: .82rem; font-weight: 700; color: var(--nx-text); text-align: right; }
.nx-checks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .55rem; }
.nx-checks li, .nx-checks > div { display: flex; gap: .5rem; align-items: flex-start; font-size: .85rem; color: var(--nx-text-2); line-height: 1.45; }
.nx-checks i { color: var(--nx-accent); flex: 0 0 auto; margin-top: .1rem; }

/* ── Tabs ───────────────────────────────────────────────────────────────── */
.nx-tabs { display: flex; gap: .25rem; border-bottom: 1px solid var(--nx-border); overflow-x: auto; }
.nx-tab {
  background: none; border: none; cursor: pointer; font-family: inherit;
  padding: .65rem .9rem; font-size: .82rem; font-weight: 700; color: var(--nx-text-3);
  border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap;
}
.nx-tab:hover { color: var(--nx-text); }
.nx-tab.is-active { color: var(--nx-accent-strong); border-bottom-color: var(--nx-accent); }
.nx-panel[hidden] { display: none !important; }

/* ── Accordion ──────────────────────────────────────────────────────────── */
.nx-acc { border: 1px solid var(--nx-border); border-radius: 13px; overflow: hidden; background: var(--nx-surface); }
.nx-acc + .nx-acc { margin-top: .6rem; }
.nx-acc-head {
  width: 100%; display: flex; align-items: center; gap: .75rem; padding: .9rem 1rem;
  background: none; border: 0; cursor: pointer; font-family: inherit; text-align: left;
}
.nx-acc-head:hover { background: var(--nx-surface-2); }
.nx-acc-order {
  width: 26px; height: 26px; border-radius: 8px; background: var(--nx-accent-soft); color: var(--nx-accent-strong);
  display: grid; place-items: center; font-size: .75rem; font-weight: 800; flex: 0 0 auto;
}
.nx-acc-title { flex: 1; min-width: 0; font-size: .86rem; font-weight: 700; color: var(--nx-text); }
.nx-acc-meta { font-size: .72rem; color: var(--nx-text-3); font-weight: 600; }
.nx-acc-head i.chev { color: var(--nx-text-3); transition: transform .2s; }
.nx-acc.is-open .nx-acc-head i.chev { transform: rotate(180deg); }
.nx-acc-body { display: none; padding: 0 1rem 1rem 3.1rem; }
.nx-acc.is-open .nx-acc-body { display: block; }
.nx-lesson { display: flex; align-items: center; gap: .6rem; padding: .5rem 0; border-bottom: 1px dashed var(--nx-border); font-size: .82rem; color: var(--nx-text-2); text-decoration: none; }
.nx-lesson:last-child { border-bottom: none; }
.nx-lesson:hover { color: var(--nx-accent-strong); }
.nx-lesson i { color: var(--nx-text-3); }

/* ── Rating ─────────────────────────────────────────────────────────────── */
.nx-stars { display: inline-flex; gap: .1rem; color: #f59e0b; font-size: .9rem; letter-spacing: .02em; }
.nx-rating-line { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; font-size: .8rem; color: var(--nx-text-3); }

/* ── Empty state ────────────────────────────────────────────────────────── */
.nx-empty { text-align: center; padding: 2.4rem 1.25rem; color: var(--nx-text-3); }
.nx-empty i { font-size: 2rem; display: block; margin-bottom: .6rem; opacity: .6; }
.nx-empty p { margin: 0 0 .9rem; font-size: .85rem; }

/* ── Forms ──────────────────────────────────────────────────────────────── */
.nx-form { display: flex; flex-direction: column; gap: 1.1rem; }
.nx-form-section { border: 1px solid var(--nx-border); border-radius: 14px; padding: 1.1rem; background: var(--nx-surface); }
.nx-form-section > header { display: flex; gap: .7rem; align-items: flex-start; padding-bottom: .8rem; margin-bottom: .9rem; border-bottom: 1px solid var(--nx-border); }
.nx-step-num {
  width: 28px; height: 28px; border-radius: 9px; background: var(--nx-accent); color: #fff;
  display: grid; place-items: center; font-size: .78rem; font-weight: 800; flex: 0 0 auto;
}
.nx-form-section h3 { margin: 0; font-size: .92rem; font-weight: 800; color: var(--nx-text); }
.nx-form-section p { margin: .18rem 0 0; font-size: .76rem; color: var(--nx-text-3); line-height: 1.5; }
.nx-field { display: flex; flex-direction: column; gap: .35rem; }
.nx-label { font-size: .78rem; font-weight: 700; color: var(--nx-text-2); }
.nx-label .req { color: var(--nx-danger); }
.nx-help { font-size: .72rem; color: var(--nx-text-3); line-height: 1.45; }
.nx-input, .nx-select, .nx-textarea {
  width: 100%; font-family: inherit; font-size: .88rem; color: var(--nx-text);
  background: var(--nx-surface); border: 1.5px solid var(--nx-border); border-radius: 10px;
  padding: .68rem .8rem; transition: border-color .18s, box-shadow .18s;
}
.nx-input:focus, .nx-select:focus, .nx-textarea:focus {
  outline: none; border-color: var(--nx-accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--nx-accent) 15%, transparent);
}
.nx-textarea { min-height: 96px; resize: vertical; }

/* ── Lightbox (shared) ──────────────────────────────────────────────────── */
.nx-lightbox {
  position: fixed; inset: 0; z-index: 9999; display: none;
  align-items: center; justify-content: center; background: rgba(6, 12, 9, .94);
  padding: 2.5rem;
}
.nx-lightbox.open { display: flex; }
.nx-lightbox img, .nx-lightbox video { max-width: 92vw; max-height: 86vh; border-radius: 12px; object-fit: contain; }
.nx-lightbox-bar { position: absolute; top: 1rem; left: 1rem; right: 1rem; display: flex; justify-content: space-between; color: rgba(255,255,255,.75); font-size: .78rem; font-weight: 600; }
.nx-lightbox button { background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.22); color: #fff; border-radius: 10px; cursor: pointer; padding: .4rem .65rem; }

/* ── Motion ─────────────────────────────────────────────────────────────── */
@keyframes nx-rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.nx-rise { animation: nx-rise .45s cubic-bezier(.2,.7,.2,1) both; }
.nx-rise-1 { animation-delay: .04s; } .nx-rise-2 { animation-delay: .08s; } .nx-rise-3 { animation-delay: .12s; }
@media (prefers-reduced-motion: reduce) { .nx-rise, .nx-rise * { animation: none !important; } .nx-meter > span { transition: none; } }

/* Dark surfaces (admin/team keep light backgrounds today, but stay safe) */
.dark .nx-card, .dark .nx-input, .dark .nx-select, .dark .nx-textarea { background: var(--nx-surface); }

/* ==========================================================================
   Customizable dashboard — compact zone system
   ========================================================================== */
.nx-dash { display: flex; flex-direction: column; gap: .9rem; padding-bottom: .75rem; }
.nx-dash[hidden] { display: none !important; }

.nx-dash-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  background: var(--nx-surface); border: 1px solid var(--nx-border); border-radius: 14px;
  padding: .6rem 1rem; box-shadow: 0 1px 0 rgba(15,23,42,.03);
}
.nx-dash-bar-mark { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--nx-accent-soft); color: var(--nx-accent-strong); flex-shrink: 0; }
.nx-dash-bar-copy, .nx-dash-bar-actions { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.nx-dash-bar .nx-chip { border-radius: 8px; }
.nx-dash-bar-copy .nx-small { margin: 0; }
.nx-dash-status { font-size: .72rem; font-weight: 700; color: var(--nx-accent); min-height: 1rem; }
.nx-dash-status[data-error] { color: var(--nx-danger); }

.nx-dash-customizer { background: var(--nx-surface); border: 1px solid var(--nx-border); border-radius: 14px; box-shadow: var(--nx-shadow); padding: 1rem 1.1rem; }
.nx-dash-customizer[hidden] { display: none !important; }
.nx-dash-customizer-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding-bottom: .8rem; border-bottom: 1px solid var(--nx-border); }
.nx-dash-customizer-head h2 { margin: 0; font-size: .95rem; font-weight: 800; color: var(--nx-text); }
.nx-dash-customizer-head p { margin: .15rem 0 0; }
.nx-dash-customizer-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.1rem; margin-top: .9rem; }
@media (max-width: 900px) { .nx-dash-customizer-grid { grid-template-columns: 1fr; } }
.nx-dash-panel-title { margin: 0 0 .55rem; font-size: .78rem; font-weight: 800; color: var(--nx-text); display: flex; align-items: center; gap: .4rem; }
.nx-dash-panel-title i { color: var(--nx-accent); }
.nx-dash-picker-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: .4rem; max-height: 17rem; overflow: auto; padding-right: .25rem; }
.nx-dash-picker-item { display: flex; align-items: center; gap: .45rem; width: 100%; text-align: left; cursor: pointer; background: var(--nx-surface-2); border: 1px solid var(--nx-border); border-radius: 8px; padding: .45rem .55rem; font: inherit; font-size: .74rem; font-weight: 700; color: var(--nx-text); }
.nx-dash-picker-item:hover:not(:disabled) { border-color: var(--nx-accent); color: var(--nx-accent); }
.nx-dash-picker-item:disabled { opacity: .5; cursor: default; }
.nx-dash-picker-item > i { font-size: .95rem; color: var(--nx-accent); }
.nx-dash-mini { margin-left: auto; font-size: .66rem; font-weight: 700; color: var(--nx-text-3); }
.nx-dash-settings-row { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .3rem 0; font-size: .75rem; font-weight: 700; color: var(--nx-text); }
.nx-dash-settings-row .nx-select { max-width: 140px; }
.nx-dash-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: .8rem; align-items: start; }
/* JavaScript measures each card and packs it into the next free slot. The
   one-pixel row unit keeps the packed height close to the natural height, so
   there are no large empty bands between rows. */
.nx-dash-grid.is-packed { grid-auto-flow: dense; grid-auto-rows: 1px; align-items: stretch; }
.nx-dash-widget {
  --zone: #16a34a; --zone-soft: #f0fdf4; --zone-ink: #166534;
  grid-column: span min(var(--nx-dash-span, 6), 12); min-width: 0;
  background: var(--nx-surface); border: 1px solid var(--nx-border); border-radius: 14px;
  display: flex; flex-direction: column; overflow: hidden;
}
.nx-dash-widget[data-tone="attention"] { --zone: #e11d48; --zone-soft: #fff1f2; --zone-ink: #9f1239; }
.nx-dash-widget[data-tone="money"] { --zone: #0f766e; --zone-soft: #f0fdfa; --zone-ink: #115e59; }
.nx-dash-widget[data-tone="calendar"] { --zone: #2563eb; --zone-soft: #eff6ff; --zone-ink: #1e40af; }
.nx-dash-widget[data-tone="ai"] { --zone: #6d5df6; --zone-soft: #f1f0ff; --zone-ink: #4c3fc7; }
.nx-dash-widget[data-tone="people"] { --zone: #b45309; --zone-soft: #fffbeb; --zone-ink: #92400e; }
.nx-dash-widget[data-tone="system"] { --zone: #475569; --zone-soft: #f1f5f9; --zone-ink: #334155; }
.nx-dash-widget-head { display: flex; align-items: center; justify-content: space-between; gap: .6rem; padding: .52rem .85rem; border-bottom: 1px solid var(--nx-border); background: var(--zone-soft); }
.nx-dash-widget-head .nx-card-title { font-size: .8rem; color: var(--zone-ink); }
.nx-dash-widget-head .nx-card-title i { color: var(--zone); }
.nx-dash-widget-tools { display: none; gap: .2rem; }
.nx-dash.is-customizing .nx-dash-widget-tools { display: flex; }
.nx-dash-widget-tools button { width: 24px; height: 24px; display: grid; place-items: center; cursor: pointer; background: var(--nx-surface); border: 1px solid var(--nx-border); border-radius: 6px; color: var(--nx-text-2); font-size: .8rem; }
.nx-dash-widget-tools button:hover { color: var(--zone); border-color: var(--zone); }
.nx-dash-widget.nx-dragging { opacity: .4; }
.nx-dash-widget.nx-drag-over { outline: 2px solid var(--zone); outline-offset: 2px; }
.nx-dash-widget[hidden], .nx-dash-widget.nx-removing { display: none !important; }
.nx-dash-widget-body { flex: 1; min-height: 0; padding: .75rem .85rem .85rem; }
.nx-dash-widget-body > .nx-grid { gap: .55rem; }
.nx-dash-widget-body .nx-card { background: transparent !important; border: 0 !important; box-shadow: none !important; padding: 0 !important; min-height: 0 !important; }
.nx-dash-widget-body .nx-card-head { padding: 0 0 .45rem; margin: 0 0 .5rem; }
.nx-dash-widget-body .nx-kpi { min-height: 0; gap: .3rem; padding: .65rem .7rem; border: 1px solid var(--nx-border); border-radius: 10px; background: var(--nx-surface) !important; }
.nx-dash-widget-body .nx-kpi:nth-child(1) .nx-kpi-icon { color: #0f766e; background: #f0fdfa; }
.nx-dash-widget-body .nx-kpi:nth-child(2) .nx-kpi-icon { color: #e11d48; background: #fff1f2; }
.nx-dash-widget-body .nx-kpi:nth-child(3) .nx-kpi-icon { color: #2563eb; background: #eff6ff; }
.nx-dash-widget-body .nx-kpi:nth-child(4) .nx-kpi-icon { color: #b45309; background: #fffbeb; }
.nx-dash-widget-body .nx-kpi-value { font-size: 1.35rem; }
.nx-dash-widget-body .nx-kpi-label { font-size: .72rem; }

.nx-dash-hero { background: linear-gradient(100deg, var(--zone-soft), var(--nx-surface) 72%); border: 1px solid var(--nx-border); border-left: 3px solid var(--zone); border-radius: 10px; padding: .7rem 1rem; color: var(--nx-text); display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.nx-dash-hero .nx-eyebrow { color: var(--zone-ink); font-size: .62rem; opacity: .82; }
.nx-dash-hero h2 { margin: .15rem 0 .2rem; font-size: 1rem; font-weight: 800; letter-spacing: -.02em; color: var(--nx-text); }
.nx-dash-hero p { margin: 0; font-size: .75rem; line-height: 1.5; color: var(--nx-text-2); max-width: 72ch; }
.nx-dash-hero strong { color: var(--nx-text); }
.nx-dash-hero .nx-select { background: var(--nx-surface); border-color: var(--nx-border); color: var(--nx-text); }
.nx-dash-hero .nx-btn { background: var(--nx-surface); border-color: var(--nx-border); color: var(--zone-ink); }
.nx-dash-hero > .nx-small { color: var(--nx-text-2) !important; }
.nx-dash-focus { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; }
.nx-dash-focus .nx-small { color: var(--nx-text-2) !important; font-weight: 700; }
.nx-dash-focus .nx-select { max-width: 190px; }
.nx-dash-focus .nx-btn { white-space: nowrap; }
.nx-dash-actions { display: flex; flex-wrap: wrap; gap: .4rem; }
.nx-dash-actions .nx-btn { font-size: .74rem; padding: .48rem .7rem; border-radius: 8px; }

.nx-dash-list { display: flex; flex-direction: column; gap: .1rem; max-height: 21rem; padding-bottom: .25rem; overflow: auto; }
.nx-dash-list .nx-feed-item { padding: .5rem .3rem; border-bottom: 1px solid var(--nx-border); }
.nx-dash-list .nx-feed-item:last-child { border-bottom: 0; }
.nx-dash-list .nx-feed-body { min-width: 0; }
.nx-dash-list .nx-feed-title { font-size: .78rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.3; }
.nx-dash-list .nx-feed-meta, .nx-dash-list .nx-feed-time { font-size: .68rem; }
.nx-dash-list .nx-empty { padding: 1rem .75rem; border: 1px dashed var(--nx-border); border-radius: 9px; margin: .3rem; }
.nx-dash-list .nx-empty p { font-size: .74rem; }

.nx-dash-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .5rem; }
.nx-dash-step { position: relative; border: 0; border-radius: 0; padding: .45rem .5rem .45rem 2rem; background: transparent; }
.nx-dash-step + .nx-dash-step::before { content: ""; position: absolute; left: .85rem; top: -.3rem; height: .6rem; border-left: 1px dashed var(--nx-border); }
.nx-dash-step .nx-step-num { position: absolute; left: .15rem; top: .4rem; width: 1.4rem; height: 1.4rem; margin: 0; display: grid; place-items: center; font-size: .65rem; border-radius: 7px; background: var(--zone-soft); color: var(--zone-ink); border: 1px solid color-mix(in srgb, var(--zone) 20%, transparent); }
.nx-dash-step strong { display: block; font-size: .75rem; margin: 0 0 .15rem; }
.nx-dash-step p { font-size: .7rem; line-height: 1.45; }

.nx-dash-tools { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: .5rem; }
.nx-dash-tool { display: flex; align-items: center; gap: .55rem; text-decoration: none; padding: .5rem .6rem; border: 1px solid var(--nx-border); background: var(--nx-surface); border-radius: 10px; }
.nx-dash-tool > span:nth-child(2) { min-width: 0; }
.nx-dash-tool .nx-kpi-icon { width: 30px; height: 30px; border-radius: 8px; background: var(--zone-soft); color: var(--zone-ink); flex-shrink: 0; }
.nx-dash-tool strong { font-size: .76rem; color: var(--nx-text); }
.nx-dash-tool p { margin: .1rem 0 0; font-size: .68rem; line-height: 1.35; }
.nx-dash-tool .nx-link { margin-left: auto; font-size: .68rem; white-space: nowrap; }
.nx-dash-tool:hover { border-color: var(--zone); }

.nx-dash-clock { display: flex; flex-direction: row; align-items: baseline; justify-content: space-between; gap: .5rem; }
.nx-dash-clock strong { font-size: 1.6rem; font-variant-numeric: tabular-nums; letter-spacing: -.04em; color: var(--zone-ink); }
.nx-dash-clock span { font-size: .72rem; color: var(--nx-text-3); }
.nx-dash-empty[hidden] { display: none !important; }

@media (max-width: 1100px) { .nx-dash-widget { grid-column: span min(var(--nx-dash-span, 6), 12); } .nx-dash-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 720px) { .nx-dash-grid { grid-template-columns: 1fr; } .nx-dash-widget { grid-column: 1 / -1; } .nx-dash-widget-body .nx-grid-2, .nx-dash-widget-body .nx-grid-3, .nx-dash-widget-body .nx-grid-4 { grid-template-columns: 1fr 1fr; } .nx-dash-steps { grid-template-columns: 1fr; } }

/* User sidebar preferences: fixed values only, never user-supplied CSS. */
html.nx-sidebar-compact #team-sidebar a, html.nx-sidebar-compact .admin-sidebar a { padding-top: .4rem; padding-bottom: .4rem; }
html.nx-sidebar-compact #team-sidebar a > span.w-8, html.nx-sidebar-compact .admin-sidebar a > div.w-8 { width: 2rem; height: 2rem; }
html.nx-sidebar-compact #team-sidebar nav, html.nx-sidebar-compact .admin-sidebar nav { padding-top: .5rem; padding-bottom: .5rem; }
#team-sidebar nav, .admin-sidebar nav { display: flex; flex-direction: column; }
@media (min-width: 1024px) {
  html #team-sidebar { width: var(--nx-sidebar-width, 16rem) !important; }
  html .admin-sidebar { width: var(--nx-sidebar-width, 16rem) !important; }
  html main.lg\:pl-64 { padding-left: var(--nx-sidebar-width, 16rem) !important; }
  html .admin-content { margin-left: var(--nx-sidebar-width, 16rem) !important; }
}

/* Accent themes. They set the same tokens the existing shells already use. */
html.nx-accent-green { --accent: #16a34a; --accent-hover: #15803d; --accent-bg: #f0fdf4; --accent-light: #dcfce7; --team-accent: #16a34a; --admin-accent: #16a34a; }
html.nx-accent-violet { --accent: #6d5df6; --accent-hover: #5746d8; --accent-bg: #f2f0ff; --accent-light: #e0dbff; --team-accent: #6d5df6; --admin-accent: #6d5df6; }
html.nx-accent-blue { --accent: #2563eb; --accent-hover: #1d4ed8; --accent-bg: #eff6ff; --accent-light: #dbeafe; --team-accent: #2563eb; --admin-accent: #2563eb; }
html.nx-accent-teal { --accent: #0d9488; --accent-hover: #0f766e; --accent-bg: #f0fdfa; --accent-light: #ccfbf1; --team-accent: #0d9488; --admin-accent: #0d9488; }
html.nx-accent-amber { --accent: #b45309; --accent-hover: #92400e; --accent-bg: #fffbeb; --accent-light: #fde68a; --team-accent: #b45309; --admin-accent: #b45309; }
html.nx-accent-rose { --accent: #be123c; --accent-hover: #9f1239; --accent-bg: #fff1f2; --accent-light: #fecdd3; --team-accent: #be123c; --admin-accent: #be123c; }
html[class*="nx-accent-"] .bg-brand-600, html[class*="nx-accent-"] .bg-green-600 { background-color: var(--accent) !important; }
html[class*="nx-accent-"] .text-brand-600, html[class*="nx-accent-"] .text-green-600, html[class*="nx-accent-"] .text-green-500 { color: var(--accent) !important; }
html[class*="nx-accent-"] .border-brand-600 { border-color: var(--accent) !important; }
html[class*="nx-accent-"] .bg-brand-50, html[class*="nx-accent-"] .bg-green-50 { background-color: var(--accent-bg) !important; }
html[class*="nx-accent-"] .text-brand-900, html[class*="nx-accent-"] .text-green-900 { color: var(--accent-hover) !important; }

/* Day at a glance: compact aside with schedule and attention panels. */
.nx-dash-widget[data-tone="aside"] { --zone: #7c3aed; --zone-soft: #f5f3ff; --zone-ink: #5b21b6; }
.nx-dash-widget[data-id="day_aside"] .nx-dash-widget-body { background: #f8fafc; }
.nx-aside { display: flex; flex-direction: column; gap: .7rem; }
.nx-aside-panel { background: #fff; border: 1px solid #e5e7eb; border-radius: 14px; padding: .85rem; }
.nx-aside-head { display: flex; align-items: flex-start; justify-content: space-between; gap: .75rem; margin-bottom: .7rem; }
.nx-aside-head h3 { margin: 0; font-size: .82rem; font-weight: 800; color: #111827; line-height: 1.25; }
.nx-aside-head p { margin: .15rem 0 0; font-size: .68rem; color: #6b7280; line-height: 1.4; }
.nx-aside-date { flex: 0 0 auto; border: 1px solid #ede9fe; background: #f5f3ff; color: #5b21b6; border-radius: 999px; padding: .22rem .5rem; font-size: .62rem; font-weight: 800; white-space: nowrap; }
.nx-aside-row { display: flex; align-items: flex-start; gap: .6rem; border: 1px solid #e5e7eb; border-radius: 12px; padding: .6rem; text-decoration: none; color: inherit; transition: border-color .18s, background .18s; }
.nx-aside-row + .nx-aside-row { margin-top: .45rem; }
.nx-aside-row:hover { border-color: #c4b5fd; background: #faf5ff; }
.nx-aside-avatar, .nx-aside-icon { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; flex: 0 0 auto; background: linear-gradient(135deg, #7c3aed, #a78bfa); color: #fff; font-size: 1rem; }
.nx-aside-icon { border-radius: 10px; background: #f5f3ff; color: #6d28d9; }
.nx-aside-icon.is-overdue { background: #fff1f2; color: #e11d48; }
.nx-aside-row strong { display: block; font-size: .76rem; color: #111827; line-height: 1.25; }
.nx-aside-row p { margin: .12rem 0 0; font-size: .67rem; color: #6b7280; line-height: 1.4; }
.nx-aside-meta { display: flex; flex-wrap: wrap; gap: .2rem .5rem; margin-top: .25rem; font-size: .64rem; color: #9ca3af; }
.nx-aside-empty { padding: 1rem .75rem; border: 1px dashed #e5e7eb; border-radius: 10px; color: #9ca3af; font-size: .7rem; text-align: center; }
@media (max-width: 720px) { .nx-aside-panel { padding: .75rem; } }

/* Fixed right rail: left navigation, centre widgets, day aside. */
.nx-dash-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: .8rem;
  align-items: start;
}
.nx-dash-layout.has-rail { grid-template-columns: minmax(0, 1fr) 320px; }
.nx-dash-main { min-width: 0; }
.nx-dash-rail {
  position: sticky;
  top: .75rem;
  min-width: 0;
  max-height: calc(100dvh - 1.5rem);
  overflow: auto;
  scrollbar-width: thin;
}
.nx-dash-rail-widget { width: 100%; }
.nx-dash-rail .nx-dash-widget-body { padding: .65rem; }
@media (max-width: 1200px) {
  .nx-dash-layout.has-rail { grid-template-columns: minmax(0, 1fr) 280px; }
}
@media (max-width: 1100px) {
  .nx-dash-layout.has-rail { grid-template-columns: minmax(0, 1fr); }
  .nx-dash-rail { position: static; max-height: none; overflow: visible; }
}

/* Tasks card */
.nx-tasks { display: flex; flex-direction: column; gap: .75rem; }
.nx-tasks-intro { display: flex; align-items: center; justify-content: space-between; gap: .75rem; flex-wrap: wrap; }
.nx-tasks-intro p { margin: 0; font-size: .82rem; color: var(--nx-text-2); }
.nx-tasks-track { display: flex; gap: .7rem; overflow-x: auto; scroll-snap-type: x mandatory; padding: .1rem .1rem .7rem; scrollbar-width: thin; }
.nx-task-card { flex: 0 0 250px; scroll-snap-align: start; display: flex; flex-direction: column; min-height: 166px; padding: .9rem; border: 1px solid #eceff3; border-radius: 14px; background: linear-gradient(180deg, #fbfcfd, #f7f9fb); text-decoration: none; transition: border-color .18s, transform .18s; }
.nx-task-card:hover { border-color: #d7dde5; transform: translateY(-1px); }
.nx-task-top { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.nx-task-pill { display: inline-flex; align-items: center; border-radius: 7px; padding: .25rem .5rem; font-size: .68rem; font-weight: 700; }
.nx-task-pill.is-progress { background: #fef3c7; color: #92400e; }
.nx-task-pill.is-done { background: #dcfce7; color: #166534; }
.nx-task-pill.is-open { background: #e0f2fe; color: #075985; }
.nx-task-dots { display: inline-flex; gap: 3px; }
.nx-task-dots i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.nx-task-dots.is-progress { color: #ef4444; }
.nx-task-dots.is-done { color: #22c55e; }
.nx-task-dots.is-open { color: #0ea5e9; }
.nx-task-title { margin: .6rem 0 auto; font-size: .88rem; line-height: 1.35; color: var(--nx-text); font-weight: 700; }
.nx-task-due { margin-top: .9rem; font-size: .72rem; color: var(--nx-text-3); }
.nx-task-due b { color: var(--nx-text-2); font-weight: 600; }
.nx-tasks-foot { display: flex; align-items: center; justify-content: space-between; gap: .75rem; flex-wrap: wrap; border-top: 1px solid var(--nx-border); padding-top: .65rem; }
.nx-tasks-counts { display: flex; align-items: center; gap: .9rem; flex-wrap: wrap; font-size: .72rem; color: var(--nx-text-3); }
.nx-tasks-counts span { display: inline-flex; align-items: center; gap: .3rem; }
.nx-tasks-counts i { width: 6px; height: 6px; border-radius: 50%; }
.nx-tasks-counts i.is-done { background: #22c55e; }
.nx-tasks-counts i.is-progress { background: #eab308; }
.nx-tasks-nav { display: inline-flex; gap: .35rem; }
.nx-tasks-nav button { width: 30px; height: 30px; display: grid; place-items: center; border: 1px solid var(--nx-border); border-radius: 8px; background: var(--nx-surface); color: var(--nx-text-2); cursor: pointer; }
.nx-tasks-nav button:hover { border-color: var(--nx-accent); color: var(--nx-accent); }
.nx-tasks-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .35rem; min-height: 130px; border: 1px dashed var(--nx-border); border-radius: 12px; color: var(--nx-text-3); }
.nx-tasks-empty i { font-size: 1.4rem; }
.nx-tasks-empty p { margin: 0; font-size: .78rem; }
@media (max-width:720px) { .nx-task-card { flex-basis: 220px; } .nx-tasks-counts { gap: .55rem; } }

/* Weekly goals card */
.nx-goals { display: flex; flex-direction: column; gap: .75rem; }
.nx-goals-intro { display: flex; align-items: center; justify-content: space-between; gap: .75rem; flex-wrap: wrap; }
.nx-goals-intro p { margin: 0; font-size: .82rem; color: var(--nx-text-2); }
.nx-goals-track { display: flex; gap: .7rem; overflow-x: auto; scroll-snap-type: x mandatory; padding: .65rem; border-radius: 14px; background: #f7f8fa; scrollbar-width: thin; }
.nx-goal-card {
  --goal: #94a3b8;
  flex: 0 0 280px; scroll-snap-align: start; display: flex; flex-direction: column; min-height: 158px;
  padding: 1rem; border: 1px solid #eef0f3; border-radius: 14px; background: #fff;
  text-decoration: none; box-shadow: 0 1px 2px rgba(15, 23, 42, .03);
  transition: border-color .18s, transform .18s;
}
.nx-goal-card:hover { border-color: #d9dee7; transform: translateY(-1px); }
.nx-goal-card.is-done { --goal: #22c55e; }
.nx-goal-card.is-progress { --goal: #7c6cf6; }
.nx-goal-card.is-open { --goal: #94a3b8; }
.nx-goal-title { font-size: .95rem; line-height: 1.3; color: var(--nx-text); font-weight: 700; }
.nx-goal-hint { margin: .4rem 0 0; font-size: .76rem; line-height: 1.45; color: var(--nx-text-2); }
.nx-goal-progress { margin-top: auto; height: 6px; border-radius: 999px; background: #edf0f4; overflow: hidden; }
.nx-goal-progress > span { display: block; height: 100%; border-radius: inherit; background: var(--goal); transition: width .3s ease; }
.nx-goal-count { align-self: flex-end; margin-top: .45rem; padding: .1rem .38rem; border-radius: 5px; background: #f1f5f9; color: var(--nx-text-3); font-size: .68rem; font-weight: 600; }
.nx-goals-foot { display: flex; align-items: center; justify-content: space-between; gap: .75rem; flex-wrap: wrap; border-top: 1px solid var(--nx-border); padding-top: .65rem; }
.nx-goals-foot p { margin: 0; font-size: .76rem; color: var(--nx-text-3); }
.nx-goals-foot b { color: var(--nx-text); font-weight: 700; }
.nx-goals-nav { display: inline-flex; gap: .35rem; }
.nx-goals-nav button { width: 30px; height: 30px; display: grid; place-items: center; border: 1px solid var(--nx-border); border-radius: 8px; background: var(--nx-surface); color: var(--nx-text-2); cursor: pointer; }
.nx-goals-nav button:hover { border-color: var(--nx-accent); color: var(--nx-accent); }
.nx-goals-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .35rem; min-height: 140px; border: 1px dashed var(--nx-border); border-radius: 12px; color: var(--nx-text-3); }
.nx-goals-empty i { font-size: 1.4rem; }
.nx-goals-empty p { margin: 0; font-size: .78rem; }
@media (max-width:720px) { .nx-goal-card { flex-basis: 240px; } .nx-goals-track { padding: .5rem; } }

/* ==========================================================================
   Clean white and green dashboard canvas
   One quiet surface, one accent, generous radii, no scattered cards.
   ========================================================================== */
.nx-dash {
  gap: 18px;
  padding: 18px 18px 20px;
  background: #fff;
  border: 1px solid #e6ece7;
  border-radius: 26px;
  box-shadow: 0 30px 80px -70px rgba(16, 36, 24, .4);
}

/* Slim utility bar inside the canvas, not a separate floating card. */
.nx-dash-bar {
  padding: 0 0 14px;
  background: transparent;
  border: 0;
  border-bottom: 1px solid #edf2ee;
  border-radius: 0;
  box-shadow: none;
  backdrop-filter: none;
}
.nx-dash-bar-copy h1 { font-size: 1rem; letter-spacing: -.02em; }
.nx-dash-bar-copy p { font-size: .75rem; color: #6b7a70; }
.nx-dash-bar-mark { width: 34px; height: 34px; border-radius: 10px; background: #ecfdf3; color: #15803d; font-size: 1rem; }
.nx-dash-bar .nx-chip { background: #f5faf6; border: 1px solid #e6efe8; color: #4b6b58; border-radius: 999px; font-size: .7rem; }
.nx-dash-bar-actions .nx-btn { border-radius: 10px; }
.nx-dash-status { color: #15803d; }

.nx-dash-customizer { background: #fbfdfb; border-color: #e6ece7; border-radius: 18px; box-shadow: none; }

.nx-dash-layout { gap: 16px; }
.nx-dash-grid { gap: 16px; }

/* Every widget uses one white surface and one green accent. */
.nx-dash-widget {
  --zone: #16a34a;
  --zone-soft: #f0fdf4;
  --zone-ink: #14532d;
  background: #fff;
  border: 1px solid #e6ece7;
  border-radius: 20px;
  box-shadow: 0 1px 2px rgba(16, 36, 24, .03);
}
.nx-dash-widget[data-tone] { --zone: #16a34a; --zone-soft: #f0fdf4; --zone-ink: #14532d; }
.nx-dash-widget-head { padding: .72rem 1rem; background: #fff; border-bottom: 1px solid #edf2ee; }
.nx-dash-widget-head .nx-card-title { gap: .5rem; font-size: .82rem; font-weight: 700; color: #2b3a31; }
.nx-dash-widget-head .nx-card-title i { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 8px; background: #ecfdf3; color: #15803d; font-size: .9rem; }
.nx-dash-widget-body { padding: 1rem; }
.nx-dash-widget-tools button { border-radius: 7px; }

/* Welcome is the page opener, not another boxed widget. */
.nx-dash-widget.is-hero { background: transparent; border: 0; border-radius: 0; box-shadow: none; overflow: visible; }
.nx-dash-widget.is-hero .nx-dash-widget-head { display: none; }
.nx-dash-widget.is-hero .nx-dash-widget-body { padding: 0; }
.nx-dash-hero {
  position: relative;
  overflow: hidden;
  padding: 26px 28px;
  border: 1px solid #e3efe7;
  border-left: 1px solid #e3efe7;
  border-radius: 22px;
  background:
    radial-gradient(520px 220px at 100% 0%, #e6f8ec 0%, rgba(230, 248, 236, 0) 72%),
    linear-gradient(135deg, #f8fcf9 0%, #fff 64%);
}
.nx-dash-hero::after {
  content: "";
  position: absolute;
  right: -70px;
  bottom: -110px;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, #dcfce7 0%, rgba(220, 252, 231, 0) 68%);
  opacity: .75;
  pointer-events: none;
}
.nx-dash-hero > * { position: relative; z-index: 1; }
.nx-dash-hero .nx-eyebrow { color: #4b6b58; font-size: .7rem; font-weight: 700; opacity: 1; }
.nx-dash-hero h2 { margin: .4rem 0 .45rem; font-size: clamp(1.7rem, 2.6vw, 2.25rem); line-height: 1.1; font-weight: 800; letter-spacing: -.035em; color: #14251b; }
.nx-dash-hero h2 span { color: #15803d; }
.nx-dash-hero p { max-width: 58ch; font-size: .9rem; line-height: 1.6; color: #5b6b61; }
.nx-dash-hero > .nx-small { color: #5b6b61 !important; font-size: .76rem; font-weight: 600; }
.nx-dash-focus .nx-small { color: #4b6b58 !important; font-weight: 700; }
.nx-dash-focus .nx-select { min-width: 190px; border-radius: 10px; background: #fff; border-color: #dfe9e2; }
.nx-dash-focus .nx-btn { border-radius: 10px; background: #15803d; border-color: #15803d; color: #fff; }
.nx-dash-focus .nx-btn:hover { background: #166534; border-color: #166534; }

/* Key numbers: soft green tiles, clean values, danger only when real. */
.nx-dash-widget-body .nx-kpi { gap: .4rem; padding: .9rem 1rem !important; border: 1px solid #e8eee9 !important; border-radius: 16px; background: #fff !important; }
.nx-dash-widget-body .nx-kpi .nx-chip:not(.nx-chip-danger) { display: none; }
.nx-dash-widget-body .nx-kpi-icon,
.nx-dash-widget-body .nx-kpi:nth-child(n) .nx-kpi-icon { width: 34px; height: 34px; border-radius: 10px; background: #ecfdf3; color: #15803d; }
.nx-dash-widget-body .nx-kpi .nx-kpi-icon.rose { background: #fff1f2; color: #be123c; }
.nx-dash-widget-body .nx-kpi-value { font-size: 1.55rem; font-weight: 800; letter-spacing: -.04em; color: #14251b; }
.nx-dash-widget-body .nx-kpi-label { font-size: .74rem; font-weight: 600; color: #6b7a70; }
.nx-dash-widget-body .nx-kpi .nx-chip { border: 1px solid #e8eee9; border-radius: 999px; background: #f6faf7; color: #4b6b58; }
.nx-dash-widget-body .nx-kpi .nx-chip-danger { border-color: #fecdd3; background: #fff1f2; color: #be123c; }

.nx-dash-list .nx-feed-item { border-bottom-color: #edf2ee; }
.nx-dash-list .nx-feed-title { color: #2b3a31; }
.nx-dash-widget-body .nx-feed-icon.blue { background: #ecfdf3; color: #15803d; }

/* Calendar: light analytics card with a green line. */
.nx-dash-widget[data-id="calendar"] { background: #fff; border-color: #e6ece7; }
.nx-dash-widget[data-id="calendar"] .nx-dash-widget-head { background: #fff; border-bottom-color: #edf2ee; }
.nx-dash-widget[data-id="calendar"] .nx-dash-widget-head .nx-card-title { color: #2b3a31; }
.nx-dash-widget[data-id="calendar"] .nx-dash-widget-head .nx-card-title i { background: #ecfdf3; color: #15803d; }
.nx-dash-widget[data-id="calendar"] .nx-dash-widget-tools button { background: #fff; border-color: #e6ece7; color: #6b7a70; }
.nx-dash-widget[data-id="calendar"] .nx-dash-widget-body { padding: 1rem; background: #fff; }
.nx-dash-widget[data-id="calendar"] .nx-cal-stats { padding: 1rem; border: 1px solid #e8efe9; border-radius: 18px; background: #fbfdfb; color: #1f2937; }
.nx-dash-widget[data-id="calendar"] .nx-cal-stats-kicker { color: #6b8a76; }
.nx-dash-widget[data-id="calendar"] .nx-cal-stats h3 { color: #14251b; }
.nx-dash-widget[data-id="calendar"] .nx-cal-range { border-color: #d1fae5; background: #ecfdf3; color: #15803d; }
.nx-dash-widget[data-id="calendar"] .nx-cal-daycard { border-color: #e6ece7; background: #fff; color: #6b7a70; }
.nx-dash-widget[data-id="calendar"] .nx-cal-daycard:hover { border-color: #bbf7d0; background: #f7fcf8; }
.nx-dash-widget[data-id="calendar"] .nx-cal-daycard strong { color: #2b3a31; }
.nx-dash-widget[data-id="calendar"] .nx-cal-daycard em { color: #15803d; }
.nx-dash-widget[data-id="calendar"] .nx-cal-daycard.is-selected { border-color: #86efac; background: #dcfce7; color: #14532d; }
.nx-dash-widget[data-id="calendar"] .nx-cal-daycard.is-selected strong,
.nx-dash-widget[data-id="calendar"] .nx-cal-daycard.is-selected span,
.nx-dash-widget[data-id="calendar"] .nx-cal-daycard.is-selected em { color: #14532d; }
.nx-dash-widget[data-id="calendar"] .nx-cal-legend { color: #6b7a70; }
.nx-dash-widget[data-id="calendar"] .nx-cal-dot { background: #16a34a; }
.nx-dash-widget[data-id="calendar"] .nx-cal-dot.is-prev { background: transparent; border-color: #f59e0b; }
.nx-dash-widget[data-id="calendar"] .nx-cal-y,
.nx-dash-widget[data-id="calendar"] .nx-cal-x { color: #8a9a90; }
.nx-dash-widget[data-id="calendar"] .nx-cal-events { border-top-color: #e8efe9; }
.nx-dash-widget[data-id="calendar"] .nx-cal-stats .nx-cal-event { border-color: #e8efe9; background: #fff; color: #2b3a31; }
.nx-dash-widget[data-id="calendar"] .nx-cal-stats .nx-cal-event:hover { border-color: #bbf7d0; background: #f7fcf8; }
.nx-dash-widget[data-id="calendar"] .nx-cal-stats .nx-cal-event time { color: #15803d; }
.nx-dash-widget[data-id="calendar"] .nx-cal-stats .nx-cal-event strong { color: #2b3a31; }
.nx-dash-widget[data-id="calendar"] .nx-cal-stats .nx-cal-event small { color: #8a9a90; }
.nx-dash-widget[data-id="calendar"] .nx-cal-empty { border-color: #dfe9e2; background: #fff; color: #8a9a90; }
.nx-dash-widget[data-id="calendar"] .nx-cal-summary { color: #8a9a90; }

/* Tasks and goals: white cards, green progress, amber in progress. */
.nx-task-card { border-color: #e8eee9; background: #fff; box-shadow: 0 1px 2px rgba(16, 36, 24, .03); }
.nx-task-card:hover { border-color: #bbf7d0; }
.nx-task-pill.is-open { background: #f4f7f5; color: #4b5b51; }
.nx-task-pill.is-progress { background: #fef3c7; color: #92400e; }
.nx-task-pill.is-done { background: #dcfce7; color: #166534; }
.nx-task-dots.is-progress { color: #f59e0b; }
.nx-task-dots.is-done { color: #16a34a; }
.nx-task-dots.is-open { color: #94a3b8; }
.nx-task-due b, .nx-task-title { color: #2b3a31; }
.nx-goals-track { background: #f7faf8; border: 1px solid #eef3ef; }
.nx-goal-card { border-color: #e8eee9; box-shadow: 0 1px 2px rgba(16, 36, 24, .03); }
.nx-goal-card:hover { border-color: #bbf7d0; }
.nx-goal-card.is-done { --goal: #15803d; }
.nx-goal-card.is-progress { --goal: #16a34a; }
.nx-goal-card.is-open { --goal: #cbd5e1; }

/* Aside rail uses the same green language as the rest of the canvas. */
.nx-dash-widget[data-tone="aside"] { --zone: #16a34a; --zone-soft: #f0fdf4; --zone-ink: #14532d; }
.nx-dash-widget[data-id="day_aside"] .nx-dash-widget-body { padding: .85rem; background: #fff; }
.nx-aside-panel { border-color: #e8eee9; border-radius: 16px; box-shadow: 0 1px 2px rgba(16, 36, 24, .03); }
.nx-aside-head h3 { color: #2b3a31; }
.nx-aside-head p { color: #7a8a80; }
.nx-aside-date { border-color: #d1fae5; background: #ecfdf3; color: #15803d; }
.nx-aside-row { border-color: #e8eee9; }
.nx-aside-row:hover { border-color: #bbf7d0; background: #f7fcf8; }
.nx-aside-avatar { background: #15803d; }
.nx-aside-icon { background: #ecfdf3; color: #15803d; }
.nx-aside-icon.is-overdue { background: #fff1f2; color: #e11d48; }
.nx-aside-row strong { color: #2b3a31; }
.nx-aside-row p, .nx-aside-meta { color: #7a8a80; }
.nx-aside-empty { border-color: #dfe9e2; color: #8a9a90; }

@media (min-width: 720px) {
  .nx-dash-widget[data-id="kpis"] .nx-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .nx-dash { gap: 14px; padding: 12px 12px 14px; border-radius: 20px; }
  .nx-dash-hero { padding: 20px; border-radius: 18px; }
  .nx-dash-bar { align-items: flex-start; }
  .nx-dash-widget-body { padding: .85rem; }
}

/* ==========================================================================
   Editorial pass: one continuous white page, not a stack of boxes.
   Green stays the only brand colour. Amber is used only for warning states.
   ========================================================================== */
.nx-dash { gap: 28px; padding: 22px 28px 32px; }
.nx-dash-bar {
  justify-content: flex-end; border: 0; background: transparent; box-shadow: none;
  padding: 0 4px; margin-bottom: -8px;
}
.nx-dash-bar-actions { gap: .45rem; }

/* Welcome becomes typography, not a green alert box. */
.nx-dash-widget.is-hero { background: transparent; border: 0; box-shadow: none; border-radius: 0; padding: 0; }
.nx-dash-widget.is-hero .nx-dash-widget-body { padding: 0; }
.nx-dash-widget.is-hero .nx-dash-hero {
  background: transparent; border: 0; box-shadow: none; border-radius: 0;
  padding: 4px 4px 0; min-height: 0;
}
.nx-dash-widget.is-hero .nx-dash-hero::after { display: none !important; }
.nx-dash-widget.is-hero .nx-dash-hero h2 {
  font-size: clamp(1.7rem, 2.8vw, 2.1rem); line-height: 1.12; letter-spacing: -.04em;
  margin: .25rem 0 .3rem; color: #1f2d24;
}
.nx-dash-widget.is-hero .nx-dash-hero h2 span { color: #15803d; }
.nx-dash-widget.is-hero .nx-eyebrow {
  text-transform: none; letter-spacing: 0; font-size: .74rem; font-weight: 600; color: #7a8a80;
}
.nx-dash-widget.is-hero .nx-dash-hero p { color: #6b7a70; font-size: .86rem; line-height: 1.55; margin-top: 2px; }
.nx-dash-widget.is-hero .nx-dash-focus { background: transparent; border: 0; padding: 0; }
.nx-dash-hero-side { display: flex; align-items: center; gap: .55rem; flex-wrap: wrap; }
.nx-dash-hero-customize {
  display: inline-flex; align-items: center; gap: .38rem; text-decoration: none;
  border: 1px solid #d7e7dc; background: #fff; color: #15803d;
  border-radius: 999px; padding: .42rem .82rem; font-size: .76rem; font-weight: 700;
  transition: border-color .16s, background .16s;
}
.nx-dash-hero-customize:hover { border-color: #16a34a; background: #f5fbf6; }
.nx-dash.is-customizing .nx-dash-hero-customize { display: none; }
.nx-dash:not(.is-customizing) .nx-dash-bar { display: none !important; }

/* Every other widget is an editorial section separated by a quiet rule. */
.nx-dash-widget:not(.is-hero) {
  background: transparent; border: 0; border-radius: 0; box-shadow: none;
}
.nx-dash-widget:not(.is-hero) .nx-dash-widget-head {
  background: transparent; border-bottom: 1px solid #edf3ee; padding: 0 2px 9px;
}
.nx-dash-widget:not(.is-hero) .nx-dash-widget-head .nx-card-title { font-size: .92rem; color: #26332b; }
.nx-dash-widget:not(.is-hero) .nx-dash-widget-body { padding: 12px 2px 0; }

/* Keep clear drag targets while customizing. */
.nx-dash.is-customizing .nx-dash-widget {
  background: #fff; border: 1px dashed #cfe0d4; border-radius: 16px; padding: 10px;
}
.nx-dash.is-customizing .nx-dash-widget .nx-dash-widget-head { padding: 0 2px 8px; }

/* Metrics become one strip with quiet dividers, not four mini cards. */
.nx-dash-widget[data-id="kpis"] .nx-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 !important;
  background: #f8fbf8; border: 1px solid #edf3ee; border-radius: 16px; padding: 5px 0;
}
.nx-dash-widget[data-id="kpis"] .nx-kpi {
  border: 0 !important; border-right: 1px solid #e6efe8 !important; border-radius: 0 !important;
  background: transparent !important; box-shadow: none !important;
  padding: 9px 16px !important; min-height: 0 !important;
}
.nx-dash-widget[data-id="kpis"] .nx-kpi:last-child { border-right: 0 !important; }
.nx-dash-widget[data-id="kpis"] .nx-kpi-icon {
  width: 26px; height: 26px; background: transparent !important;
  color: var(--nx-accent) !important; font-size: 1rem; margin-bottom: 1px;
}
.nx-dash-widget[data-id="kpis"] .nx-kpi-icon.rose { color: #b45309 !important; }
.nx-dash-widget[data-id="kpis"] .nx-chip { display: none !important; }
.nx-dash-widget[data-id="kpis"] .nx-kpi-value { font-size: 1.6rem; line-height: 1.1; color: #1f2d24; }
.nx-dash-widget[data-id="kpis"] .nx-kpi-label {
  font-size: .66rem; letter-spacing: .05em; text-transform: uppercase; color: #7a8a80;
}

/* Blue and violet leftovers become green; overdue becomes amber, never red. */
.nx-dash-widget .nx-feed-icon.blue,
.nx-dash-widget .nx-feed-icon.violet,
.nx-dash-widget .nx-feed-icon.amber,
.nx-dash-widget .nx-feed-icon.rose {
  background: var(--nx-accent-soft); color: var(--nx-accent-strong);
}
.nx-dash-widget .nx-chip-danger { background: #fffbeb; color: #b45309; border-color: #fde68a; }
.nx-aside-icon.is-overdue { background: #fffbeb; color: #b45309; }

@media (max-width: 1100px) {
  .nx-dash { gap: 22px; padding: 18px 20px 24px; }
}
@media (max-width: 720px) {
  .nx-dash { gap: 18px; padding: 14px 14px 20px; border-radius: 20px; }
  .nx-dash-widget.is-hero .nx-dash-hero h2 { font-size: 1.65rem; }
  .nx-dash-widget[data-id="kpis"] .nx-kpi { padding: 9px 10px !important; }
  .nx-dash-widget[data-id="kpis"] .nx-kpi-value { font-size: 1.35rem; }
}

/* Carousels sit on the page; only the cards themselves carry a surface. */
.nx-goals-track { background: transparent; padding: .1rem 2px .4rem; border-radius: 0; }
.nx-goal-card { min-height: 138px; padding: .9rem; }
.nx-dash-widget[data-id="calendar"] .nx-cal-empty {
  border: 0; background: transparent; text-align: left; padding: 2px 0;
}

/* ==========================================================================
   Full-bleed page canvases
   The dashboard and the Work workspace are pages, not cards sitting on a page.
   ========================================================================== */
body:has(.nx-dash) main { padding: 0 !important; }
body.admin-shell:has(.nx-dash) .admin-content { padding: 0 !important; }
.nx-dash.max-w-7xl,
.nx-dash {
  width: 100%;
  max-width: none !important;
  margin: 0 !important;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  min-height: calc(100vh - 4rem);
}

/* Explicit size control. Sizes are fixed server-side values, never free widths. */
.nx-dash-size { display: inline-flex; align-items: center; }
.nx-dash-size select {
  height: 24px; min-width: 62px; cursor: pointer;
  border: 1px solid var(--nx-border); border-radius: 6px;
  background: var(--nx-surface); color: var(--nx-text-2);
  font: inherit; font-size: .66rem; font-weight: 700;
  padding: 0 .2rem;
}
.nx-dash-size select:hover { border-color: var(--nx-accent); color: var(--nx-accent-strong); }
.nx-dash-size select:focus-visible { outline: 2px solid var(--nx-accent-border); outline-offset: 1px; }
