/* Nexrizen Client Portal — base styles */

@font-face {
  font-family: "Gellix";
  src: url("/static/assets/fonts/Gellix-SemiBold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Poppins";
  src: url("/static/assets/fonts/Poppins-Regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Poppins";
  src: url("/static/assets/fonts/Poppins-Medium.ttf") format("truetype");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "Poppins";
  src: url("/static/assets/fonts/Poppins-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-display: swap;
}

:root {
  --nxr-black: #000000;
  --nxr-ink: #0a0a0a;
  --nxr-white: #ffffff;
  --nxr-off-white: #fbffff;
  --nxr-purple: #502cff;
  --nxr-cyan: #4cbdf5;
  --nxr-mint: #ccfffe;
  --nxr-gradient: linear-gradient(135deg, #502cff 0%, #4cbdf5 55%, #ccfffe 100%);
  --nxr-gradient-soft: linear-gradient(135deg, rgba(80,44,255,0.06), rgba(76,189,245,0.06), rgba(204,255,254,0.10));

  --nxr-fg: #0a0a0a;
  --nxr-fg-muted: #5a5a62;
  --nxr-fg-soft: #8a8a93;
  --nxr-line: rgba(0,0,0,0.10);
  --nxr-line-strong: rgba(0,0,0,0.18);
  --nxr-line-soft: rgba(0,0,0,0.06);
  --nxr-surface: #ffffff;
  --nxr-surface-2: #f6f7f8;
  --nxr-surface-3: #eef0f2;

  --nxr-status-complete: #0f8a4a;
  --nxr-status-complete-bg: #e6f5ec;
  --nxr-status-review: #b15d00;
  --nxr-status-review-bg: #fff1de;
  --nxr-status-progress: #1f4cd6;
  --nxr-status-progress-bg: #e7edff;
  --nxr-status-hold: #6b6b6b;
  --nxr-status-hold-bg: #efefef;
  --nxr-status-input: #8a2bca;
  --nxr-status-input-bg: #f4ebfb;

  --nxr-r-xs: 4px;
  --nxr-r-sm: 6px;
  --nxr-r-md: 8px;
  --nxr-r-lg: 12px;
  --nxr-r-pill: 999px;

  --nxr-shadow-1: 0 1px 0 rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.03);
  --nxr-shadow-2: 0 4px 12px rgba(0,0,0,0.06), 0 1px 3px rgba(0,0,0,0.04);
  --nxr-shadow-modal: 0 24px 64px rgba(15,17,30,0.18), 0 2px 8px rgba(15,17,30,0.06);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: var(--nxr-off-white);
}

body, .nxr {
  font-family: "Poppins", Inter, Arial, system-ui, sans-serif;
  color: var(--nxr-fg);
  background: var(--nxr-off-white);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.nxr h1, .nxr h2, .nxr h3, .nxr h4, .nxr-display, .nxr-eyebrow-display {
  font-family: "Gellix", Inter, Arial, system-ui, sans-serif;
  font-weight: 600;
  letter-spacing: -0.03em;
}
.nxr h1 { font-size: 40px; line-height: 1.05; margin: 0; }
.nxr h2 { font-size: 28px; line-height: 1.1; margin: 0; }
.nxr h3 { font-size: 20px; line-height: 1.15; margin: 0; }
.nxr h4 { font-size: 16px; line-height: 1.2; margin: 0; letter-spacing: -0.02em; }
.nxr p { margin: 0; line-height: 1.5; }

.nxr-mono { font-feature-settings: "tnum" 1; font-variant-numeric: tabular-nums; }

.nxr-eyebrow {
  font-family: "Poppins", sans-serif;
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--nxr-fg-soft);
}

.nxr-shell {
  min-height: 100vh;
  background: var(--nxr-off-white);
  display: flex;
  flex-direction: column;
}

.nxr-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(251,255,255,0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--nxr-line);
}
.nxr-header-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 14px 32px;
  display: flex;
  align-items: center;
  gap: 24px;
}
.nxr-header-logo { display: flex; align-items: center; gap: 10px; }
.nxr-header-logo img { height: 22px; display: block; }
.nxr-header-divider { width: 1px; height: 22px; background: var(--nxr-line); }
.nxr-header-client { display: flex; flex-direction: column; line-height: 1.1; }
.nxr-header-client .name {
  font-family: "Gellix", sans-serif;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.02em;
}
.nxr-header-client .meta { font-size: 11px; color: var(--nxr-fg-soft); }
.nxr-header-spacer { flex: 1; }
.nxr-header-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: var(--nxr-fg-muted);
}
.nxr-pulse-dot {
  width: 6px; height: 6px; border-radius: 999px;
  background: var(--nxr-status-complete);
  box-shadow: 0 0 0 3px rgba(15,138,74,0.14);
}
.nxr-avatar {
  width: 30px; height: 30px;
  border-radius: 999px;
  background: var(--nxr-surface-3);
  border: 1px solid var(--nxr-line);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 500;
  color: var(--nxr-fg);
}

.nxr-body {
  display: grid;
  grid-template-columns: 240px 1fr;
  max-width: 1280px;
  margin: 0 auto;
  width: 100%;
  gap: 0;
  flex: 1;
}
/* When the picker page is active there is no sidebar -- collapse the
   240px reserve and widen the content area so cards can fan out. */
