/* =============================================================================
   Nexflow Track — the one stylesheet.
   Nexflow P2 design system v2.0 (tokens + nav, cards, stat grid, badges, buttons,
   tables, forms, alerts, toast, modal, empty/retry, loading, login card, responsive,
   safe-area) merged with the Track components (steps, drawer, My Work cards,
   timeline, ring, wizard, template editor).
   Dark theme everywhere; <html class="nx-light"> (client share page) and print are light.
   Fonts: Barlow + Barlow Condensed via <link> in each <head> (never @import).
   ============================================================================= */

/* ── TOKENS ── */
:root {
  --bg:            #0c0e14;
  --surface:       #141720;
  --surface2:      #1c2030;
  --surface3:      #222840;
  --border:        #252a3a;
  --border2:       #2e3550;
  --orange:        #ff5c1a;
  --orange2:       #e84400;
  --orange-dim:    rgba(255,92,26,0.12);
  --orange-glow:   rgba(255,92,26,0.22);
  --green:         #22d87a;
  --green-dim:     rgba(34,216,122,0.12);
  --red:           #ef4444;
  --red-dim:       rgba(239,68,68,0.12);
  --yellow:        #f59e0b;
  --yellow-dim:    rgba(245,158,11,0.12);
  --grey-dim:      rgba(136,146,168,0.10);
  --text:          #e2e6f0;
  --mid:           #8892a8;
  --light:         #b8c0d0;
  --white:         #ffffff;
  --font:          'Barlow', system-ui, -apple-system, 'Segoe UI', Roboto, 'Noto Sans', 'Noto Sans Devanagari', sans-serif;
  --condensed:     'Barlow Condensed', 'Barlow', system-ui, sans-serif;
  --mono:          'Courier New', ui-monospace, monospace;
  --radius:        6px;
  --radius-sm:     4px;
  --radius-lg:     10px;
  --shadow-sm:     0 2px 8px rgba(0,0,0,0.4);
  --shadow-md:     0 4px 20px rgba(0,0,0,0.5);
  --shadow-orange: 0 4px 24px rgba(255,92,26,0.28);
  --nav-h:         56px;
  --tap:           44px;
  color-scheme: dark;
}

/* Light variant: client share page + print. Same orange accent, white background. */
html.nx-light {
  --bg:        #ffffff;
  --surface:   #ffffff;
  --surface2:  #f4f5f9;
  --surface3:  #eceef4;
  --border:    #e3e6ee;
  --border2:   #cfd4e0;
  --orange-dim:  rgba(255,92,26,0.10);
  --orange-glow: rgba(255,92,26,0.18);
  --green:     #15803d;
  --green-dim: rgba(21,128,61,0.10);
  --red:       #dc2626;
  --red-dim:   rgba(220,38,38,0.10);
  --yellow:    #b45309;
  --yellow-dim: rgba(180,83,9,0.10);
  --grey-dim:  rgba(100,110,130,0.10);
  --text:      #1a1f2e;
  --mid:       #5b6478;
  --light:     #2f3748;
  --white:     #0f1320;
  --shadow-sm: 0 1px 4px rgba(15,19,32,0.08);
  --shadow-md: 0 4px 16px rgba(15,19,32,0.10);
  color-scheme: light;
}

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
body {
  background: var(--bg);
  background-image: radial-gradient(ellipse 80% 40% at 50% -10%, rgba(255,92,26,0.07) 0%, transparent 70%);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.55;
  overflow-x: hidden;
  min-height: 100vh;
  min-height: 100dvh;
}
html.nx-light body { background-image: none; }
h1, h2, h3, h4 { line-height: 1.2; color: var(--white); }
p { margin: 0 0 .8em; }
a { color: var(--orange); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }
:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--mid); }

