/* Nexo UI refinement: comfortable reading size, stronger hierarchy and calmer motion. */
:root {
  --ink: #17271f;
  --muted: #5c6d63;
  --line: #d5e0d8;
  --surface: #ffffff;
  --canvas: #edf2ee;
  --green: #176c4c;
  --green-dark: #0e5238;
  --green-pale: #e7f3ea;
  --gold: #a96b1e;
  --red: #b2443e;
  --blue: #386f8f;
  --radius: 14px;
  --shadow: 0 8px 24px rgba(26, 57, 39, .07);
  --shadow-raised: 0 16px 38px rgba(26, 57, 39, .12);
  --nexo-text-primary: #17271f;
  --nexo-text-secondary: #40544a;
  --nexo-text-muted: #5c6d63;
  --nexo-surface-raised: #ffffff;
  --nexo-surface-hover: #f0f5f1;
  --nexo-card-shadow: 0 2px 7px rgba(25, 48, 36, .04), 0 8px 20px rgba(25, 48, 36, .035);
  --nexo-card-shadow-hover: 0 4px 12px rgba(25, 48, 36, .07), 0 14px 28px rgba(25, 48, 36, .06);
}

html[data-theme="dark"] {
  --ink: #edf4ef;
  --muted: #adbbb1;
  --line: #34443a;
  --surface: #1a2720;
  --canvas: #101814;
  --green: #70c99a;
  --green-dark: #59b885;
  --green-pale: #263e31;
  --gold: #e0b85f;
  --red: #f18c83;
  --blue: #83bad6;
  --shadow: 0 8px 26px rgba(0, 0, 0, .24);
  --shadow-raised: 0 16px 38px rgba(0, 0, 0, .34);
  --nexo-text-primary: #edf4ef;
  --nexo-text-secondary: #d2ded5;
  --nexo-text-muted: #adbbb1;
  --nexo-surface-raised: #1a2720;
  --nexo-surface-hover: #24372c;
  --nexo-card-shadow: 0 4px 16px rgba(0, 0, 0, .19);
  --nexo-card-shadow-hover: 0 10px 26px rgba(0, 0, 0, .3);
}

body {
  color: var(--nexo-text-primary);
  font-size: 15px;
  line-height: 1.5;
}

.sidebar {
  padding-inline: 16px;
}

.workspace {
  padding: 13px 10px;
  margin: 30px 0 22px;
}

.workspace-copy strong,
.user-details strong {
  color: var(--nexo-text-primary);
  font-size: 13px;
}

.workspace-copy span,
.user-details small {
  color: var(--nexo-text-muted);
  font-size: 12px;
}

.nav-label {
  color: #68776e;
  font-size: 10px;
  letter-spacing: .09em;
}

.nav-space {
  margin-top: 23px;
}

.nav-item {
  min-height: 42px;
  height: auto;
  padding-block: 8px;
  color: var(--nexo-text-secondary);
  font-size: 13px;
  line-height: 1.35;
  transition: background-color .18s ease, color .18s ease, transform .18s ease;
}

.nav-item:hover {
  background: var(--nexo-surface-hover);
  color: var(--nexo-text-primary);
  transform: translateX(2px);
}

.nav-item.active {
  background: var(--green-pale);
  color: var(--green-dark);
}

.nav-count {
  color: var(--nexo-text-secondary);
  font-size: 11px;
}

.trial-card {
  padding: 15px 13px;
  background: var(--nexo-surface-hover);
  border-color: var(--line);
}

.trial-top,
.trial-card p,
.trial-link {
  font-size: 12px;
}

.trial-top,
.trial-card p {
  color: var(--nexo-text-muted);
}

.trial-card > strong {
  color: var(--nexo-text-primary);
  font-size: 13px;
}

.topbar {
  min-height: 64px;
  padding-inline: clamp(18px, 3vw, 38px);
}

.breadcrumbs,
.top-date {
  font-size: 12px;
}

.breadcrumbs strong {
  color: var(--nexo-text-primary);
}

.top-actions {
  gap: 12px;
}

.page-wrap {
  padding: clamp(28px, 4vw, 42px) clamp(20px, 3vw, 42px) 64px;
}

.page-heading {
  margin-bottom: 30px;
}

.page-heading h1 {
  color: var(--nexo-text-primary);
  font-size: clamp(27px, 2.25vw, 34px);
  letter-spacing: -.045em;
  line-height: 1.2;
}

.page-heading p {
  max-width: 68ch;
  color: var(--nexo-text-secondary);
  font-size: 14px;
  line-height: 1.55;
}

.eyebrow {
  color: var(--nexo-text-muted);
  font-size: 11px;
  letter-spacing: .1em;
}

.button {
  min-height: 42px;
  padding-inline: 16px;
  font-size: 13px;
  transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease, border-color .18s ease;
}

.button-small {
  min-height: 36px;
  padding-inline: 12px;
  font-size: 12px;
}

.button-primary {
  box-shadow: 0 2px 5px rgba(17, 88, 64, .16);
}

.button-primary:hover {
  box-shadow: 0 6px 14px rgba(17, 88, 64, .2);
  transform: translateY(-2px);
}

.button-secondary {
  color: var(--nexo-text-secondary);
}

.metric-grid {
  gap: 16px;
  margin-bottom: 20px;
}

.metric-card {
  min-height: 136px;
  padding: 19px 20px;
  border-radius: 14px;
}

.metric-top {
  gap: 12px;
  color: var(--nexo-text-secondary);
  font-size: 12px;
  line-height: 1.4;
}

.metric-icon {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  font-size: 16px;
}

.metric-value {
  color: var(--nexo-text-primary);
  font-size: clamp(25px, 2vw, 31px);
  line-height: 1.2;
}

.metric-foot {
  color: var(--nexo-text-muted);
  font-size: 12px;
  line-height: 1.4;
}

.dashboard-grid {
  gap: 19px;
}