.nxr-shell.is-picker .nxr-body {
  grid-template-columns: 1fr;
  max-width: 1440px;
}
.nxr-sidebar {
  padding: 28px 16px 28px 32px;
  border-right: 1px solid var(--nxr-line);
  position: sticky;
  top: 56px;
  height: fit-content;
}
.nxr-sidebar-section { margin-bottom: 22px; }
.nxr-sidebar-section .nxr-eyebrow { padding: 0 10px 8px; display: block; }
.nxr-nav { display: flex; flex-direction: column; gap: 1px; }
.nxr-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--nxr-r-md);
  font-size: 13px;
  color: var(--nxr-fg);
  cursor: pointer;
  text-decoration: none;
  border: 1px solid transparent;
  background: transparent;
  font-family: inherit;
  text-align: left;
  width: 100%;
}
.nxr-nav-item:hover { background: var(--nxr-surface-2); }
.nxr-nav-item.active {
  background: var(--nxr-white);
  border-color: var(--nxr-line);
  font-weight: 500;
}
.nxr-nav-item .count {
  margin-left: auto;
  font-size: 11px;
  color: var(--nxr-fg-soft);
  background: var(--nxr-surface-2);
  padding: 1px 7px;
  border-radius: 999px;
}
.nxr-nav-item.active .count { background: var(--nxr-surface-3); }

.nxr-main { padding: 28px 32px 64px; min-width: 0; }
.nxr-stack > * + * { margin-top: 20px; }

.nxr-page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--nxr-line);
}
.nxr-page-head h1 { font-size: 30px; }
.nxr-page-head .sub { margin-top: 6px; color: var(--nxr-fg-muted); font-size: 13px; }
.nxr-page-head .right { display: flex; gap: 8px; align-items: center; }

.nxr-card {
  background: var(--nxr-surface);
  border: 1px solid var(--nxr-line);
  border-radius: var(--nxr-r-md);
}
.nxr-card-pad { padding: 20px; }
.nxr-card-pad-lg { padding: 24px; }
.nxr-card-head {
  padding: 16px 20px;
  border-bottom: 1px solid var(--nxr-line);
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: space-between;
}
.nxr-card-head h3 { font-size: 15px; letter-spacing: -0.01em; }
.nxr-card-head .right { display: flex; gap: 8px; align-items: center; font-size: 12px; color: var(--nxr-fg-muted); }
.nxr-card-body { padding: 20px; }

.nxr-accent-bar {
  height: 3px;
  background: var(--nxr-gradient);
  border-radius: 2px;
}