/* ── NAVBAR ── */
.nx-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px;
  background: rgba(12,14,20,0.97);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  gap: 10px;
}
html.nx-light .nx-nav { background: rgba(255,255,255,0.97); }
.nx-nav-logo {
  font-family: var(--condensed); font-weight: 900; font-size: 17px; color: var(--white);
  letter-spacing: 1px; text-transform: uppercase; text-decoration: none; white-space: nowrap;
  display: flex; align-items: center; gap: 10px; min-width: 0;
}
.nx-nav-logo:hover { text-decoration: none; }
.nx-nav-logo span { color: var(--orange); }
.nx-nav-logo img { width: 26px; height: 26px; border-radius: 6px; flex: 0 0 auto; }
.nx-nav-company { font-family: var(--font); font-weight: 600; font-size: 12px; color: var(--mid); text-transform: none; letter-spacing: 0; overflow: hidden; text-overflow: ellipsis; max-width: 40vw; }
.nx-nav-links { display: flex; align-items: center; gap: 2px; flex: 1; justify-content: center; flex-wrap: nowrap; overflow: hidden; }
.nx-nav-links a {
  color: var(--mid); font-size: 11px; font-weight: 700; padding: 7px 11px; border-radius: var(--radius-sm);
  text-decoration: none; text-transform: uppercase; letter-spacing: 0.6px; transition: all 0.15s; white-space: nowrap;
}
.nx-nav-links a:hover { color: var(--text); background: var(--surface2); }
.nx-nav-links a.nx-active { color: var(--orange); text-shadow: 0 0 12px rgba(255,92,26,0.5); }
.nx-nav-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.nx-lang-pill {
  background: var(--surface2); border: 1px solid var(--border); color: var(--mid);
  font-family: var(--condensed); font-size: 11px; font-weight: 700; padding: 4px 10px; min-height: 32px;
  border-radius: var(--radius-sm); cursor: pointer; text-transform: uppercase; transition: all 0.15s; white-space: nowrap;
}
.nx-lang-pill:hover { border-color: var(--orange); color: var(--orange); }
.nx-user-badge {
  display: flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 5px 12px; font-size: 11px; color: var(--mid); white-space: nowrap; cursor: pointer;
}
.nx-user-badge:hover { border-color: var(--border2); }
.nx-plan-tag {
  font-family: var(--condensed); font-weight: 700; font-size: 10px; padding: 2px 7px; border-radius: 3px;
  text-transform: uppercase; letter-spacing: 0.5px; background: var(--orange-dim); color: var(--orange); border: 1px solid rgba(255,92,26,0.2);
}
.nx-logout-btn {
  background: var(--orange); color: #fff; border: none; font-family: var(--font); font-size: 11px; font-weight: 700;
  padding: 6px 13px; min-height: 36px; border-radius: var(--radius-sm); cursor: pointer; text-transform: uppercase; letter-spacing: 0.5px;
  transition: background 0.15s; white-space: nowrap;
}
.nx-logout-btn:hover { background: var(--orange2); }
.nx-hamburger {
  display: none; background: none; border: 1px solid var(--border2); color: var(--mid); font-size: 18px;
  padding: 6px 10px; min-width: 40px; min-height: 36px; border-radius: var(--radius-sm); cursor: pointer;
}
.nx-mobile-menu {
  display: none; position: fixed; top: var(--nav-h); left: 0; right: 0; background: rgba(12,14,20,0.98);
  backdrop-filter: blur(14px); border-bottom: 1px solid var(--border); padding: 12px 20px 20px; z-index: 199;
  flex-direction: column; gap: 4px; box-shadow: var(--shadow-md);
}
html.nx-light .nx-mobile-menu { background: rgba(255,255,255,0.98); }
.nx-mobile-menu.open { display: flex; }
.nx-mobile-menu a, .nx-mobile-menu button.nx-menu-item {
  color: var(--mid); font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px;
  padding: 12px; min-height: var(--tap); border-radius: var(--radius-sm); text-decoration: none; transition: all 0.15s; text-align: left; display: flex; align-items: center; gap: 8px;
}
.nx-mobile-menu a:hover, .nx-mobile-menu button.nx-menu-item:hover { color: var(--text); background: var(--surface2); }
.nx-mobile-menu a.nx-active { color: var(--orange); background: var(--orange-dim); }
.nx-mobile-divider { height: 1px; background: var(--border); margin: 10px 0; }
.nx-mobile-bottom { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding-top: 4px; }
.nx-mobile-who { font-size: 12px; color: var(--light); padding: 4px 12px 8px; }
.nx-mobile-who strong { color: var(--white); }

/* Icon button in the nav (bell) */
.nx-iconbtn {
  width: 40px; height: 36px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface2);
  color: var(--text); display: grid; place-items: center; position: relative; font-size: 15px; cursor: pointer; transition: all 0.15s;
}
.nx-iconbtn:hover { border-color: var(--orange); color: var(--orange); }
.nx-iconbtn .nx-count {
  position: absolute; top: -6px; right: -6px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: var(--orange); color: #fff; font-size: 10px; font-weight: 800; display: grid; place-items: center; font-family: var(--condensed);
}
.nx-avatar {
  width: 26px; height: 26px; border-radius: 50%; background: var(--orange-dim); color: var(--orange); border: 1px solid rgba(255,92,26,0.3);
  display: grid; place-items: center; font-family: var(--condensed); font-weight: 800; font-size: 11px; flex: 0 0 auto;
}

/* ── MAIN / PAGE ── */
.nx-main { padding-top: var(--nav-h); min-height: 100vh; }
.nx-main.nx-no-nav { padding-top: 0; }
.nx-page { max-width: 1100px; margin: 0 auto; padding: 32px 20px 60px; }
.nx-page-narrow { max-width: 600px; }
.nx-page-header {
  display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 28px; padding-bottom: 20px;
  border-bottom: 1px solid var(--border); gap: 16px; flex-wrap: wrap;
}
.nx-page-title {
  font-family: var(--condensed); font-weight: 900; font-size: 26px; color: var(--white); text-transform: uppercase; letter-spacing: 0.5px; line-height: 1.1;
}
.nx-page-title span { color: var(--orange); }
.nx-page-sub { font-size: 12px; color: var(--mid); margin-top: 4px; }
.nx-page-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ── EYEBROW / SECTION HEAD / DIVIDER ── */
.nx-eyebrow {
  display: inline-flex; align-items: center; gap: 7px; font-family: var(--condensed); font-size: 10px; font-weight: 700;
  letter-spacing: 2px; text-transform: uppercase; color: var(--orange); background: var(--orange-dim); border: 1px solid rgba(255,92,26,0.2);
  padding: 3px 10px; border-radius: 3px; margin-bottom: 10px;
}
.nx-eyebrow::before { content: '●'; font-size: 6px; animation: nx-blink 1.5s infinite; }
@keyframes nx-blink { 0%,100%{opacity:1}50%{opacity:0.2} }
.nx-section-head {
  display: flex; align-items: center; gap: 10px; font-family: var(--condensed); font-weight: 800; font-size: 15px; color: var(--white);
  text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 16px;
}
.nx-section-head::before { content: ''; display: inline-block; width: 3px; height: 16px; background: var(--orange); border-radius: 2px; flex-shrink: 0; }
.nx-section-head .nx-count { margin-left: auto; }
.nx-section { margin-top: 28px; }
.nx-divider { display: flex; align-items: center; gap: 14px; margin: 24px 0; font-size: 10px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: var(--mid); }
.nx-divider::before, .nx-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.nx-fade-in { animation: nx-fade-up 0.35s ease both; }
@keyframes nx-fade-up { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

/* ── CARDS ── */
.nx-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 22px; transition: border-color 0.2s;
  box-shadow: 0 2px 12px rgba(0,0,0,0.25), inset 0 1px 0 rgba(255,255,255,0.02);
}
.nx-card:hover { border-color: var(--border2); box-shadow: 0 4px 20px rgba(0,0,0,0.35), inset 0 1px 0 rgba(255,255,255,0.03); }
html.nx-light .nx-card, html.nx-light .nx-card:hover { box-shadow: var(--shadow-sm); }
.nx-card + .nx-card { margin-top: 18px; }
.nx-card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; padding-bottom: 14px; border-bottom: 1px solid var(--border); gap: 12px; flex-wrap: wrap; }
.nx-card-title { font-family: var(--condensed); font-weight: 800; font-size: 14px; color: var(--white); text-transform: uppercase; letter-spacing: 0.5px; }
.nx-card h2, .nx-card h3 { font-family: var(--condensed); font-weight: 800; text-transform: uppercase; letter-spacing: 0.5px; font-size: 14px; margin-bottom: 12px; }
.nx-card h1 { font-family: var(--condensed); font-weight: 900; font-size: 22px; text-transform: uppercase; letter-spacing: 0.4px; }
.nx-card-flat { box-shadow: none; background: var(--surface2); }
.nx-card.nx-clickable { cursor: pointer; display: block; color: inherit; text-decoration: none; }
.nx-card.nx-clickable:hover { border-color: var(--orange); text-decoration: none; }
.nx-tone-red    { border-left: 3px solid var(--red) !important; }
.nx-tone-yellow { border-left: 3px solid var(--yellow) !important; }
.nx-tone-green  { border-left: 3px solid var(--green) !important; }
.nx-tone-grey   { border-left: 3px solid var(--mid) !important; }
.nx-tone-orange { border-left: 3px solid var(--orange) !important; }