.panel,
.metric-card,
.settings-card,
.plan-card,
.sales-agent-panel,
.task-summary,
.pipeline-summary,
.inbox-list-panel,
.inbox-chat-panel,
.inbox-detail-panel {
  border-radius: 14px;
  box-shadow: var(--nexo-card-shadow);
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.panel-heading {
  gap: 14px;
  padding: 20px 21px 15px;
}

.panel-heading h2,
.settings-card h2 {
  color: var(--nexo-text-primary);
  font-size: 16px;
  line-height: 1.35;
}

.panel-heading p,
.settings-card p {
  color: var(--nexo-text-secondary);
  font-size: 13px;
  line-height: 1.5;
}

.period-select {
  min-height: 38px;
  padding: 7px 10px;
  color: var(--nexo-text-secondary);
  font-size: 12px;
}

.chart-area {
  padding: 10px 20px 20px;
}

.chart-legend {
  flex-wrap: wrap;
  color: var(--nexo-text-secondary);
  font-size: 12px;
}

.chart-label {
  fill: var(--nexo-text-muted);
  font-size: 11px;
}

.quick-actions {
  gap: 10px;
  padding: 7px 18px 16px;
}

.quick-action {
  min-height: 52px;
  padding: 11px;
  color: var(--nexo-text-secondary);
  font-size: 12px;
  line-height: 1.4;
  transition: transform .18s ease, background-color .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.quick-action span:first-child {
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  font-size: 16px;
}

.activity-list {
  padding-inline: 20px;
}

.activity-item {
  gap: 12px;
  padding-block: 12px;
}

.activity-content {
  color: var(--nexo-text-secondary);
  font-size: 12px;
  line-height: 1.55;
}

.activity-content strong {
  color: var(--nexo-text-primary);
}

.activity-content small {
  color: var(--nexo-text-muted);
  font-size: 11px;
}

.table-toolbar {
  gap: 12px;
  padding: 14px 18px;
}

.search-box input {
  height: 40px;
  padding-left: 34px;
  color: var(--nexo-text-primary);
  font-size: 13px;
}

th {
  height: 43px;
  color: var(--nexo-text-secondary);
  font-size: 11px;
  letter-spacing: .02em;
}

td {
  height: 59px;
  color: var(--nexo-text-secondary);
  font-size: 13px;
}

.primary-cell {
  color: var(--nexo-text-primary);
}

.secondary-cell {
  color: var(--nexo-text-muted);
  font-size: 11px;
}

.status {
  padding: 5px 9px;
  font-size: 11px;
}

.empty-state {
  padding: 54px 18px;
  color: var(--nexo-text-secondary);
}

.empty-state strong {
  color: var(--nexo-text-primary);
  font-size: 15px;
}

.empty-state p {
  color: var(--nexo-text-secondary);
  font-size: 13px;
  line-height: 1.5;
}

.form-grid {
  gap: 16px;
}

.form-field {
  gap: 8px;
}

.form-field label {
  color: var(--nexo-text-secondary);
  font-size: 13px;
}

.form-field input,
.form-field select,
.form-field textarea {
  min-height: 43px;
  padding-inline: 12px;
  color: var(--nexo-text-primary);
  font-size: 13px;
}

.form-field textarea {
  min-height: 92px;
  padding: 11px 12px;
}

.form-hint {
  color: var(--nexo-text-muted);
  font-size: 11px;
  line-height: 1.45;
}

.subscription-grid {
  gap: 18px;
}

.plan-card {
  padding: 23px;
}

.plan-name {
  color: var(--nexo-text-secondary);
  font-size: 13px;
}

.plan-price {
  font-size: 30px;
}

.plan-price small {
  color: var(--nexo-text-muted);
  font-size: 12px;
}

.plan-description {
  min-height: 40px;
  height: auto;
  color: var(--nexo-text-secondary);
  font-size: 13px;
  line-height: 1.5;
}

.plan-features {
  color: var(--nexo-text-secondary);
  font-size: 13px;
  line-height: 1.45;
}

.settings-grid {
  gap: 18px;
}

.settings-card {
  padding: 21px;
}

.notice {
  color: var(--nexo-text-secondary);
  font-size: 13px;
  line-height: 1.55;
}

.toast {
  font-size: 13px;
}

@media (hover: hover) and (pointer: fine) {
  .metric-card:hover,
  .panel:hover,
  .settings-card:hover,
  .plan-card:hover,
  .sales-agent-panel:hover,
  .task-summary:hover,
  .pipeline-summary:hover {
    border-color: #d2ded6;
    box-shadow: var(--nexo-card-shadow-hover);
    transform: translateY(-2px);
  }

  .quick-action:hover {
    background: var(--nexo-surface-hover);
    border-color: #d2ded6;
    box-shadow: 0 4px 12px rgba(25, 48, 36, .06);
    transform: translateY(-1px);
  }
}

html[data-theme="dark"] .nav-label,
html[data-theme="dark"] .metric-top,
html[data-theme="dark"] .panel-heading p,
html[data-theme="dark"] .settings-card p,
html[data-theme="dark"] .chart-legend,
html[data-theme="dark"] .activity-content,
html[data-theme="dark"] .activity-content small,
html[data-theme="dark"] .empty-state,
html[data-theme="dark"] .empty-state p,
html[data-theme="dark"] .form-field label,
html[data-theme="dark"] .form-hint,
html[data-theme="dark"] .plan-name,
html[data-theme="dark"] .plan-description,
html[data-theme="dark"] .plan-features,
html[data-theme="dark"] .notice,
html[data-theme="dark"] td,
html[data-theme="dark"] th,
html[data-theme="dark"] .secondary-cell {
  color: var(--nexo-text-secondary);
}

html[data-theme="dark"] .page-heading h1,
html[data-theme="dark"] .metric-value,
html[data-theme="dark"] .panel-heading h2,
html[data-theme="dark"] .settings-card h2,
html[data-theme="dark"] .activity-content strong,
html[data-theme="dark"] .empty-state strong,
html[data-theme="dark"] .primary-cell,
html[data-theme="dark"] .form-field input,
html[data-theme="dark"] .form-field select,
html[data-theme="dark"] .form-field textarea {
  color: var(--nexo-text-primary);
}

html[data-theme="dark"] .quick-action,
html[data-theme="dark"] .period-select,
html[data-theme="dark"] .search-box input,
html[data-theme="dark"] .form-field input,
html[data-theme="dark"] .form-field select,
html[data-theme="dark"] .form-field textarea {
  background-color: var(--nexo-surface-hover);
  border-color: var(--line);
}

@media (max-width: 1050px) {
  .sidebar {
    width: 228px;
  }

  .main-content {
    margin-left: 228px;
  }

  .topbar {
    padding-inline: 22px;
  }

  .page-wrap {
    padding-inline: 24px;
  }
}

@media (max-width: 760px) {
  .sidebar {
    width: min(300px, calc(100vw - 48px));
    padding: 20px 16px max(14px, env(safe-area-inset-bottom));
  }

  .main-content {
    margin-left: 0;
  }

  .topbar {
    min-height: 62px;
    height: auto;
    padding: 8px 14px;
  }

  .top-actions {
    gap: 5px;
  }

  .top-actions .icon-button {
    width: 40px;
    height: 40px;
  }

  .page-wrap {
    padding: 28px 18px max(44px, env(safe-area-inset-bottom));
  }

  .page-heading {
    margin-bottom: 22px;
  }

  .page-heading p {
    max-width: 48ch;
    font-size: 14px;
  }

  .panel-heading {
    padding: 18px 17px 14px;
  }

  .right-stack {
    gap: 14px;
  }

  .table-wrap {
    overscroll-behavior-x: contain;
    scrollbar-width: thin;
  }
}

@media (max-width: 480px) {
  .page-wrap {
    padding-inline: 15px;
  }

  .page-heading {
    flex-wrap: wrap;
    align-items: center;
  }

  .page-heading > :first-child {
    flex: 1 1 100%;
  }

  .page-heading h1 {
    font-size: 27px;
  }

  .page-heading > .button {
    min-height: 42px;
    font-size: 12px;
  }

  .metric-grid {
    gap: 10px;
  }

  .metric-card {
    min-height: 126px;
    padding: 14px;
  }

  .metric-top {
    align-items: flex-start;
    font-size: 11px;
  }

  .metric-value {
    margin-top: 8px;
    font-size: 23px;
  }

  .metric-foot {
    font-size: 11px;
  }

  .right-stack {
    grid-template-columns: 1fr;
  }

  .quick-actions {
    grid-template-columns: 1fr 1fr;
    padding-inline: 14px;
  }

  .quick-action {
    min-height: 58px;
    padding: 9px;
    font-size: 11px;
  }

  .table-toolbar {
    padding: 13px 14px;
  }

  .toolbar-actions .button {
    min-height: 40px;
  }

  .modal-header,
  .modal-body {
    padding-inline: 18px;
  }

  .modal-footer {
    padding-inline: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .nav-item,
  .button,
  .metric-card,
  .panel,
  .settings-card,
  .plan-card,
  .quick-action {
    transition: none !important;
  }
}

/* One shared color system for every workspace, module and theme. */
body {
  background: var(--canvas);
  color: var(--ink);
}

.sidebar,
.topbar,
.panel,
.metric-card,
.settings-card,
.plan-card,
.modal,
.auth-card,
.document-preview,
.sales-agent-panel,
.task-summary,
.pipeline-summary,
.inbox-list-panel,
.inbox-chat-panel,
.inbox-detail-panel,
.help-overview,
.help-guide-list,
.help-guide-detail {
  background-color: var(--surface);
  border-color: var(--line);
}

.sidebar {
  box-shadow: 6px 0 28px rgba(23, 53, 37, .035);
}

.brand-mark {
  background: var(--green);
}

.brand-dot {
  color: #2f8d62;
}

.workspace,
.settings-card,
.plan-card,
.panel,
.metric-card,
.quick-action,
.conversation-row,
.help-guide-link {
  border-color: var(--line);
}

.workspace-avatar,
.user-avatar,
.top-avatar {
  background: #e5eee8;
  color: #285943;
}

.nav-label,
.breadcrumbs,
.top-date,
.eyebrow,
.trial-top,
.trial-card p,
.metric-foot,
.chart-legend,
.panel-heading p,
.activity-content,
.secondary-cell,
.form-hint,
.plan-description,
.settings-card p,
.help-guide-meta p,
.help-tour-prerequisite p,
.help-tour-result p {
  color: var(--nexo-text-muted);
}

.page-heading h1,
.breadcrumbs strong,
.metric-value,
.panel-heading h2,
.activity-content strong,
.primary-cell,
.settings-card h2,
.plan-price,
.plan-name,
.empty-state strong,
.modal-header h2 {
  color: var(--nexo-text-primary);
}

.page-heading p,
.metric-top,
.empty-state p,
.form-field label,
.plan-features,
.activity-content,
td,
th {
  color: var(--nexo-text-secondary);
}

.icon-button {
  color: var(--nexo-text-secondary);
}

.icon-button:hover,
.row-action:hover {
  background: var(--nexo-surface-hover);
  color: var(--green-dark);
}

.nav-item {
  position: relative;
  color: var(--nexo-text-secondary);
}

.nav-item::before {
  position: absolute;
  inset: 25% auto 25% 0;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--green);
  content: "";
  opacity: 0;
  transform: scaleY(.55);
  transition: opacity .2s ease, transform .2s ease;
}

.nav-item.active {
  background: var(--green-pale);
  color: var(--green-dark);
}

.nav-item.active::before {
  opacity: 1;
  transform: scaleY(1);
}

.nav-count {
  background: var(--green-pale);
  color: var(--green-dark);
}

.button-primary {
  background: var(--green);
  color: #fff;
}

.button-primary:hover {
  background: var(--green-dark);
}

.button-secondary {
  background: var(--surface);
  border-color: var(--line);
  color: var(--nexo-text-secondary);
}

.button-secondary:hover {
  background: var(--nexo-surface-hover);
  border-color: #b9ccbe;
}

.button-danger {
  background: #fff2f0;
  border-color: #f0d0cb;
  color: var(--red);
}

.metric-icon,
.activity-mark,
.quick-action span:first-child,
.agent-badge,
.agent-spark {
  background: var(--green-pale);
  color: var(--green-dark);
}

.chart-grid {
  stroke: var(--line);
}

.chart-line,
.legend-dot {
  stroke: var(--green);
  background: var(--green);
}

.chart-line2,
.legend-dot.light {
  stroke: #a5cdb1;
  background: #a5cdb1;
}

.status {
  background: #e6f3e9;
  color: #176542;
}

.status.pending {
  background: #fff2dc;
  color: #8d5b10;
}

.status.draft {
  background: #edf0ed;
  color: #52645a;
}

.status.overdue {
  background: #ffedeb;
  color: #a93832;
}

.status.paid {
  background: #e8f1f7;
  color: #285d7a;
}

.table-toolbar,
.panel-heading,
.modal-header,
.modal-footer,
.activity-item,
.user-profile {
  border-color: var(--line);
}

th {
  background: #edf3ee;
  border-color: var(--line);
}

td {
  border-color: #e8eee9;
}

tbody tr:hover {
  background: #f5f8f5;
}

.form-field input,
.form-field select,
.form-field textarea,
.search-box input,
.inbox-search,
.global-search-input input {
  background: var(--surface);
  border-color: var(--line);
  color: var(--nexo-text-primary);
}

.form-field input::placeholder,
.form-field textarea::placeholder,
.search-box input::placeholder {
  color: var(--nexo-text-muted);
  opacity: 1;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus,
.search-box input:focus {
  border-color: #48956d;
  box-shadow: 0 0 0 3px rgba(45, 125, 82, .13);
}

.notice,
.help-guide-meta section,
.help-tour-prerequisite,
.help-tour-result {
  background: #edf4ee;
  border-color: #dce8df;
  color: var(--nexo-text-secondary);
}

.inventory-banner {
  background: #eaf4ec;
  border-color: #d7e8dc;
  color: var(--nexo-text-primary);
}

.inventory-banner p {
  color: var(--nexo-text-secondary);
}

.plan-card.featured {
  border-color: #5e9e78;
  box-shadow: 0 8px 26px rgba(32, 106, 66, .11);
}

.plan-features li::before {
  color: var(--green);
}

.button:focus-visible,
.icon-button:focus-visible,
.nav-item:focus-visible,
.user-profile:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
a:focus-visible {
  outline: 3px solid #72b18a;
  outline-offset: 3px;
}

::selection {
  background: #cde8d4;
  color: #153e2a;
}

.sidebar-toggle {
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--nexo-text-secondary);
}

.sidebar-toggle svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform .28s cubic-bezier(.2, .75, .25, 1);
}

.sidebar-toggle:hover {
  border-color: #b5c9ba;
  background: var(--green-pale);
  color: var(--green-dark);
}

.sidebar-toggle[aria-expanded="false"] svg {
  transform: rotate(180deg);
}

.mobile-menu {
  display: none;
}

.sidebar,
.main-content {
  transition: width .3s cubic-bezier(.2, .75, .25, 1), margin-left .3s cubic-bezier(.2, .75, .25, 1), padding .3s cubic-bezier(.2, .75, .25, 1);
}

.main-nav {
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #bac9bd transparent;
}

.nav-item {
  transition: background-color .18s ease, color .18s ease, transform .18s ease, padding .25s ease, width .25s ease;
}

.panel,
.metric-card,
.settings-card,
.plan-card,
.sales-agent-panel,
.task-summary,
.pipeline-summary,
.quick-action,
.conversation-row,
.agent-suggestion {
  transition: background-color .22s ease, border-color .22s ease, box-shadow .22s ease, transform .22s cubic-bezier(.2, .75, .25, 1);
}

.button:active,
.quick-action:active {
  transform: translateY(1px) scale(.99);
}

.trial-dot {
  animation: none;
}

@keyframes nexo-enter {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes nexo-modal-in {
  from { opacity: 0; transform: translateY(9px) scale(.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes nexo-toast-in {
  from { opacity: 0; transform: translateY(7px) scale(.99); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (min-width: 1101px) {
  .sidebar {
    overflow-x: hidden;
    transition: width .3s cubic-bezier(.2, .75, .25, 1), padding .3s cubic-bezier(.2, .75, .25, 1), background-color .2s ease;
  }

  .main-content {
    transition: margin-left .3s cubic-bezier(.2, .75, .25, 1);
  }

  .app-shell.sidebar-collapsed .sidebar {
    width: 76px;
    padding-inline: 10px;
  }

  .app-shell.sidebar-collapsed .main-content {
    margin-left: 76px;
  }

  .app-shell.sidebar-collapsed .brand {
    justify-content: center;
    padding-inline: 0;
  }

  .app-shell.sidebar-collapsed .brand > span:last-child {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .app-shell.sidebar-collapsed .workspace {
    justify-content: center;
    min-height: 54px;
    padding: 7px 0;
    border-color: transparent;
    background: transparent;
  }

  .app-shell.sidebar-collapsed .workspace-copy,
  .app-shell.sidebar-collapsed .workspace-more {
    display: none;
  }

  .app-shell.sidebar-collapsed .nav-label {
    height: 10px;
    margin: 8px 0 4px;
    overflow: hidden;
    font-size: 0;
    letter-spacing: 0;
  }

  .app-shell.sidebar-collapsed .nav-item {
    width: 50px;
    min-height: 48px;
    height: 48px;
    justify-content: center;
    gap: 0;
    margin-inline: auto;
    padding: 0;
    overflow: visible;
    font-size: 0;
  }

  .app-shell.sidebar-collapsed .nav-icon,
  .app-shell.sidebar-collapsed .nav-icon svg {
    width: 22px;
    height: 22px;
  }

  .app-shell.sidebar-collapsed .nav-count:not(.is-zero-count) {
    position: absolute;
    top: 2px;
    right: 1px;
    display: grid;
    min-width: 17px;
    height: 17px;
    place-items: center;
    margin: 0;
    padding: 0 3px;
    border: 1px solid var(--surface);
    border-radius: 999px;
    font-size: 10px;
    line-height: 1;
  }

  .app-shell.sidebar-collapsed .nav-count.is-zero-count {
    display: none;
  }

  .app-shell.sidebar-collapsed .trial-card {
    margin: 10px 0 8px;
    padding: 7px;
    text-align: center;
  }

  .app-shell.sidebar-collapsed .trial-top > span:not(.trial-dot),
  .app-shell.sidebar-collapsed .trial-card > strong,
  .app-shell.sidebar-collapsed .trial-card > p {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .app-shell.sidebar-collapsed .trial-top {
    justify-content: center;
  }

  .app-shell.sidebar-collapsed .trial-link {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    margin-inline: auto;
    font-size: 0;
  }

  .app-shell.sidebar-collapsed .trial-link span {
    margin: 0;
    font-size: 17px;
  }

  .app-shell.sidebar-collapsed .user-profile {
    justify-content: center;
    padding: 12px 0 0;
  }

  .app-shell.sidebar-collapsed .user-details,
  .app-shell.sidebar-collapsed .user-menu {
    display: none;
  }

  .app-shell.sidebar-collapsed .user-avatar {
    width: 38px;
    height: 38px;
    font-size: 13px;
  }
}

@media (max-width: 1100px) {
  .sidebar-toggle {
    display: none;
  }

  .mobile-menu {
    display: grid;
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
  }

  .sidebar {
    width: min(318px, 88vw);
    transition: transform .28s cubic-bezier(.2, .75, .25, 1), box-shadow .25s ease;
  }

  .main-content {
    margin-left: 0;
  }

  .sidebar-backdrop:not([hidden]) {
    animation: nexo-backdrop-in .22s ease both;
  }

  .nav-item:hover {
    transform: none;
  }
}

@keyframes nexo-backdrop-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

html[data-theme="dark"] .sidebar,
html[data-theme="dark"] .topbar,
html[data-theme="dark"] .panel,
html[data-theme="dark"] .metric-card,
html[data-theme="dark"] .settings-card,
html[data-theme="dark"] .plan-card,
html[data-theme="dark"] .modal,
html[data-theme="dark"] .auth-card,
html[data-theme="dark"] .document-preview,
html[data-theme="dark"] .sales-agent-panel,
html[data-theme="dark"] .task-summary,
html[data-theme="dark"] .pipeline-summary,
html[data-theme="dark"] .inbox-list-panel,
html[data-theme="dark"] .inbox-chat-panel,
html[data-theme="dark"] .inbox-detail-panel,
html[data-theme="dark"] .help-overview,
html[data-theme="dark"] .help-guide-list,
html[data-theme="dark"] .help-guide-detail {
  background-color: var(--surface);
  border-color: var(--line);
  color: var(--nexo-text-primary);
}

html[data-theme="dark"] .sidebar {
  box-shadow: 8px 0 30px rgba(0, 0, 0, .22);
}

html[data-theme="dark"] .topbar {
  background: rgba(26, 39, 32, .96);
}

html[data-theme="dark"] .brand-mark {
  background: #287d57;
}

html[data-theme="dark"] .brand-dot {
  color: #83d5a2;
}

html[data-theme="dark"] .workspace-avatar,
html[data-theme="dark"] .user-avatar,
html[data-theme="dark"] .top-avatar {
  background: #2c4535;
  color: #c1e4ca;
}

html[data-theme="dark"] .nav-item,
html[data-theme="dark"] .breadcrumbs,
html[data-theme="dark"] .top-date,
html[data-theme="dark"] .nav-label,
html[data-theme="dark"] .eyebrow,
html[data-theme="dark"] .trial-top,
html[data-theme="dark"] .trial-card p,
html[data-theme="dark"] .metric-top,
html[data-theme="dark"] .metric-foot,
html[data-theme="dark"] .page-heading p,
html[data-theme="dark"] .panel-heading p,
html[data-theme="dark"] .activity-content,
html[data-theme="dark"] .activity-content small,
html[data-theme="dark"] .secondary-cell,
html[data-theme="dark"] .form-field label,
html[data-theme="dark"] .form-hint,
html[data-theme="dark"] .plan-description,
html[data-theme="dark"] .plan-features,
html[data-theme="dark"] .settings-card p,
html[data-theme="dark"] .empty-state,
html[data-theme="dark"] .empty-state p,
html[data-theme="dark"] td,
html[data-theme="dark"] th {
  color: var(--nexo-text-secondary);
}

html[data-theme="dark"] .page-heading h1,
html[data-theme="dark"] .breadcrumbs strong,
html[data-theme="dark"] .metric-value,
html[data-theme="dark"] .panel-heading h2,
html[data-theme="dark"] .activity-content strong,
html[data-theme="dark"] .primary-cell,
html[data-theme="dark"] .settings-card h2,
html[data-theme="dark"] .plan-price,
html[data-theme="dark"] .plan-name,
html[data-theme="dark"] .empty-state strong,
html[data-theme="dark"] .modal-header h2 {
  color: var(--nexo-text-primary);
}

html[data-theme="dark"] .nav-item:hover,
html[data-theme="dark"] .nav-item.active,
html[data-theme="dark"] .nav-count,
html[data-theme="dark"] .metric-icon,
html[data-theme="dark"] .activity-mark,
html[data-theme="dark"] .quick-action span:first-child,
html[data-theme="dark"] .agent-badge,
html[data-theme="dark"] .agent-spark {
  background: var(--green-pale);
  color: #a2e2b8;
}

html[data-theme="dark"] .button-primary {
  background: #32895e;
  color: #fff;
}

html[data-theme="dark"] .button-primary:hover {
  background: #3c9a6b;
}

html[data-theme="dark"] .button-secondary,
html[data-theme="dark"] .button-danger,
html[data-theme="dark"] .quick-action,
html[data-theme="dark"] .period-select,
html[data-theme="dark"] .search-box input,
html[data-theme="dark"] .form-field input,
html[data-theme="dark"] .form-field select,
html[data-theme="dark"] .form-field textarea,
html[data-theme="dark"] .inbox-search {
  background: var(--nexo-surface-hover);
  border-color: var(--line);
  color: var(--nexo-text-primary);
}

html[data-theme="dark"] th {
  background: #26372d;
  border-color: var(--line);
}

html[data-theme="dark"] td,
html[data-theme="dark"] .table-toolbar,
html[data-theme="dark"] .panel-heading,
html[data-theme="dark"] .modal-header,
html[data-theme="dark"] .modal-footer,
html[data-theme="dark"] .activity-item,
html[data-theme="dark"] .user-profile {
  border-color: var(--line);
}

html[data-theme="dark"] tbody tr:hover {
  background: #223329;
}

html[data-theme="dark"] .notice,
html[data-theme="dark"] .help-guide-meta section,
html[data-theme="dark"] .help-tour-prerequisite,
html[data-theme="dark"] .help-tour-result,
html[data-theme="dark"] .inventory-banner {
  background: #203329;
  border-color: #354d3d;
  color: var(--nexo-text-secondary);
}

html[data-theme="dark"] .status {
  background: #254b35;
  color: #a8e1b7;
}

html[data-theme="dark"] .status.pending {
  background: #4a3920;
  color: #f0cb79;
}

html[data-theme="dark"] .status.draft {
  background: #303b34;
  color: #c1cbc4;
}

html[data-theme="dark"] .status.overdue {
  background: #4a2b29;
  color: #ffaaa2;
}

html[data-theme="dark"] .status.paid {
  background: #223e4c;
  color: #a6d5ec;
}

html[data-theme="dark"] .button-danger {
  color: #ffaaa2;
}

html[data-theme="dark"] .chart-grid {
  stroke: #35483b;
}

html[data-theme="dark"] .chart-label {
  fill: #bac9be;
}

html[data-theme="dark"] ::selection {
  background: #31583e;
  color: #f2f8f3;
}

html[data-theme="dark"] .sidebar-toggle {
  background: var(--surface);
  border-color: var(--line);
  color: var(--nexo-text-secondary);
}

@media (min-width: 1101px) {
  .app-shell.sidebar-collapsed .sidebar {
    width: 0;
    min-width: 0;
    padding-inline: 0;
    overflow: hidden;
    border-right-width: 0;
    opacity: 0;
    pointer-events: none;
    transform: translateX(-28px);
    transition: width .3s cubic-bezier(.2, .75, .25, 1), padding .3s cubic-bezier(.2, .75, .25, 1), border-color .2s ease, opacity .2s ease, transform .3s cubic-bezier(.2, .75, .25, 1);
  }

  .app-shell.sidebar-collapsed .main-content {
    margin-left: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sidebar,
  .main-content,
  .sidebar-toggle svg,
  .nav-item,
  .nav-item::before,
  .panel,
  .metric-card,
  .settings-card,
  .plan-card,
  .quick-action,
  .conversation-row,
  .agent-suggestion {
    transition-duration: .01ms !important;
  }

  .sidebar-backdrop:not([hidden]) {
    animation: none !important;
  }
}

/* Responsive refinements: keep navigation and content comfortable until desktop width. */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 76px;
}

body,
.app-shell,
.main-content,
.page-wrap,
#pageContent {
  min-width: 0;
}

.app-shell {
  min-height: 100dvh;
}

.page-wrap {
  width: 100%;
  padding-inline: clamp(16px, 3.2vw, 42px);
}

#pageContent > *,
.dashboard-grid > *,
.right-stack > *,
.metric-grid > *,
.settings-grid > *,
.report-grid > *,
.pipeline-summary > * {
  min-width: 0;
}

.page-heading {
  gap: clamp(12px, 2vw, 22px);
}

.page-heading > :first-child {
  min-width: 0;
}

.page-heading h1,
.page-heading p,
.panel-heading h2 {
  overflow-wrap: anywhere;
}

.panel,
.metric-card,
.settings-card,
.plan-card,
.sales-agent-panel,
.task-summary,
.pipeline-summary,
.inbox-layout,
.help-layout {
  min-width: 0;
}

.table-toolbar {
  flex-wrap: wrap;
  gap: 10px 14px;
}

.table-toolbar .search-box {
  flex: 1 1 240px;
  min-width: min(100%, 220px);
}

.toolbar-actions,
.erp-actions {
  min-width: 0;
  flex-wrap: wrap;
  gap: 8px;
}

.modal-backdrop {
  padding: max(18px, env(safe-area-inset-top)) max(18px, env(safe-area-inset-right)) max(18px, env(safe-area-inset-bottom)) max(18px, env(safe-area-inset-left));
}

.modal {
  max-height: calc(100dvh - 36px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  overscroll-behavior: contain;
}

.modal-body {
  min-height: 0;
  overscroll-behavior: contain;
}

@media (max-width: 1100px) {
  .sidebar-toggle {
    display: none;
  }

  .mobile-menu {
    display: grid;
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
  }

  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 40;
    width: min(318px, 84vw);
    padding: calc(18px + env(safe-area-inset-top)) 16px max(14px, env(safe-area-inset-bottom));
    transform: translateX(-105%);
    transition: transform .28s cubic-bezier(.22, .8, .25, 1), box-shadow .24s ease;
    box-shadow: 18px 0 48px rgba(12, 28, 18, .2);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .app-shell.sidebar-collapsed .sidebar {
    width: min(318px, 84vw);
    min-width: 0;
    padding-inline: 16px;
    border-right-width: 1px;
    opacity: 1;
    pointer-events: auto;
    transform: translateX(-105%);
  }

  .app-shell.sidebar-collapsed .sidebar.open {
    transform: translateX(0);
  }

  .app-shell.sidebar-collapsed .main-content,
  .main-content {
    margin-left: 0;
  }

  .sidebar-backdrop:not([hidden]) {
    position: fixed;
    inset: 0;
    z-index: 35;
    display: block;
    background: rgba(21, 37, 28, .38);
    backdrop-filter: blur(2px);
    animation: nexo-backdrop-in .2s ease both;
  }

  .topbar {
    gap: 12px;
    padding-inline: clamp(14px, 2.4vw, 24px);
  }

  .breadcrumbs {
    min-width: 0;
    flex: 0 1 auto;
  }

  .top-actions {
    min-width: 0;
    flex: 0 1 auto;
    gap: 8px;
  }

  .inbox-layout {
    max-width: 100%;
  }

  .table-wrap {
    max-width: 100%;
    overflow: auto;
    overscroll-behavior-inline: contain;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
  }

  .modal-backdrop {
    align-items: center;
  }

  .modal {
    display: flex;
    flex-direction: column;
    width: min(760px, 100%);
    max-height: calc(100dvh - 36px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
    overflow: hidden;
  }

  .modal-header,
  .modal-footer {
    flex: none;
  }

  .modal-body {
    overflow-y: auto;
  }
}

@media (max-width: 760px) {
  html {
    scroll-padding-top: 64px;
  }

  .page-wrap {
    padding: clamp(20px, 5vw, 28px) 18px max(42px, env(safe-area-inset-bottom));
  }

  .page-heading {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 22px;
  }

  .page-heading > :first-child {
    flex-basis: auto;
  }

  .page-heading > .button {
    align-self: flex-start;
    width: auto;
    min-height: 44px;
    max-width: 100%;
    white-space: normal;
  }

  .panel-heading {
    flex-wrap: wrap;
    gap: 10px;
  }

  .table-toolbar .search-box {
    flex-basis: 100%;
  }

  .toolbar-actions {
    width: 100%;
  }

  .toolbar-actions .button {
    flex: 0 1 auto;
    min-height: 42px;
  }

  .modal-backdrop {
    align-items: flex-end;
    padding: 0;
  }

  .modal,
  .modal.wide {
    width: 100%;
    max-width: none;
    max-height: calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom));
    border-radius: 18px 18px 0 0;
  }

  .modal-header,
  .modal-footer {
    padding-inline: 18px;
  }

  .modal-body {
    padding-inline: 18px;
  }
}

@media (max-width: 480px) {
  .page-wrap {
    padding-inline: 15px;
  }

  .page-heading > .button {
    align-self: stretch;
    width: 100%;
  }

  .metric-grid {
    gap: 10px;
  }

  .metric-card {
    min-height: 112px;
    padding: 13px;
  }

  .metric-top {
    font-size: 10px;
    line-height: 1.35;
  }

  .metric-value {
    overflow-wrap: anywhere;
  }

  .toolbar-actions .button {
    flex: 1 1 calc(50% - 8px);
    min-width: 0;
    padding-inline: 9px;
    white-space: normal;
  }

  .inbox-list-panel,
  .inbox-chat-panel,
  .inbox-detail-panel {
    min-width: 0;
  }

  .conversation-row,
  .message-bubble,
  .help-step {
    overflow-wrap: anywhere;
  }
}

@media (prefers-reduced-motion: no-preference) {
  #pageContent > .page-heading {
    animation-duration: .3s;
  }

  #pageContent > .metric-grid > .metric-card {
    animation-duration: .32s;
  }

  #pageContent > .panel,
  #pageContent > .dashboard-grid,
  #pageContent > .inventory-banner,
  #pageContent > .report-grid,
  #pageContent > .sales-agent-panel,
  #pageContent > .task-summary,
  #pageContent > .pipeline-summary {
    animation-duration: .32s;
    animation-timing-function: cubic-bezier(.2, .75, .25, 1);
  }

  .modal-backdrop:not([hidden]) .modal {
    animation-duration: .24s;
    animation-timing-function: cubic-bezier(.2, .75, .25, 1);
  }

  .button,
  .icon-button,
  .quick-action,
  .nav-item,
  .conversation-row,
  .help-guide-link,
  .help-filter,
  .row-action {
    transition-duration: .16s;
  }
}

@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .panel:hover,
  .metric-card:hover,
  .settings-card:hover,
  .plan-card:hover,
  .agent-suggestion:hover {
    transform: translateY(-2px);
    box-shadow: var(--nexo-card-shadow-hover);
  }

  .button-primary:hover,
  .button-secondary:hover,
  .icon-button:hover {
    transform: translateY(-1px);
  }

  .nav-icon svg,
  .button svg,
  .row-action svg {
    transition: transform .18s cubic-bezier(.2, .75, .25, 1);
  }

  .nav-item:hover .nav-icon svg {
    transform: scale(1.08);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto !important;
  }

  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
}

/* Stronger surface hierarchy across the workspace. */
.task-summary-card {
  position: relative;
  min-width: 0;
  min-height: 96px;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--green);
  border-radius: 13px;
  background: var(--nexo-surface-hover);
  box-shadow: none;
}

.task-summary-card span {
  color: var(--nexo-text-secondary);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
}

.task-summary-card strong {
  flex: none;
  color: var(--nexo-text-primary);
  font: 700 27px/1 Manrope, sans-serif;
  letter-spacing: -.04em;
  font-variant-numeric: tabular-nums;
}

.task-summary-card.attention {
  border-left-color: var(--red);
}

.task-summary-card.attention strong {
  color: var(--red);
}

.section-panel .empty-state {
  min-height: 220px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 0 12px 12px;
  padding: 34px 20px;
  border-radius: 12px;
  background: var(--canvas);
}

.section-panel .empty-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  margin: 0 0 11px;
  border-radius: 12px;
  background: var(--green-pale);
  color: var(--green);
}

html[data-theme="dark"] .section-panel .empty-state {
  background: #141e19;
}

@media (max-width: 760px) {
  .task-summary-card {
    min-height: 78px;
    gap: 10px;
    padding: 14px;
  }

  .task-summary-card span {
    font-size: 12px;
  }

  .task-summary-card strong {
    font-size: 24px;
  }

  .section-panel .empty-state {
    min-height: 190px;
    margin: 0 8px 8px;
    padding: 28px 14px;
  }
}

@media (max-width: 360px) {
  .task-summary-card {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    gap: 7px;
  }
}

/* Nexo palette: azul profundo, celeste y turquesa */
:root {
  color-scheme: light;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --surface: #ffffff;
  --canvas: #f8fafc;
  --green: #22c55e;
  --green-dark: #15803d;
  --green-pale: #dcfce7;
  --gold: #f59e0b;
  --red: #ef4444;
  --blue: #0ea5e9;
  --primary: #1e40af;
  --primary-hover: #1d4ed8;
  --primary-soft: #eff6ff;
  --primary-ink: #1e40af;
  --secondary: #0ea5e9;
  --secondary-soft: #e0f2fe;
  --accent: #14b8a6;
  --accent-soft: #ccfbf1;
  --accent-line: #99f6e4;
  --success: #22c55e;
  --success-soft: #dcfce7;
  --success-ink: #15803d;
  --warning: #f59e0b;
  --warning-soft: #fef3c7;
  --warning-ink: #92400e;
  --danger: #ef4444;
  --danger-soft: #fee2e2;
  --danger-ink: #b91c1c;
  --nexo-text-primary: #0f172a;
  --nexo-text-secondary: #334155;
  --nexo-text-muted: #64748b;
  --nexo-surface-raised: #ffffff;
  --nexo-surface-hover: #f1f5f9;
  --nexo-card-shadow: 0 2px 7px rgba(15, 23, 42, .035), 0 8px 20px rgba(15, 23, 42, .035);
  --nexo-card-shadow-hover: 0 4px 12px rgba(15, 23, 42, .06), 0 14px 28px rgba(15, 23, 42, .06);
  --shadow: 0 8px 24px rgba(15, 23, 42, .06);
  --shadow-raised: 0 16px 38px rgba(15, 23, 42, .1);
}

html[data-theme="dark"] {
  color-scheme: dark;
  --ink: #e2e8f0;
  --muted: #94a3b8;
  --line: #334155;
  --surface: #111827;
  --canvas: #0b1220;
  --green: #4ade80;
  --green-dark: #22c55e;
  --green-pale: #123323;
  --gold: #fbbf24;
  --red: #f87171;
  --blue: #38bdf8;
  --primary: #3b82f6;
  --primary-hover: #60a5fa;
  --primary-soft: #172b4d;
  --primary-ink: #bfdbfe;
  --secondary: #38bdf8;
  --secondary-soft: #102e43;
  --accent: #2dd4bf;
  --accent-soft: #123a3a;
  --accent-line: #1f5b5a;
  --success: #4ade80;
  --success-soft: #123323;
  --success-ink: #86efac;
  --warning: #fbbf24;
  --warning-soft: #3a2b12;
  --warning-ink: #fcd34d;
  --danger: #f87171;
  --danger-soft: #3b1f2a;
  --danger-ink: #fca5a5;
  --nexo-text-primary: #e2e8f0;
  --nexo-text-secondary: #cbd5e1;
  --nexo-text-muted: #94a3b8;
  --nexo-surface-raised: #172033;
  --nexo-surface-hover: #1e293b;
  --nexo-card-shadow: 0 4px 16px rgba(0, 0, 0, .2);
  --nexo-card-shadow-hover: 0 10px 26px rgba(0, 0, 0, .3);
  --shadow: 0 8px 26px rgba(0, 0, 0, .24);
  --shadow-raised: 0 16px 38px rgba(0, 0, 0, .34);
}

.brand-mark { background: var(--primary); }
.brand-dot { color: var(--accent); }
.workspace-avatar, .user-avatar, .top-avatar { background: var(--primary-soft); color: var(--primary-ink); }
.nav-item::before { background: var(--primary); }
.nav-item.active { background: var(--primary-soft); color: var(--primary-ink); }
.nav-count { background: var(--secondary-soft); color: var(--primary-ink); }
.trial-link, .text-button, .inline-action { color: var(--primary); }
.icon-button:hover, .row-action:hover { color: var(--primary); }
.button-primary { background: var(--primary); color: #fff; }
.button-primary:hover { background: var(--primary-hover); }
.button-secondary:hover { border-color: color-mix(in srgb, var(--primary) 28%, var(--line)); }
.button-danger { background: var(--danger-soft); border-color: color-mix(in srgb, var(--danger) 22%, var(--line)); color: var(--danger-ink); }
.metric-icon, .quick-action span:first-child { background: var(--secondary-soft); color: var(--primary); }
.activity-mark, .agent-badge, .agent-spark { background: var(--accent-soft); color: var(--accent); }
.chart-line, .legend-dot { stroke: var(--primary); background: var(--primary); }
.chart-line2, .legend-dot.light { stroke: #7dd3fc; background: #7dd3fc; }
.status { background: var(--success-soft); color: var(--success-ink); }
.status.pending { background: var(--warning-soft); color: var(--warning-ink); }
.status.draft { background: var(--nexo-surface-hover); color: var(--nexo-text-secondary); }
.status.overdue { background: var(--danger-soft); color: var(--danger-ink); }
.status.paid { background: var(--secondary-soft); color: #0369a1; }
.form-field input:focus, .form-field select:focus, .form-field textarea:focus, .search-box input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 18%, transparent);
}
.button:focus-visible, .icon-button:focus-visible, .nav-item:focus-visible, .user-profile:focus-visible,
input:focus-visible, select:focus-visible, textarea:focus-visible, a:focus-visible {
  outline-color: var(--primary);
}
::selection { background: color-mix(in srgb, var(--primary) 18%, white); color: var(--ink); }
th { background: var(--nexo-surface-hover); }
td { border-color: var(--line); }
tbody tr:hover { background: var(--primary-soft); }
.notice, .help-guide-meta section, .help-tour-prerequisite, .help-tour-result {
  background: var(--accent-soft);
  border-color: var(--accent-line);
}
.inventory-banner { background: var(--secondary-soft); border-color: color-mix(in srgb, var(--secondary) 24%, var(--line)); }
.plan-card.featured { border-color: var(--primary); box-shadow: 0 8px 26px color-mix(in srgb, var(--primary) 12%, transparent); }
.global-search-trigger:hover { border-color: var(--accent); color: var(--primary); }
.global-search-result:hover, .global-search-result.selected { background: var(--primary-soft); }
.global-result-icon { background: var(--secondary-soft); color: var(--primary); }
.section-panel .empty-icon { background: var(--primary-soft); color: var(--primary); }
input[type="checkbox"], input[type="radio"], progress { accent-color: var(--primary); }

html[data-theme="dark"] .topbar { background: rgba(17, 24, 39, .96); }
html[data-theme="dark"] .brand-mark { background: var(--primary); }
html[data-theme="dark"] .brand-dot { color: var(--accent); }
html[data-theme="dark"] .workspace-avatar, html[data-theme="dark"] .user-avatar, html[data-theme="dark"] .top-avatar {
  background: var(--primary-soft);
  color: var(--primary-ink);
}
html[data-theme="dark"] .nav-item:hover, html[data-theme="dark"] .nav-item.active, html[data-theme="dark"] .nav-count {
  background: var(--primary-soft);
  color: var(--primary-ink);
}
html[data-theme="dark"] .metric-icon, html[data-theme="dark"] .quick-action span:first-child {
  background: var(--secondary-soft);
  color: var(--secondary);
}
html[data-theme="dark"] .activity-mark, html[data-theme="dark"] .agent-badge, html[data-theme="dark"] .agent-spark {
  background: var(--accent-soft);
  color: var(--accent);
}
html[data-theme="dark"] .button-primary { background: var(--primary); color: #fff; }
html[data-theme="dark"] .button-primary:hover { background: var(--primary-hover); }
html[data-theme="dark"] .button-danger { background: var(--danger-soft); border-color: var(--danger-soft); color: var(--danger-ink); }
html[data-theme="dark"] th { background: var(--nexo-surface-hover); }
html[data-theme="dark"] tbody tr:hover { background: var(--primary-soft); }
html[data-theme="dark"] .notice, html[data-theme="dark"] .help-guide-meta section,
html[data-theme="dark"] .help-tour-prerequisite, html[data-theme="dark"] .help-tour-result {
  background: var(--accent-soft);
  border-color: var(--accent-line);
  color: var(--nexo-text-secondary);
}
html[data-theme="dark"] .inventory-banner { background: var(--secondary-soft); border-color: var(--line); }
html[data-theme="dark"] .status { background: var(--success-soft); color: var(--success-ink); }
html[data-theme="dark"] .status.pending { background: var(--warning-soft); color: var(--warning-ink); }
html[data-theme="dark"] .status.draft { background: var(--nexo-surface-hover); color: var(--nexo-text-secondary); }
html[data-theme="dark"] .status.overdue { background: var(--danger-soft); color: var(--danger-ink); }
html[data-theme="dark"] .status.paid { background: var(--secondary-soft); color: #7dd3fc; }
html[data-theme="dark"] .chart-line2, html[data-theme="dark"] .legend-dot.light { stroke: #2563eb; background: #2563eb; }
html[data-theme="dark"] .global-search-result:hover, html[data-theme="dark"] .global-search-result.selected { background: var(--primary-soft); }
html[data-theme="dark"] .global-result-icon { background: var(--secondary-soft); color: var(--secondary); }
html[data-theme="dark"] .section-panel .empty-state { background: var(--nexo-surface-hover); }
.nav-item.active::before { background: var(--primary); }
html[data-theme="dark"] .nav-item.active::before { background: var(--primary); }
html[data-theme="dark"] .workspace,
html[data-theme="dark"] .trial-card {
  background: var(--nexo-surface-hover);
  border-color: var(--line);
}
html[data-theme="dark"] .chart-empty {
  background: transparent;
  border-color: transparent;
  color: var(--nexo-text-secondary);
}
html[data-theme="dark"] .global-search-trigger:hover {
  background: var(--nexo-surface-hover);
  border-color: var(--primary);
  color: var(--primary-ink);
}
html[data-theme="dark"] .contextual-help-trigger:hover {
  background: var(--primary-soft);
  color: var(--primary-ink);
}
html[data-theme="dark"] .help-tour-progress { background: var(--line); }
html[data-theme="dark"] .help-tour-icon,
html[data-theme="dark"] .help-tour-steps li span {
  background: var(--primary-soft);
  color: var(--primary-ink);
}
html[data-theme="dark"] .help-tour-steps li {
  background: var(--nexo-surface-hover);
  border-color: var(--line);
  color: var(--nexo-text-secondary);
}
html[data-theme="dark"] .help-related-link {
  background: var(--surface);
  border-color: var(--line);
  color: var(--nexo-text-secondary);
}
html[data-theme="dark"] .help-related-link:hover {
  background: var(--primary-soft);
  border-color: var(--primary);
  color: var(--primary-ink);
}

/* Centro de ayuda: demos guiadas y seguras, independientes de los datos reales. */
.help-demo {
  --demo-ink: var(--nexo-text-primary);
  --demo-muted: var(--nexo-text-secondary);
  --demo-line: var(--line);
  margin: 24px 0 30px;
  padding: clamp(16px, 2.4vw, 24px);
  border: 1px solid var(--demo-line);
  border-radius: 18px;
  background: linear-gradient(140deg, var(--surface), var(--nexo-surface-hover));
  box-shadow: var(--nexo-card-shadow);
  color: var(--demo-ink);
  overflow: hidden;
}
.help-demo-header,
.help-demo-controls,
.help-demo-toolbar,
.help-demo-screen-heading,
.help-demo-stepbar,
.help-demo-timeline,
.help-demo-brand,
.help-demo-nav-item,
.help-demo-chat-contact,
.help-demo-table-row,
.help-demo-metrics article,
.help-demo-field {
  display: flex;
  align-items: center;
}
.help-demo-header { justify-content: space-between; gap: 18px; margin-bottom: 17px; }
.help-demo-header h3 { margin: 4px 0 2px; font-size: clamp(18px, 2vw, 22px); letter-spacing: -.025em; }
.help-demo-header p { margin: 0; color: var(--demo-muted); font-size: 13px; }
.help-demo-kicker,
.help-demo-step-count { color: var(--green); font-size: 10px; font-weight: 800; letter-spacing: .12em; }
.help-demo-controls { flex: 0 0 auto; gap: 8px; }
.help-demo-controls .button { min-height: 38px; }
.help-demo-controls button:disabled { cursor: not-allowed; opacity: .45; }
.help-demo-play { min-width: 148px; }
.help-demo-window { position: relative; border: 1px solid var(--demo-line); border-radius: 13px; background: var(--surface); overflow: hidden; }
.help-demo-browserbar { height: 36px; padding: 0 12px; display: flex; align-items: center; justify-content: center; gap: 10px; border-bottom: 1px solid var(--demo-line); background: var(--nexo-surface-hover); color: var(--demo-muted); font-size: 11px; }
.help-demo-browserbar b { color: var(--green); }
.help-demo-browserbar small { position: absolute; right: 12px; padding: 3px 7px; border: 1px solid var(--demo-line); border-radius: 999px; color: var(--demo-muted); font-size: 8px; font-weight: 800; letter-spacing: .09em; }
.help-demo-window-dots { position: absolute; left: 12px; display: flex; gap: 5px; }
.help-demo-window-dots i { width: 7px; height: 7px; border-radius: 50%; background: #e67365; }
.help-demo-window-dots i:nth-child(2) { background: #e5b453; }
.help-demo-window-dots i:nth-child(3) { background: #68b987; }
.help-demo-app { min-height: 244px; position: relative; display: grid; grid-template-columns: 150px minmax(0, 1fr); }
.help-demo-sidebar { padding: 15px 11px; border-right: 1px solid var(--demo-line); background: var(--nexo-surface-hover); }
.help-demo-brand { gap: 6px; margin: 0 0 18px 3px; font-size: 13px; font-weight: 800; }
.help-demo-brand i { width: 22px; height: 22px; display: grid; place-items: center; border-radius: 7px; background: var(--green); color: #fff; font-style: normal; }
.help-demo-brand span { color: var(--green); }
.help-demo-nav-label { display: block; margin: 0 5px 7px; color: var(--demo-muted); font-size: 8px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.help-demo-nav-item { gap: 8px; min-height: 29px; margin: 2px 0; padding: 5px 7px; border-radius: 7px; color: var(--demo-muted); font-size: 10px; transition: background .2s ease, color .2s ease, transform .2s ease; }
.help-demo-nav-item svg { width: 13px; height: 13px; flex: 0 0 13px; }
.help-demo-nav-item.active { background: color-mix(in srgb, var(--green) 13%, transparent); color: var(--green); font-weight: 750; }
.help-demo-main { min-width: 0; padding: 12px 15px 15px; }
.help-demo-toolbar { justify-content: space-between; gap: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--demo-line); color: var(--demo-muted); font-size: 9px; }
.help-demo-toolbar b { padding: 0 4px; color: var(--green); }
.help-demo-search { min-width: 115px; padding: 5px 8px; border: 1px solid var(--demo-line); border-radius: 6px; color: var(--demo-muted); background: var(--surface); }
.help-demo-screen-heading { justify-content: space-between; gap: 12px; margin: 12px 0 10px; }
.help-demo-screen-heading > div { display: grid; gap: 2px; }
.help-demo-screen-heading small { color: var(--demo-muted); font-size: 8px; text-transform: uppercase; letter-spacing: .08em; }
.help-demo-screen-heading strong { font-size: 14px; }
.help-demo-action { padding: 6px 9px; border-radius: 7px; background: var(--green); color: #fff; font-size: 9px; font-weight: 700; white-space: nowrap; }
.help-demo-art { min-height: 142px; }
.help-demo-window [data-demo-target] { transition: outline-color .2s ease, box-shadow .2s ease, transform .2s ease, background-color .2s ease; }
.help-demo-window[data-focus="navigation"] .help-demo-nav-item[data-demo-target="nav"],
.help-demo-window[data-kind="help"][data-focus="navigation"] .help-demo-help-content [data-demo-target="navigation"],
.help-demo-window:not([data-kind="inbox"])[data-focus="search"] .help-demo-toolbar [data-demo-target="search"],
.help-demo-window[data-kind="help"][data-focus="search"] .help-demo-help-toolbar [data-demo-target="search"],
.help-demo-window[data-kind="inbox"][data-focus="search"] .help-demo-chat-list [data-demo-target="search"],
.help-demo-window[data-focus="action"] [data-demo-target="action"],
.help-demo-window[data-focus="form"] [data-demo-target="form"],
.help-demo-window[data-focus="result"] [data-demo-target="result"],
.help-demo-window[data-focus="report-card"] [data-demo-target="report-card"],
.help-demo-window[data-focus="table-search"] [data-demo-target="table-search"],
.help-demo-window[data-focus="export"] [data-demo-target="export"],
.help-demo-window[data-focus="delete"] [data-demo-target="delete"],
.help-demo-window[data-focus="edit"] [data-demo-target="edit"],
.help-demo-window[data-focus="import"] [data-demo-target="import"],
.help-demo-window[data-focus="import-result"] [data-demo-target="import-result"],
.help-demo-window[data-focus="item"] [data-demo-target="item"],
.help-demo-window[data-focus="totals"] [data-demo-target="totals"],
.help-demo-window[data-focus="print"] [data-demo-target="print"],
.help-demo-window[data-focus="status"] [data-demo-target="status"],
.help-demo-window[data-focus="create"] [data-demo-target="create"],
.help-demo-window[data-focus="stock"] [data-demo-target="stock"],
.help-demo-window[data-focus="history"] [data-demo-target="history"],
.help-demo-window[data-focus="reserve"] [data-demo-target="reserve"],
.help-demo-window[data-focus="deliver"] [data-demo-target="deliver"],
.help-demo-window[data-focus="cancel"] [data-demo-target="cancel"],
.help-demo-window[data-focus="confirm"] [data-demo-target="confirm"],
.help-demo-window[data-focus="receive"] [data-demo-target="receive"],
.help-demo-window[data-focus="payment"] [data-demo-target="payment"],
.help-demo-window[data-focus="balances"] [data-demo-target="balances"],
.help-demo-window[data-focus="documents"] [data-demo-target="documents"],
.help-demo-window[data-focus="stage"] [data-demo-target="stage"],
.help-demo-window[data-focus="agent"] [data-demo-target="agent"],
.help-demo-window[data-focus="followup"] [data-demo-target="followup"],
.help-demo-window[data-focus="compare"] [data-demo-target="compare"],
.help-demo-window[data-focus="plan"] [data-demo-target="plan"],
.help-demo-window[data-focus="billing"] [data-demo-target="billing"],
.help-demo-window[data-focus="company"] [data-demo-target="company"],
.help-demo-window[data-focus="security"] [data-demo-target="security"],
.help-demo-window[data-focus="channels"] [data-demo-target="channels"],
.help-demo-window[data-focus="team"] [data-demo-target="team"],
.help-demo-window[data-focus="backup"] [data-demo-target="backup"],
.help-demo-window[data-focus="linked-contact"] [data-demo-target="linked-contact"],
.help-demo-window[data-focus="complete"] [data-demo-target="complete"],
.help-demo-window[data-focus="progress"] [data-demo-target="progress"],
.help-demo-window[data-focus="scope"] [data-demo-target="scope"],
.help-demo-window[data-focus="download"] [data-demo-target="download"],
.help-demo-window[data-focus="validation"] [data-demo-target="validation"] {
  outline: 2px solid color-mix(in srgb, var(--green) 72%, transparent);
  outline-offset: 2px;
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--green) 14%, transparent);
  animation: help-demo-emphasis 1.1s ease-in-out 1;
  position: relative;
  z-index: 1;
}
.help-demo-cursor { position: absolute; z-index: 3; top: 64%; left: 67%; width: 22px; height: 25px; color: var(--green); filter: drop-shadow(0 2px 2px rgba(0,0,0,.25)); pointer-events: none; transition: transform .65s cubic-bezier(.2,.8,.2,1), top .65s ease, left .65s ease; }
.help-demo-cursor svg { width: 100%; height: 100%; fill: currentColor; stroke: #fff; stroke-width: 1.4px; }
.help-demo-window[data-focus="navigation"] .help-demo-cursor { top: 28%; left: 12%; }
.help-demo-window[data-kind="help"][data-focus="navigation"] .help-demo-cursor { top: 68%; left: 18%; }
.help-demo-window[data-kind="help"][data-focus="search"] .help-demo-cursor { top: 51%; left: 37%; }
.help-demo-window:not([data-kind="inbox"])[data-focus="search"] .help-demo-cursor { top: 13%; left: 83%; }
.help-demo-window[data-kind="inbox"][data-focus="search"] .help-demo-cursor { top: 50%; left: 13%; }
.help-demo-window[data-focus="action"] .help-demo-cursor { top: 33%; left: 91%; }
.help-demo-window[data-focus="form"] .help-demo-cursor { top: 69%; left: 69%; }
.help-demo-window[data-focus="result"] .help-demo-cursor { top: 73%; left: 86%; }
.help-demo-window[data-focus="table-search"] .help-demo-cursor { top: 57%; left: 22%; }
.help-demo-window[data-focus="export"] .help-demo-cursor { top: 57%; left: 85%; }
.help-demo-window[data-focus="delete"] .help-demo-cursor { top: 78%; left: 86%; }
.help-demo-window[data-focus="import"] .help-demo-cursor { top: 64%; left: 74%; }
.help-demo-window[data-focus="import-result"] .help-demo-cursor { top: 78%; left: 65%; }
.help-demo-window[data-focus="item"] .help-demo-cursor { top: 61%; left: 55%; }
.help-demo-window[data-focus="totals"] .help-demo-cursor { top: 77%; left: 76%; }
.help-demo-window[data-focus="print"] .help-demo-cursor { top: 86%; left: 75%; }
.help-demo-window[data-focus="status"] .help-demo-cursor { top: 86%; left: 90%; }
.help-demo-window[data-focus="create"] .help-demo-cursor { top: 86%; left: 56%; }
.help-demo-window[data-focus="edit"] .help-demo-cursor { top: 78%; left: 83%; }
.help-demo-window[data-focus="stock"] .help-demo-cursor { top: 51%; left: 70%; }
.help-demo-window[data-focus="history"] .help-demo-cursor { top: 73%; left: 83%; }
.help-demo-window[data-focus="reserve"] .help-demo-cursor,
.help-demo-window[data-focus="confirm"] .help-demo-cursor { top: 76%; left: 31%; }
.help-demo-window[data-focus="deliver"] .help-demo-cursor,
.help-demo-window[data-focus="receive"] .help-demo-cursor { top: 76%; left: 59%; }
.help-demo-window[data-focus="cancel"] .help-demo-cursor,
.help-demo-window[data-focus="payment"] .help-demo-cursor { top: 76%; left: 86%; }
.help-demo-window[data-focus="balances"] .help-demo-cursor { top: 33%; left: 22%; }
.help-demo-window[data-focus="documents"] .help-demo-cursor { top: 78%; left: 78%; }
.help-demo-window[data-focus="stage"] .help-demo-cursor { top: 57%; left: 81%; }
.help-demo-window[data-focus="agent"] .help-demo-cursor { top: 84%; left: 45%; }
.help-demo-window[data-focus="followup"] .help-demo-cursor { top: 88%; left: 70%; }
.help-demo-window[data-focus="compare"] .help-demo-cursor { top: 55%; left: 50%; }
.help-demo-window[data-focus="plan"] .help-demo-cursor { top: 60%; left: 50%; }
.help-demo-window[data-focus="billing"] .help-demo-cursor { top: 88%; left: 50%; }
.help-demo-window[data-focus="company"] .help-demo-cursor,
.help-demo-window[data-focus="security"] .help-demo-cursor,
.help-demo-window[data-focus="channels"] .help-demo-cursor,
.help-demo-window[data-focus="backup"] .help-demo-cursor { top: 55%; left: 38%; }
.help-demo-window[data-kind="inbox"][data-focus="channels"] .help-demo-cursor { top: 82%; left: 88%; }
.help-demo-window[data-focus="team"] .help-demo-cursor { top: 79%; left: 77%; }
.help-demo-window[data-focus="linked-contact"] .help-demo-cursor { top: 54%; left: 88%; }
.help-demo-window[data-focus="complete"] .help-demo-cursor { top: 74%; left: 87%; }
.help-demo-window[data-focus="progress"] .help-demo-cursor { top: 73%; left: 66%; }
.help-demo-window[data-focus="report-card"] .help-demo-cursor { top: 38%; left: 30%; }
.help-demo-window[data-focus="scope"] .help-demo-cursor { top: 54%; left: 30%; }
.help-demo-window[data-focus="download"] .help-demo-cursor { top: 69%; left: 30%; }
.help-demo-window[data-focus="validation"] .help-demo-cursor { top: 85%; left: 30%; }
.help-demo-window[data-focus="source"] [data-demo-target="source"] { outline: 2px solid color-mix(in srgb, var(--green) 72%, transparent); outline-offset: 2px; box-shadow: 0 0 0 5px color-mix(in srgb, var(--green) 14%, transparent); animation: help-demo-emphasis 1.1s ease-in-out 1; position: relative; z-index: 1; }
.help-demo-window[data-focus="source"] .help-demo-cursor { top: 90%; left: 34%; }
.help-demo-window[data-kind="reports"][data-focus="action"] .help-demo-cursor { top: 28%; left: 88%; }
.help-demo-stepbar { align-items: flex-start; justify-content: space-between; gap: 20px; padding: 14px 2px 0; }
.help-demo-stepbar > div:first-child { max-width: 78%; }
.help-demo-stepbar p { min-height: 22px; margin: 4px 0 0; color: var(--demo-ink); font-size: 13px; line-height: 1.5; }
.help-demo-progress { width: clamp(72px, 16%, 140px); height: 6px; margin-top: 7px; border-radius: 99px; background: var(--demo-line); overflow: hidden; }
.help-demo-progress > span { display: block; height: 100%; border-radius: inherit; background: var(--green); transition: width .3s ease; }
.help-demo-timeline { gap: 6px; padding: 5px 0 0; flex-wrap: wrap; }
.help-demo-dot { width: 25px; height: 25px; display: grid; place-items: center; border: 1px solid var(--demo-line); border-radius: 50%; background: var(--surface); color: var(--demo-muted); font-size: 10px; cursor: pointer; transition: transform .18s ease, background .18s ease, color .18s ease; }
.help-demo-dot:hover { transform: translateY(-2px); border-color: var(--green); }
.help-demo-dot.active { border-color: var(--green); background: var(--green); color: #fff; font-weight: 800; }
.help-demo-disclaimer { margin: 10px 0 0; color: var(--demo-muted); font-size: 10px; }
.help-demo-chat { min-height: 142px; display: grid; grid-template-columns: minmax(115px, .72fr) minmax(0, 1.5fr) minmax(110px, .75fr); border: 1px solid var(--demo-line); border-radius: 9px; overflow: hidden; font-size: 9px; }
.help-demo-chat-list { padding: 9px; border-right: 1px solid var(--demo-line); background: var(--nexo-surface-hover); }
.help-demo-chat-list > span { font-size: 10px; font-weight: 800; }
.help-demo-chat-contact { gap: 6px; margin-top: 9px; padding: 6px; border-radius: 6px; }
.help-demo-chat-contact.active { background: color-mix(in srgb, var(--green) 12%, transparent); }
.help-demo-chat-contact i { width: 18px; height: 18px; border-radius: 50%; background: var(--green); }
.help-demo-chat-contact span { display: grid; min-width: 0; }
.help-demo-chat-contact strong { font-size: 8px; }
.help-demo-chat-contact small { overflow: hidden; color: var(--demo-muted); text-overflow: ellipsis; white-space: nowrap; }
.help-demo-messages { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 8px 10px 30px; }
.help-demo-date { align-self: center; color: var(--demo-muted); font-size: 8px; }
.help-demo-bubble { max-width: 80%; padding: 6px 9px; border-radius: 9px; background: var(--nexo-surface-hover); }
.help-demo-bubble.outgoing { align-self: flex-end; background: color-mix(in srgb, var(--green) 18%, var(--surface)); }
.help-demo-composer { position: absolute; right: 8px; bottom: 7px; left: 8px; display: flex; justify-content: space-between; padding: 5px 7px; border: 1px solid var(--demo-line); border-radius: 6px; color: var(--demo-muted); }
.help-demo-composer b { color: var(--green); }
.help-demo-chat-details { display: grid; align-content: start; gap: 6px; padding: 9px; border-left: 1px solid var(--demo-line); background: var(--nexo-surface-hover); }
.help-demo-chat-details strong { font-size: 9px; }
.help-demo-chat-details span { font-weight: 750; }
.help-demo-chat-details small { color: var(--demo-muted); }
.help-demo-chat-details b { margin-top: 3px; padding: 5px; border-radius: 5px; background: var(--surface); color: var(--primary-ink); font-size: 8px; }
.help-demo-pipeline { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; min-height: 130px; }
.help-demo-lane { min-width: 0; padding: 7px; border: 1px solid var(--demo-line); border-radius: 8px; background: var(--nexo-surface-hover); }
.help-demo-lane > span { display: block; margin-bottom: 7px; color: var(--demo-muted); font-size: 8px; font-weight: 750; }
.help-demo-deal { display: grid; gap: 4px; padding: 8px; border: 1px solid var(--demo-line); border-radius: 7px; background: var(--surface); font-size: 8px; }
.help-demo-deal strong { font-size: 9px; }
.help-demo-deal small,.help-demo-deal b { color: var(--demo-muted); font-size: 8px; }
.help-demo-deal.active { border-color: color-mix(in srgb, var(--green) 50%, var(--demo-line)); }
.help-demo-lane-empty { color: var(--demo-muted); font-size: 8px; }
.help-demo-dashboard { display: grid; gap: 8px; }
.help-demo-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
.help-demo-metrics article { align-items: flex-start; flex-direction: column; gap: 3px; padding: 7px 9px; border: 1px solid var(--demo-line); border-radius: 7px; }
.help-demo-metrics span,.help-demo-metrics small { color: var(--demo-muted); font-size: 8px; }
.help-demo-metrics strong { font-size: 14px; }
.help-demo-chart { position: relative; height: 58px; border-bottom: 1px solid var(--demo-line); background: repeating-linear-gradient(to bottom, transparent 0 18px, color-mix(in srgb, var(--demo-line) 70%, transparent) 19px 20px); }
.help-demo-chart-title { margin-bottom: 5px; font-size: 8px; }
.help-demo-bars { position: absolute; inset: 17px 5% 0; display: flex; align-items: end; justify-content: space-around; gap: 5%; }
.help-demo-bars i { width: 8%; height: 35%; border-radius: 3px 3px 0 0; background: color-mix(in srgb, var(--green) 72%, var(--surface)); }
.help-demo-bars i:nth-child(2n) { height: 56%; }
.help-demo-bars i:nth-child(3n) { height: 82%; }
.help-demo-bars i:nth-child(4n) { height: 68%; }
.help-demo-plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.help-demo-plans article { min-height: 100px; display: grid; align-content: start; gap: 7px; padding: 10px; border: 1px solid var(--demo-line); border-radius: 8px; }
.help-demo-plans article.featured { border-color: var(--green); box-shadow: inset 0 2px var(--green); }
.help-demo-plans strong { font-size: 10px; }
.help-demo-plans b { font-size: 12px; }
.help-demo-plans small { color: var(--demo-muted); font-size: 8px; }
.help-demo-plan-note { grid-column: 1 / -1; padding: 7px 9px; border-radius: 7px; background: color-mix(in srgb, var(--warning) 12%, var(--surface)); color: var(--demo-muted); font-size: 8px; }
.help-demo-settings { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.help-demo-settings .help-demo-form { display: grid; gap: 5px; }
.help-demo-settings .help-demo-table { align-self: start; margin-top: 0; }
.help-demo-order,.help-demo-purchase { display: grid; gap: 7px; }
.help-demo-order-origin,.help-demo-order-state article,.help-demo-order-actions b,.help-demo-inventory-row,.help-demo-inventory-tools > * { padding: 7px 9px; border: 1px solid var(--demo-line); border-radius: 7px; background: var(--surface); }
.help-demo-order-origin { display: grid; grid-template-columns: 1fr auto; gap: 3px 10px; font-size: 8px; }
.help-demo-order-origin span { color: var(--demo-muted); }
.help-demo-order-origin strong { grid-column: 1; }
.help-demo-order-origin b { grid-column: 2; grid-row: 1 / span 2; align-self: center; color: var(--primary-ink); }
.help-demo-order-state { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.help-demo-order-state article { display: grid; gap: 4px; font-size: 8px; }
.help-demo-order-state small { color: var(--demo-muted); }
.help-demo-order-actions,.help-demo-inventory-tools { display: flex; flex-wrap: wrap; gap: 6px; }
.help-demo-order-actions b,.help-demo-inventory-tools > * { color: var(--primary-ink); font-size: 8px; }
.help-demo-inventory { display: grid; gap: 8px; }
.help-demo-inventory-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 8px; }
.help-demo-inventory-row > span { display: grid; gap: 3px; min-width: 0; }
.help-demo-inventory-row small { color: var(--demo-muted); }
.help-demo-inventory-row b { white-space: nowrap; color: var(--green); }
.help-demo-inventory-tools { justify-content: space-between; }
.help-demo-inventory-tools > * { background: var(--nexo-surface-hover); }
.help-demo-help { display: grid; gap: 8px; }
.help-demo-help-toolbar { display: flex; justify-content: space-between; gap: 8px; font-size: 8px; }
.help-demo-help-toolbar > * { padding: 6px 8px; border: 1px solid var(--demo-line); border-radius: 6px; }
.help-demo-help-toolbar span { flex: 1; color: var(--demo-muted); }
.help-demo-help-content { display: grid; grid-template-columns: minmax(90px, .65fr) 1.5fr; gap: 8px; }
.help-demo-help-content nav,.help-demo-help-content article { display: grid; align-content: start; gap: 6px; padding: 8px; border: 1px solid var(--demo-line); border-radius: 7px; font-size: 8px; }
.help-demo-help-content nav span { color: var(--demo-muted); }
.help-demo-help-content nav span.active { color: var(--green); font-weight: 800; }
.help-demo-help-content article > span,.help-demo-help-progress { color: var(--demo-muted); }
.help-demo-help-content article > strong { font-size: 10px; }
.help-demo-help-content article p { margin: 0; line-height: 1.6; }
.help-demo-help-progress { display: flex; align-items: center; gap: 6px; }
.help-demo-help-progress i { width: 22px; height: 6px; border-radius: 99px; background: var(--green); }
.help-demo-help-content article > b { color: var(--primary-ink); }
.help-demo-record { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.help-demo-record-tools { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; color: var(--demo-muted); font-size: 8px; }
.help-demo-record-tools .help-demo-search { display: inline-block; min-width: 0; padding: 5px 7px; border: 1px solid var(--demo-line); border-radius: 5px; background: var(--surface); font-size: 8px; }
.help-demo-record-tools > b { color: var(--primary-ink); font-size: 8px; white-space: nowrap; }
.help-demo-followup-source { grid-column: 1 / -1; display: flex; justify-content: space-between; gap: 8px; padding: 7px 9px; border: 1px dashed var(--demo-line); border-radius: 7px; font-size: 8px; }
.help-demo-followup-source span { color: var(--demo-muted); }
.help-demo-provider { grid-column: 1 / -1; display: flex; align-items: center; gap: 5px; color: var(--demo-muted); font-size: 8px; }
.help-demo-provider input { width: 11px; height: 11px; margin: 0; accent-color: var(--green); }
.help-demo-import,.help-demo-import-result { grid-column: 1 / -1; display: grid; gap: 4px; padding: 7px 9px; border: 1px solid var(--demo-line); border-radius: 7px; background: var(--surface); font-size: 8px; }
.help-demo-import span,.help-demo-import-result span { color: var(--demo-muted); }
.help-demo-import small { color: var(--primary-ink); }
.help-demo-import-result { grid-template-columns: 1fr auto; background: var(--nexo-surface-hover); }
.help-demo-document { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.help-demo-document-item,.help-demo-document-totals,.help-demo-document-actions { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 7px; padding: 7px 9px; border: 1px solid var(--demo-line); border-radius: 7px; background: var(--surface); font-size: 8px; }
.help-demo-document-item small { color: var(--demo-muted); }
.help-demo-document-totals { justify-content: flex-end; color: var(--demo-muted); }
.help-demo-document-totals strong { color: var(--demo-ink); }
.help-demo-document-actions { flex-wrap: wrap; }
.help-demo-document-actions b { padding: 5px 7px; border-radius: 5px; background: var(--nexo-surface-hover); color: var(--primary-ink); font-size: 7px; }
.help-demo-document-actions b:first-child { background: var(--green); color: #fff; }
.help-demo-field { min-width: 0; align-items: flex-start; flex-direction: column; gap: 3px; padding: 7px 9px; border: 1px solid var(--demo-line); border-radius: 7px; }
.help-demo-field span { color: var(--demo-muted); font-size: 8px; }
.help-demo-field strong { overflow: hidden; max-width: 100%; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.help-demo-table { margin-top: 8px; border: 1px solid var(--demo-line); border-radius: 7px; overflow: hidden; font-size: 8px; }
.help-demo-table-head,.help-demo-table-row { display: grid; grid-template-columns: 1.4fr .8fr .8fr; gap: 8px; align-items: center; padding: 7px 8px; }
.help-demo-table-head { background: var(--nexo-surface-hover); color: var(--demo-muted); font-weight: 750; }
.help-demo-table-row { grid-template-columns: 1.4fr .8fr .8fr; border-top: 1px solid var(--demo-line); }
.help-demo-table-row > span { display: flex; align-items: center; gap: 5px; min-width: 0; }
.help-demo-table-row i svg { width: 12px; height: 12px; color: var(--green); }
.help-demo-table-row strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.help-demo-table-row b { color: var(--green); font-size: 8px; }
.help-demo-table-row small { color: var(--demo-muted); }
@keyframes help-demo-emphasis { 0%,100% { transform: scale(1); } 45% { transform: scale(1.025); } }
.help-demo.is-playing .help-demo-cursor { animation: help-demo-cursor-tap 1.4s ease-in-out infinite; }
@keyframes help-demo-cursor-tap { 0%,100% { margin-top: 0; } 50% { margin-top: 4px; } }
html[data-theme="dark"] .help-demo { background: linear-gradient(140deg, var(--surface), var(--nexo-surface-hover)); }
html[data-theme="dark"] .help-demo-window { background: var(--surface); }
@media (max-width: 720px) {
  .help-demo { margin: 18px 0 24px; padding: 15px; }
  .help-demo-header { align-items: flex-start; flex-direction: column; }
  .help-demo-controls { width: 100%; }
  .help-demo-controls .help-demo-play { flex: 1; }
  .help-demo-app { grid-template-columns: 1fr; min-height: 215px; }
  .help-demo-sidebar { display: none; }
  .help-demo-main { padding: 10px; }
  .help-demo-cursor { display: none; }
  .help-demo-stepbar { flex-direction: column; gap: 8px; }
  .help-demo-stepbar > div:first-child { max-width: 100%; }
  .help-demo-progress { width: 100%; margin-top: 0; }
}
@media (max-width: 420px) {
  .help-demo-controls { gap: 5px; }
  .help-demo-controls .button { padding-inline: 9px; }
  .help-demo-play { min-width: 0; }
  .help-demo-browserbar { justify-content: flex-start; padding-left: 73px; }
  .help-demo-browserbar small { display: none; }
  .help-demo-toolbar { font-size: 8px; }
  .help-demo-chat { grid-template-columns: 88px minmax(0, 1fr); }
  .help-demo-chat-details { grid-column: 1 / -1; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--demo-line); border-left: 0; }
  .help-demo-chat-details strong,.help-demo-chat-details b { grid-column: 1 / -1; }
  .help-demo-settings { grid-template-columns: 1fr; }
  .help-demo-inventory-row { flex-wrap: wrap; }
  .help-demo-inventory-row > span { flex: 1 1 100%; }
  .help-demo-help-toolbar { flex-direction: column; }
  .help-demo-chat-contact { padding-inline: 2px; }
  .help-demo-pipeline,.help-demo-plans { gap: 5px; }
  .help-demo-lane { padding: 5px; }
  .help-demo-deal { padding: 6px; }
  .help-demo-table-head,.help-demo-table-row { grid-template-columns: 1.4fr .8fr; }
  .help-demo-table-head span:last-child,.help-demo-table-row small { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .help-demo *, .help-demo *::before, .help-demo *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}



.help-demo-pipeline-scene { display: grid; gap: 7px; }
.help-demo-agent-queue { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 8px; border: 1px solid var(--demo-line); border-radius: 7px; background: var(--surface); font-size: 8px; }
.help-demo-agent-queue strong { font-size: 8px; }
.help-demo-agent-queue span { color: var(--demo-muted); }
.help-demo-settings-action { display: inline-block; margin-top: 8px; padding: 5px 7px; border: 1px solid var(--demo-line); border-radius: 6px; background: var(--surface); color: var(--primary-ink); font-size: 8px; }
.help-demo-chat-list > strong { display: block; margin-bottom: 6px; font-size: 10px; }
.help-demo-chat-list .help-demo-search { display: block; min-width: 0; margin-top: 5px; padding: 5px; font-size: 8px; }
.help-demo-chat-filters { margin-top: 7px; color: var(--demo-muted); font-size: 7px; white-space: nowrap; }
.help-demo-pipeline { grid-template-columns: repeat(6, minmax(76px, 1fr)); overflow-x: auto; }
.help-demo-lane { min-height: 128px; }
.help-demo-deal > span { color: var(--demo-muted); font-size: 7px; }
.help-demo-period { display: inline-block; margin-left: 7px; padding: 3px 6px; border: 1px solid var(--demo-line); border-radius: 5px; background: var(--surface); }
.help-demo-finance { display: grid; gap: 8px; }
.help-demo-finance .help-demo-metrics article { min-height: 52px; }
.help-demo-finance-tools { display: flex; justify-content: space-between; gap: 8px; color: var(--demo-muted); font-size: 8px; }
.help-demo-finance-tools b { color: var(--primary-ink); }
.help-demo-payment-form { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; align-items: center; padding: 8px; border: 1px solid var(--demo-line); border-radius: 7px; background: var(--surface); font-size: 8px; }
.help-demo-payment-form > span { min-width: 0; overflow: hidden; color: var(--demo-muted); text-overflow: ellipsis; white-space: nowrap; }
.help-demo-payment-form > b { padding: 5px 7px; border-radius: 5px; background: var(--green); color: #fff; text-align: center; }
.help-demo-finance .help-demo-table { margin-top: 0; }
.help-demo-reports { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.help-demo-reports article { min-width: 0; display: grid; align-content: start; gap: 5px; padding: 9px; border: 1px solid var(--demo-line); border-radius: 8px; background: var(--surface); }
.help-demo-reports article > span,.help-demo-reports small { color: var(--demo-muted); font-size: 8px; }
.help-demo-reports strong { font-size: 13px; }
.help-demo-reports b { justify-self: start; margin-top: 3px; padding: 5px 6px; border-radius: 5px; background: var(--nexo-surface-hover); color: var(--primary-ink); font-size: 7px; white-space: nowrap; }
.help-demo-report-validation { grid-column: 1 / -1; display: flex; justify-content: space-between; gap: 8px; padding: 7px 9px; border-radius: 7px; background: var(--nexo-surface-hover); font-size: 8px; }
.help-demo-report-validation span { color: var(--demo-muted); }
.help-demo-window[data-kind="inbox"] .help-demo-toolbar [data-demo-target="search"] { opacity: .65; }
@media (max-width: 720px) {
  .help-demo-pipeline { grid-template-columns: repeat(6, minmax(76px, 1fr)); }
  .help-demo-payment-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .help-demo-reports { gap: 5px; }
  .help-demo-reports article { padding: 6px; }
}

/* Notificaciones del espacio de trabajo: teclado, móvil y tema oscuro. */
.notification-anchor { position: relative; display: grid; place-items: center; }
.notification-button { position: relative; flex: 0 0 auto; }
.notification-count { position: absolute; top: 1px; right: 0; min-width: 17px; height: 17px; display: grid; place-items: center; padding: 0 4px; border: 2px solid var(--surface); border-radius: 999px; background: var(--red); color: #fff; font-size: 9px; font-weight: 800; line-height: 1; }
.notification-count[hidden] { display: none; }
.notification-panel { position: absolute; z-index: 150; top: calc(100% + 10px); right: 0; width: min(390px, calc(100vw - 24px)); max-height: min(72vh, 620px); display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); color: var(--nexo-text-primary); box-shadow: 0 18px 50px rgba(15, 23, 42, .2); animation: notification-panel-in .16s ease-out both; }
.notification-panel[hidden] { display: none; }
@keyframes notification-panel-in { from { opacity: 0; transform: translateY(-5px) scale(.99); } to { opacity: 1; transform: translateY(0) scale(1); } }
.notification-panel-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding: 17px 18px 13px; border-bottom: 1px solid var(--line); }
.notification-panel-header > div { display: grid; gap: 4px; }
.notification-panel-header strong { font-size: 15px; }
.notification-panel-header span,.notification-panel-tools span { color: var(--nexo-text-secondary); font-size: 11px; }
.notification-close { width: 30px; height: 30px; border: 1px solid var(--line); border-radius: 8px; background: transparent; color: var(--nexo-text-secondary); font-size: 20px; line-height: 1; }
.notification-close:hover { border-color: var(--primary); color: var(--primary-ink); }
.notification-panel-tools { min-height: 44px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 18px; border-bottom: 1px solid var(--line); }
.notification-panel-tools button { border: 0; background: transparent; color: var(--primary-ink); font-size: 11px; font-weight: 700; }
.notification-panel-tools button:hover { text-decoration: underline; }
.notification-panel-tools button:disabled { opacity: .55; cursor: wait; }
.notification-list { overflow-y: auto; overscroll-behavior: contain; }
.notification-item { width: 100%; display: grid; grid-template-columns: 10px minmax(0, 1fr); align-items: start; gap: 11px; padding: 13px 18px; border: 0; border-bottom: 1px solid var(--line); background: transparent; color: var(--nexo-text-primary); text-align: left; transition: background .16s ease; }
.notification-item:hover,.notification-item:focus-visible { outline: none; background: var(--nexo-surface-hover); }
.notification-item.is-unread { background: color-mix(in srgb, var(--primary) 5%, var(--surface)); }
.notification-item-dot { width: 8px; height: 8px; margin-top: 5px; border-radius: 50%; background: transparent; }
.notification-item.is-unread .notification-item-dot { background: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 15%, transparent); }
.notification-item-copy { min-width: 0; display: grid; gap: 4px; }
.notification-item-copy strong { overflow-wrap: anywhere; font-size: 12px; }
.notification-item-copy > span { color: var(--nexo-text-secondary); font-size: 11px; line-height: 1.45; overflow-wrap: anywhere; }
.notification-item-time { margin-top: 2px; color: var(--nexo-text-secondary); font-size: 10px; }
.notification-empty,.notification-state { margin: 0; padding: 22px 18px; color: var(--nexo-text-secondary); font-size: 12px; line-height: 1.5; text-align: center; }
.notification-state { padding: 12px 18px; border-bottom: 1px solid var(--line); background: var(--nexo-surface-hover); }
.notification-state[hidden] { display: none; }
body:not([data-app-ready]) .app-shell { visibility: hidden; }
body:not([data-app-ready])::after { content: 'Cargando tu espacio de trabajo…'; position: fixed; inset: 0; z-index: 1100; display: grid; place-items: center; padding: 24px; background: var(--canvas); color: var(--nexo-text-secondary); font: 600 14px/1.5 'DM Sans', sans-serif; }
@media (max-width: 760px) { .notification-panel { position: fixed; top: 66px; right: 10px; } }
@media (max-width: 360px) { .top-actions .notification-button { display: grid; } .notification-panel { top: 62px; right: 8px; width: calc(100vw - 16px); } }
@media (prefers-reduced-motion: reduce) { .notification-panel { animation: none; } }


/* Dashboard principal: una jerarquía más clara, acentos azules y movimiento útil. */
#pageContent.dashboard-home {
  background: radial-gradient(ellipse at 92% 2%, color-mix(in srgb, var(--secondary) 10%, transparent), transparent 34rem), transparent;
}
.dashboard-home > .page-heading {
  position:relative; isolation:isolate; overflow:hidden; align-items:center; min-height:176px;
  margin-bottom:22px; padding:clamp(22px,3vw,34px);
  border:1px solid color-mix(in srgb,var(--primary) 16%,var(--line)); border-radius:22px;
  background:linear-gradient(112deg,color-mix(in srgb,var(--primary-soft) 72%,var(--surface)),var(--surface) 72%);
  box-shadow:var(--nexo-card-shadow); animation:dashboard-enter .48s cubic-bezier(.2,.75,.25,1) both;
}
.dashboard-home > .page-heading::after {
  content:""; position:absolute; z-index:0; width:clamp(170px,25vw,290px); aspect-ratio:1; right:12%; top:50%;
  border:1px solid color-mix(in srgb,var(--primary) 10%,transparent); border-radius:50%;
  background:radial-gradient(circle at 40% 35%,color-mix(in srgb,var(--secondary) 18%,transparent),transparent 66%);
  box-shadow:0 0 0 24px color-mix(in srgb,var(--primary) 3%,transparent),0 0 0 52px color-mix(in srgb,var(--primary) 2%,transparent);
  transform:translateY(-50%); pointer-events:none;
}
.dashboard-home > .page-heading > :first-child,.dashboard-home > .page-heading > .button { position:relative; z-index:1; }
.dashboard-home > .page-heading .eyebrow {
  display:inline-flex; align-items:center; min-height:27px; margin-bottom:11px; padding:4px 10px;
  border:1px solid color-mix(in srgb,var(--primary) 13%,var(--line)); border-radius:999px;
  background:color-mix(in srgb,var(--surface) 74%,var(--primary-soft)); color:var(--primary); font-size:10px; letter-spacing:.095em;
}
.dashboard-home > .page-heading h1 { max-width:18ch; font-size:clamp(30px,3vw,40px); letter-spacing:-.05em; }
.dashboard-home > .page-heading p:last-child { margin-top:8px; font-size:14px; }
.dashboard-home > .page-heading > .button {
  min-height:48px; padding-inline:19px; border-radius:12px;
  box-shadow:0 8px 18px color-mix(in srgb,var(--primary) 22%,transparent);
}
.dashboard-home > .metric-grid { gap:14px; margin-bottom:20px; }
.dashboard-home .metric-card {
  position:relative; isolation:isolate; overflow:hidden; min-height:148px; padding:19px 20px 17px 23px;
  border-color:color-mix(in srgb,var(--primary) 9%,var(--line)); border-radius:16px; background:var(--surface);
  box-shadow:var(--nexo-card-shadow); animation:dashboard-enter .48s cubic-bezier(.2,.75,.25,1) both;
  transition:transform .22s ease,box-shadow .22s ease,border-color .22s ease;
}
.dashboard-home .metric-card::before { content:""; position:absolute; z-index:0; inset:0 auto 0 0; width:4px; border-radius:inherit; background:var(--primary); }
.dashboard-home .metric-card > * { position:relative; z-index:1; }
.dashboard-home .metric-card:nth-child(2)::before { background:var(--secondary); }
.dashboard-home .metric-card:nth-child(3)::before { background:var(--accent); }
.dashboard-home .metric-card:nth-child(4)::before { background:var(--warning); }
.dashboard-home .metric-card:nth-child(1) { animation-delay:.04s; }
.dashboard-home .metric-card:nth-child(2) { animation-delay:.09s; }
.dashboard-home .metric-card:nth-child(3) { animation-delay:.14s; }
.dashboard-home .metric-card:nth-child(4) { animation-delay:.19s; }
.dashboard-home .metric-card:hover { transform:translateY(-3px); border-color:color-mix(in srgb,var(--primary) 24%,var(--line)); box-shadow:var(--nexo-card-shadow-hover); }
.dashboard-home .metric-top { min-height:35px; color:var(--nexo-text-secondary); font-size:12px; }
.dashboard-home .metric-icon {
  width:36px; height:36px; border:1px solid color-mix(in srgb,var(--primary) 10%,var(--line));
  border-radius:11px; background:var(--secondary-soft); color:var(--primary);
}
.dashboard-home .metric-value { margin-top:8px; font-size:clamp(24px,2.2vw,31px); letter-spacing:-.045em; }
.dashboard-home .metric-foot { margin-top:6px; color:var(--nexo-text-muted); font-size:11px; }
.dashboard-home .dashboard-grid { grid-template-columns:minmax(0,1.68fr) minmax(285px,.88fr); align-items:stretch; gap:18px; }
.dashboard-home .dashboard-grid > .panel,.dashboard-home .right-stack > .panel,.dashboard-home > .panel {
  overflow:hidden; border-color:color-mix(in srgb,var(--primary) 9%,var(--line)); border-radius:17px;
  background:var(--surface); box-shadow:var(--nexo-card-shadow);
  animation:dashboard-enter .52s cubic-bezier(.2,.75,.25,1) .2s both;
}
.dashboard-home .panel-heading { padding:20px 22px 13px; }
.dashboard-home .panel-heading h2 { font-size:16px; letter-spacing:-.025em; }
.dashboard-home .panel-heading p { font-size:12px; }
.dashboard-home .chart-area { min-height:246px; padding:9px 22px 19px; }
.dashboard-home .chart-legend { align-items:center; margin-bottom:12px; font-size:11px; }
.dashboard-home .chart-total { color:var(--nexo-text-primary); font-size:13px; font-weight:750; }
.dashboard-home .chart { height:205px; overflow:visible; }
.dashboard-home .chart-grid { stroke:color-mix(in srgb,var(--line) 80%,transparent); stroke-dasharray:3 6; }
.dashboard-home .chart-line {
  stroke:var(--primary); stroke-width:3; stroke-linecap:round; stroke-linejoin:round;
  stroke-dasharray:1000; stroke-dashoffset:1000; animation:dashboard-chart-draw .95s cubic-bezier(.3,.7,.2,1) .12s forwards;
}
.dashboard-home .chart-line2 { stroke:color-mix(in srgb,var(--secondary) 62%,var(--line)); stroke-dasharray:5 7; opacity:.8; animation:dashboard-chart-fade .6s ease .18s both; }
.dashboard-home .chart circle { transform-box:fill-box; transform-origin:center; opacity:0; animation:dashboard-point-pop .3s ease-out .62s forwards; }
.dashboard-home .chart-empty {
  min-height:192px; margin-top:2px; padding:19px; border:1px dashed color-mix(in srgb,var(--primary) 23%,var(--line));
  border-radius:14px; background:linear-gradient(135deg,var(--primary-soft),color-mix(in srgb,var(--surface) 88%,var(--secondary-soft)));
  color:var(--nexo-text-secondary); animation:dashboard-enter .38s ease both;
}
.dashboard-home .chart-empty-mark {
  display:grid; place-items:center; width:42px; height:42px; margin-bottom:5px;
  border:1px solid color-mix(in srgb,var(--primary) 16%,var(--line)); border-radius:13px; background:var(--surface); color:var(--primary);
}
.dashboard-home .chart-empty-mark .ui-icon { width:20px; height:20px; }
.dashboard-home .chart-empty strong { color:var(--nexo-text-primary); font-size:14px; }
.dashboard-home .chart-empty > span:not(.chart-empty-mark) { max-width:46ch; font-size:12px; line-height:1.55; }
.dashboard-home .chart-empty .button { margin-top:8px; }
.dashboard-home .right-stack { gap:15px; }
.dashboard-home .quick-actions { gap:9px; padding:6px 17px 17px; }
.dashboard-home .quick-action {
  min-height:58px; border-color:var(--line); border-radius:11px; background:var(--surface);
  color:var(--nexo-text-primary); font-size:12px;
  transition:transform .18s ease,border-color .18s ease,background-color .18s ease,box-shadow .18s ease;
}
.dashboard-home .quick-action:hover {
  transform:translateY(-2px); border-color:color-mix(in srgb,var(--primary) 35%,var(--line));
  background:var(--primary-soft); box-shadow:0 7px 16px color-mix(in srgb,var(--primary) 10%,transparent);
}
.dashboard-home .quick-action .ui-icon { width:19px; height:19px; }
.dashboard-home .activity-list,.dashboard-home .ranking-list { padding-inline:19px; }
.dashboard-home .activity-item { gap:11px; padding-block:11px; }
.dashboard-home .activity-mark { width:32px; height:32px; border-radius:10px; }
.dashboard-home .activity-content { font-size:12px; }
.dashboard-home .activity-content small { font-size:11px; }
.dashboard-home .ranking-list { padding-bottom:17px; }
.dashboard-home .ranking-list li { padding-block:11px; }
.dashboard-home .ranking-position { background:var(--primary-soft); color:var(--primary); }
.dashboard-home > .panel { margin-top:19px !important; }
.dashboard-home > .panel .table-wrap { border-top:1px solid var(--line); }
.dashboard-home > .panel th { height:42px; font-size:10px; }
.dashboard-home > .panel td { height:58px; font-size:12px; }
@keyframes dashboard-enter { from { opacity:0; transform:translateY(12px); } to { opacity:1; transform:translateY(0); } }
@keyframes dashboard-chart-draw { to { stroke-dashoffset:0; } }
@keyframes dashboard-chart-fade { from { opacity:0; } to { opacity:.8; } }
@keyframes dashboard-point-pop { from { opacity:0; transform:scale(.45); } to { opacity:1; transform:scale(1); } }
html[data-theme="dark"] .dashboard-home > .page-heading {
  border-color:color-mix(in srgb,var(--primary) 28%,var(--line));
  background:radial-gradient(circle at 78% 35%,color-mix(in srgb,var(--secondary) 12%,transparent),transparent 20rem),linear-gradient(112deg,var(--primary-soft),var(--surface) 72%);
}
html[data-theme="dark"] .dashboard-home .chart-empty {
  border-color:color-mix(in srgb,var(--primary) 35%,var(--line)); background:linear-gradient(135deg,var(--primary-soft),var(--surface));
}
@media (max-width:1100px) { .dashboard-home .dashboard-grid { grid-template-columns:minmax(0,1.35fr) minmax(260px,.9fr); } }
@media (max-width:900px) {
  .dashboard-home .dashboard-grid { grid-template-columns:minmax(0,1fr); }
  .dashboard-home .right-stack { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); align-items:start; }
}
@media (max-width:600px) {
  .dashboard-home > .page-heading { min-height:0; align-items:flex-start; flex-direction:column; gap:17px; padding:20px; border-radius:17px; }
  .dashboard-home > .page-heading::after { width:145px; right:-38px; top:27%; }
  .dashboard-home > .page-heading h1 { font-size:clamp(26px,8vw,34px); }
  .dashboard-home > .page-heading p:last-child { font-size:13px; }
  .dashboard-home > .page-heading > .button { width:100%; }
  .dashboard-home > .metric-grid { gap:10px; }
  .dashboard-home .metric-card { min-height:130px; padding:15px 12px 13px 16px; border-radius:13px; }
  .dashboard-home .metric-top { align-items:flex-start; font-size:11px; }
  .dashboard-home .metric-icon { width:31px; height:31px; }
  .dashboard-home .metric-value { font-size:clamp(20px,6vw,27px); }
  .dashboard-home .metric-foot { font-size:10px; }
  .dashboard-home .dashboard-grid { gap:12px; }
  .dashboard-home .panel-heading { padding:17px 16px 11px; }
  .dashboard-home .chart-area { min-height:0; padding:8px 14px 15px; }
  .dashboard-home .chart { height:175px; }
  .dashboard-home .chart-empty { min-height:178px; }
  .dashboard-home .right-stack { grid-template-columns:minmax(0,1fr); gap:12px; }
  .dashboard-home .quick-actions { padding-inline:13px; }
  .dashboard-home > .panel td { padding-inline:11px; }
}
@media (prefers-reduced-motion:reduce) {
  .dashboard-home *, .dashboard-home *::before, .dashboard-home *::after {
    animation-duration:.01ms !important; animation-delay:0ms !important; scroll-behavior:auto !important; transition-duration:.01ms !important;
  }
}


@media (max-width:360px) {
  .topbar { gap:4px; padding-inline:8px; }
  .mobile-menu { width:34px; min-width:34px; flex-basis:34px; }
  .breadcrumbs { display:none; }
  .top-actions { min-width:0; flex:1 1 auto; justify-content:flex-end; gap:2px; }
  .top-actions .icon-button { width:32px; height:36px; }
  .global-search-trigger { width:32px; min-width:32px; flex:0 0 32px; justify-content:center; padding:0; }
  .global-search-trigger span,.global-search-trigger kbd,.contextual-help-trigger { display:none; }
  .top-login-button { min-height:34px; padding-inline:7px; font-size:10px; white-space:nowrap; }
  .top-avatar { width:28px; height:28px; }
}

/* Final compatibility pass for controls with pre-tokenized green dark styles. */
html[data-theme="dark"] .global-search-trigger,
html[data-theme="dark"] .global-search-dialog,
html[data-theme="dark"] .global-search-footer,
html[data-theme="dark"] .global-search-result,
html[data-theme="dark"] .search-box,
html[data-theme="dark"] .period-select,
html[data-theme="dark"] .quick-action,
html[data-theme="dark"] .form-field input,
html[data-theme="dark"] .form-field select,
html[data-theme="dark"] .form-field textarea {
  border-color: var(--line);
  background-color: var(--surface);
  color: var(--nexo-text-secondary);
}
html[data-theme="dark"] .global-search-trigger:hover,
html[data-theme="dark"] .global-search-result:hover,
html[data-theme="dark"] .global-search-result.selected,
html[data-theme="dark"] .quick-action:hover { background-color: var(--nexo-surface-hover); }
html[data-theme="dark"] .global-search-trigger kbd { border-color: var(--line); background: var(--nexo-surface-hover); color: var(--nexo-text-muted); }
html[data-theme="dark"] .global-search-result strong,
html[data-theme="dark"] .global-search-result small,
html[data-theme="dark"] .form-field input::placeholder,
html[data-theme="dark"] .form-field textarea::placeholder { color: var(--nexo-text-muted); }
html[data-theme="dark"] .global-search-input,
html[data-theme="dark"] .search-box input,
html[data-theme="dark"] .period-select,
html[data-theme="dark"] .form-field input,
html[data-theme="dark"] .form-field select,
html[data-theme="dark"] .form-field textarea { color: var(--nexo-text-primary); }
html[data-theme="dark"] input:not([type="checkbox"]):not([type="radio"]),
html[data-theme="dark"] select,
html[data-theme="dark"] textarea {
  border-color: var(--line);
  background-color: var(--surface);
  color: var(--nexo-text-primary);
}
html[data-theme="dark"] input:not([type="checkbox"]):not([type="radio"])::placeholder,
html[data-theme="dark"] textarea::placeholder { color: var(--nexo-text-muted); }

/* Replace the legacy green dark surfaces from styles.css with the Nexo navy palette. */
html[data-theme="dark"] .activity-item {
  background: transparent;
  border-color: var(--line);
  color: var(--nexo-text-secondary);
}
html[data-theme="dark"] .activity-mark {
  background: var(--primary-soft);
  color: var(--secondary);
}
html[data-theme="dark"] .quick-action {
  background: var(--surface);
  border-color: var(--line);
  color: var(--nexo-text-secondary);
}
html[data-theme="dark"] .quick-action:hover { background: var(--nexo-surface-hover); }
html[data-theme="dark"] .quick-action .ui-icon { color: var(--secondary); }
html[data-theme="dark"] .sales-chart-data li {
  background: var(--surface);
  border-color: var(--line);
  color: var(--nexo-text-secondary);
}