.nxr-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: "Poppins", sans-serif;
  font-size: 13px;
  font-weight: 500;
  border-radius: var(--nxr-r-pill);
  padding: 9px 18px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .15s cubic-bezier(.22,.61,.36,1), background-color .2s, border-color .2s, color .2s;
  white-space: nowrap;
  user-select: none;
}
.nxr-btn:active { transform: scale(0.985); }
.nxr-btn-primary { background: var(--nxr-black); color: var(--nxr-white); }
.nxr-btn-primary:hover { background: #1a1a1a; }
.nxr-btn-outline { background: transparent; color: var(--nxr-black); border-color: var(--nxr-line-strong); }
.nxr-btn-outline:hover { background: var(--nxr-black); color: var(--nxr-white); border-color: var(--nxr-black); }
.nxr-btn-ghost { background: transparent; color: var(--nxr-fg); border-color: transparent; }
.nxr-btn-ghost:hover { background: var(--nxr-surface-2); }
.nxr-btn-danger { background: transparent; color: #b3261e; border-color: rgba(179,38,30,0.30); }
.nxr-btn-danger:hover { background: #b3261e; color: white; border-color: #b3261e; }
.nxr-btn-sm { padding: 6px 12px; font-size: 12px; }
.nxr-btn-lg { padding: 12px 22px; font-size: 14px; }
.nxr-btn[disabled] { opacity: 0.45; cursor: not-allowed; }
.nxr-btn[disabled]:active { transform: none; }

.nxr-field { display: flex; flex-direction: column; gap: 6px; }
.nxr-label { font-size: 12px; font-weight: 500; color: var(--nxr-fg); }
.nxr-help { font-size: 11px; color: var(--nxr-fg-soft); }
.nxr-input,
.nxr-textarea {
  font-family: "Poppins", sans-serif;
  font-size: 13px;
  padding: 10px 12px;
  border: 1px solid var(--nxr-line-strong);
  border-radius: var(--nxr-r-md);
  background: var(--nxr-white);
  color: var(--nxr-fg);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
  width: 100%;
}
.nxr-input::placeholder, .nxr-textarea::placeholder { color: var(--nxr-fg-soft); }
.nxr-input:focus, .nxr-textarea:focus {
  border-color: var(--nxr-purple);
  box-shadow: 0 0 0 3px rgba(80,44,255,0.12);
}
.nxr-textarea { resize: vertical; min-height: 92px; line-height: 1.5; }

.nxr-seg {
  display: inline-flex;
  background: var(--nxr-surface-2);
  border: 1px solid var(--nxr-line);
  border-radius: var(--nxr-r-pill);
  padding: 3px;
}
.nxr-seg-btn {
  font-family: "Poppins", sans-serif;
  font-size: 12px;
  font-weight: 500;
  border: none;
  background: transparent;
  color: var(--nxr-fg-muted);
  padding: 6px 14px;
  border-radius: var(--nxr-r-pill);
  cursor: pointer;
  display: inline-flex; gap: 6px; align-items: center;
}
.nxr-seg-btn.active {
  background: var(--nxr-white);
  color: var(--nxr-fg);
  box-shadow: var(--nxr-shadow-1);
}

.nxr-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 500;
  padding: 3px 10px;
  border-radius: var(--nxr-r-pill);
  border: 1px solid transparent;
  letter-spacing: 0.01em;
}
.nxr-chip .dot { width: 6px; height: 6px; border-radius: 999px; background: currentColor; }
.nxr-chip-complete { color: var(--nxr-status-complete); background: var(--nxr-status-complete-bg); }
.nxr-chip-review   { color: var(--nxr-status-review);   background: var(--nxr-status-review-bg); }
.nxr-chip-progress { color: var(--nxr-status-progress); background: var(--nxr-status-progress-bg); }
.nxr-chip-hold     { color: var(--nxr-status-hold);     background: var(--nxr-status-hold-bg); }
.nxr-chip-input    { color: var(--nxr-status-input);    background: var(--nxr-status-input-bg); }
.nxr-chip-neutral  { color: var(--nxr-fg-muted); background: var(--nxr-surface-2); border-color: var(--nxr-line); }

.nxr-row { display: flex; align-items: center; gap: 12px; }
.nxr-col { display: flex; flex-direction: column; gap: 12px; }
.nxr-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.nxr-grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.nxr-divider { height: 1px; background: var(--nxr-line); }
.nxr-divider-strong { height: 1px; background: var(--nxr-line-strong); }
.nxr-spacer-sm { height: 8px; }
.nxr-spacer-md { height: 16px; }
.nxr-spacer-lg { height: 28px; }

.nxr-login-surface {
  position: relative;
  width: 100%;
  min-height: 100vh;
  background: var(--nxr-off-white);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
  overflow: hidden;
}
.nxr-login-bg {
  position: absolute; inset: 0; pointer-events: none;
  background-image: url("/static/assets/elements/ellipses-outline.svg");
  background-position: 110% -20%;
  background-repeat: no-repeat;
  background-size: 70% auto;
  opacity: 0.30;
}
.nxr-login-stripes {
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 90px;
  background: url("/static/assets/elements/stripes-gradient-wide.svg") center bottom / 100% 100% no-repeat;
  opacity: 0.55;
  pointer-events: none;
}
.nxr-login-card {
  position: relative;
  width: 100%;
  max-width: 420px;
  background: var(--nxr-white);
  border: 1px solid var(--nxr-line);
  border-radius: var(--nxr-r-lg);
  padding: 36px;
  box-shadow: var(--nxr-shadow-2);
}
.nxr-login-card .logo { height: 26px; display: block; margin-bottom: 22px; }

.nxr-modal-scrim {
  position: fixed;
  inset: 0;
  background: rgba(10, 12, 20, 0.32);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 60;
}
.nxr-modal {
  width: min(540px, calc(100% - 64px));
  background: var(--nxr-white);
  border: 1px solid var(--nxr-line);
  border-radius: var(--nxr-r-lg);
  box-shadow: var(--nxr-shadow-modal);
  overflow: hidden;
}
.nxr-modal-head {
  padding: 20px 24px;
  border-bottom: 1px solid var(--nxr-line);
  display: flex; align-items: center; justify-content: space-between;
}
.nxr-modal-body { padding: 20px 24px; }
.nxr-modal-foot {
  padding: 16px 24px;
  border-top: 1px solid var(--nxr-line);
  display: flex; justify-content: flex-end; gap: 8px;
  background: var(--nxr-surface-2);
}

.nxr-icon-btn {
  width: 30px; height: 30px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--nxr-line);
  border-radius: var(--nxr-r-md);
  background: var(--nxr-white);
  cursor: pointer;
  color: var(--nxr-fg-muted);
}
.nxr-icon-btn:hover { color: var(--nxr-fg); border-color: var(--nxr-line-strong); }

.nxr-timeline { display: flex; flex-direction: column; gap: 0; }
.nxr-tl-row {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px dashed var(--nxr-line);
  align-items: flex-start;
}
.nxr-tl-row:last-child { border-bottom: none; }
.nxr-tl-marker {
  position: relative;
  width: 18px; height: 18px;
  border-radius: 999px;
  border: 2px solid var(--nxr-line-strong);
  background: var(--nxr-white);
  margin-top: 2px;
}
.nxr-tl-marker.complete {
  border-color: var(--nxr-status-complete);
  background: var(--nxr-status-complete);
}
.nxr-tl-marker.complete::after {
  content: ""; position: absolute; inset: 4px;
  background: white; border-radius: 999px;
  transform: scale(0.5);
}
.nxr-tl-marker.current {
  border-color: var(--nxr-purple);
  background: white;
  box-shadow: 0 0 0 4px rgba(80,44,255,0.12);
}
.nxr-tl-marker.current::after {
  content: ""; position: absolute; inset: 3px;
  background: var(--nxr-purple); border-radius: 999px;
}
.nxr-tl-marker.progress {
  border-color: var(--nxr-status-progress);
  background: white;
}
.nxr-tl-marker.progress::after {
  content: ""; position: absolute; inset: 3px;
  background: conic-gradient(var(--nxr-status-progress) 0 60%, transparent 60% 100%);
  border-radius: 999px;
}
.nxr-tl-content .name {
  font-family: "Gellix", sans-serif;
  font-weight: 600;
  letter-spacing: -0.01em;
  font-size: 14px;
}
.nxr-tl-content .meta { font-size: 12px; color: var(--nxr-fg-muted); margin-top: 2px; }

.nxr-attention {
  border: 1px solid var(--nxr-line);
  border-radius: var(--nxr-r-md);
  background: var(--nxr-white);
  position: relative;
  overflow: hidden;
}
.nxr-attention .nxr-accent-bar { border-radius: 0; }
.nxr-attention-row {
  display: grid;
  grid-template-columns: 24px 1fr auto auto;
  align-items: center;
  gap: 14px;
  padding: 14px 20px;
  border-top: 1px solid var(--nxr-line-soft);
  font-size: 13px;
}
.nxr-attention-row:first-of-type { border-top: none; }
.nxr-attention-row .icon {
  width: 22px; height: 22px;
  border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center;
}
.nxr-attention-row .icon.review { background: var(--nxr-status-review-bg); color: var(--nxr-status-review); }
.nxr-attention-row .icon.input { background: var(--nxr-status-input-bg); color: var(--nxr-status-input); }
.nxr-attention-row .label { font-weight: 500; }
.nxr-attention-row .due { font-size: 11px; color: var(--nxr-fg-soft); }

.nxr-drop {
  border: 1.5px dashed var(--nxr-line-strong);
  border-radius: var(--nxr-r-md);
  padding: 28px 20px;
  text-align: center;
  background: var(--nxr-surface-2);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.nxr-drop:hover { border-color: var(--nxr-purple); background: rgba(80,44,255,0.03); }

.nxr-acc { border: 1px solid var(--nxr-line); border-radius: var(--nxr-r-md); overflow: hidden; background: white; }
.nxr-acc-row { border-top: 1px solid var(--nxr-line); }
.nxr-acc-row:first-child { border-top: none; }
.nxr-acc-head {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 18px;
  cursor: pointer;
  width: 100%; text-align: left;
  background: white; border: none;
  font-family: "Poppins", sans-serif;
}
.nxr-acc-head:hover { background: var(--nxr-surface-2); }
.nxr-acc-head .num {
  font-family: "Gellix", sans-serif;
  font-size: 12px;
  color: var(--nxr-fg-soft);
  width: 24px;
}
.nxr-acc-head .title {
  font-family: "Gellix", sans-serif;
  font-weight: 600;
  letter-spacing: -0.01em;
  font-size: 14px;
  flex: 1;
}
.nxr-acc-head .chev {
  width: 18px; height: 18px;
  color: var(--nxr-fg-soft);
  transition: transform .2s;
}
.nxr-acc-row.open .chev { transform: rotate(90deg); }
.nxr-acc-body {
  padding: 0 18px 18px 56px;
  font-size: 13px;
  color: var(--nxr-fg-muted);
  line-height: 1.55;
}
.nxr-acc-body p + p { margin-top: 8px; }
.nxr-acc-body .row {
  display: grid; grid-template-columns: 130px 1fr;
  gap: 12px; padding: 6px 0;
  border-top: 1px dashed var(--nxr-line-soft);
}
.nxr-acc-body .row:first-child { border-top: none; padding-top: 0; }
.nxr-acc-body .row .k { color: var(--nxr-fg); font-weight: 500; }

.nxr-chat-fab {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 52px; height: 52px;
  border-radius: 999px;
  background: var(--nxr-black);
  color: white;
  border: none;
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 22px rgba(0,0,0,0.18);
  z-index: 30;
}
.nxr-chat-fab .pulse {
  position: absolute; inset: -4px;
  border-radius: 999px;
  background: var(--nxr-gradient);
  filter: blur(8px); opacity: 0.5; z-index: -1;
}
.nxr-chat-panel {
  position: fixed;
  right: 20px;
  bottom: 84px;
  width: 360px;
  max-height: 520px;
  background: var(--nxr-white);
  border: 1px solid var(--nxr-line);
  border-radius: var(--nxr-r-lg);
  box-shadow: var(--nxr-shadow-modal);
  display: flex; flex-direction: column;
  overflow: hidden;
  z-index: 30;
}
.nxr-chat-head {
  padding: 14px 16px;
  border-bottom: 1px solid var(--nxr-line);
  display: flex; align-items: center; gap: 10px;
}
.nxr-chat-head .gradient-pip {
  width: 28px; height: 28px;
  background: var(--nxr-gradient);
  border-radius: 999px;
  position: relative;
}
.nxr-chat-head .gradient-pip::after {
  content: ""; position: absolute; inset: 6px;
  background: white; border-radius: 999px;
  mask: url("/static/assets/logos/icon-black.svg") center / 14px 14px no-repeat;
  -webkit-mask: url("/static/assets/logos/icon-black.svg") center / 14px 14px no-repeat;
}
.nxr-chat-title {
  font-family: "Gellix", sans-serif;
  font-weight: 600; font-size: 14px;
  letter-spacing: -0.01em;
}
.nxr-chat-sub { font-size: 11px; color: var(--nxr-fg-soft); }
.nxr-chat-body {
  flex: 1;
  padding: 14px;
  overflow-y: auto;
  background: var(--nxr-off-white);
  display: flex; flex-direction: column; gap: 10px;
}
.nxr-chat-msg {
  font-size: 13px;
  line-height: 1.45;
  padding: 10px 12px;
  border-radius: 12px;
  max-width: 85%;
}
.nxr-chat-msg.bot {
  align-self: flex-start;
  background: white;
  border: 1px solid var(--nxr-line);
  border-top-left-radius: 4px;
}
.nxr-chat-msg.user {
  align-self: flex-end;
  background: var(--nxr-black);
  color: white;
  border-top-right-radius: 4px;
}
.nxr-chat-suggest {
  display: flex; flex-wrap: wrap; gap: 6px;
  padding: 0 14px 10px;
  border-top: 1px solid var(--nxr-line);
  padding-top: 10px;
}
.nxr-chat-suggest button {
  font-size: 11px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--nxr-line-strong);
  background: white;
  cursor: pointer;
  color: var(--nxr-fg);
  font-family: "Poppins", sans-serif;
}
.nxr-chat-suggest button:hover { background: var(--nxr-surface-2); }
.nxr-chat-input-row {
  padding: 10px 12px;
  border-top: 1px solid var(--nxr-line);
  display: flex; gap: 6px;
  background: white;
}
.nxr-chat-input-row input {
  flex: 1;
  border: none;
  outline: none;
  font-family: "Poppins", sans-serif;
  font-size: 13px;
  padding: 6px 8px;
  background: var(--nxr-surface-2);
  border-radius: var(--nxr-r-md);
}
.nxr-chat-disclaimer {
  font-size: 10px;
  color: var(--nxr-fg-soft);
  text-align: center;
  padding: 6px 12px 10px;
  background: white;
}

.nxr-mobile-nav {
  display: none;
  gap: 6px;
  overflow-x: auto;
  padding: 4px 0 14px;
  margin-bottom: 4px;
  -webkit-overflow-scrolling: touch;
}
.nxr-mobile-nav-pill {
  font-family: "Poppins", sans-serif;
  font-size: 12px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--nxr-line);
  background: white;
  color: var(--nxr-fg);
  white-space: nowrap;
  cursor: pointer;
  flex-shrink: 0;
}
.nxr-mobile-nav-pill.active {
  background: var(--nxr-fg);
  color: white;
  border-color: var(--nxr-fg);
}
@media (max-width: 880px) {
  .nxr-mobile-nav { display: flex; }
}