/* ── STAT GRID ── */
.nx-stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; margin-bottom: 26px; }
.nx-stat {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px; position: relative; overflow: hidden;
  transition: all 0.2s; box-shadow: 0 2px 12px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.03); text-align: left; color: inherit; width: 100%;
}
.nx-stat::after { content: ''; position: absolute; top: 0; left: 0; width: 3px; height: 100%; background: var(--orange); border-radius: 3px 0 0 3px; }
.nx-stat.green::after  { background: var(--green); }
.nx-stat.red::after    { background: var(--red); }
.nx-stat.yellow::after { background: var(--yellow); }
.nx-stat.grey::after   { background: var(--mid); }
.nx-stat.nx-stat-red   { background: rgba(239,68,68,0.05);  border-color: rgba(239,68,68,0.2); }
.nx-stat.nx-stat-green { background: rgba(34,216,122,0.05); border-color: rgba(34,216,122,0.18); }
.nx-stat:hover { border-color: var(--border2); transform: translateY(-2px); box-shadow: 0 6px 24px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.04); }
.nx-stat.nx-selected { border-color: var(--orange); box-shadow: 0 0 0 1px var(--orange) inset; }
.nx-stat-label { font-size: 10px; font-weight: 700; color: var(--mid); text-transform: uppercase; letter-spacing: 1.2px; margin-bottom: 10px; }
.nx-stat-value { font-family: var(--condensed); font-weight: 900; font-size: 32px; color: var(--white); line-height: 1; text-shadow: 0 2px 8px rgba(0,0,0,0.4); }
.nx-stat-value.orange { color: var(--orange); }
.nx-stat-value.green  { color: var(--green); }
.nx-stat-value.red    { color: var(--red); }
.nx-stat-value.yellow { color: var(--yellow); }
.nx-stat-unit { font-size: 11px; color: var(--mid); margin-top: 5px; }
.nx-stat-grid.nx-fade-in .nx-stat { animation: nx-fade-up 0.35s ease both; }
.nx-stat-grid.nx-fade-in .nx-stat:nth-child(2) { animation-delay: 0.05s; }
.nx-stat-grid.nx-fade-in .nx-stat:nth-child(3) { animation-delay: 0.1s; }
.nx-stat-grid.nx-fade-in .nx-stat:nth-child(4) { animation-delay: 0.15s; }