.nxr-mobile { font-size: 14px; }
.nxr-mobile .nxr-header-inner { padding: 10px 14px; }
.nxr-mobile .nxr-main { padding: 14px; }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.18); border-radius: 999px; }
::-webkit-scrollbar-track { background: transparent; }

.nxr-clamp-1 { display:-webkit-box; -webkit-line-clamp:1; -webkit-box-orient: vertical; overflow:hidden; }

/* responsive: collapse sidebar on small screens */
@media (max-width: 880px) {
  .nxr-body { grid-template-columns: 1fr; }
  .nxr-sidebar { display: none; }
  .nxr-main { padding: 14px 14px 90px; }

  .nxr-header-inner {
    padding: 12px 14px;
    gap: 10px;
  }
  .nxr-header-divider,
  .nxr-header-client,
  .nxr-header-meta { display: none; }
  .nxr-header-logo img { height: 20px; }

  .nxr-page-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .nxr-page-head h1 { font-size: 24px; }
  .nxr-page-head .right { flex-wrap: wrap; }

  /* cards + heads */
  .nxr-card-head { flex-wrap: wrap; gap: 8px; padding: 14px 16px; }
  .nxr-card-head .right { flex-wrap: wrap; }
  .nxr-card-body { padding: 16px; }
  .nxr-card-pad,
  .nxr-card-pad-lg { padding: 16px; }

  /* grids */
  .nxr-grid-2,
  .nxr-grid-4 { grid-template-columns: 1fr; }

  /* status summary 2x2 -> 1col */
  .nxr-card > div[style*="grid-template-columns: 1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }
  .nxr-card > div[style*="grid-template-columns: 1fr 1fr"] > div {
    border-right: none !important;
    border-top: 1px solid var(--nxr-line-soft) !important;
  }
  .nxr-card > div[style*="grid-template-columns: 1fr 1fr"] > div:first-child {
    border-top: none !important;
  }

  /* team 3-col -> 1col */
  .nxr-card > div[style*="grid-template-columns: 1fr 1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }
  .nxr-card > div[style*="grid-template-columns: 1fr 1fr 1fr"] > div {
    border-left: none !important;
    border-top: 1px solid var(--nxr-line-soft);
  }
  .nxr-card > div[style*="grid-template-columns: 1fr 1fr 1fr"] > div:first-child {
    border-top: none;
  }

  /* secure upload split */
  .nxr-card-body[style*="grid-template-columns: 1.2fr 1fr"] {
    grid-template-columns: 1fr !important;
    gap: 18px !important;
  }

  /* deliverables row */
  .nxr-card > div > div[style*="grid-template-columns: 36px 1fr auto"] {
    grid-template-columns: 36px 1fr !important;
    row-gap: 10px;
  }
  .nxr-card > div > div[style*="grid-template-columns: 36px 1fr auto"] > .nxr-btn {
    grid-column: 1 / -1;
    justify-self: flex-start;
  }

  /* attention */
  .nxr-attention-row { grid-template-columns: 24px 1fr; row-gap: 8px; }
  .nxr-attention-row > .nxr-chip { grid-column: 2; }
  .nxr-attention-row > .nxr-btn { grid-column: 2; justify-self: flex-start; }

  /* timeline */
  .nxr-tl-row { grid-template-columns: 28px 1fr; }
  .nxr-tl-row > div:last-child { grid-column: 2; align-items: flex-start !important; }

  /* sign-off + review action */
  .nxr-card-body[style*="justify-content: space-between"] { gap: 12px !important; }
  .nxr-card-body[style*="justify-content: space-between"] > div:last-child { width: 100%; flex-wrap: wrap; }
  .nxr-card-body[style*="justify-content: space-between"] > div:last-child > .nxr-btn { flex: 1 1 auto; justify-content: center; }

  /* accordion body indent */
  .nxr-acc-body { padding: 0 16px 16px 16px; }
  .nxr-acc-body .row { grid-template-columns: 1fr; gap: 4px; }
  .nxr-acc-head { padding: 12px 14px; }

  /* segmented control wrap */
  .nxr-seg { width: 100%; justify-content: stretch; }
  .nxr-seg-btn { flex: 1; justify-content: center; }

  /* chat panel full width */
  .nxr-chat-panel {
    right: 12px;
    left: 12px;
    width: auto;
    bottom: 78px;
    max-height: calc(100vh - 110px);
  }
  .nxr-chat-fab { right: 14px; bottom: 14px; }

  /* modal */
  .nxr-modal { width: calc(100% - 28px); }
  .nxr-modal-head,
  .nxr-modal-body,
  .nxr-modal-foot { padding: 14px 16px; }

  /* login */
  .nxr-login-surface { padding: 16px; align-items: flex-start; padding-top: 48px; }
  .nxr-login-card { padding: 24px; }

  /* drop zone */
  .nxr-drop { padding: 22px 14px; }

  /* typography */
  .nxr h1 { font-size: 28px; }
  .nxr h2 { font-size: 22px; }
}

@media (max-width: 480px) {
  .nxr-header-inner { gap: 6px; padding: 10px 12px; }
  .nxr-avatar { display: none; }
  .nxr-page-head h1 { font-size: 22px; }
  .nxr-card-body[style*="justify-content: space-between"] > div:last-child > .nxr-chip { width: 100%; justify-content: center; }
}

/* ---------- Header overflow fix (logo / client name overlap) ---------- */
.nxr-header-logo { flex-shrink: 0; }
.nxr-header-client {
  min-width: 0;
  overflow: hidden;
  flex: 1 1 auto;
  max-width: 320px;
}
.nxr-header-client .name,
.nxr-header-client .meta {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---------- Project picker (post-login landing) ---------- */
.nxr-picker-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin: 4px 0 28px;
  flex-wrap: wrap;
}
.nxr-picker-hero-copy {
  min-width: 0;
  flex: 1 1 420px;
}
.nxr-picker-hero-copy .nxr-eyebrow {
  display: inline-block;
  margin-bottom: 10px;
}
.nxr-picker-hero h1 {
  font-family: "Gellix", Inter, Arial, system-ui, sans-serif;
  font-weight: 600;
  letter-spacing: -0.02em;
  font-size: clamp(28px, 4vw, 36px);
  line-height: 1.08;
  margin: 0;
  color: var(--nxr-fg);
}
.nxr-picker-hero .sub {
  margin-top: 8px;
  color: var(--nxr-fg-muted);
  font-size: 14px;
  line-height: 1.5;
  max-width: 60ch;
}
.nxr-picker-hero-meta {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  margin-bottom: 4px;
}
.nxr-picker-meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 500;
  color: var(--nxr-fg-muted);
  background: var(--nxr-surface);
  border: 1px solid var(--nxr-line);
  border-radius: var(--nxr-r-pill);
  padding: 7px 13px;
  box-shadow: var(--nxr-shadow-1);
}

.nxr-picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 18px;
  align-items: stretch;
}

.nxr-picker-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--nxr-surface);
  border: 1px solid var(--nxr-line);
  border-radius: 16px;
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  box-shadow: var(--nxr-shadow-1);
  isolation: isolate;
}
.nxr-picker-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--nxr-gradient-soft);
  opacity: 0;
  transition: opacity 0.18s ease;
  pointer-events: none;
  z-index: 0;
}
.nxr-picker-card > * { position: relative; z-index: 1; }
.nxr-picker-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(80, 44, 255, 0.10), 0 1px 2px rgba(0, 0, 0, 0.04);
  border-color: rgba(80, 44, 255, 0.22);
}
.nxr-picker-card:hover::before { opacity: 1; }
.nxr-picker-card:focus-visible {
  outline: 2px solid var(--nxr-purple);
  outline-offset: 2px;
}

.nxr-picker-card-accent {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--nxr-gradient);
  opacity: 0;
  transition: opacity 0.18s ease;
  z-index: 2;
}
.nxr-picker-card:hover .nxr-picker-card-accent,
.nxr-picker-card.is-attention .nxr-picker-card-accent { opacity: 1; }

.nxr-picker-card-body {
  padding: 22px 22px 18px;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.nxr-picker-card-head {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-right: 92px; /* leave room for the needs-flag */
}
.nxr-picker-card .title {
  font-family: "Gellix", Inter, Arial, system-ui, sans-serif;
  font-weight: 600;
  font-size: 18px;
  letter-spacing: -0.01em;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0;
  color: var(--nxr-fg);
}
.nxr-picker-card .lifecycle-chip {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: var(--nxr-r-pill);
  background: var(--nxr-surface-2);
  color: var(--nxr-fg-muted);
  border: 1px solid var(--nxr-line-soft);
  white-space: nowrap;
}
.nxr-picker-card .lifecycle-chip .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--nxr-fg-soft);
}
.nxr-picker-card .lifecycle-chip[data-status="Client Review"] {
  color: var(--nxr-status-review);
  background: var(--nxr-status-review-bg);
  border-color: transparent;
}
.nxr-picker-card .lifecycle-chip[data-status="Client Review"] .dot { background: var(--nxr-status-review); }
.nxr-picker-card .lifecycle-chip[data-status="In Progress"] {
  color: var(--nxr-status-progress);
  background: var(--nxr-status-progress-bg);
  border-color: transparent;
}
.nxr-picker-card .lifecycle-chip[data-status="In Progress"] .dot { background: var(--nxr-status-progress); }
.nxr-picker-card .lifecycle-chip[data-status="Completed"],
.nxr-picker-card .lifecycle-chip[data-status="Complete"] {
  color: var(--nxr-status-complete);
  background: var(--nxr-status-complete-bg);
  border-color: transparent;
}
.nxr-picker-card .lifecycle-chip[data-status="Completed"] .dot,
.nxr-picker-card .lifecycle-chip[data-status="Complete"] .dot { background: var(--nxr-status-complete); }
.nxr-picker-card .lifecycle-chip[data-status="On Hold"] {
  color: var(--nxr-status-hold);
  background: var(--nxr-status-hold-bg);
  border-color: transparent;
}
.nxr-picker-card .lifecycle-chip[data-status="On Hold"] .dot { background: var(--nxr-status-hold); }
.nxr-picker-card .lifecycle-chip[data-status="Negotiation or Planning"] {
  color: var(--nxr-fg-muted);
  background: var(--nxr-surface-2);
}