/* ── LAYOUT GRIDS / FLEX UTILITIES ── */
.nx-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.nx-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 18px; }
.nx-flex         { display: flex; }
.nx-flex-center  { display: flex; align-items: center; }
.nx-flex-between { display: flex; align-items: center; justify-content: space-between; }
.nx-row  { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.nx-row.nx-nowrap { flex-wrap: nowrap; }
.nx-col  { display: flex; flex-direction: column; gap: 8px; }
.nx-grow { flex: 1 1 auto; min-width: 0; }
.nx-gap-sm { gap: 8px; } .nx-gap { gap: 14px; } .nx-gap-lg { gap: 24px; }
.nx-mt-8 { margin-top: 8px; } .nx-mt-16 { margin-top: 16px; } .nx-mt-24 { margin-top: 24px; }
.nx-mb-16 { margin-bottom: 16px; } .nx-mb-24 { margin-bottom: 24px; }
.nx-w-full { width: 100%; }
.nx-text-orange { color: var(--orange); } .nx-text-green { color: var(--green); } .nx-text-red { color: var(--red); }
.nx-text-yellow { color: var(--yellow); } .nx-text-mid { color: var(--mid); } .nx-text-white { color: var(--white); }
.nx-text-sm { font-size: 12px; } .nx-text-xs { font-size: 11px; } .nx-bold { font-weight: 700; }
.nx-right { margin-left: auto; } .nx-center { text-align: center; } .nx-nowrap { white-space: nowrap; }
.nx-wrap { overflow-wrap: anywhere; } .nx-mono { font-family: var(--mono); font-size: 12px; } .nx-hidden { display: none !important; }
.nx-dim { opacity: .6; } .nx-strike { text-decoration: line-through; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ── ALERTS ── */
.nx-alert { display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; border-radius: var(--radius); font-size: 13px; margin-bottom: 16px; border-left: 3px solid; flex-wrap: wrap; }
.nx-alert-red    { background: var(--red-dim);    border-color: var(--red); }
.nx-alert-orange { background: var(--orange-dim); border-color: var(--orange); }
.nx-alert-green  { background: var(--green-dim);  border-color: var(--green); }
.nx-alert-yellow { background: var(--yellow-dim); border-color: var(--yellow); }
.nx-alert-icon   { font-size: 15px; flex-shrink: 0; margin-top: 1px; }
.nx-alert > span:first-child:not(.nx-alert-icon) { flex: 1 1 200px; }
.nx-alert .nx-btn { margin-left: auto; }

/* ── BADGES (status, health) ── */
.nx-badge {
  display: inline-flex; align-items: center; gap: 5px; font-family: var(--condensed); font-size: 10px; font-weight: 700; letter-spacing: 0.8px;
  text-transform: uppercase; padding: 3px 8px; border-radius: 3px; white-space: nowrap; background: var(--grey-dim); color: var(--mid); border: 1px solid rgba(136,146,168,0.2);
}
.nx-badge::before { content: '●'; font-size: 6px; }
.nx-badge-green  { background: var(--green-dim);  color: var(--green);  border-color: rgba(34,216,122,0.2); }
.nx-badge-orange { background: var(--orange-dim); color: var(--orange); border-color: rgba(255,92,26,0.2); }
.nx-badge-red    { background: var(--red-dim);    color: var(--red);    border-color: rgba(239,68,68,0.2); }
.nx-badge-yellow { background: var(--yellow-dim); color: var(--yellow); border-color: rgba(245,158,11,0.2); }
.nx-badge-grey   { background: var(--grey-dim);   color: var(--mid);    border-color: rgba(136,146,168,0.2); }
.nx-badge.nx-strike { text-decoration: line-through; }
.nx-badge.nx-nodot::before { display: none; }

/* Selectable chip (filters, choices) — Track addition in the badge family */
.nx-chip {
  display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 12px; border-radius: var(--radius); cursor: pointer;
  font-family: var(--condensed); font-size: 12px; font-weight: 700; letter-spacing: 0.6px; text-transform: uppercase;
  background: var(--surface2); color: var(--mid); border: 1px solid var(--border2); transition: all 0.15s; white-space: nowrap; text-decoration: none;
}
.nx-chip:hover { border-color: var(--orange); color: var(--orange); text-decoration: none; }
.nx-chip.nx-selected { background: var(--orange); color: #fff; border-color: var(--orange); }
.nx-chip.nx-chip-block { height: auto; min-height: var(--tap); padding: 10px 14px; justify-content: flex-start; text-transform: none; font-family: var(--font); font-size: 13px; letter-spacing: 0; white-space: normal; text-align: left; }
.nx-pill { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 3px; font-family: var(--condensed); font-size: 10px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; background: var(--orange-dim); color: var(--orange); border: 1px solid rgba(255,92,26,0.2); }
.nx-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex: 0 0 auto; background: var(--mid); }
.nx-dot.green { background: var(--green); } .nx-dot.yellow { background: var(--yellow); } .nx-dot.red { background: var(--red); } .nx-dot.grey { background: var(--mid); }
.nx-offline-pill { background: var(--yellow-dim); color: var(--yellow); border: 1px solid rgba(245,158,11,0.3); padding: 3px 9px; border-radius: 3px; font-family: var(--condensed); font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .6px; }

/* ── BUTTONS ── */
.nx-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; font-family: var(--font); font-size: 12px; font-weight: 700;
  padding: 9px 18px; min-height: var(--tap); border-radius: var(--radius); border: 1px solid var(--border2); cursor: pointer; text-decoration: none;
  text-transform: uppercase; letter-spacing: 0.5px; transition: all 0.15s; white-space: nowrap; background: var(--surface2); color: var(--text);
}
.nx-btn:hover { border-color: var(--mid); text-decoration: none; }
.nx-btn:disabled, .nx-btn[aria-busy="true"] { opacity: .55; cursor: not-allowed; transform: none !important; box-shadow: none !important; }
.nx-btn-primary   { background: var(--orange); color: #fff; border-color: var(--orange); }
.nx-btn-primary:hover { background: var(--orange2); border-color: var(--orange2); box-shadow: var(--shadow-orange); transform: translateY(-1px); }
.nx-btn-secondary { background: var(--surface2); color: var(--text); border-color: var(--border2); }
.nx-btn-secondary:hover { border-color: var(--mid); }
.nx-btn-ghost     { background: transparent; color: var(--mid); border-color: var(--border); }
.nx-btn-ghost:hover { border-color: var(--orange); color: var(--orange); }
.nx-btn-green     { background: var(--green); color: #0a1a10; border-color: var(--green); }
.nx-btn-green:hover { background: #1cb86a; border-color: #1cb86a; transform: translateY(-1px); }
.nx-btn-danger    { background: var(--red-dim); color: var(--red); border-color: rgba(239,68,68,0.25); }
.nx-btn-danger:hover { background: var(--red); color: #fff; }
.nx-btn-sm  { font-size: 10px; padding: 5px 10px; min-height: 36px; }
.nx-btn-lg  { font-size: 14px; padding: 12px 26px; min-height: 52px; }
.nx-btn-full { width: 100%; }
.nx-btn-icon { padding: 0; width: var(--tap); }
.nx-btn-icon.nx-btn-sm { width: 36px; }
.nx-btn .nx-spin { width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: nx-spin .7s linear infinite; }
.nx-btn-row { display: flex; gap: 8px; flex-wrap: wrap; }
.nx-btn-row.nx-end { justify-content: flex-end; }
.nx-btn-row.nx-stack > .nx-btn { flex: 1 1 140px; }

/* ── TABLES ── */
.nx-table-wrap { overflow-x: auto; border-radius: var(--radius-lg); border: 1px solid var(--border); }
.nx-table { width: 100%; border-collapse: collapse; background: var(--surface); font-size: 13px; }
.nx-table thead { background: var(--surface2); border-bottom: 1px solid var(--border2); }
.nx-table th { font-family: var(--condensed); font-weight: 700; font-size: 10px; letter-spacing: 1.2px; text-transform: uppercase; color: var(--mid); padding: 12px 16px; text-align: left; white-space: nowrap; }
.nx-table td { padding: 13px 16px; border-bottom: 1px solid var(--border); color: var(--light); vertical-align: middle; }
.nx-table tr:last-child td { border-bottom: none; }
.nx-table tbody tr { transition: background 0.12s; }
.nx-table tbody tr:hover { background: rgba(255,92,26,0.04); }
.nx-td-bold { color: var(--white); font-weight: 700; }
.nx-td-mono { font-family: var(--mono); font-size: 11px; color: var(--mid); }

/* ── FORMS ── */
.nx-label, .nx-form label, .nx-form-group > label { font-size: 11px; font-weight: 700; color: var(--mid); text-transform: uppercase; letter-spacing: 0.8px; display: block; margin-bottom: 6px; }
.nx-form input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), .nx-form select, .nx-form textarea,
.nx-input, .nx-select, .nx-textarea,
.nx-page input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), .nx-page select, .nx-page textarea,
.nx-modal input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), .nx-modal select, .nx-modal textarea {
  width: 100%; background: var(--surface2); border: 1px solid var(--border2); border-radius: var(--radius); color: var(--text);
  font-family: var(--font); font-size: 16px; padding: 10px 14px; min-height: var(--tap); outline: none;
  transition: border-color 0.15s, box-shadow 0.15s; -webkit-appearance: none; appearance: none;
}
.nx-form input:focus, .nx-form select:focus, .nx-form textarea:focus, .nx-input:focus, .nx-select:focus, .nx-textarea:focus,
.nx-page input:focus, .nx-page select:focus, .nx-page textarea:focus, .nx-modal input:focus, .nx-modal select:focus, .nx-modal textarea:focus {
  border-color: var(--orange); box-shadow: 0 0 0 3px var(--orange-dim);
}
.nx-form input::placeholder, .nx-form textarea::placeholder, .nx-input::placeholder, .nx-page input::placeholder, .nx-modal input::placeholder { color: var(--mid); opacity: 0.7; }
.nx-form select, .nx-select, .nx-page select, .nx-modal select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath fill='%238892a8' d='M0 0l5 6 5-6z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 8px; padding-right: 32px; cursor: pointer;
}
.nx-page input[readonly], .nx-modal input[readonly] { color: var(--mid); }
.nx-page input[type="checkbox"], .nx-page input[type="radio"], .nx-modal input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--orange); flex: 0 0 auto; }
.nx-page input[type="file"], .nx-modal input[type="file"] { color: var(--mid); font-size: 13px; }
textarea { min-height: 88px; resize: vertical; }
.nx-form { display: grid; gap: 16px; }
.nx-form-group { display: grid; gap: 6px; }
.nx-form-group > label { margin-bottom: 0; }
.nx-form-row   { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.nx-form-row-3 { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 14px; }
.nx-form-row-eq3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.nx-hint { color: var(--mid); font-size: 11px; }
.nx-error-text { color: var(--red); font-size: 12px; font-weight: 600; }
.nx-check { display: flex; align-items: center; gap: 10px; min-height: var(--tap); font-size: 13px; color: var(--text); text-transform: none; letter-spacing: 0; cursor: pointer; }
.nx-check span { font-weight: 500; }
.nx-otp-input { letter-spacing: .4em; font-size: 22px !important; text-align: center; font-family: var(--mono) !important; }
.nx-switch { position: relative; width: 46px; height: 26px; border-radius: 13px; background: var(--surface3); border: 1px solid var(--border2); flex: 0 0 auto; transition: background .2s; cursor: pointer; }
.nx-switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%; background: var(--light); transition: left .2s, background .2s; }
.nx-switch[aria-checked="true"] { background: var(--orange); border-color: var(--orange); }
.nx-switch[aria-checked="true"]::after { left: 22px; background: #fff; }

/* ── KEY/VALUE, LISTS, META ── */
.nx-kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: 13px; }
.nx-kv dt { color: var(--mid); font-size: 11px; text-transform: uppercase; letter-spacing: .6px; font-weight: 700; padding-top: 2px; }
.nx-kv dd { margin: 0; color: var(--text); font-weight: 600; }
.nx-kv dd.nx-text-red { color: var(--red); }
.nx-list { list-style: none; margin: 0; padding: 0; }
.nx-list li { display: flex; align-items: center; gap: 10px; padding: 12px 0; border-top: 1px solid var(--border); }
.nx-list li:first-child { border-top: 0; }
.nx-meta { color: var(--mid); font-size: 12px; }
.nx-progress { height: 6px; border-radius: 3px; background: var(--surface3); overflow: hidden; }
.nx-progress > span { display: block; height: 100%; background: var(--orange); border-radius: 3px; transition: width .3s ease; }
.nx-progress.green > span { background: var(--green); } .nx-progress.yellow > span { background: var(--yellow); } .nx-progress.red > span { background: var(--red); } .nx-progress.grey > span { background: var(--mid); }

/* ── TOAST ── */
.nx-toast-wrap { position: fixed; bottom: 20px; right: 20px; z-index: 999; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.nx-toast {
  display: flex; align-items: center; gap: 10px; background: var(--surface2); border: 1px solid var(--border2); border-left: 3px solid var(--green);
  border-radius: var(--radius); padding: 12px 18px; font-size: 13px; font-weight: 500; color: var(--text); white-space: pre-line; box-shadow: var(--shadow-md);
  animation: nx-toast-in 0.25s ease; min-width: 240px; max-width: 360px; pointer-events: auto;
}
.nx-toast.error { border-left-color: var(--red); }
.nx-toast.warn  { border-left-color: var(--yellow); }
.nx-toast.info  { border-left-color: var(--orange); }
@keyframes nx-toast-in { from { opacity: 0; transform: translateX(12px); } to { opacity: 1; transform: translateX(0); } }

/* ── MODAL ── */
.nx-modal-overlay { position: fixed; inset: 0; z-index: 300; background: rgba(5,7,12,0.72); display: flex; align-items: center; justify-content: center; padding: 12px; animation: nx-modal-bg-in 0.18s ease both; }
.nx-modal {
  background: var(--surface); border: 1px solid var(--border2); border-radius: var(--radius-lg); padding: 24px; width: 100%; max-width: 520px;
  max-height: 90vh; overflow-y: auto; box-shadow: var(--shadow-md); display: flex; flex-direction: column; gap: 14px;
}
.nx-modal-lg { max-width: 860px; }
.nx-modal-overlay > .nx-modal { animation: nx-modal-in 0.22s cubic-bezier(0.16, 1, 0.3, 1) both; }
@keyframes nx-modal-bg-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes nx-modal-in { from { opacity: 0; transform: scale(0.96) translateY(8px); } to { opacity: 1; transform: scale(1) translateY(0); } }
.nx-modal-head { display: flex; align-items: center; gap: 8px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.nx-modal-head h2 { margin: 0; flex: 1; font-family: var(--condensed); font-weight: 800; font-size: 16px; text-transform: uppercase; letter-spacing: .5px; }
.nx-modal-body { display: grid; gap: 12px; }
.nx-modal-actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; padding-top: 4px; }
.nx-modal-actions .nx-btn { flex: 1 1 120px; }
.nx-modal-close { width: 36px; height: 36px; border-radius: var(--radius-sm); color: var(--mid); display: grid; place-items: center; }
.nx-modal-close:hover { background: var(--surface2); color: var(--text); }

/* ── EMPTY / RETRY / LOADING ── */
.nx-empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 48px 24px; color: var(--mid); }
.nx-empty-icon { font-size: 32px; margin-bottom: 12px; opacity: 0.6; line-height: 1; }
.nx-empty-text { font-size: 13px; line-height: 1.6; max-width: 340px; margin-bottom: 16px; }
.nx-empty-text:last-child { margin-bottom: 0; }
.nx-empty-title { font-family: var(--condensed); font-weight: 800; font-size: 15px; text-transform: uppercase; letter-spacing: .5px; color: var(--text); margin-bottom: 6px; }
.nx-retry-state { border: 1px solid rgba(239,68,68,0.25); border-radius: var(--radius-lg); background: var(--surface); }
.nx-retry-state .nx-empty-icon { opacity: 1; }
.nx-retry-state .nx-empty-text { color: var(--red); }
.nx-loading { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 40px; color: var(--mid); font-size: 13px; }
.nx-spinner { width: 18px; height: 18px; border: 2px solid var(--border2); border-top-color: var(--orange); border-radius: 50%; animation: nx-spin 0.7s linear infinite; flex-shrink: 0; }
@keyframes nx-spin { to { transform: rotate(360deg); } }