.nxr-needs-flag {
  position: absolute;
  top: 14px;
  right: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px 5px 9px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: #fff;
  background: var(--nxr-gradient);
  border-radius: var(--nxr-r-pill);
  box-shadow: 0 2px 8px rgba(80, 44, 255, 0.28);
  z-index: 3;
  white-space: nowrap;
}
.nxr-needs-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.35);
}

.nxr-picker-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 24px;
}
.nxr-picker-stats .label {
  display: block;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--nxr-fg-soft);
  margin-bottom: 4px;
  font-weight: 500;
}
.nxr-picker-stats .value {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--nxr-fg);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-variant-numeric: tabular-nums;
}

.nxr-picker-progress {
  margin-top: auto;
  height: 4px;
  background: var(--nxr-surface-3);
  border-radius: var(--nxr-r-pill);
  overflow: hidden;
}
.nxr-picker-progress > .fill {
  height: 100%;
  background: var(--nxr-gradient);
  border-radius: var(--nxr-r-pill);
  transition: width 0.4s ease;
}

.nxr-picker-card-foot {
  padding: 13px 22px;
  border-top: 1px solid var(--nxr-line-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 12.5px;
  color: var(--nxr-fg-muted);
  background: var(--nxr-surface-2);
}
.nxr-picker-card-foot .foot-meta {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.nxr-picker-card-foot .open {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
  color: var(--nxr-fg);
  flex-shrink: 0;
}
.nxr-picker-card-foot .open svg { transition: transform 0.18s ease; }
.nxr-picker-card:hover .nxr-picker-card-foot .open svg { transform: translateX(3px); }
.nxr-picker-card:hover .nxr-picker-card-foot .open { color: var(--nxr-purple); }

.nxr-picker-empty {
  text-align: center;
  padding: 56px 28px;
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.nxr-picker-empty-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--nxr-gradient-soft);
  color: var(--nxr-purple);
  margin-bottom: 6px;
}
.nxr-picker-empty h3 {
  margin: 0;
  font-family: "Gellix", Inter, Arial, system-ui, sans-serif;
  font-size: 18px;
  letter-spacing: -0.01em;
  color: var(--nxr-fg);
}
.nxr-picker-empty p {
  margin: 0;
  max-width: 48ch;
  color: var(--nxr-fg-muted);
  font-size: 14px;
  line-height: 1.5;
}
.nxr-picker-empty .nxr-btn {
  margin-top: 12px;
}

@media (max-width: 720px) {
  .nxr-picker-hero {
    align-items: flex-start;
    margin-bottom: 22px;
  }
  .nxr-picker-hero-meta { margin-bottom: 0; }
}

@media (max-width: 480px) {
  .nxr-picker-grid { grid-template-columns: 1fr; gap: 14px; }
  .nxr-picker-card-body { padding: 18px 18px 14px; gap: 16px; }
  .nxr-picker-card-foot { padding: 12px 18px; }
  .nxr-picker-card-head { padding-right: 84px; }
  .nxr-picker-stats { gap: 12px 18px; }
}


/* ---------- Per-milestone DoD + Scope blocks (timeline) ---------- */
.nxr-tl-section { margin-top: 10px; }
.nxr-tl-dod {
  margin: 6px 0 0;
  padding-left: 18px;
  font-size: 12px;
  line-height: 1.55;
  color: var(--nxr-fg-muted);
}
.nxr-tl-dod li { margin: 2px 0; }
.nxr-tl-scope {
  margin-top: 12px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  padding: 10px 12px;
  background: var(--nxr-surface-2);
  border: 1px solid var(--nxr-line-soft);
  border-radius: var(--nxr-r-md);
}
.nxr-tl-scope ul {
  margin: 6px 0 0;
  padding-left: 16px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--nxr-fg);
}
.nxr-tl-scope ul li { margin: 2px 0; }