/* ── LOGIN ── */
.nx-login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; padding-top: 0; }
.nx-login-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 40px 36px; width: 100%; max-width: 420px; box-shadow: var(--shadow-md); }
.nx-login-logo { font-family: var(--condensed); font-weight: 900; font-size: 22px; color: var(--white); letter-spacing: 1px; text-transform: uppercase; margin-bottom: 6px; display: block; }
.nx-login-logo span { color: var(--orange); }
.nx-login-sub { font-size: 13px; color: var(--mid); margin-bottom: 32px; }
.nx-landing-hero { padding: 28px 0 10px; }
.nx-landing-hero h1 { font-family: var(--condensed); font-weight: 900; font-size: 34px; text-transform: uppercase; letter-spacing: .5px; line-height: 1.05; margin-bottom: 10px; }
.nx-landing-hero h1 span { color: var(--orange); }
.nx-landing-points { display: grid; gap: 10px; margin: 18px 0; }
.nx-landing-points .nx-card { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; }
.nx-landing-points .nx-ico { font-size: 20px; line-height: 1; margin-top: 2px; }

/* ── USER MENU (desktop dropdown) ── */
.nx-menu { position: absolute; right: 16px; top: calc(var(--nav-h) + 6px); background: var(--surface); border: 1px solid var(--border2); border-radius: var(--radius-lg); box-shadow: var(--shadow-md); min-width: 240px; padding: 8px; z-index: 250; display: grid; gap: 2px; }
.nx-menu .nx-menu-who { padding: 8px 10px 10px; border-bottom: 1px solid var(--border); margin-bottom: 4px; }
.nx-menu a, .nx-menu button { text-align: left; background: none; border: 0; padding: 10px; border-radius: var(--radius-sm); color: var(--text); font-weight: 600; font-size: 13px; min-height: var(--tap); display: flex; align-items: center; gap: 8px; }
.nx-menu a:hover, .nx-menu button:hover { background: var(--surface2); text-decoration: none; }

/* ── NOTIFICATIONS LIST ── */
.nx-notif-list { max-height: 60vh; overflow: auto; }
.nx-notif { display: grid; gap: 2px; padding: 10px 0; border-top: 1px solid var(--border); color: inherit; }
.nx-notif:first-child { border-top: 0; }
.nx-notif:hover { text-decoration: none; }
.nx-notif.nx-unread .nx-notif-title { color: var(--white); }
.nx-notif-title { font-weight: 700; }
.nx-notif-body { color: var(--light); font-size: 12px; }
.nx-notif-when { color: var(--mid); font-size: 11px; }

/* ── STEPS (project page) ── */
.nx-phase { margin-top: 22px; }
.nx-phase-head { display: flex; align-items: center; gap: 10px; padding: 6px 0 10px; color: var(--mid); font-family: var(--condensed); font-weight: 700; text-transform: uppercase; font-size: 11px; letter-spacing: 1.5px; }
.nx-phase-head .nx-line { flex: 1; height: 1px; background: var(--border); }
.nx-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.nx-step {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 12px 14px;
  display: grid; grid-template-columns: 32px 1fr auto; gap: 6px 10px; align-items: center; cursor: pointer; transition: border-color .15s;
}
.nx-step:hover { border-color: var(--border2); }
.nx-step.nx-open { border-color: var(--orange); box-shadow: 0 0 0 1px var(--orange) inset; }
.nx-step-seq { width: 32px; height: 32px; border-radius: 50%; background: var(--surface2); border: 1px solid var(--border2); display: grid; place-items: center; font-family: var(--condensed); font-weight: 800; font-size: 13px; color: var(--mid); }
.nx-step.done .nx-step-seq { background: var(--green); border-color: var(--green); color: #0a1a10; }
.nx-step.in_progress .nx-step-seq { background: var(--orange); border-color: var(--orange); color: #fff; }
.nx-step.blocked .nx-step-seq { background: var(--red); border-color: var(--red); color: #fff; }
.nx-step.ready .nx-step-seq { border-color: var(--green); color: var(--green); }
.nx-step.skipped .nx-step-seq { text-decoration: line-through; }
.nx-step-title { font-weight: 700; color: var(--white); min-width: 0; overflow-wrap: anywhere; font-size: 14px; }
.nx-step-sub { grid-column: 2 / 4; color: var(--mid); font-size: 12px; display: flex; gap: 6px 12px; flex-wrap: wrap; }
.nx-step-status { justify-self: end; }
.nx-parallel-tag { font-family: var(--condensed); font-size: 10px; color: var(--orange); font-weight: 700; letter-spacing: .5px; text-transform: uppercase; margin-left: 6px; }
.nx-drawer { grid-column: 1 / 4; border-top: 1px dashed var(--border2); margin-top: 8px; padding-top: 12px; display: grid; gap: 12px; cursor: default; }
.nx-drawer-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.nx-drawer-actions .nx-btn { flex: 1 1 130px; }
.nx-reports { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.nx-report { display: inline-flex; align-items: center; gap: 6px; padding: 7px 10px; min-height: 36px; border-radius: var(--radius); border: 1px solid var(--border2); background: var(--surface2); font-size: 12px; color: var(--text); max-width: 100%; cursor: pointer; }
.nx-report:hover { border-color: var(--orange); text-decoration: none; }
.nx-report-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 180px; }
.nx-events { list-style: none; margin: 0; padding: 0; }
.nx-events li { display: grid; grid-template-columns: 10px 1fr; gap: 10px; padding: 8px 0; border-top: 1px solid var(--border); font-size: 13px; color: var(--light); }
.nx-events li:first-child { border-top: 0; }
.nx-events li strong { color: var(--white); }
.nx-event-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--orange); margin-top: 7px; }
.nx-event-when { color: var(--mid); font-size: 11px; }
.nx-timeline { display: none; }
@media (min-width: 900px) {
  .nx-timeline { display: block; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 14px 16px; margin: 16px 0; }
  .nx-tl-axis { position: relative; height: 22px; margin: 8px 0 4px; }
  .nx-tl-tick { position: absolute; top: 0; font-size: 10px; color: var(--mid); transform: translateX(-50%); white-space: nowrap; font-family: var(--condensed); letter-spacing: .5px; }
  .nx-tl-lane { position: relative; height: 12px; border-radius: 6px; background: var(--surface2); margin: 6px 0; }
  .nx-tl-seg { position: absolute; top: 0; bottom: 0; border-radius: 6px; min-width: 2px; }
  .nx-tl-seg.base { background: var(--border2); }
  .nx-tl-seg.plan { background: var(--orange); opacity: .85; }
  .nx-tl-seg.done { background: var(--green); }
  .nx-tl-marker { position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--red); }
  .nx-tl-marker.today { background: var(--yellow); }
  .nx-tl-legend { display: flex; gap: 14px; font-size: 11px; color: var(--mid); flex-wrap: wrap; }
  .nx-tl-legend i { display: inline-block; width: 12px; height: 8px; border-radius: 4px; margin-right: 4px; vertical-align: middle; }
}

/* ── MY WORK ── */
.nx-work-group { margin-top: 10px; }
.nx-work-card { display: grid; gap: 10px; }
.nx-work-card.nx-dim { opacity: .65; }
.nx-work-proj { color: var(--mid); font-size: 12px; font-weight: 600; }
.nx-work-step { font-family: var(--condensed); font-size: 20px; font-weight: 800; color: var(--white); text-transform: uppercase; letter-spacing: .3px; line-height: 1.15; }
.nx-work-step:hover { color: var(--orange); text-decoration: none; }
.nx-work-due { font-size: 13px; color: var(--light); }
.nx-work-due.nx-late { color: var(--red); font-weight: 700; }
.nx-work-actions { display: grid; grid-template-columns: 1fr; gap: 8px; }
.nx-work-actions.nx-two { grid-template-columns: 1fr 1fr; }

/* ── RING (share page) ── */
.nx-ring { width: 160px; height: 160px; margin: 0 auto; position: relative; }
.nx-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.nx-ring circle { fill: none; stroke-width: 12; stroke-linecap: round; }
.nx-ring .track { stroke: var(--surface3); }
.nx-ring .bar { stroke: var(--orange); transition: stroke-dashoffset .6s ease; }
.nx-ring-label { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--condensed); font-size: 34px; font-weight: 900; color: var(--white); }
.nx-ring-label small { font-size: 11px; font-weight: 700; color: var(--mid); display: block; text-align: center; text-transform: uppercase; letter-spacing: 1px; font-family: var(--font); }

/* ── WIZARD / TEMPLATE EDITOR / SECTION NAV ── */
.nx-wizard-steps { display: flex; gap: 6px; margin-bottom: 16px; }
.nx-wizard-steps span { flex: 1; height: 5px; border-radius: 3px; background: var(--surface3); }
.nx-wizard-steps span.done { background: var(--green); }
.nx-wizard-steps span.current { background: var(--orange); }
.nx-section-nav { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 10px; scrollbar-width: none; }
.nx-section-nav::-webkit-scrollbar { display: none; }
.nx-tpl-step { display: grid; grid-template-columns: 28px 1fr; gap: 6px 8px; padding: 10px 0; border-top: 1px solid var(--border); align-items: start; }
.nx-tpl-step:first-child { border-top: 0; }
.nx-tpl-fields { display: grid; gap: 6px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .nx-tpl-fields { grid-template-columns: 2fr 1.4fr 80px auto; align-items: center; } }
.nx-tpl-step.nx-dragging { opacity: .4; }
.nx-drag-handle { cursor: grab; color: var(--mid); padding: 0 6px; user-select: none; touch-action: none; }