@media (max-width: 720px) {
  .nxr-tl-scope { grid-template-columns: 1fr; }
}

/* ---------- Overview progress card ---------- */
.nxr-mini-track {
  display: flex;
  gap: 6px;
  margin-bottom: 22px;
}
.nxr-mini-seg {
  flex: 1;
  height: 8px;
  border-radius: 999px;
  background: var(--nxr-surface-3);
  position: relative;
  overflow: hidden;
  text-decoration: none;
  display: block;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.nxr-mini-seg:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}
.nxr-mini-seg .dot { display: none; }
.nxr-mini-seg.complete { background: var(--nxr-status-complete); }
.nxr-mini-seg.current  { background: var(--nxr-gradient); }
.nxr-mini-seg.upcoming { background: var(--nxr-surface-3); }
.nxr-mini-seg.hold     { background: var(--nxr-status-hold); opacity: 0.6; }
.nxr-mini-seg.missed   { background: #d62828; }

.nxr-overview-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.nxr-overview-stats > div {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 0 16px 0 0;
  border-right: 1px solid var(--nxr-line-soft);
}
.nxr-overview-stats > div:last-child { border-right: none; }
.nxr-overview-stats .value {
  font-family: "Gellix", sans-serif;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--nxr-fg);
  line-height: 1.1;
  margin-top: 2px;
}
.nxr-overview-stats .hint {
  font-size: 11px;
  color: var(--nxr-fg-soft);
}

.nxr-quick-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  text-decoration: none;
  color: inherit;
  border-right: 1px solid var(--nxr-line-soft);
  transition: background 0.15s ease;
}
.nxr-quick-link:last-child { border-right: none; }
.nxr-quick-link:hover { background: var(--nxr-surface-2); }
.nxr-quick-link .ic {
  width: 28px; height: 28px; border-radius: 8px;
  background: var(--nxr-surface-2);
  border: 1px solid var(--nxr-line-soft);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--nxr-fg-muted);
  flex-shrink: 0;
}
.nxr-quick-link .text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.nxr-quick-link .label { font-size: 13px; font-weight: 500; color: var(--nxr-fg); }
.nxr-quick-link .sub   { font-size: 11px; color: var(--nxr-fg-soft); }
.nxr-quick-link .arr   { color: var(--nxr-fg-soft); transition: transform 0.15s ease; }
.nxr-quick-link:hover .arr { transform: translateX(3px); color: var(--nxr-fg); }

@media (max-width: 720px) {
  .nxr-overview-stats { grid-template-columns: 1fr; }
  .nxr-overview-stats > div { border-right: none; border-bottom: 1px solid var(--nxr-line-soft); padding: 0 0 12px; }
  .nxr-overview-stats > div:last-child { border-bottom: none; padding-bottom: 0; }
}

/* ---------- Flash banner (top of section after action) ---------- */
.nxr-flash {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 18px;
  border-radius: var(--nxr-r-md);
  margin-bottom: 18px;
  border: 1px solid var(--nxr-line-soft);
  font-size: 13px;
  line-height: 1.45;
  color: var(--nxr-fg);
}
.nxr-flash.is-success {
  background: var(--nxr-status-complete-bg);
  border-color: rgba(15, 138, 74, 0.2);
}
.nxr-flash.is-info {
  background: var(--nxr-status-progress-bg);
  border-color: rgba(31, 76, 214, 0.2);
}
.nxr-flash .ic {
  width: 22px; height: 22px; border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  background: var(--nxr-surface);
  border: 1px solid var(--nxr-line-soft);
}
.nxr-flash.is-success .ic { color: var(--nxr-status-complete); }
.nxr-flash.is-info .ic { color: var(--nxr-status-progress); }
.nxr-flash .msg { flex: 1; min-width: 0; }
.nxr-flash em { font-style: normal; color: var(--nxr-status-complete); font-weight: 500; }

/* ---------- Per-milestone Review history block ---------- */
.nxr-history {
  margin-top: 14px;
  padding: 10px 12px;
  background: var(--nxr-surface);
  border: 1px solid var(--nxr-line-soft);
  border-radius: var(--nxr-r-md);
}
.nxr-history > .nxr-eyebrow { display: block; margin-bottom: 6px; }
.nxr-history ul {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 12px;
  line-height: 1.55;
  color: var(--nxr-fg-muted);
}
.nxr-history li { padding: 3px 0; display: flex; flex-wrap: wrap; gap: 6px; }
.nxr-history .when { color: var(--nxr-fg-soft); font-variant-numeric: tabular-nums; }
.nxr-history .who { color: var(--nxr-fg); font-weight: 500; }
.nxr-history .act-approve { color: var(--nxr-status-complete); font-weight: 500; }
.nxr-history .act-changes { color: var(--nxr-status-review); font-weight: 500; }
.nxr-history .excerpt { color: var(--nxr-fg-muted); flex-basis: 100%; padding-left: 0; }

/* ---------- Inline expandable form (Request changes textarea) ---------- */
.nxr-tl-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  min-width: 180px;
}
.nxr-tl-approve-form { margin: 0; }
.nxr-inline-form {
  width: 100%;
  margin-top: 6px;
  padding: 12px;
  background: var(--nxr-surface-2);
  border: 1px solid var(--nxr-line-soft);
  border-radius: var(--nxr-r-md);
  text-align: left;
}

/* ---------- Review feedback smart preview ---------- */
.nxr-review-preview {
  margin-top: 12px;
  padding: 10px 12px;
  background: var(--nxr-surface);
  border: 1px dashed var(--nxr-line);
  border-radius: var(--nxr-r-md);
}
.nxr-review-preview > .nxr-eyebrow {
  display: block;
  margin-bottom: 6px;
  color: var(--nxr-status-input);
}
.nxr-review-preview .body {
  font-size: 13px;
  line-height: 1.5;
  color: var(--nxr-fg);
  white-space: pre-wrap;
  word-break: break-word;
}
.nxr-review-preview .link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  font-size: 12px;
  color: var(--nxr-purple);
  text-decoration: none;
  word-break: break-all;
}
.nxr-review-preview .link:hover { text-decoration: underline; }

/* ---------- Empty state cards (any section) ---------- */
.nxr-empty {
  text-align: center;
  padding: 56px 24px;
  background: var(--nxr-surface);
  border: 1px solid var(--nxr-line);
  border-radius: 16px;
  color: var(--nxr-fg-muted);
}
.nxr-empty .nxr-empty-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-bottom: 12px;
  border-radius: 999px;
  background: var(--nxr-gradient-soft);
  color: var(--nxr-purple);
}
.nxr-empty h3 {
  margin: 0 0 6px;
  font-size: 17px;
  color: var(--nxr-fg);
}
.nxr-empty p {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
  max-width: 48ch;
  margin-left: auto;
  margin-right: auto;
}

/* ---------- Submit spinner (inline button feedback) ---------- */
.nxr-spinner {
  display: inline-block;
  width: 12px;
  height: 12px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 999px;
  animation: nxr-spin 0.7s linear infinite;
  vertical-align: -2px;
  margin-right: 4px;
}
@keyframes nxr-spin {
  to { transform: rotate(360deg); }
}
button[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ---------- HTMX auto busy-state (no-JS, attribute-driven) ----------
 * Any form/button doing an htmx request gets `.htmx-request` while the
 * request is in flight. We fade + lock pointer-events and append a CSS
 * spinner so users always see feedback. Pair with `hx-disabled-elt="this"`
 * on each form so the actual <button> is HTML-disabled and Enter resubmits
 * are blocked until the response lands. */
form.htmx-request,
button.htmx-request {
  cursor: wait;
}
form.htmx-request button[type="submit"],
button.htmx-request {
  opacity: 0.7;
  pointer-events: none;
  position: relative;
}
form.htmx-request button[type="submit"]::after,
button.htmx-request::after {
  content: "";
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-left: 8px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 999px;
  animation: nxr-spin 0.7s linear infinite;
  vertical-align: -2px;
}

/* ---------- Mobile: milestone timeline actions ---------- */
@media (max-width: 720px) {
  .nxr-tl-row {
    flex-direction: column;
    align-items: stretch;
  }
  .nxr-tl-actions {
    align-items: stretch !important;
    min-width: 0 !important;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 6px !important;
    margin-top: 10px;
  }
  .nxr-tl-actions > * {
    flex: 1 1 calc(50% - 6px);
  }
  .nxr-tl-actions .nxr-inline-form {
    flex-basis: 100%;
  }
}

@media (max-width: 480px) {
  .nxr-tl-actions > * {
    flex-basis: 100%;
  }
  .nxr-header-client { display: none; }
  .nxr-header-divider { display: none; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .nxr-spinner {
    animation-duration: 0.7s !important;
    animation-iteration-count: infinite !important;
  }
}