/* ── MISC ── */
.nx-count { background: var(--surface3); color: var(--light); padding: 0 8px; border-radius: 10px; font-size: 11px; font-weight: 700; font-family: var(--condensed); letter-spacing: .5px; }
.nx-clickable { cursor: pointer; }
.nx-print-only { display: none; }

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .nx-nav-links { display: none; }
  .nx-hamburger { display: block; }
  .nx-nav-logo  { font-size: 14px; }
  .nx-user-badge span:first-child { display: none; }
  .nx-plan-tag  { display: none; }
  .nx-logout-btn { font-size: 10px; padding: 5px 10px; }
  .nx-grid-2, .nx-grid-3 { grid-template-columns: 1fr; }
  .nx-stat-grid { grid-template-columns: repeat(2, 1fr); }
  .nx-page { padding: 20px 14px 72px; }
  .nx-page-header { flex-direction: column; align-items: flex-start; }
  .nx-page-title  { font-size: 22px; }
  .nx-card { padding: 16px; }
  .nx-card-header { margin-bottom: 14px; padding-bottom: 10px; }
  .nx-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .nx-table { min-width: 480px; }
  .nx-table th, .nx-table td { padding: 10px 12px; }
  .nx-form-row, .nx-form-row-3 { grid-template-columns: 1fr; }
  .nx-form-row-eq3 { grid-template-columns: 1fr; }
  .nx-modal-overlay { align-items: flex-end; }
  .nx-modal { max-width: 100%; border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
}
@media (max-width: 480px) {
  :root { --nav-h: 52px; }
  .nx-nav { padding: 0 12px; }
  .nx-nav-logo { font-size: 13px; letter-spacing: 0.5px; }
  .nx-nav-company { max-width: 32vw; }
  .nx-hamburger { font-size: 16px; padding: 5px 8px; }
  .nx-page { padding: 16px 12px 80px; }
  .nx-page-title { font-size: 20px; }
  .nx-page-sub   { font-size: 11px; }
  .nx-stat-grid { grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 18px; }
  .nx-stat { padding: 14px; }
  .nx-stat-value { font-size: 26px; }
  .nx-stat-label { font-size: 9px; }
  .nx-card { padding: 14px 12px; border-radius: var(--radius); }
  .nx-table { min-width: 420px; font-size: 12px; }
  .nx-table th { font-size: 11px; padding: 8px 10px; }
  .nx-table td { padding: 9px 10px; }
  .nx-btn { font-size: 11px; padding: 12px 14px; }
  .nx-btn-sm { font-size: 10px; padding: 8px 10px; }
  .nx-btn-lg { font-size: 13px; padding: 14px 18px; }
  .nx-alert { font-size: 12px; padding: 12px 12px; }
  .nx-badge { font-size: 9px; padding: 2px 6px; }
  .nx-section-head { font-size: 13px; }
  .nx-toast-wrap { left: 12px; right: 12px; bottom: 16px; }
  .nx-toast { min-width: unset; width: 100%; max-width: none; }
  .nx-login-card { padding: 28px 20px; }
  .nx-landing-hero h1 { font-size: 28px; }
  .nx-modal { padding: 16px; }
}
@media (max-width: 380px) {
  .nx-stat-grid  { grid-template-columns: 1fr 1fr; gap: 8px; }
  .nx-stat-value { font-size: 22px; }
  .nx-page       { padding: 14px 10px 80px; }
  .nx-table      { min-width: 380px; }
  .nx-work-step  { font-size: 18px; }
}
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .nx-main { padding-bottom: env(safe-area-inset-bottom); }
  .nx-page { padding-bottom: calc(72px + env(safe-area-inset-bottom)); }
  .nx-toast-wrap { bottom: calc(16px + env(safe-area-inset-bottom)); }
}

/* ── PRINT (light, clean) ── */
@media print {
  :root { --bg: #fff; --surface: #fff; --surface2: #f4f5f9; --surface3: #eceef4; --border: #ddd; --border2: #ccc; --text: #111; --mid: #555; --light: #333; --white: #000; }
  .nx-nav, .nx-mobile-menu, .nx-hamburger, .nx-toast-wrap, .nx-modal-overlay, .nx-no-print { display: none !important; }
  body { background: #fff !important; background-image: none !important; color: #000; }
  .nx-main { padding-top: 0; }
  .nx-card, .nx-stat, .nx-step { border: 1px solid #ddd; box-shadow: none; break-inside: avoid; }
}

/* ── Track conveniences on top of the system ── */
.nx-page-header > h1, .nx-page-header > div > h1 { font-family: var(--condensed); font-weight: 900; font-size: 26px; color: var(--white); text-transform: uppercase; letter-spacing: 0.5px; line-height: 1.1; margin: 0; }
.nx-page-header > .nx-right, .nx-page-header > .nx-page-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-left: auto; }
.nx-section > h2, .nx-work-group > h2 { display: flex; align-items: center; gap: 10px; font-family: var(--condensed); font-weight: 800; font-size: 15px; color: var(--white); text-transform: uppercase; letter-spacing: 0.5px; margin: 0 0 14px; }
.nx-section > h2::before, .nx-work-group > h2::before { content: ''; display: inline-block; width: 3px; height: 16px; background: var(--orange); border-radius: 2px; flex-shrink: 0; }
.nx-page .nx-login-card { max-width: 100%; }
.nx-logo-text { white-space: nowrap; }
@media (max-width: 900px) { .nx-page-header > h1, .nx-page-header > div > h1 { font-size: 22px; } }
@media (max-width: 480px) { .nx-page-header > h1, .nx-page-header > div > h1 { font-size: 20px; } }
.nx-login-card h1, .nx-login-card h2 { font-family: var(--condensed); font-weight: 900; font-size: 22px; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 10px; }
