:root {
  color-scheme: light;
  --nex-red: #e30613;
  --nex-black: #050505;
  --nex-charcoal: #24272d;
  --nex-line: #e6e7eb;
  --nex-soft: #f4f5f7;
  --nex-gold: #c9a24a;
}

* {
  box-sizing: border-box;
}

html,
body,
#root {
  min-height: 100%;
}

html {
  min-height: 100%;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background:
    linear-gradient(135deg, rgb(255 255 255 / 0.92), rgb(244 245 247 / 0.98)),
    linear-gradient(90deg, rgb(227 6 19 / 0.04), transparent 34%, rgb(201 162 74 / 0.06));
  color: #17191d;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  letter-spacing: 0;
  overscroll-behavior-y: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled,
input:disabled,
textarea:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.app-shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr) 380px;
  min-height: 100vh;
}

.app-shell.portal-shell {
  grid-template-columns: 280px minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  height: 100vh;
  flex-direction: column;
  gap: 24px;
  overflow-y: auto;
  background: #060607;
  padding: 22px;
  color: white;
}

.brand-lockup {
  display: grid;
  gap: 8px;
  align-items: start;
}

.brand-mark {
  display: grid;
  height: 46px;
  width: 46px;
  place-items: center;
  border: 1px solid rgb(255 255 255 / 0.18);
  background: var(--nex-red);
  color: white;
  font-size: 28px;
  font-weight: 950;
  line-height: 1;
}

.brand-lockup h1 {
  margin: 2px 0 0;
  font-size: 17px;
  font-weight: 850;
  line-height: 1.1;
}

.brand-lockup p {
  margin: 0;
  color: rgb(255 255 255 / 0.58);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.brand-logo {
  display: block;
  width: 150px;
  height: auto;
  max-width: 100%;
  max-height: 68px;
  object-fit: contain;
  object-position: left center;
  flex: 0 0 auto;
}

.brand-logo-compact {
  width: 118px;
  max-height: 46px;
}

.platform-logo {
  width: 190px;
  max-height: 98px;
}

.nav-list {
  display: grid;
  gap: 7px;
}

.nav-item {
  position: relative;
  display: grid;
  grid-template-columns: 22px 1fr auto;
  align-items: center;
  gap: 10px;
  border: 1px solid transparent;
  background: transparent;
  color: rgb(255 255 255 / 0.72);
  padding: 11px 12px;
  text-align: left;
  transition: 160ms ease;
}

.nav-item span {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 14px;
  font-weight: 700;
}

.nav-item:hover,
.nav-item.active {
  border-color: rgb(255 255 255 / 0.12);
  background: rgb(255 255 255 / 0.08);
  color: white;
}

.nav-item.active {
  box-shadow: inset 3px 0 0 var(--nex-red);
}

.nav-unread-badge {
  position: absolute;
  top: 7px;
  right: 8px;
  display: inline-grid;
  min-width: 20px;
  height: 20px;
  place-items: center;
  background: var(--nex-red);
  color: white;
  padding: 0 6px;
  font-size: 10px;
  font-style: normal;
  font-weight: 950;
}

.role-card {
  margin-top: auto;
  border: 1px solid rgb(255 255 255 / 0.12);
  background: rgb(255 255 255 / 0.06);
  padding: 14px;
}

.role-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin-top: 10px;
  background: rgb(255 255 255 / 0.08);
  padding: 4px;
}

.role-toggle button {
  border: 0;
  background: transparent;
  color: rgb(255 255 255 / 0.72);
  padding: 8px 10px;
  font-size: 13px;
  font-weight: 800;
}

.role-toggle button.selected {
  background: white;
  color: var(--nex-black);
}

.signed-in-card {
  display: grid;
  gap: 4px;
  margin-top: 10px;
  background: rgb(255 255 255 / 0.08);
  padding: 11px;
}

.signed-in-card strong,
.signed-in-card span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.signed-in-card strong {
  color: white;
  font-size: 13px;
  font-weight: 900;
}

.signed-in-card span {
  color: rgb(255 255 255 / 0.58);
  font-size: 12px;
  font-weight: 800;
}

.logout-btn {
  display: inline-flex;
  width: 100%;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid rgb(255 255 255 / 0.16);
  background: transparent;
  color: white;
  margin-top: 12px;
  font-size: 12px;
  font-weight: 850;
}

.main-area {
  min-width: 0;
  padding: 22px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--nex-line);
  padding-bottom: 18px;
}

.topbar h2 {
  margin: 2px 0 0;
  font-size: clamp(24px, 4vw, 34px);
  font-weight: 900;
  line-height: 1;
}

.topbar-actions,
.hero-actions,
.button-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.eyebrow {
  margin: 0;
  color: #747985;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.btn,
.icon-btn {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 1px solid transparent;
  padding: 0 14px;
  font-size: 13px;
  font-weight: 850;
  line-height: 1;
  text-decoration: none;
  transition: 160ms ease;
}

.btn.primary {
  background: var(--nex-red);
  color: white;
}

.btn.secondary {
  border-color: #d8dae0;
  background: white;
  color: #191b20;
}

.btn.dark {
  background: #111318;
  color: white;
}

.btn.light {
  border-color: rgb(255 255 255 / 0.32);
  background: rgb(255 255 255 / 0.14);
  color: white;
}

.btn.danger-soft {
  border-color: rgb(227 6 19 / 0.25);
  background: rgb(227 6 19 / 0.08);
  color: #9b111c;
}

.btn:hover,
.icon-btn:hover {
  transform: translateY(-1px);
}

.icon-btn {
  min-height: 38px;
  width: 38px;
  border-color: #d8dae0;
  background: white;
  color: #1e2128;
  padding: 0;
}

.icon-btn.small {
  min-height: 30px;
  width: 30px;
}

.small-btn {
  min-height: 36px;
}

.install-app-btn {
  border-color: rgb(227 6 19 / 0.22);
  color: var(--nex-red);
}

.spin {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.dashboard-grid {
  display: grid;
  gap: 18px;
  padding-top: 22px;
}

.command-dashboard,
.portal-page {
  display: grid;
  gap: 18px;
  padding-top: 22px;
}

.command-hero,
.module-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: end;
  min-height: 280px;
  overflow: hidden;
  border: 1px solid rgb(255 255 255 / 0.16);
  background:
    linear-gradient(100deg, rgb(0 0 0 / 0.92), rgb(0 0 0 / 0.58)),
    linear-gradient(135deg, var(--nex-red), var(--nex-charcoal));
  color: white;
  padding: 34px;
  box-shadow: 0 24px 70px rgb(5 5 5 / 0.18);
}

.command-hero h3,
.module-hero h3 {
  max-width: 760px;
  margin: 8px 0;
  font-size: clamp(34px, 5vw, 58px);
  font-weight: 950;
  line-height: 0.96;
}

.command-hero p:not(.eyebrow),
.module-hero p:not(.eyebrow) {
  max-width: 720px;
  color: rgb(255 255 255 / 0.76);
  font-size: 16px;
  line-height: 1.6;
}

.hero-brand-card {
  display: grid;
  min-width: 220px;
  justify-items: end;
  gap: 12px;
  border: 1px solid rgb(255 255 255 / 0.16);
  background: rgb(255 255 255 / 0.08);
  padding: 18px;
}

.hero-brand-card .brand-logo,
.module-hero .brand-logo {
  width: 210px;
  max-height: 120px;
}

.hero-brand-card span {
  color: rgb(255 255 255 / 0.64);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.alert-row,
.quick-action-grid,
.module-card-grid,
.resource-grid,
.quick-links-grid,
.announcement-grid {
  display: grid;
  gap: 14px;
}

.alert-row {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.alert-card,
.announcement-card,
.resource-card,
.module-card,
.quick-action-card,
.quick-link-card,
.ticket-list article,
.feed-list article,
.mini-project-row article {
  border: 1px solid var(--nex-line);
  background: white;
  padding: 16px;
  box-shadow: 0 16px 44px rgb(18 22 30 / 0.05);
}

.alert-card {
  border-left: 5px solid var(--nex-gold);
}

.alert-card.urgent,
.announcement-card.urgent,
.feed-list article.urgent {
  border-left: 5px solid var(--nex-red);
}

.alert-card span,
.announcement-meta span,
.feed-list span,
.resource-card span,
.quick-link-card em,
.ticket-list span,
.mini-project-row span,
.guide-list button span {
  color: #717987;
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.alert-card strong,
.feed-list strong,
.mini-project-row strong {
  display: block;
  margin-top: 7px;
  color: #14171d;
  font-size: 17px;
  font-weight: 950;
}

.alert-card p,
.feed-list p,
.resource-card p,
.announcement-card p,
.quick-link-card span,
.ticket-list p {
  margin: 8px 0 0;
  color: #5f6673;
  font-size: 13px;
  line-height: 1.5;
}

.quick-action-grid,
.module-card-grid,
.quick-links-grid,
.resource-grid,
.announcement-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.dashboard-chat-preview {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  border: 1px solid rgb(227 6 19 / 0.16);
  background:
    linear-gradient(120deg, rgb(227 6 19 / 0.08), transparent 42%),
    #ffffff;
  color: #111318;
  padding: 16px;
  text-align: left;
  box-shadow: 0 18px 48px rgb(18 22 30 / 0.06);
}

.dashboard-chat-preview .chat-preview-icon {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  background: #111318;
  color: white;
}

.dashboard-chat-preview > span:not(.chat-preview-icon) {
  min-width: 0;
}

.dashboard-chat-preview em {
  display: block;
  color: var(--nex-red);
  font-size: 10px;
  font-style: normal;
  font-weight: 950;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.dashboard-chat-preview strong,
.dashboard-chat-preview p {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-chat-preview strong {
  margin-top: 4px;
  font-size: 15px;
  font-weight: 950;
}

.dashboard-chat-preview p {
  margin: 4px 0 0;
  color: #5f6673;
  font-size: 13px;
  font-weight: 750;
}

.dashboard-chat-preview small {
  color: #717987;
  font-size: 11px;
  font-weight: 850;
  text-align: right;
}

.quick-action-card,
.module-card,
.quick-link-card > button {
  display: grid;
  min-height: 150px;
  align-content: start;
  gap: 10px;
  border: 1px solid var(--nex-line);
  background: white;
  color: #17191d;
  padding: 16px;
  text-align: left;
}

.quick-action-card svg,
.module-card svg,
.quick-link-card svg,
.resource-card svg {
  color: var(--nex-red);
}

.quick-action-card strong,
.module-card strong,
.quick-link-card strong,
.resource-card h3,
.announcement-card h3 {
  margin: 0;
  color: #111318;
  font-size: 18px;
  font-weight: 950;
  line-height: 1.05;
}

.quick-link-sections {
  display: grid;
  gap: 22px;
}

.quick-link-section {
  display: grid;
  gap: 10px;
}

.quick-link-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.quick-link-section-head h3 {
  margin: 0;
  color: #111318;
  font-size: 16px;
  font-weight: 950;
}

.quick-link-section-head span {
  color: #717987;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.quick-link-card {
  overflow: hidden;
}

.quick-link-card > button {
  min-height: 128px;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  width: 100%;
}

.nex-dashboard {
  display: grid;
  gap: 18px;
  padding-top: 22px;
}

.nex-hero {
  position: relative;
  overflow: hidden;
  border: 1px solid rgb(255 255 255 / 0.14);
  background:
    radial-gradient(circle at 82% 20%, rgb(227 6 19 / 0.34), transparent 28%),
    radial-gradient(circle at 16% 8%, rgb(201 162 74 / 0.13), transparent 24%),
    linear-gradient(135deg, #050505 0%, #111318 52%, #23262d 100%);
  color: white;
  box-shadow: 0 28px 80px rgb(5 5 5 / 0.22);
}

.nex-hero-glow {
  position: absolute;
  inset: auto -90px -150px auto;
  width: 360px;
  height: 360px;
  border-radius: 999px;
  background: rgb(227 6 19 / 0.34);
  filter: blur(72px);
  animation: nexPulseGlow 4.8s ease-in-out infinite;
}

@keyframes nexPulseGlow {
  0%,
  100% {
    opacity: 0.45;
    transform: scale(0.96);
  }

  50% {
    opacity: 0.85;
    transform: scale(1.04);
  }
}

.nex-hero-content {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 270px;
  gap: 28px;
  align-items: stretch;
  min-height: 360px;
  padding: 34px;
}

.nex-hero-copy {
  display: grid;
  align-content: center;
  gap: 18px;
}

.nex-hero h1 {
  max-width: 780px;
  margin: 0;
  color: white;
  font-size: clamp(42px, 6vw, 76px);
  font-weight: 950;
  line-height: 0.92;
}

.nex-hero p:not(.eyebrow) {
  max-width: 760px;
  margin: 0;
  color: rgb(255 255 255 / 0.76);
  font-size: 17px;
  line-height: 1.6;
}

.nex-status-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.nex-status-row span,
.live-badge,
.urgent-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  width: max-content;
  border: 1px solid rgb(255 255 255 / 0.12);
  background: rgb(255 255 255 / 0.07);
  color: rgb(255 255 255 / 0.78);
  padding: 7px 10px;
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
}

.nex-status-row i,
.live-badge i {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #27d17f;
  box-shadow: 0 0 0 5px rgb(39 209 127 / 0.12);
  animation: liveDot 1.8s ease-in-out infinite;
}

@keyframes liveDot {
  0%,
  100% {
    transform: scale(0.86);
  }

  50% {
    transform: scale(1.12);
  }
}

.nex-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.nex-hero-agent {
  display: grid;
  align-content: space-between;
  justify-items: start;
  gap: 18px;
  border: 1px solid rgb(255 255 255 / 0.14);
  background: rgb(255 255 255 / 0.08);
  padding: 22px;
  backdrop-filter: blur(18px);
}

.nex-hero-agent .brand-logo {
  width: 178px;
  max-height: 104px;
}

.nex-avatar {
  display: grid;
  width: 74px;
  height: 74px;
  place-items: center;
  border: 1px solid rgb(255 255 255 / 0.2);
  background:
    linear-gradient(135deg, rgb(227 6 19 / 0.92), rgb(17 19 24 / 0.72));
  color: white;
  font-size: 24px;
  font-weight: 950;
}

.nex-hero-agent strong {
  color: white;
  font-size: 22px;
  font-weight: 950;
  line-height: 1;
}

.nex-hero-agent span {
  color: rgb(255 255 255 / 0.62);
  font-size: 12px;
  font-weight: 850;
}

.nex-ai-bar {
  display: grid;
  grid-template-columns: auto minmax(260px, 1fr);
  gap: 12px;
  align-items: center;
  border: 1px solid rgb(227 6 19 / 0.18);
  background:
    linear-gradient(120deg, rgb(227 6 19 / 0.09), transparent 44%),
    white;
  padding: 14px;
  box-shadow: 0 16px 42px rgb(18 22 30 / 0.06);
}

.nex-ai-bar > svg {
  color: var(--nex-red);
}

.nex-ai-bar > button {
  border: 0;
  background: transparent;
  color: #111318;
  padding: 8px 0;
  font-size: 17px;
  font-weight: 900;
  text-align: left;
}

.nex-ai-bar > div {
  grid-column: 1 / -1;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.nex-ai-bar > div button {
  flex: 0 0 auto;
  border: 1px solid #dfe2e8;
  background: #f8f9fb;
  color: #3b4049;
  padding: 8px 10px;
  font-size: 11px;
  font-weight: 900;
}

.nex-metrics-row {
  display: grid;
  grid-template-columns: repeat(8, minmax(160px, 1fr));
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.nex-metric-card {
  position: relative;
  display: grid;
  min-height: 156px;
  align-content: space-between;
  gap: 10px;
  overflow: hidden;
  border: 1px solid var(--nex-line);
  background: white;
  color: #111318;
  padding: 15px;
  text-align: left;
  box-shadow: 0 16px 42px rgb(18 22 30 / 0.05);
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.nex-metric-card:hover,
.nex-launchpad-grid button:hover,
.nex-activity-feed button:hover,
.bulletin-card-list button:hover,
.momentum-template-row button:hover {
  border-color: rgb(227 6 19 / 0.32);
  box-shadow: 0 22px 54px rgb(18 22 30 / 0.1);
  transform: translateY(-2px);
}

.nex-metric-card::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 4px;
  background: var(--nex-red);
}

.nex-metric-card.gold::before {
  background: var(--nex-gold);
}

.metric-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  background: #111318;
  color: white;
}

.nex-metric-card.red .metric-icon {
  background: var(--nex-red);
}

.nex-metric-card.gold .metric-icon {
  background: var(--nex-gold);
}

.metric-status {
  position: absolute;
  top: 12px;
  right: 12px;
  color: var(--nex-red);
  font-size: 10px;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nex-metric-card strong {
  color: #111318;
  font-size: 34px;
  font-weight: 950;
  line-height: 1;
}

.nex-metric-card em {
  color: #69707d;
  font-size: 12px;
  font-style: normal;
  font-weight: 850;
  line-height: 1.25;
}

.nex-dashboard-grid {
  display: grid;
  grid-template-columns: minmax(320px, 0.75fr) minmax(0, 1.25fr);
  gap: 16px;
}

.nex-dashboard-grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.nex-widget,
.nex-launchpad {
  border: 1px solid var(--nex-line);
  background: white;
  padding: 18px;
  box-shadow: 0 18px 52px rgb(18 22 30 / 0.06);
}

.nex-widget.dark {
  background: #111318;
  color: white;
}

.nex-widget-head,
.nex-section-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: start;
  margin-bottom: 14px;
}

.nex-widget-head h2,
.nex-section-head h2 {
  margin: 3px 0 0;
  color: #111318;
  font-size: 24px;
  font-weight: 950;
  line-height: 1;
}

.nex-widget-head > span {
  color: var(--nex-red);
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
}

.nex-progress-track {
  overflow: hidden;
  height: 8px;
  background: #edf0f4;
  margin-bottom: 14px;
}

.nex-progress-track i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--nex-red), var(--nex-gold));
}

.nex-focus-list {
  display: grid;
  gap: 8px;
}

.nex-focus-list label {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border: 1px solid #e4e7ee;
  background: #fbfcfd;
  margin: 0;
  padding: 10px;
}

.nex-focus-list label.complete {
  border-color: rgb(39 209 127 / 0.3);
  background: rgb(39 209 127 / 0.08);
}

.nex-focus-list input {
  width: auto;
  accent-color: var(--nex-red);
}

.nex-focus-list span {
  color: #303540;
  font-size: 13px;
  font-weight: 850;
}

.nex-focus-list button {
  border: 1px solid #dfe2e8;
  background: white;
  color: var(--nex-red);
  padding: 6px 8px;
  font-size: 10px;
  font-weight: 950;
}

.nex-activity-feed,
.bulletin-card-list,
.nexu-mini-list,
.recent-project-mini {
  display: grid;
  gap: 9px;
}

.nex-activity-feed button,
.bulletin-card-list button,
.nexu-mini-list button,
.recent-project-mini button {
  display: grid;
  gap: 5px;
  border: 1px solid #e4e7ee;
  background: #fbfcfd;
  color: #111318;
  padding: 11px;
  text-align: left;
}

.nex-activity-feed button {
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
}

.nex-activity-feed em {
  grid-row: span 2;
  border: 1px solid #dfe2e8;
  background: white;
  color: #596170;
  padding: 5px 7px;
  font-size: 10px;
  font-style: normal;
  font-weight: 950;
  text-transform: uppercase;
}

.nex-activity-feed em.live,
.live-badge {
  border-color: rgb(39 209 127 / 0.24);
  background: rgb(39 209 127 / 0.1);
  color: #168a4a;
}

.nex-activity-feed em.urgent,
.urgent-pill {
  border-color: rgb(227 6 19 / 0.24);
  background: rgb(227 6 19 / 0.1);
  color: var(--nex-red);
}

.nex-activity-feed em.new {
  border-color: rgb(201 162 74 / 0.28);
  background: rgb(201 162 74 / 0.12);
  color: #8a6a16;
}

.nex-activity-feed strong,
.bulletin-card-list strong,
.nexu-mini-list strong,
.recent-project-mini strong {
  color: #111318;
  font-size: 13px;
  font-weight: 950;
  overflow-wrap: anywhere;
}

.nex-activity-feed span,
.bulletin-card-list p,
.recent-project-mini p {
  color: #69707d;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.35;
}

.nex-activity-feed small {
  grid-row: span 2;
  color: #8a929f;
  font-size: 10px;
  font-weight: 850;
  text-align: right;
}

.nex-launchpad-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(205px, 1fr));
  gap: 12px;
}

.nex-launchpad-grid button {
  display: grid;
  min-height: 178px;
  align-content: start;
  gap: 10px;
  border: 1px solid #e0e4eb;
  background:
    linear-gradient(135deg, rgb(227 6 19 / 0.05), transparent 50%),
    #ffffff;
  color: #111318;
  padding: 16px;
  text-align: left;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.nex-launchpad-grid svg {
  color: var(--nex-red);
}

.nex-launchpad-grid button > span {
  width: max-content;
  border: 1px solid rgb(227 6 19 / 0.2);
  background: rgb(227 6 19 / 0.08);
  color: var(--nex-red);
  padding: 5px 7px;
  font-size: 10px;
  font-weight: 950;
  text-transform: uppercase;
}

.nex-launchpad-grid strong {
  color: #111318;
  font-size: 18px;
  font-weight: 950;
}

.nex-launchpad-grid p {
  margin: 0;
  color: #69707d;
  font-size: 13px;
  line-height: 1.45;
}

.nex-pulse-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.nex-pulse-grid div,
.support-snapshot-grid div {
  display: grid;
  gap: 5px;
  background: #f7f8fa;
  padding: 12px;
}

.nex-pulse-grid span,
.support-snapshot-grid span,
.nexu-mini-list span,
.bulletin-card-list span,
.momentum-template-row span,
.recent-project-mini span {
  color: #747c89;
  font-size: 10px;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nex-pulse-grid strong,
.support-snapshot-grid strong {
  color: #111318;
  font-size: 20px;
  font-weight: 950;
}

.nex-pulse-grid em {
  color: #69707d;
  font-size: 11px;
  font-style: normal;
  line-height: 1.3;
}

.nex-chat-card {
  cursor: pointer;
}

.nex-chat-card p {
  min-height: 82px;
  margin: 0;
  color: #303540;
  font-size: 18px;
  font-weight: 850;
  line-height: 1.35;
}

.nex-chat-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.nex-chat-meta span,
.nex-chat-meta strong,
.nex-chat-meta em {
  border: 1px solid #dfe2e8;
  background: #f8f9fb;
  color: #3b4049;
  padding: 7px 9px;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
}

.support-snapshot-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}

.bulletin-card-list button.urgent {
  border-left: 4px solid var(--nex-red);
}

.bulletin-card-list em {
  color: #8a929f;
  font-size: 10px;
  font-style: normal;
  font-weight: 850;
}

.momentum-template-row {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.momentum-template-row button {
  flex: 0 0 155px;
  display: grid;
  min-height: 118px;
  align-content: end;
  gap: 6px;
  border: 1px solid #e0e4eb;
  background:
    linear-gradient(135deg, rgb(17 19 24 / 0.94), rgb(17 19 24 / 0.62)),
    linear-gradient(135deg, var(--accent), #ffffff);
  color: white;
  padding: 12px;
  text-align: left;
}

.momentum-template-row span {
  color: var(--accent);
}

.momentum-template-row strong {
  color: white;
  font-size: 15px;
  font-weight: 950;
  line-height: 1;
}

.nex-dashboard {
  gap: 16px;
  padding-top: 18px;
}

.nex-hero {
  border-color: rgb(255 255 255 / 0.1);
  background:
    radial-gradient(circle at 78% 18%, rgb(227 6 19 / 0.18), transparent 24%),
    radial-gradient(circle at 18% 8%, rgb(201 162 74 / 0.08), transparent 20%),
    linear-gradient(135deg, #07080b 0%, #111318 58%, #1b1f27 100%);
  box-shadow: 0 22px 58px rgb(5 5 5 / 0.18);
}

.nex-hero-glow {
  width: 300px;
  height: 300px;
  background: rgb(227 6 19 / 0.2);
  filter: blur(82px);
  animation-duration: 7s;
}

.nex-hero-content {
  grid-template-columns: minmax(0, 1fr) 240px;
  gap: 22px;
  min-height: 310px;
  padding: 30px;
}

.nex-hero-copy {
  gap: 14px;
}

.nex-hero h1 {
  font-size: clamp(38px, 4.8vw, 62px);
  line-height: 0.98;
}

.nex-hero p:not(.eyebrow) {
  max-width: 720px;
  color: rgb(255 255 255 / 0.72);
  font-size: 15px;
}

.nex-status-row span {
  border-color: rgb(255 255 255 / 0.1);
  background: rgb(255 255 255 / 0.05);
  padding: 6px 9px;
}

.nex-hero-actions {
  gap: 8px;
}

.nex-hero-actions .btn {
  min-height: 38px;
  padding: 9px 12px;
  font-size: 12px;
}

.nex-hero-agent {
  gap: 14px;
  border-color: rgb(255 255 255 / 0.1);
  background: rgb(255 255 255 / 0.055);
  padding: 18px;
}

.nex-hero-agent .brand-logo {
  width: 150px;
  max-height: 84px;
}

.nex-avatar {
  width: 64px;
  height: 64px;
  font-size: 21px;
}

.nex-hero-agent strong {
  font-size: 20px;
}

.nex-ai-bar {
  border-color: rgb(227 6 19 / 0.12);
  background:
    linear-gradient(120deg, rgb(227 6 19 / 0.055), transparent 38%),
    #ffffff;
  padding: 12px;
  box-shadow: 0 10px 28px rgb(18 22 30 / 0.045);
}

.nex-ai-bar > button {
  font-size: 15px;
}

.nex-metrics-row {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  overflow: visible;
}

.nex-metric-card {
  min-height: 122px;
  gap: 8px;
  padding: 14px;
  box-shadow: 0 10px 26px rgb(18 22 30 / 0.045);
}

.nex-metric-card:hover,
.nex-launchpad-grid button:hover,
.nex-activity-feed button:hover,
.bulletin-card-list button:hover,
.momentum-template-row button:hover {
  box-shadow: 0 16px 36px rgb(18 22 30 / 0.08);
  transform: translateY(-1px);
}

.metric-icon {
  width: 34px;
  height: 34px;
}

.metric-status {
  top: 11px;
  right: 11px;
}

.nex-metric-card strong {
  font-size: 28px;
}

.nex-widget,
.nex-launchpad {
  border-color: #e5e8ef;
  padding: 16px;
  box-shadow: 0 12px 34px rgb(18 22 30 / 0.05);
}

.nex-widget-head h2,
.nex-section-head h2 {
  font-size: 22px;
}

.nex-dashboard-grid {
  grid-template-columns: minmax(300px, 0.84fr) minmax(0, 1.16fr);
  gap: 14px;
}

.nex-dashboard-grid.three {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.nex-dashboard-grid.three.lower .nex-widget:last-child {
  grid-column: 1 / -1;
}

.nex-launchpad-grid {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.nex-launchpad-grid button {
  min-height: 136px;
  gap: 8px;
  background:
    linear-gradient(135deg, rgb(227 6 19 / 0.035), transparent 45%),
    #ffffff;
  padding: 14px;
}

.nex-launchpad-grid strong {
  font-size: 16px;
}

.nex-launchpad-grid p {
  font-size: 12px;
}

.nex-chat-card p {
  min-height: 58px;
  font-size: 16px;
}

.nex-pulse-grid div,
.support-snapshot-grid div,
.nex-focus-list label,
.nex-activity-feed button,
.bulletin-card-list button,
.nexu-mini-list button,
.recent-project-mini button,
.nex-launchpad-grid button,
.nex-metric-card,
.nex-widget,
.nex-launchpad,
.nex-ai-bar {
  border-radius: 8px;
}

.quick-link-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  background: rgb(227 6 19 / 0.08);
  color: var(--nex-red);
  margin: 0;
}

.quick-link-copy {
  display: grid;
  min-width: 0;
  gap: 6px;
  margin: 0;
}

.quick-link-copy span {
  margin: 0;
}

.quick-link-card > button em {
  grid-column: 1 / -1;
  width: fit-content;
  border: 1px solid #dfe2e8;
  background: #f7f8fa;
  color: #555e6c;
  padding: 5px 8px;
  font-size: 10px;
  font-style: normal;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.quick-link-card.type-external > button em {
  border-color: rgb(227 6 19 / 0.2);
  background: rgb(227 6 19 / 0.06);
  color: #9f1119;
}

.quick-link-card.type-needs-url > button em {
  border-color: rgb(201 162 74 / 0.34);
  background: rgb(201 162 74 / 0.1);
  color: #84621f;
}

.link-admin-controls {
  border-top: 1px solid var(--nex-line);
  background: #fafafb;
}

.link-admin-controls summary {
  cursor: pointer;
  color: #4d535f;
  padding: 10px 12px;
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.link-admin-controls > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) 72px auto;
  gap: 8px;
  padding: 0 12px 12px;
}

.portal-two-column,
.support-layout,
.transaction-layout,
.agent-assist-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 18px;
}

.feed-list,
.ticket-list,
.guide-list {
  display: grid;
  gap: 10px;
}

.compact-feed article {
  min-height: 116px;
}

.mini-project-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.portal-toolbar,
.admin-form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
}

.nexu-external-card,
.nexu-internal-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border: 1px solid rgb(227 6 19 / 0.18);
  background:
    linear-gradient(120deg, rgb(17 19 24 / 0.96), rgb(43 47 56 / 0.92)),
    #111318;
  color: white;
  padding: 22px;
  box-shadow: 0 18px 48px rgb(18 22 30 / 0.14);
}

.nexu-external-card h3,
.nexu-internal-card h3 {
  margin: 4px 0 8px;
  color: white;
  font-size: 24px;
  font-weight: 950;
}

.nexu-external-card p:not(.eyebrow),
.nexu-internal-card p:not(.eyebrow) {
  max-width: 760px;
  margin: 0;
  color: rgb(255 255 255 / 0.7);
  font-size: 13px;
  line-height: 1.5;
}

.nexu-internal-card > span {
  flex: 0 0 auto;
  border: 1px solid rgb(39 209 127 / 0.24);
  background: rgb(39 209 127 / 0.1);
  color: #bdf4d4;
  padding: 8px 10px;
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nexu-player-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.55fr);
  gap: 16px;
}

.nexu-player-panel {
  display: grid;
  min-height: 420px;
  place-items: center;
  overflow: hidden;
  border: 1px solid #101217;
  background:
    linear-gradient(135deg, #111318, #24272d);
  box-shadow: 0 22px 58px rgb(18 22 30 / 0.18);
}

.nexu-player-panel iframe {
  width: 100%;
  height: 100%;
  min-height: 420px;
  border: 0;
  background: #050505;
}

.nexu-now-playing {
  display: grid;
  align-content: start;
  gap: 12px;
  border: 1px solid var(--nex-line);
  background: white;
  padding: 18px;
  box-shadow: 0 16px 44px rgb(18 22 30 / 0.05);
}

.nexu-now-playing h3 {
  margin: 0;
  color: #111318;
  font-size: 24px;
  font-weight: 950;
  line-height: 1.02;
}

.nexu-now-playing p:not(.eyebrow) {
  margin: 0;
  color: #5f6673;
  font-size: 13px;
  line-height: 1.55;
}

.nexu-player-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.nexu-player-meta span {
  border: 1px solid #dfe2e8;
  background: #f7f8fa;
  color: #4d535f;
  padding: 6px 8px;
  font-size: 10px;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.bulk-video-import {
  display: grid;
  grid-column: 1 / -1;
  gap: 10px;
  border: 1px dashed rgb(227 6 19 / 0.32);
  background: rgb(227 6 19 / 0.04);
  padding: 14px;
}

.admin-form-grid .field:has(textarea),
.admin-form-grid .field textarea,
.admin-form-grid .field:nth-last-child(1) {
  grid-column: 1 / -1;
}

.admin-compose {
  display: grid;
  gap: 14px;
}

.check-field {
  display: inline-flex;
  min-height: 39px;
  align-items: center;
  gap: 8px;
  color: #4d535f;
  font-size: 12px;
  font-weight: 850;
}

.announcement-card {
  display: grid;
  gap: 8px;
}

.announcement-edit-grid {
  display: grid;
  gap: 10px;
}

.announcement-meta,
.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.announcement-meta em,
.resource-card em,
.ticket-list em {
  background: rgb(227 6 19 / 0.08);
  color: var(--nex-red);
  padding: 5px 7px;
  font-size: 10px;
  font-style: normal;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ticket-list article {
  display: grid;
  gap: 10px;
}

.ticket-list article.selected {
  border-color: rgb(227 6 19 / 0.34);
  box-shadow: 0 0 0 3px rgb(227 6 19 / 0.08);
}

.ticket-summary-button {
  display: grid;
  gap: 7px;
  border: 0;
  background: transparent;
  color: inherit;
  padding: 0;
  text-align: left;
}

.ticket-summary-button strong {
  color: #111318;
  font-size: 16px;
  font-weight: 950;
}

.ticket-detail-card {
  display: grid;
  gap: 14px;
  margin-top: 16px;
  border: 1px solid var(--nex-line);
  background: #fafafb;
  padding: 16px;
}

.ticket-detail-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.ticket-detail-head h3 {
  margin: 3px 0 0;
  color: #111318;
  font-size: 20px;
  font-weight: 950;
}

.ticket-detail-head > span {
  background: #111318;
  color: white;
  padding: 6px 9px;
  font-size: 10px;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ticket-detail-card dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

.ticket-detail-card dt {
  color: #747b87;
  font-size: 10px;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ticket-detail-card dd {
  margin: 3px 0 0;
  color: #17191d;
  font-size: 13px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.ticket-detail-description {
  border-top: 1px solid var(--nex-line);
  padding-top: 12px;
}

.ticket-detail-description strong {
  color: #111318;
  font-size: 13px;
  font-weight: 950;
}

.ticket-attachment {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 8px;
  border: 1px solid #d9dde5;
  background: white;
  padding: 8px 10px;
  color: #3d444f;
  font-size: 12px;
  font-weight: 850;
}

.category-pills,
.support-topic-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.category-pills button,
.support-topic-list span {
  border: 1px solid #d9dde5;
  background: white;
  color: #4d535f;
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 850;
}

.category-pills button.selected {
  border-color: #111318;
  background: #111318;
  color: white;
}

.resource-card {
  display: grid;
  gap: 9px;
}

.resource-card.selected {
  border-color: rgb(227 6 19 / 0.38);
  box-shadow: 0 0 0 3px rgb(227 6 19 / 0.08), 0 16px 44px rgb(18 22 30 / 0.06);
}

.quick-link-card {
  position: relative;
  padding: 0;
}

.quick-link-card .icon-btn {
  position: absolute;
  right: 10px;
  top: 10px;
}

.link-admin-controls {
  border-top: 1px solid var(--nex-line);
  background: #fafafb;
}

.link-admin-controls > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) 72px auto;
  gap: 8px;
  padding: 0 12px 12px;
}

.link-admin-controls input {
  min-width: 0;
  border: 1px solid #d9dde5;
  background: white;
  padding: 8px 9px;
  color: #17191d;
  font-size: 12px;
  font-weight: 750;
}

.quick-link-card .link-admin-controls .icon-btn {
  position: static;
}

.guide-list button {
  display: grid;
  gap: 4px;
  border: 1px solid var(--nex-line);
  background: #fafafb;
  padding: 12px;
  text-align: left;
}

.guide-list button.selected {
  border-color: var(--nex-red);
  background: rgb(227 6 19 / 0.06);
}

.guide-list button strong {
  color: #111318;
  font-size: 15px;
  font-weight: 950;
}

.guide-admin-card {
  display: grid;
  gap: 10px;
  margin-top: 10px;
  border: 1px solid rgb(227 6 19 / 0.18);
  background: rgb(227 6 19 / 0.04);
  padding: 12px;
}

.guide-admin-card h4 {
  margin: 0;
  color: #111318;
  font-size: 15px;
  font-weight: 950;
}

.guide-detail {
  display: grid;
  gap: 18px;
}

.guide-detail h3 {
  margin: 0;
  font-size: 32px;
  font-weight: 950;
}

.guide-detail h4 {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.guide-detail ul {
  margin: 0;
  padding-left: 19px;
  color: #3d444f;
  line-height: 1.6;
}

.guide-overview-card {
  border: 1px solid rgb(227 6 19 / 0.16);
  background:
    linear-gradient(120deg, rgb(227 6 19 / 0.06), transparent 42%),
    #ffffff;
  padding: 16px;
}

.guide-overview-card p {
  margin: 0 0 14px;
  color: #4e5662;
  font-size: 14px;
  line-height: 1.6;
}

.guide-callouts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
}

.guide-callouts article {
  border: 1px solid var(--nex-line);
  background: #fafafb;
  padding: 12px;
}

.guide-callouts strong {
  color: #111318;
  font-size: 13px;
  font-weight: 950;
}

.guide-callouts p {
  color: #5f6673;
  font-size: 13px;
  line-height: 1.5;
}

.crm-hero {
  background:
    linear-gradient(100deg, rgb(0 0 0 / 0.9), rgb(0 0 0 / 0.58)),
    radial-gradient(circle at 80% 12%, rgb(201 162 74 / 0.38), transparent 34%),
    linear-gradient(135deg, var(--nex-red), #111318);
}

.crm-roadmap-card {
  min-height: 170px;
}

.native-readiness-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.native-readiness-list article {
  border: 1px solid var(--nex-line);
  background: #fafafb;
  padding: 14px;
}

.native-readiness-list strong,
.native-readiness-list span {
  display: block;
}

.native-readiness-list strong {
  color: #111318;
  font-size: 14px;
  font-weight: 950;
}

.native-readiness-list span {
  margin-top: 6px;
  color: #5f6673;
  font-size: 13px;
  line-height: 1.5;
}

.crm-module {
  gap: 18px;
}

.crm-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 2px 10px;
  scrollbar-width: none;
}

.crm-tabs::-webkit-scrollbar {
  display: none;
}

.crm-tabs button {
  border: 1px solid var(--nex-line);
  background: white;
  color: #353b45;
  padding: 10px 14px;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.crm-tabs button.active {
  border-color: var(--nex-red);
  background: #111318;
  color: white;
  box-shadow: 0 12px 26px rgb(5 5 5 / 0.14);
}

.crm-dashboard-grid,
.crm-import-grid,
.crm-settings-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.crm-dashboard-grid > .stat-card {
  min-height: 112px;
}

.crm-wide-panel {
  grid-column: span 4;
}

.crm-import-grid,
.crm-settings-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.crm-layout {
  display: grid;
  grid-template-columns: minmax(320px, 0.85fr) minmax(0, 1.6fr);
  gap: 16px;
  align-items: start;
}

.crm-list-panel,
.crm-detail-panel,
.crm-board-panel {
  min-width: 0;
}

.crm-filter-grid,
.crm-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.crm-form-grid .field:has(textarea) {
  grid-column: 1 / -1;
}

.crm-form-grid.compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.crm-contact-list {
  display: grid;
  gap: 9px;
  margin: 14px 0;
  max-height: 520px;
  overflow: auto;
  padding-right: 4px;
}

.crm-contact-card {
  display: grid;
  gap: 4px;
  width: 100%;
  border: 1px solid var(--nex-line);
  background: #fafafb;
  padding: 13px;
  text-align: left;
  cursor: pointer;
}

.crm-contact-card.active,
.crm-contact-card:hover {
  border-color: rgb(227 6 19 / 0.55);
  background:
    linear-gradient(90deg, rgb(227 6 19 / 0.08), transparent 55%),
    white;
}

.crm-contact-card strong,
.pipeline-card strong,
.crm-task-stack strong,
.crm-task-table strong {
  color: #111318;
  font-size: 14px;
  font-weight: 950;
}

.crm-contact-card span,
.pipeline-card span,
.crm-task-stack span,
.crm-task-table span {
  color: #5f6673;
  font-size: 12px;
  line-height: 1.45;
}

.crm-contact-card em {
  color: var(--nex-red);
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
}

.crm-add-form {
  border-top: 1px solid var(--nex-line);
  display: grid;
  gap: 12px;
  margin-top: 12px;
  padding-top: 16px;
}

.compact-heading {
  margin-bottom: -2px;
}

.crm-detail-stack {
  display: grid;
  gap: 16px;
}

.crm-contact-head {
  align-items: center;
  border-bottom: 1px solid var(--nex-line);
  display: flex;
  gap: 14px;
  justify-content: space-between;
  padding-bottom: 14px;
}

.crm-contact-head h3 {
  margin: 4px 0 3px;
  color: #111318;
  font-size: 25px;
  font-weight: 950;
}

.crm-contact-head span {
  color: #5f6673;
  font-size: 13px;
  font-weight: 800;
}

.crm-ai-panel,
.crm-inner-panel {
  border: 1px solid var(--nex-line);
  background: #fbfbfc;
  padding: 14px;
}

.crm-ai-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ai-output-card {
  border: 1px solid rgb(227 6 19 / 0.22);
  background: white;
  margin-top: 12px;
  padding: 14px;
}

.ai-output-card p {
  color: #343a46;
  font-size: 13px;
  line-height: 1.6;
  margin: 10px 0 0;
  white-space: pre-wrap;
}

.crm-split-panels {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.crm-inline-form {
  display: grid;
  gap: 10px;
}

.crm-inline-form .btn {
  justify-self: start;
}

.crm-timeline-list,
.crm-task-stack,
.crm-task-table {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.crm-timeline-list article,
.crm-task-stack article,
.crm-task-table article {
  border: 1px solid var(--nex-line);
  background: white;
  padding: 12px;
}

.crm-timeline-list span {
  color: var(--nex-red);
  display: block;
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.crm-timeline-list p {
  color: #3d444f;
  font-size: 13px;
  line-height: 1.55;
  margin: 6px 0 0;
}

.crm-task-stack article,
.crm-task-table article {
  display: grid;
  gap: 7px;
}

.crm-task-stack article.overdue,
.crm-task-table article.overdue {
  border-color: rgb(227 6 19 / 0.4);
  background: #fff5f5;
}

.crm-task-stack article.done {
  opacity: 0.62;
}

.crm-task-table article {
  align-items: center;
  grid-template-columns: minmax(0, 1fr) auto;
}

.crm-stage-meter {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
}

.crm-stage-meter button {
  border: 1px solid var(--nex-line);
  background:
    linear-gradient(135deg, rgb(17 19 24 / 0.04), transparent),
    white;
  cursor: pointer;
  min-height: 82px;
  padding: 12px;
  text-align: left;
}

.crm-stage-meter strong {
  color: var(--nex-red);
  display: block;
  font-size: 26px;
  font-weight: 950;
}

.crm-stage-meter span {
  color: #4f5662;
  font-size: 12px;
  font-weight: 900;
}

.crm-permission-card {
  align-items: flex-start;
  display: flex;
  gap: 12px;
}

.crm-permission-card svg {
  color: var(--nex-red);
  flex: 0 0 auto;
}

.crm-permission-card p,
.crm-helper-text {
  color: #4f5662;
  font-size: 13px;
  line-height: 1.6;
  margin: 0;
}

.crm-mini-stats,
.crm-stage-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.crm-mini-stats span,
.crm-stage-tags span {
  border: 1px solid var(--nex-line);
  background: #fafafb;
  color: #353b45;
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 900;
}

.pipeline-board {
  display: grid;
  grid-auto-columns: minmax(250px, 1fr);
  grid-auto-flow: column;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 6px;
}

.pipeline-column {
  border: 1px solid var(--nex-line);
  background: #f6f7f9;
  min-height: 360px;
  padding: 10px;
}

.pipeline-column-head {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
}

.pipeline-column-head strong {
  color: #111318;
  font-size: 13px;
  font-weight: 950;
}

.pipeline-column-head span {
  align-items: center;
  background: #111318;
  color: white;
  display: inline-flex;
  height: 24px;
  justify-content: center;
  min-width: 24px;
  padding: 0 7px;
  font-size: 11px;
  font-weight: 950;
}

.pipeline-card {
  background: white;
  border: 1px solid var(--nex-line);
  display: grid;
  gap: 10px;
  margin-bottom: 10px;
  padding: 11px;
}

.pipeline-card button {
  background: transparent;
  border: 0;
  display: grid;
  gap: 4px;
  padding: 0;
  text-align: left;
  cursor: pointer;
}

.pipeline-card select {
  border: 1px solid var(--nex-line);
  background: #fafafb;
  color: #111318;
  font-size: 12px;
  font-weight: 800;
  min-height: 36px;
  padding: 8px;
  width: 100%;
}

.crm-import-grid .panel,
.crm-settings-grid .panel {
  min-width: 0;
}

.crm-cockpit {
  display: grid;
  gap: 14px;
}

.crm-cockpit-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(250px, 0.38fr);
  gap: 18px;
  align-items: end;
  overflow: hidden;
  border: 1px solid rgb(17 19 24 / 0.08);
  border-radius: 8px;
  background:
    radial-gradient(circle at 86% 12%, rgb(227 6 19 / 0.16), transparent 28%),
    linear-gradient(135deg, #08090c, #181b22 62%, #252a34);
  color: white;
  padding: 24px;
  box-shadow: 0 18px 46px rgb(18 22 30 / 0.12);
}

.crm-cockpit-hero h2 {
  max-width: 880px;
  margin: 4px 0 10px;
  color: white;
  font-size: clamp(28px, 4vw, 46px);
  font-weight: 950;
  line-height: 1;
}

.crm-cockpit-hero p:not(.eyebrow) {
  max-width: 860px;
  margin: 0;
  color: rgb(255 255 255 / 0.72);
  font-size: 14px;
  line-height: 1.6;
}

.crm-cockpit-status {
  display: grid;
  gap: 8px;
}

.crm-cockpit-status span {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgb(255 255 255 / 0.12);
  border-radius: 8px;
  background: rgb(255 255 255 / 0.06);
  color: rgb(255 255 255 / 0.82);
  padding: 10px;
  font-size: 12px;
  font-weight: 900;
}

.crm-cockpit-status svg {
  color: #ff2632;
}

.crm-cockpit-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}

.crm-cockpit-card {
  display: grid;
  gap: 6px;
  min-height: 128px;
  border: 1px solid #e3e7ef;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgb(227 6 19 / 0.045), transparent 48%),
    white;
  color: #111318;
  padding: 14px;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 10px 26px rgb(18 22 30 / 0.04);
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.crm-cockpit-card:hover {
  border-color: rgb(227 6 19 / 0.34);
  box-shadow: 0 16px 36px rgb(18 22 30 / 0.08);
  transform: translateY(-1px);
}

.crm-cockpit-card svg {
  color: var(--nex-red);
}

.crm-cockpit-card.hot {
  background:
    linear-gradient(135deg, rgb(227 6 19 / 0.09), transparent 54%),
    white;
}

.crm-cockpit-card.danger {
  border-color: rgb(227 6 19 / 0.24);
}

.crm-cockpit-card strong {
  color: #111318;
  font-size: 30px;
  font-weight: 950;
  line-height: 1;
}

.crm-cockpit-card span {
  color: #252932;
  font-size: 13px;
  font-weight: 950;
}

.crm-cockpit-card em {
  color: #747c89;
  font-size: 11px;
  font-style: normal;
  font-weight: 850;
}

.crm-cockpit-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
}

.crm-cockpit-grid .crm-wide-panel {
  grid-column: 1 / -1;
}

.crm-lead-queue,
.crm-smart-list-mini,
.crm-source-list,
.crm-smart-list-buttons,
.crm-lead-table,
.crm-accountability-table {
  display: grid;
  gap: 9px;
}

.crm-lead-queue button,
.crm-smart-list-mini button,
.crm-source-list button,
.crm-smart-list-buttons button,
.crm-lead-table button {
  width: 100%;
  border: 1px solid #e3e7ef;
  border-radius: 8px;
  background: #fbfcfd;
  color: #111318;
  padding: 11px;
  text-align: left;
  cursor: pointer;
}

.crm-lead-queue button {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 10px;
  align-items: center;
}

.crm-lead-queue strong,
.crm-smart-list-mini span,
.crm-source-list span,
.crm-smart-list-buttons span,
.crm-lead-table strong,
.crm-accountability-table strong {
  color: #111318;
  font-size: 13px;
  font-weight: 950;
}

.crm-lead-queue span,
.crm-lead-table span,
.crm-accountability-table span {
  color: #67707d;
  font-size: 12px;
  font-weight: 750;
}

.crm-lead-queue em {
  grid-row: span 2;
  border: 1px solid rgb(227 6 19 / 0.2);
  border-radius: 999px;
  background: rgb(227 6 19 / 0.08);
  color: var(--nex-red);
  padding: 6px 8px;
  font-size: 11px;
  font-style: normal;
  font-weight: 950;
}

.crm-smart-list-mini button,
.crm-smart-list-buttons button,
.crm-source-list button {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
}

.crm-smart-list-buttons button.active {
  border-color: rgb(227 6 19 / 0.4);
  background: rgb(227 6 19 / 0.08);
}

.crm-smart-list-mini svg,
.crm-smart-list-buttons svg {
  color: var(--nex-red);
}

.crm-smart-list-mini strong,
.crm-smart-list-buttons strong,
.crm-source-list strong {
  display: inline-flex;
  min-width: 28px;
  height: 28px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #111318;
  color: white;
  font-size: 12px;
  font-weight: 950;
}

.crm-accountability-table article {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) repeat(5, auto);
  gap: 8px;
  align-items: center;
  border: 1px solid #e3e7ef;
  border-radius: 8px;
  background: #fbfcfd;
  padding: 10px;
}

.crm-profile-badges,
.crm-card-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 8px;
}

.crm-profile-badges em,
.crm-contact-card small,
.pipeline-card small {
  border: 1px solid #dfe3ea;
  border-radius: 999px;
  background: #f7f8fa;
  color: #4f5662;
  padding: 5px 8px;
  font-size: 10px;
  font-style: normal;
  font-weight: 950;
  text-transform: uppercase;
}

.temperature-badge {
  border-color: #dfe3ea !important;
  background: #f7f8fa !important;
  color: #4f5662 !important;
}

.temperature-badge.hot {
  border-color: rgb(227 6 19 / 0.28) !important;
  background: rgb(227 6 19 / 0.1) !important;
  color: var(--nex-red) !important;
}

.temperature-badge.warm {
  border-color: rgb(201 162 74 / 0.3) !important;
  background: rgb(201 162 74 / 0.12) !important;
  color: #80601d !important;
}

.temperature-badge.cold {
  border-color: rgb(72 92 120 / 0.18) !important;
  background: rgb(72 92 120 / 0.08) !important;
  color: #526273 !important;
}

.temperature-badge.nurture {
  border-color: rgb(37 99 235 / 0.2) !important;
  background: rgb(37 99 235 / 0.08) !important;
  color: #1d4ed8 !important;
}

.temperature-badge.dead-dnc {
  border-color: rgb(17 19 24 / 0.18) !important;
  background: #eeeeef !important;
  color: #343a46 !important;
}

.crm-next-action-strip,
.crm-smart-plan-panel,
.crm-communication-panel {
  display: grid;
  gap: 12px;
  border: 1px solid #e3e7ef;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgb(227 6 19 / 0.04), transparent 56%),
    #fbfcfd;
  padding: 14px;
}

.crm-next-action-strip {
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
}

.crm-next-action-strip svg {
  color: var(--nex-red);
}

.crm-next-action-strip strong,
.crm-smart-plan-panel h3,
.crm-communication-panel h3 {
  color: #111318;
  font-weight: 950;
}

.crm-next-action-strip p,
.crm-smart-plan-panel p {
  margin: 4px 0 0;
  color: #5f6673;
  font-size: 13px;
  line-height: 1.45;
}

.crm-smart-plan-panel {
  grid-template-columns: minmax(0, 1fr) minmax(220px, 0.32fr) auto;
  align-items: end;
}

.crm-smart-plan-panel article {
  grid-column: 1 / -1;
  border-top: 1px solid #e3e7ef;
  padding-top: 12px;
}

.crm-smart-plan-panel article strong {
  display: block;
  color: #111318;
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
}

.crm-communication-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  align-items: end;
}

.crm-communication-form .field:has(textarea) {
  grid-column: 1 / -1;
}

.crm-contact-card-head,
.pipeline-card-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: start;
}

.pipeline-card-head em {
  border-radius: 999px;
  padding: 5px 7px;
  font-size: 10px;
  font-style: normal;
  font-weight: 950;
}

.crm-lead-table button {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) repeat(4, auto);
  gap: 10px;
  align-items: center;
}

.crm-smart-layout {
  display: grid;
  grid-template-columns: minmax(260px, 0.35fr) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.active-soft {
  border-color: rgb(227 6 19 / 0.35) !important;
  background: rgb(227 6 19 / 0.08) !important;
  color: var(--nex-red) !important;
}

.pipeline-empty {
  margin: 10px 0 0;
  color: #8b93a0;
  font-size: 12px;
  font-weight: 800;
}

.crm-dnc-toggle {
  align-self: center;
}

.file-input {
  border: 1px dashed rgb(17 19 24 / 0.22);
  background: #fafafb;
  color: #343a46;
  padding: 12px;
  width: 100%;
}

.csv-sample {
  border: 1px solid var(--nex-line);
  background: #fafafb;
  margin-top: 16px;
  padding: 12px;
}

.csv-sample strong {
  color: #111318;
  font-size: 13px;
  font-weight: 950;
}

.csv-sample p,
.muted-text {
  color: #69717e;
  font-size: 12px;
  line-height: 1.55;
  margin: 6px 0 0;
}

.notification-bell {
  position: relative;
  display: inline-flex;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--nex-line);
  background: white;
  color: #111318;
  cursor: pointer;
}

.notification-bell span {
  position: absolute;
  top: -6px;
  right: -6px;
  display: inline-flex;
  min-width: 20px;
  height: 20px;
  align-items: center;
  justify-content: center;
  background: var(--nex-red);
  color: white;
  padding: 0 5px;
  font-size: 10px;
  font-weight: 950;
}

.buyer-hero {
  background:
    linear-gradient(100deg, rgb(0 0 0 / 0.9), rgb(0 0 0 / 0.54)),
    radial-gradient(circle at 86% 18%, rgb(227 6 19 / 0.5), transparent 32%),
    linear-gradient(135deg, #17191d, #3b1418);
}

.buyer-tracker-page {
  gap: 18px;
}

.buyer-create-form,
.buyer-list-page,
.buyer-detail-page {
  display: grid;
  gap: 16px;
}

.buyer-form-grid,
.buyer-filter-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.buyer-form-grid .field:has(textarea) {
  grid-column: 1 / -1;
}

.buyer-form-grid.compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.buyer-overdue-filter {
  align-self: end;
  min-height: 44px;
}

.buyer-transaction-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}

.buyer-transaction-card {
  border: 1px solid var(--nex-line);
  background: white;
  box-shadow: 0 16px 36px rgb(5 5 5 / 0.07);
}

.buyer-transaction-card > button {
  display: grid;
  width: 100%;
  gap: 12px;
  border: 0;
  background: transparent;
  padding: 16px;
  text-align: left;
  cursor: pointer;
}

.buyer-card-head {
  display: grid;
  gap: 8px;
}

.buyer-card-head strong {
  color: #111318;
  font-size: 18px;
  font-weight: 950;
  line-height: 1.1;
}

.buyer-transaction-card p {
  margin: 0;
  color: #4f5662;
  font-size: 13px;
  line-height: 1.5;
}

.buyer-card-meta {
  display: grid;
  gap: 5px;
}

.buyer-card-meta span,
.buyer-transaction-card em {
  color: #69717e;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.status-badge,
.deadline-badge {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  background: #111318;
  color: white;
  padding: 6px 9px;
  font-size: 10px;
  font-weight: 950;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.status-badge.closing-soon,
.deadline-badge.tone-soon {
  background: #c98213;
}

.status-badge.closed,
.deadline-badge.tone-complete {
  background: #19784d;
}

.status-badge.cancelled,
.deadline-badge.tone-overdue,
.deadline-badge.tone-today {
  background: var(--nex-red);
}

.deadline-badge.tone-tomorrow {
  background: #d6601f;
}

.deadline-badge.tone-none {
  background: #747985;
}

.progress-track {
  height: 8px;
  overflow: hidden;
  background: #e7e9ee;
}

.progress-track div {
  height: 100%;
  background: linear-gradient(90deg, var(--nex-red), #111318);
}

.buyer-detail-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid var(--nex-line);
  background: white;
  padding: 18px;
}

.buyer-detail-hero h3 {
  margin: 4px 0 6px;
  color: #111318;
  font-size: 28px;
  font-weight: 950;
  line-height: 1.04;
}

.buyer-detail-hero p {
  margin: 0;
  color: #5f6673;
  font-size: 13px;
  line-height: 1.5;
}

.deadline-summary-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  border: 1px solid rgb(227 6 19 / 0.22);
  background:
    linear-gradient(120deg, rgb(227 6 19 / 0.08), transparent 40%),
    white;
  padding: 18px;
}

.deadline-summary-card h3 {
  margin: 4px 0 6px;
  color: #111318;
  font-size: 22px;
  font-weight: 950;
}

.deadline-summary-card span {
  color: #5d6571;
  font-size: 13px;
  font-weight: 800;
}

.deadline-summary-card em {
  position: absolute;
  top: 14px;
  right: 14px;
  color: var(--nex-red);
  font-size: 10px;
  font-style: normal;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.deadline-summary-metrics {
  display: grid;
  grid-template-columns: auto auto;
  gap: 3px 9px;
  align-content: center;
  text-align: right;
}

.deadline-summary-metrics strong {
  color: #111318;
  font-size: 25px;
  font-weight: 950;
}

.deadline-summary-metrics strong.danger {
  color: var(--nex-red);
}

.deadline-summary-metrics span {
  align-self: center;
  font-size: 11px;
  text-transform: uppercase;
}

.deadline-summary-card .progress-track {
  grid-column: 1 / -1;
}

.buyer-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.38fr);
  gap: 16px;
  align-items: start;
}

.buyer-checklist-stack,
.buyer-side-panel {
  display: grid;
  gap: 14px;
}

.checklist-section {
  border: 1px solid var(--nex-line);
  background: white;
}

.checklist-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--nex-line);
  background: white;
  color: inherit;
  padding: 14px 16px;
  text-align: left;
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease;
}

.checklist-section-head:hover {
  background: #fbfcfd;
}

.checklist-section.collapsed .checklist-section-head {
  border-bottom-color: transparent;
}

.checklist-section-title {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-width: 0;
}

.checklist-section-title svg {
  color: var(--nex-red);
}

.checklist-section-title p {
  margin: 4px 0 0;
  color: #747c89;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}

.checklist-section-head h3 {
  margin: 0;
  color: #111318;
  font-size: 17px;
  font-weight: 950;
}

.checklist-section-head span {
  background: #111318;
  color: white;
  padding: 5px 8px;
  font-size: 11px;
  font-weight: 950;
}

.checklist-section-preview {
  display: grid;
  gap: 8px;
  border-top: 1px solid var(--nex-line);
  padding: 0 16px 14px;
}

.preview-task {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  background: #f8f9fb;
  padding: 10px;
}

.preview-task strong {
  color: #252932;
  font-size: 12px;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.preview-task small {
  color: #69707d;
  font-size: 11px;
  font-weight: 850;
  text-align: right;
}

.preview-task.tone-overdue,
.preview-task.tone-today {
  background: #fff0f1;
}

.preview-task.tone-tomorrow,
.preview-task.tone-soon {
  background: #fff7e5;
}

.checklist-section-preview > span,
.checklist-section-preview > em {
  color: #747c89;
  font-size: 12px;
  font-style: normal;
  font-weight: 850;
}

.buyer-checklist-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.buyer-checklist-toolbar h3 {
  margin: 2px 0 4px;
  color: #111318;
  font-size: 20px;
  font-weight: 950;
}

.buyer-checklist-toolbar span {
  color: #69707d;
  font-size: 13px;
  font-weight: 750;
}

.checklist-task-list {
  display: grid;
}

.checklist-task-item {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  gap: 12px;
  border-bottom: 1px solid var(--nex-line);
  padding: 14px 16px;
}

.checklist-task-item:last-child {
  border-bottom: 0;
}

.checklist-task-item.tone-complete {
  background: #f2fbf6;
}

.checklist-task-item.tone-soon {
  background: #fff9e8;
}

.checklist-task-item.tone-tomorrow {
  background: #fff1e8;
}

.checklist-task-item.tone-today,
.checklist-task-item.tone-overdue {
  background: #fff0f1;
}

.task-check {
  display: flex;
  align-items: start;
  justify-content: center;
  padding-top: 2px;
}

.task-check input {
  width: 20px;
  height: 20px;
  accent-color: var(--nex-red);
}

.task-main {
  min-width: 0;
}

.task-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.task-title-row strong {
  color: #111318;
  font-size: 14px;
  font-weight: 950;
  line-height: 1.35;
}

.task-edit-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  margin-top: 10px;
}

.task-edit-grid .field:has(textarea) {
  grid-column: 1 / -1;
}

.task-edit-grid .field span {
  font-size: 10px;
}

.task-edit-grid input,
.task-edit-grid select,
.task-edit-grid textarea {
  min-height: 36px;
  padding: 8px;
  font-size: 12px;
}

.task-edit-grid textarea {
  min-height: 58px;
}

.buyer-key-date-list {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}

.buyer-key-date-list span {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--nex-line);
  padding-bottom: 8px;
  color: #5f6673;
  font-size: 12px;
  font-weight: 800;
}

.buyer-key-date-list strong {
  color: #111318;
}

.reminder-settings-panel {
  border: 1px solid var(--nex-line);
  background: white;
  padding: 16px;
}

.check-grid {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}

.notification-center {
  min-height: 420px;
}

.notification-list {
  display: grid;
  gap: 10px;
}

.notification-list article {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  border: 1px solid var(--nex-line);
  background: #fafafb;
  padding: 13px;
}

.notification-list article.unread {
  border-color: rgb(227 6 19 / 0.36);
  background: #fff7f7;
}

.notification-list span {
  color: var(--nex-red);
  display: block;
  font-size: 10px;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.notification-list strong {
  color: #111318;
  display: block;
  margin-top: 3px;
  font-size: 14px;
  font-weight: 950;
}

.notification-list p {
  color: #4f5662;
  font-size: 13px;
  line-height: 1.5;
  margin: 5px 0;
}

.notification-list em {
  color: #69717e;
  font-size: 11px;
  font-style: normal;
  font-weight: 850;
}

.production-calculator-page {
  gap: 18px;
}

.production-hero {
  background:
    linear-gradient(100deg, rgb(0 0 0 / 0.92), rgb(0 0 0 / 0.58)),
    radial-gradient(circle at 82% 16%, rgb(227 6 19 / 0.42), transparent 34%),
    linear-gradient(135deg, #111318, #3b1418);
}

.production-score-card {
  display: grid;
  min-width: 220px;
  place-items: center;
  gap: 8px;
  border: 1px solid rgb(255 255 255 / 0.16);
  background: rgb(255 255 255 / 0.1);
  padding: 20px;
  text-align: center;
}

.production-score-card span,
.production-daily-card p,
.production-updated {
  color: rgb(255 255 255 / 0.68);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.production-score-card strong {
  color: white;
  font-size: 54px;
  font-weight: 950;
  line-height: 0.9;
}

.production-status-badge,
.production-pace-badge {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  background: var(--nex-red);
  color: white;
  padding: 6px 9px;
  font-size: 10px;
  font-style: normal;
  font-weight: 950;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.production-status-badge.status-elite-pace,
.production-pace-badge.ahead {
  background: #19784d;
}

.production-status-badge.status-on-track,
.production-pace-badge.on-track {
  background: #1766a6;
}

.production-status-badge.status-needs-push {
  background: #c98213;
}

.production-status-badge.status-off-pace,
.production-pace-badge.behind {
  background: var(--nex-red);
}

.production-daily-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  background:
    linear-gradient(105deg, #111318, rgb(227 6 19 / 0.92)),
    var(--nex-red);
  color: white;
  padding: 26px;
  box-shadow: 0 20px 56px rgb(5 5 5 / 0.18);
}

.production-daily-card p,
.production-daily-card span {
  margin: 0;
}

.production-daily-card h3 {
  margin: 4px 0 8px;
  font-size: clamp(38px, 7vw, 72px);
  font-weight: 950;
  line-height: 0.94;
}

.production-daily-card span {
  color: rgb(255 255 255 / 0.78);
  font-size: 15px;
  font-weight: 800;
}

.production-grid.two-column,
.production-activity-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}

.production-card {
  display: grid;
  gap: 14px;
}

.production-form-grid,
.production-assumption-list,
.production-activity-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.production-assumption-list,
.production-activity-form {
  grid-template-columns: 1fr;
}

.production-field {
  display: grid;
  gap: 6px;
}

.production-field span {
  color: #343a46;
  font-size: 12px;
  font-weight: 900;
}

.production-field small,
.production-muted {
  color: #6b7280;
  font-size: 12px;
  line-height: 1.45;
}

.production-input-wrap {
  display: flex;
  align-items: center;
  border: 1px solid #d8dce4;
  background: white;
}

.production-input-wrap em {
  color: #69717e;
  padding: 0 10px;
  font-size: 12px;
  font-style: normal;
  font-weight: 950;
}

.production-field > input,
.production-input-wrap input {
  flex: 1;
  width: 100%;
  min-width: 0;
  min-height: 42px;
  border: 0;
  background: white;
  color: #111318;
  padding: 0 10px;
  font-size: 14px;
  font-weight: 850;
}

.production-field > input {
  border: 1px solid #d8dce4;
}

.production-metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
}

.production-metric-card {
  display: grid;
  gap: 8px;
  border: 1px solid var(--nex-line);
  background: #fafafb;
  padding: 15px;
}

.production-metric-card.featured {
  border-color: rgb(227 6 19 / 0.35);
  background:
    linear-gradient(135deg, rgb(227 6 19 / 0.08), transparent 58%),
    white;
}

.production-metric-card svg {
  color: var(--nex-red);
}

.production-metric-card span {
  color: #69717e;
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.production-metric-card strong {
  color: #111318;
  font-size: 26px;
  font-weight: 950;
  line-height: 1;
}

.production-period-toggle {
  display: flex;
  gap: 6px;
  background: #f0f2f6;
  padding: 4px;
}

.production-period-toggle button {
  border: 0;
  background: transparent;
  color: #4f5662;
  padding: 8px 11px;
  font-size: 12px;
  font-weight: 900;
}

.production-period-toggle button.active {
  background: #111318;
  color: white;
}

.production-accountability-panel {
  display: grid;
  gap: 14px;
}

.production-accountability-panel > p {
  margin: 0;
  color: #4f5662;
  font-size: 13px;
  line-height: 1.5;
}

.production-score-ring {
  display: grid;
  min-height: 150px;
  place-items: center;
  border: 1px solid rgb(227 6 19 / 0.28);
  background:
    radial-gradient(circle at center, rgb(227 6 19 / 0.1), transparent 58%),
    white;
  text-align: center;
}

.production-score-ring strong {
  color: var(--nex-red);
  font-size: 62px;
  font-weight: 950;
  line-height: 0.9;
}

.production-score-ring span {
  color: #111318;
  font-size: 13px;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.production-activity-rows {
  display: grid;
  gap: 9px;
}

.production-activity-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(90px, 0.45fr) auto;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--nex-line);
  background: #fafafb;
  padding: 11px;
}

.production-activity-row > div:first-child {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 2px 8px;
  align-items: center;
}

.production-activity-row svg {
  grid-row: span 2;
  color: var(--nex-red);
}

.production-activity-row strong,
.production-activity-row span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.production-activity-row strong {
  color: #111318;
  font-size: 13px;
  font-weight: 950;
}

.production-activity-row span {
  color: #69717e;
  font-size: 11px;
  font-weight: 800;
}

.production-progress {
  height: 8px;
  overflow: hidden;
  background: #e3e6ec;
}

.production-progress div {
  height: 100%;
  background: linear-gradient(90deg, var(--nex-red), #111318);
}

.nex-chat-page {
  display: grid;
  grid-template-columns: minmax(260px, 320px) minmax(0, 1fr);
  gap: 18px;
  min-height: calc(100vh - 130px);
  padding-top: 22px;
}

.nex-chat-sidebar,
.nex-chat-main {
  border: 1px solid var(--nex-line);
  background: white;
  box-shadow: 0 16px 44px rgb(18 22 30 / 0.05);
}

.nex-chat-sidebar {
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 16px;
}

.nex-chat-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #111318;
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.nex-chat-section-heading em {
  color: #7a808c;
  font-style: normal;
}

.dm-heading {
  margin-top: 8px;
}

.nex-chat-room-list {
  display: grid;
  gap: 7px;
}

.nex-chat-room-list button {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  border: 1px solid #dfe2e8;
  background: #fafafb;
  color: #252a34;
  padding: 9px;
  text-align: left;
}

.nex-chat-room-list button.active {
  border-color: rgb(227 6 19 / 0.3);
  background: #111318;
  color: white;
  box-shadow: inset 3px 0 0 var(--nex-red);
}

.nex-chat-room-list button > span:first-child,
.mini-avatar,
.chat-avatar {
  display: grid;
  height: 30px;
  width: 30px;
  place-items: center;
  background: var(--nex-red);
  color: white;
  font-size: 12px;
  font-weight: 950;
}

.nex-chat-room-list strong {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 13px;
  font-weight: 900;
}

.nex-chat-room-list em {
  display: inline-grid;
  min-width: 22px;
  height: 22px;
  place-items: center;
  background: var(--nex-red);
  color: white;
  padding: 0 6px;
  font-size: 10px;
  font-style: normal;
  font-weight: 950;
}

.nex-channel-create {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 38px;
  gap: 7px;
}

.nex-channel-create input {
  min-width: 0;
  border: 1px solid #dfe2e8;
  padding: 0 9px;
}

.nex-channel-create button {
  border: 0;
  background: var(--nex-red);
  color: white;
}

.nex-chat-main {
  display: grid;
  min-width: 0;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
}

.nex-chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--nex-line);
  background:
    linear-gradient(135deg, #ffffff, #f7f8fa);
  padding: 16px 18px;
}

.nex-chat-header h3 {
  margin: 2px 0;
  color: #111318;
  font-size: 24px;
  font-weight: 950;
}

.nex-chat-header span {
  color: #69717e;
  font-size: 12px;
  font-weight: 800;
}

.nex-chat-stream {
  display: flex;
  min-height: 420px;
  flex-direction: column;
  gap: 14px;
  overflow-y: auto;
  padding: 18px;
}

.nex-chat-message {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.nex-chat-message.mine {
  grid-template-columns: minmax(0, 1fr) 38px;
}

.nex-chat-message.mine .chat-avatar {
  grid-column: 2;
}

.nex-chat-message.mine .chat-message-body {
  grid-column: 1;
  grid-row: 1;
  justify-self: end;
  background: #111318;
  color: white;
}

.nex-chat-message.mine .chat-message-meta span,
.nex-chat-message.mine .chat-message-body p {
  color: rgb(255 255 255 / 0.72);
}

.chat-avatar {
  height: 38px;
  width: 38px;
}

.chat-message-body {
  max-width: min(760px, 100%);
  border: 1px solid var(--nex-line);
  background: #fafafb;
  padding: 12px 13px;
}

.chat-message-meta {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 7px;
}

.chat-message-meta strong {
  color: inherit;
  font-size: 13px;
  font-weight: 950;
}

.chat-message-meta span {
  color: #7a808c;
  font-size: 11px;
  font-weight: 800;
}

.chat-message-body p {
  margin: 0;
  color: #303540;
  font-size: 14px;
  line-height: 1.48;
  white-space: pre-wrap;
}

.chat-attachments {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.chat-attachments a {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  border: 1px solid rgb(255 255 255 / 0.18);
  background: rgb(255 255 255 / 0.1);
  color: inherit;
  padding: 8px;
  text-decoration: none;
}

.chat-attachments a:not(.image-attachment) {
  border-color: #dfe2e8;
  background: white;
  color: #111318;
}

.chat-attachments img {
  grid-column: 1 / -1;
  max-height: 240px;
  max-width: 100%;
  object-fit: cover;
}

.chat-attachments span {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 12px;
  font-weight: 900;
}

.chat-attachments small {
  display: block;
  margin-top: 3px;
  color: #7a808c;
  font-size: 10px;
}

.nex-chat-composer {
  display: grid;
  gap: 9px;
  border-top: 1px solid var(--nex-line);
  background: white;
  padding: 12px;
}

.emoji-row {
  display: flex;
  gap: 6px;
  overflow-x: auto;
}

.emoji-row button {
  border: 1px solid #dfe2e8;
  background: #fafafb;
  padding: 6px 8px;
}

.pending-attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.pending-attachments span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: #f1f2f5;
  color: #303540;
  padding: 7px 9px;
  font-size: 12px;
  font-weight: 850;
}

.pending-attachments button {
  border: 0;
  background: transparent;
  color: var(--nex-red);
  font-weight: 950;
}

.composer-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 9px;
  align-items: end;
}

.chat-attach-button {
  display: grid;
  height: 44px;
  place-items: center;
  border: 1px solid #dfe2e8;
  background: #fafafb;
  color: #111318;
  cursor: pointer;
}

.chat-attach-button input {
  display: none;
}

.composer-row textarea {
  min-height: 44px;
  max-height: 150px;
  resize: vertical;
  border: 1px solid #dfe2e8;
  padding: 10px;
  font-size: 14px;
}

.hero-panel {
  min-height: 260px;
  overflow: hidden;
  border: 1px solid rgb(255 255 255 / 0.16);
  background:
    linear-gradient(100deg, rgb(0 0 0 / 0.9), rgb(0 0 0 / 0.5)),
    url("data:image/svg+xml,%3Csvg width='1200' height='560' viewBox='0 0 1200 560' xmlns='http://www.w3.org/2000/svg'%3E%3Crect width='1200' height='560' fill='%2324272d'/%3E%3Cg fill='none' stroke='%23ffffff' stroke-opacity='.14' stroke-width='3'%3E%3Cpath d='M80 420 L260 250 L420 420 Z'/%3E%3Cpath d='M270 420 L520 180 L790 420 Z'/%3E%3Cpath d='M760 420 L980 230 L1140 420 Z'/%3E%3Cpath d='M170 420 V535 M360 420 V535 M620 420 V535 M910 420 V535 M1080 420 V535'/%3E%3C/g%3E%3Cg fill='%23e30613' fill-opacity='.8'%3E%3Crect x='520' y='252' width='38' height='168'/%3E%3Crect x='558' y='216' width='38' height='204'/%3E%3Crect x='596' y='282' width='38' height='138'/%3E%3C/g%3E%3C/svg%3E");
  background-position: center;
  background-size: cover;
  color: white;
  box-shadow: 0 24px 70px rgb(5 5 5 / 0.18);
}

.hero-content {
  max-width: 720px;
  padding: 34px;
}

.hero-content h3 {
  margin: 10px 0;
  max-width: 680px;
  font-size: clamp(34px, 6vw, 58px);
  font-weight: 950;
  line-height: 0.96;
}

.hero-content p:not(.eyebrow) {
  max-width: 650px;
  color: rgb(255 255 255 / 0.78);
  font-size: 16px;
  line-height: 1.6;
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.stat-card,
.panel,
.chat-card {
  border: 1px solid var(--nex-line);
  background: white;
}

.stat-card {
  display: flex;
  min-height: 86px;
  align-items: center;
  gap: 14px;
  padding: 16px;
}

.stat-card svg {
  color: var(--nex-charcoal);
}

.stat-card.red svg {
  color: var(--nex-red);
}

.stat-card.gold svg {
  color: var(--nex-gold);
}

.stat-card p {
  margin: 0;
  color: #69707d;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.stat-card strong {
  display: block;
  margin-top: 3px;
  font-size: 23px;
  font-weight: 950;
}

.panel {
  min-width: 0;
  padding: 18px;
  box-shadow: 0 16px 44px rgb(18 22 30 / 0.05);
}

.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.panel-heading h3 {
  margin: 3px 0 0;
  font-size: 19px;
  font-weight: 900;
}

.studio-strip {
  border: 1px solid var(--nex-line);
  background:
    linear-gradient(135deg, #ffffff, #f7f8fa);
  padding: 18px;
  box-shadow: 0 16px 44px rgb(18 22 30 / 0.05);
}

.studio-template-row {
  display: grid;
  grid-template-columns: repeat(6, minmax(120px, 1fr));
  gap: 10px;
}

.studio-template-card {
  position: relative;
  display: grid;
  min-height: 150px;
  align-content: end;
  overflow: hidden;
  border: 1px solid #dfe2e8;
  background:
    linear-gradient(145deg, rgb(17 19 24 / 0.9), rgb(17 19 24 / 0.62)),
    linear-gradient(135deg, var(--accent), #ffffff);
  color: white;
  padding: 14px;
  text-align: left;
}

.studio-template-card::before {
  content: "";
  position: absolute;
  inset: 14px;
  border: 1px solid rgb(255 255 255 / 0.18);
}

.studio-template-card::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 6px;
  background: var(--accent);
}

.studio-template-card span,
.studio-template-card strong,
.studio-template-card em,
.studio-template-card .brand-logo {
  position: relative;
  z-index: 1;
}

.template-card-logo {
  width: 86px;
  max-height: 34px;
}

.studio-template-card span {
  color: var(--accent);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.studio-template-card strong {
  margin-top: 8px;
  font-size: 21px;
  font-weight: 950;
  line-height: 0.95;
  overflow-wrap: anywhere;
}

.studio-template-card em {
  margin-top: 12px;
  color: rgb(255 255 255 / 0.66);
  font-size: 11px;
  font-style: normal;
  font-weight: 850;
  text-transform: uppercase;
}

.canva-studio {
  display: grid;
  gap: 12px;
  min-height: calc(100vh - 92px);
  padding-top: 14px;
}

.studio-top-toolbar {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) auto;
  gap: 14px;
  align-items: center;
  border: 1px solid var(--nex-line);
  background: white;
  padding: 12px;
  box-shadow: 0 12px 32px rgb(18 22 30 / 0.05);
}

.project-title-wrap {
  display: grid;
  gap: 4px;
}

.project-title-wrap input {
  width: 100%;
  border: 0;
  border-bottom: 1px solid #dfe2e8;
  background: transparent;
  color: #111318;
  padding: 3px 0 7px;
  font-size: 20px;
  font-weight: 950;
}

.project-title-wrap span {
  color: #6b7280;
  font-size: 11px;
  font-weight: 850;
}

.studio-toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: end;
}

.studio-toolbar-actions .btn {
  min-height: 36px;
}

.studio-export-strip {
  display: grid;
  grid-template-columns: minmax(220px, 0.34fr) minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  border: 1px solid rgb(17 19 24 / 0.09);
  background:
    linear-gradient(135deg, #ffffff 0%, #f7f8fb 100%);
  padding: 12px;
  box-shadow: 0 12px 34px rgb(18 22 30 / 0.05);
}

.studio-export-strip > div:first-child {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.studio-export-strip strong {
  color: #111318;
  font-size: 16px;
  font-weight: 950;
}

.studio-export-strip span,
.studio-note {
  color: #69707d;
  font-size: 11px;
  font-weight: 850;
  line-height: 1.45;
}

.studio-export-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: end;
  gap: 8px;
}

.studio-export-grid,
.studio-social-grid {
  display: grid;
  gap: 8px;
}

.studio-export-grid button,
.studio-social-grid button {
  display: flex;
  min-height: 42px;
  align-items: center;
  gap: 9px;
  border: 1px solid #dfe2e8;
  background: white;
  color: #303540;
  padding: 10px 11px;
  text-align: left;
}

.studio-export-grid button:hover,
.studio-social-grid button:hover {
  border-color: rgb(227 6 19 / 0.34);
  box-shadow: 0 10px 24px rgb(17 19 24 / 0.06);
}

.studio-export-grid span,
.studio-social-grid span {
  min-width: 0;
  font-size: 12px;
  font-weight: 900;
}

.studio-start-strip {
  display: grid;
  grid-template-columns: minmax(210px, 0.35fr) minmax(0, 1fr);
  gap: 12px;
  align-items: stretch;
  border: 1px solid var(--nex-line);
  background: #111318;
  color: white;
  padding: 12px;
}

.studio-start-copy {
  display: grid;
  align-content: center;
  gap: 4px;
  min-width: 0;
}

.studio-start-copy strong {
  color: white;
  font-size: 18px;
  font-weight: 950;
}

.studio-start-copy span {
  color: rgb(255 255 255 / 0.62);
  font-size: 12px;
  font-weight: 800;
}

.studio-start-actions {
  display: grid;
  grid-template-columns: repeat(6, minmax(112px, 1fr));
  gap: 8px;
  min-width: 0;
}

.studio-start-actions button {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  border: 1px solid rgb(255 255 255 / 0.13);
  background: rgb(255 255 255 / 0.06);
  color: white;
  padding: 10px;
  text-align: left;
}

.studio-start-actions button:hover,
.studio-start-actions button.selected {
  border-color: rgb(227 6 19 / 0.62);
  background: rgb(227 6 19 / 0.18);
}

.studio-start-actions button > svg {
  flex: 0 0 auto;
  color: var(--nex-red);
}

.studio-start-actions button span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.studio-start-actions button strong,
.studio-start-actions button em {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.studio-start-actions button strong {
  color: white;
  font-size: 12px;
  font-weight: 950;
}

.studio-start-actions button em {
  color: rgb(255 255 255 / 0.58);
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
}

.canva-workspace {
  display: grid;
  grid-template-columns: minmax(292px, 360px) minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  min-height: calc(100vh - 258px);
}

.studio-left-panel,
.studio-right-panel,
.studio-canvas-panel {
  min-width: 0;
  min-height: 0;
}

.studio-left-panel {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  position: sticky;
  top: 88px;
  max-height: calc(100vh - 106px);
  overflow: hidden;
  border: 1px solid var(--nex-line);
  background: white;
  box-shadow: 0 16px 36px rgb(18 22 30 / 0.06);
}

.studio-tool-rail {
  display: grid;
  align-content: start;
  gap: 6px;
  border-right: 1px solid var(--nex-line);
  background: #111318;
  padding: 10px 7px;
}

.studio-tool-rail button {
  display: grid;
  gap: 4px;
  place-items: center;
  border: 1px solid transparent;
  background: transparent;
  color: rgb(255 255 255 / 0.62);
  padding: 8px 5px;
}

.studio-tool-rail button.active,
.studio-tool-rail button:hover {
  border-color: rgb(255 255 255 / 0.14);
  background: rgb(255 255 255 / 0.09);
  color: white;
}

.studio-tool-rail span {
  font-size: 9px;
  font-weight: 900;
  line-height: 1.1;
  text-align: center;
}

.studio-tool-panel,
.studio-right-panel {
  overflow-y: auto;
  background: #fbfbfc;
}

.studio-right-panel {
  display: none;
}

.studio-tool-content,
.studio-settings-content {
  display: grid;
  gap: 14px;
  padding: 14px;
}

.studio-panel-head h3 {
  margin: 4px 0 0;
  color: #111318;
  font-size: 18px;
  font-weight: 950;
  line-height: 1.1;
}

.studio-search {
  width: 100%;
  border: 1px solid #d9dde5;
  background: white;
  padding: 10px 11px;
  font-size: 13px;
  font-weight: 800;
}

.studio-filter-row {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.studio-filter-row button,
.selected-element-row button,
.cta-chip-grid button,
.assistant-action-grid button,
.tagline-list button {
  border: 1px solid #dfe2e8;
  background: white;
  color: #3b4049;
  padding: 8px 9px;
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

.studio-filter-row button.selected,
.selected-element-row button.selected {
  border-color: #111318;
  background: #111318;
  color: white;
}

.studio-template-browser {
  display: grid;
  gap: 12px;
}

.studio-template-preview {
  display: grid;
  gap: 8px;
  border: 1px solid #dfe2e8;
  background: white;
  padding: 10px;
  text-align: left;
}

.studio-template-preview.selected {
  border-color: rgb(227 6 19 / 0.45);
  box-shadow: 0 0 0 3px rgb(227 6 19 / 0.08);
}

.studio-template-preview strong {
  color: #111318;
  font-size: 13px;
  font-weight: 950;
}

.studio-template-preview > span {
  color: #707783;
  font-size: 11px;
  font-weight: 850;
}

.studio-size-note {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #dfe2e8;
  background: white;
  color: #4b515d;
  padding: 9px 10px;
  font-size: 11px;
  font-weight: 850;
}

.studio-size-note svg {
  color: var(--nex-red);
}

.mini-template-preview,
.project-thumb {
  display: grid;
  min-height: 156px;
  align-content: end;
  gap: 7px;
  overflow: hidden;
  background:
    linear-gradient(140deg, rgb(5 5 5 / 0.9), rgb(5 5 5 / 0.5)),
    linear-gradient(135deg, var(--accent), #ffffff);
  color: white;
  padding: 12px;
}

.mini-template-preview .brand-logo,
.project-thumb .brand-logo {
  width: 88px;
  max-height: 38px;
}

.mini-template-preview span,
.project-thumb span {
  color: var(--accent);
  font-size: 10px;
  font-weight: 950;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.mini-template-preview strong,
.project-thumb strong {
  color: white;
  font-size: 22px;
  font-weight: 950;
  line-height: 0.95;
  text-transform: uppercase;
}

.mini-template-preview em {
  color: rgb(255 255 255 / 0.66);
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
}

.brand-kit-card {
  display: grid;
  gap: 10px;
  border: 1px solid var(--nex-line);
  padding: 14px;
}

.brand-kit-card.dark {
  background: #111318;
  color: white;
}

.brand-kit-card.light {
  background: white;
}

.brand-kit-card span,
.brand-font-list span {
  color: #69707d;
  font-size: 11px;
  font-weight: 850;
}

.brand-swatch-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.brand-swatch-row button {
  width: 34px;
  height: 34px;
  border: 1px solid #cfd3dc;
}

.brand-font-list,
.tagline-list,
.cta-chip-grid,
.assistant-action-grid,
.selected-element-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.media-assignment-grid {
  display: grid;
  gap: 10px;
}

.media-assignment-grid article {
  display: grid;
  gap: 8px;
  border: 1px solid #dfe2e8;
  background: white;
  padding: 8px;
}

.media-assignment-grid img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.media-assignment-grid strong {
  color: #3b4049;
  font-size: 12px;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.media-assignment-grid article div {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.media-assignment-grid button {
  border: 1px solid #dfe2e8;
  background: #f7f8fa;
  padding: 6px 7px;
  font-size: 10px;
  font-weight: 900;
}

.mini-field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.toggle-row {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #303540;
  font-size: 13px;
  font-weight: 850;
}

.toggle-row input {
  width: auto;
  accent-color: var(--nex-red);
}

.studio-canvas-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 10px;
  min-height: 0;
  overflow: hidden;
}

.canvas-floating-bar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--nex-line);
  background: white;
  padding: 10px 12px;
}

.canvas-floating-bar strong,
.canvas-floating-bar span {
  display: block;
}

.canvas-floating-bar strong {
  color: #111318;
  font-size: 14px;
  font-weight: 950;
}

.canvas-floating-bar span {
  color: #6b7280;
  font-size: 11px;
  font-weight: 850;
}

.canvas-format-pills {
  display: flex;
  gap: 6px;
  max-width: min(720px, 54vw);
  overflow-x: auto;
  padding-bottom: 2px;
}

.canvas-format-pills button {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: max-content;
  height: 34px;
  border: 1px solid #dfe2e8;
  background: white;
  color: #4b515d;
  padding: 0 10px;
}

.canvas-format-pills button span {
  font-size: 11px;
  font-weight: 900;
}

.canvas-format-pills button.selected {
  border-color: var(--nex-red);
  background: rgb(227 6 19 / 0.08);
  color: var(--nex-red);
}

.canvas-inspector-panel {
  position: sticky;
  bottom: 12px;
  z-index: 7;
  display: grid;
  gap: 10px;
  width: min(100%, 760px);
  justify-self: center;
  border: 1px solid rgb(17 19 24 / 0.12);
  background: rgb(255 255 255 / 0.95);
  box-shadow: 0 18px 44px rgb(15 18 26 / 0.18);
  padding: 12px;
  backdrop-filter: blur(18px);
}

.inspector-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 12px;
  align-items: center;
}

.inspector-head .eyebrow {
  grid-column: 1 / -1;
}

.inspector-head strong {
  color: #111318;
  font-size: 14px;
  font-weight: 950;
}

.inspector-head span {
  color: #69707d;
  font-size: 11px;
  font-weight: 850;
}

.inspector-layers,
.inspector-action-grid,
.qr-purpose-grid,
.text-preset-grid,
.inspector-selection-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.inspector-layers button,
.inspector-action-grid button,
.qr-purpose-grid button,
.text-preset-grid button,
.inspector-selection-actions button,
.canvas-upload-button,
.mini-danger-button {
  display: flex;
  align-items: center;
  gap: 7px;
  border: 1px solid #dfe2e8;
  background: white;
  color: #303540;
  padding: 8px 9px;
  font-size: 11px;
  font-weight: 900;
}

.inspector-selection-actions small {
  flex-basis: 100%;
  color: #69707d;
  font-size: 10px;
  font-weight: 800;
}

.canvas-upload-button {
  justify-content: center;
  cursor: pointer;
}

.canvas-upload-button input {
  display: none;
}

.mini-danger-button {
  border-color: rgb(227 6 19 / 0.24);
  color: var(--nex-red);
}

.inspector-layers button.selected {
  border-color: #111318;
  background: #111318;
  color: white;
}

.inspector-card {
  display: grid;
  gap: 10px;
  border: 1px solid #e4e6ec;
  background: #fbfbfc;
  padding: 10px;
}

.studio-right-panel {
  border: 1px solid var(--nex-line);
}

.settings-card {
  display: grid;
  gap: 10px;
  border: 1px solid #dfe2e8;
  background: white;
  padding: 12px;
}

.settings-card > strong {
  color: #111318;
  font-size: 15px;
  font-weight: 950;
}

.settings-card > span,
.assistant-card small {
  color: #69707d;
  font-size: 11px;
  font-weight: 850;
}

.settings-card textarea {
  width: 100%;
  border: 1px solid #d6dae3;
  padding: 9px 10px;
  resize: vertical;
}

.export-card button {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #dfe2e8;
  background: white;
  padding: 9px;
  color: #303540;
  font-size: 12px;
  font-weight: 850;
  text-align: left;
}

.copy-action-row {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  border-bottom: 1px solid var(--nex-line);
  background: #fbfbfc;
  padding: 10px 12px;
}

.copy-action-row button {
  border: 1px solid #dfe2e8;
  background: white;
  color: #303540;
  padding: 7px 9px;
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

.chat-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: 18px;
  padding-top: 22px;
}

.chat-card {
  display: grid;
  min-height: calc(100vh - 130px);
  grid-template-rows: auto 1fr auto;
  overflow: hidden;
}

.prompt-starters {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  border-bottom: 1px solid var(--nex-line);
  background:
    linear-gradient(135deg, #ffffff, #f7f8fa);
  padding: 12px;
}

.prompt-starters button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 8px;
  border: 1px solid #dfe2e8;
  background: white;
  color: #252a34;
  padding: 0 10px;
  text-align: left;
}

.prompt-starters span {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 12px;
  font-weight: 850;
}

.prompt-starters svg {
  flex: 0 0 auto;
  color: var(--nex-red);
}

.chat-stream {
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow-y: auto;
  padding: 18px;
}

.message {
  display: flex;
}

.message.user {
  justify-content: flex-end;
}

.message-bubble {
  max-width: min(760px, 92%);
  border: 1px solid var(--nex-line);
  background: #f8f9fb;
  padding: 14px 15px;
}

.message.user .message-bubble {
  border-color: var(--nex-red);
  background: var(--nex-red);
  color: white;
}

.message.assistant .message-bubble.rich {
  width: 100%;
  max-width: none;
  background: white;
}

.message-bubble p {
  margin: 0;
  line-height: 1.55;
}

.chat-composer {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  border-top: 1px solid var(--nex-line);
  padding: 14px;
}

.chat-composer textarea,
.field input,
.field select,
.field textarea,
.template-card input {
  width: 100%;
  border: 1px solid #d8dae0;
  background: white;
  color: #17191d;
  outline: none;
}

.chat-composer textarea {
  min-height: 82px;
  resize: vertical;
  padding: 12px;
  line-height: 1.45;
}

.chat-composer textarea:focus,
.field input:focus,
.field select:focus,
.field textarea:focus,
.template-card input:focus {
  border-color: var(--nex-red);
  box-shadow: 0 0 0 3px rgb(227 6 19 / 0.12);
}

.output-panel {
  align-self: start;
  max-height: calc(100vh - 130px);
  overflow: auto;
}

.marketing-output {
  display: grid;
  gap: 13px;
}

.output-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.output-header h3 {
  margin: 3px 0 0;
  font-size: 22px;
  font-weight: 950;
}

.output-grid {
  display: grid;
  gap: 10px;
}

.marketing-output.compact .output-grid {
  grid-template-columns: 1fr;
}

.output-card {
  border: 1px solid var(--nex-line);
  background: #fbfbfc;
  padding: 12px;
}

.output-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.output-card-head span {
  color: #4c5260;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.output-card p {
  margin: 0;
  white-space: pre-wrap;
  color: #24272d;
  font-size: 14px;
  line-height: 1.55;
}

.hashtag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hashtag-row span,
.suggestion-strip {
  background: #f3f4f7;
  color: #383d47;
  font-size: 12px;
  font-weight: 800;
  padding: 8px 10px;
}

.suggestion-strip {
  border-left: 4px solid var(--nex-gold);
}

.compliance-notice {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 9px;
  align-items: start;
  border: 1px solid rgb(227 6 19 / 0.18);
  background: rgb(227 6 19 / 0.06);
  color: #3c1115;
  margin-bottom: 12px;
  padding: 10px;
}

.compliance-notice p {
  margin: 0;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.45;
}

.empty-state {
  display: grid;
  min-height: 240px;
  place-items: center;
  align-content: center;
  gap: 10px;
  border: 1px dashed #cdd0d8;
  background: #fafafb;
  padding: 30px;
  text-align: center;
}

.empty-state svg {
  color: var(--nex-red);
}

.empty-state h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 900;
}

.empty-state p {
  margin: 0;
  max-width: 420px;
  color: #69707d;
  line-height: 1.55;
}

.input-panel {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  border-left: 1px solid var(--nex-line);
  background: #ffffff;
  padding: 20px;
}

.sticky-heading {
  position: sticky;
  top: 0;
  z-index: 3;
  background: white;
  padding-bottom: 10px;
}

.form-stack,
.settings-form,
.template-editor {
  display: grid;
  gap: 16px;
}

.form-section {
  display: grid;
  gap: 11px;
  border-top: 1px solid var(--nex-line);
  padding-top: 16px;
}

.form-section h4 {
  margin: 0;
  font-size: 13px;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.field {
  display: grid;
  gap: 7px;
}

.field span {
  color: #4d535f;
  font-size: 12px;
  font-weight: 850;
}

.field input,
.field select {
  min-height: 39px;
  padding: 0 10px;
}

.field textarea {
  min-height: 92px;
  resize: vertical;
  padding: 10px;
  line-height: 1.45;
}

.split-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.file-drop {
  display: grid;
  min-height: 74px;
  place-items: center;
  gap: 4px;
  border: 1px dashed #bcc1ca;
  background: #fafafb;
  color: #4e5562;
  padding: 11px;
  text-align: center;
  transition: 160ms ease;
}

.file-drop:hover {
  border-color: var(--nex-red);
  background: rgb(227 6 19 / 0.04);
}

.file-drop span {
  font-size: 12px;
  font-weight: 850;
}

.file-drop em {
  color: #747985;
  font-size: 11px;
  font-style: normal;
}

.file-drop img {
  height: 48px;
  width: 48px;
  object-fit: cover;
}

.file-drop input {
  display: none;
}

.photo-thumb-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 7px;
}

.photo-thumb-grid button {
  aspect-ratio: 1;
  border: 1px solid var(--nex-line);
  background: white;
  padding: 0;
}

.photo-thumb-grid img {
  height: 100%;
  width: 100%;
  object-fit: cover;
}

.flyer-builder-grid {
  display: grid;
  grid-template-columns: minmax(320px, 430px) minmax(0, 1fr);
  gap: 18px;
  padding-top: 22px;
}

.business-card-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  padding-top: 22px;
}

.business-card-controls {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: end;
}

.business-card-controls .panel-heading,
.business-card-controls .card-control-group,
.business-card-controls .print-note,
.business-card-controls .business-card-buttons {
  grid-column: 1 / -1;
}

.builder-controls {
  align-self: start;
  display: grid;
  gap: 13px;
}

.studio-controls {
  max-height: calc(100vh - 130px);
  overflow: auto;
}

.studio-block {
  display: grid;
  gap: 12px;
  border: 1px solid var(--nex-line);
  background:
    linear-gradient(135deg, #ffffff, #fafafb);
  padding: 14px;
}

.studio-label,
.choice-group > p {
  margin: 0;
  color: #111318;
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.template-picker {
  display: grid;
  max-height: 330px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  overflow: auto;
  padding-right: 2px;
}

.template-preset {
  position: relative;
  display: grid;
  min-height: 118px;
  align-content: space-between;
  overflow: hidden;
  border: 1px solid #dfe2e8;
  background: #111318;
  color: white;
  padding: 12px;
  text-align: left;
}

.template-preset::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 6px;
  background: var(--accent);
}

.template-preset.selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgb(227 6 19 / 0.12);
}

.template-preset span,
.template-preset em {
  color: rgb(255 255 255 / 0.58);
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.template-preset strong {
  color: white;
  font-size: 17px;
  font-weight: 950;
  line-height: 0.98;
  overflow-wrap: anywhere;
}

.template-preset .brand-logo {
  width: 78px;
  max-height: 32px;
}

.choice-group {
  display: grid;
  gap: 8px;
}

.choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.choice-chip {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  border: 1px solid #d9dde5;
  background: white;
  color: #24272d;
  padding: 0 10px;
  text-align: left;
}

.choice-chip span {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 12px;
  font-weight: 850;
}

.choice-chip.selected {
  border-color: var(--nex-red);
  background: #111318;
  color: white;
}

.format-note {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 8px;
  border: 1px solid rgb(227 6 19 / 0.18);
  background: rgb(227 6 19 / 0.06);
  color: #24272d;
  padding: 9px 10px;
  font-size: 12px;
  font-weight: 900;
}

.stock-tray {
  display: grid;
  gap: 10px;
}

.stock-tabs {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.stock-tabs button {
  flex: 0 0 auto;
  border: 1px solid #d9dde5;
  background: white;
  color: #4d535f;
  padding: 7px 9px;
  font-size: 11px;
  font-weight: 850;
}

.stock-tabs button.selected {
  border-color: #111318;
  background: #111318;
  color: white;
}

.stock-search-button {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid rgb(227 6 19 / 0.22);
  background: rgb(227 6 19 / 0.06);
  color: #241417;
  font-size: 12px;
  font-weight: 850;
}

.stock-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.stock-card {
  display: grid;
  gap: 7px;
  border: 1px solid #dfe2e8;
  background: white;
  padding: 7px;
  text-align: left;
}

.stock-card img {
  width: 100%;
  aspect-ratio: 1.35;
  object-fit: cover;
}

.stock-card span {
  color: #252a34;
  font-size: 11px;
  font-weight: 850;
}

.copy-studio-block {
  background: white;
}

.button-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(126px, 1fr));
  gap: 9px;
}

.business-card-buttons {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.business-card-buttons .btn.secondary {
  grid-column: 1 / -1;
}

.print-note {
  border-left: 4px solid var(--nex-red);
  background: #f7f8fa;
  color: #4f5663;
  padding: 10px 12px;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.45;
}

.business-headshot-upload {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 4px 14px;
  align-items: center;
  border: 1px dashed #bcc1ca;
  background:
    linear-gradient(135deg, #ffffff, #f7f8fa);
  padding: 13px;
  cursor: pointer;
}

.business-headshot-upload:hover {
  border-color: var(--nex-red);
  background: rgb(227 6 19 / 0.04);
}

.business-headshot-upload img,
.business-headshot-upload > span {
  grid-row: span 2;
  height: 74px;
  width: 74px;
  object-fit: cover;
}

.business-headshot-upload > span {
  display: grid;
  place-items: center;
  background: #111318;
  color: white;
}

.business-headshot-upload strong {
  color: #111318;
  font-size: 14px;
  font-weight: 950;
}

.business-headshot-upload em {
  color: #69717e;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
  line-height: 1.4;
}

.business-headshot-upload input {
  display: none;
}

.card-control-group {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  border: 1px solid var(--nex-line);
  background: #fafafb;
  padding: 14px;
}

.card-control-group > p {
  grid-column: 1 / -1;
  margin: 0;
  color: #111318;
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.range-field span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.range-field strong {
  color: var(--nex-red);
  font-size: 11px;
  font-weight: 950;
}

.range-field input[type="range"] {
  accent-color: var(--nex-red);
  padding: 0;
}

.preview-shell {
  display: grid;
  min-height: calc(100vh - 130px);
  place-items: start center;
  overflow: auto;
  border: 1px solid var(--nex-line);
  background:
    radial-gradient(circle at 18% 14%, rgb(227 6 19 / 0.10), transparent 26%),
    linear-gradient(135deg, #eef0f4, #d9dde5);
  padding: 28px;
}

.flyer-page {
  --accent: var(--nex-red);
  --brand-gold: var(--nex-gold);
  display: flex;
  width: min(100%, 460px);
  min-height: 650px;
  flex-direction: column;
  overflow: hidden;
  background: white;
  box-shadow: 0 18px 50px rgb(15 18 26 / 0.22);
}

.studio-flyer {
  aspect-ratio: var(--canvas-aspect, 8.5 / 11);
}

.studio-flyer[class*="format-"]:not(.format-letter-flyer) {
  height: auto;
  min-height: auto;
}

.format-instagram-square {
  width: min(100%, 520px);
}

.format-instagram-story,
.format-instagram-reel {
  width: min(100%, 360px);
}

.format-facebook-post,
.format-linkedin-post,
.format-youtube-thumbnail,
.format-horizontal-video,
.format-postcard,
.format-postcard-large,
.format-yard-sign {
  width: min(100%, 640px);
}

.format-email-header {
  width: min(100%, 680px);
}

.format-open-house-sign,
.format-qr-code-flyer {
  width: min(100%, 500px);
}

.format-business-card {
  width: min(100%, 520px);
  min-height: auto;
}

.format-instagram-square .flyer-photo-strip,
.format-instagram-story .flyer-photo-strip,
.format-instagram-reel .flyer-photo-strip,
.format-facebook-post .flyer-photo-strip,
.format-linkedin-post .flyer-photo-strip,
.format-youtube-thumbnail .flyer-photo-strip,
.format-horizontal-video .flyer-photo-strip,
.format-postcard .flyer-photo-strip,
.format-postcard-large .flyer-photo-strip,
.format-yard-sign .flyer-photo-strip,
.format-email-header .flyer-photo-strip,
.format-business-card .flyer-photo-strip {
  display: none;
}

.format-facebook-post .flyer-top,
.format-linkedin-post .flyer-top,
.format-youtube-thumbnail .flyer-top,
.format-horizontal-video .flyer-top,
.format-postcard .flyer-top,
.format-postcard-large .flyer-top,
.format-yard-sign .flyer-top,
.format-email-header .flyer-top,
.format-business-card .flyer-top,
.format-instagram-square .flyer-top,
.format-instagram-story .flyer-top,
.format-instagram-reel .flyer-top {
  min-height: 58px;
  padding: 12px 18px;
}

.format-facebook-post .flyer-hero,
.format-linkedin-post .flyer-hero,
.format-youtube-thumbnail .flyer-hero,
.format-horizontal-video .flyer-hero,
.format-postcard .flyer-hero,
.format-postcard-large .flyer-hero,
.format-yard-sign .flyer-hero,
.format-email-header .flyer-hero,
.format-business-card .flyer-hero,
.format-instagram-square .flyer-hero,
.format-instagram-story .flyer-hero {
  min-height: 0;
  flex: 1;
}

.format-facebook-post .flyer-hero img,
.format-linkedin-post .flyer-hero img,
.format-youtube-thumbnail .flyer-hero img,
.format-horizontal-video .flyer-hero img,
.format-postcard .flyer-hero img,
.format-postcard-large .flyer-hero img,
.format-yard-sign .flyer-hero img,
.format-email-header .flyer-hero img,
.format-business-card .flyer-hero img,
.format-instagram-square .flyer-hero img,
.format-instagram-story .flyer-hero img,
.format-instagram-reel .flyer-hero img,
.format-facebook-post .photo-placeholder,
.format-linkedin-post .photo-placeholder,
.format-youtube-thumbnail .photo-placeholder,
.format-horizontal-video .photo-placeholder,
.format-postcard .photo-placeholder,
.format-postcard-large .photo-placeholder,
.format-yard-sign .photo-placeholder,
.format-email-header .photo-placeholder,
.format-business-card .photo-placeholder,
.format-instagram-square .photo-placeholder,
.format-instagram-story .photo-placeholder,
.format-instagram-reel .photo-placeholder {
  height: 100%;
}

.format-instagram-story .flyer-hero,
.format-instagram-reel .flyer-hero {
  min-height: 42%;
}

.format-instagram-story .flyer-headline h2,
.format-instagram-reel .flyer-headline h2 {
  font-size: 34px;
}

.format-facebook-post .flyer-copy-block,
.format-linkedin-post .flyer-copy-block,
.format-youtube-thumbnail .flyer-copy-block,
.format-horizontal-video .flyer-copy-block,
.format-postcard .flyer-copy-block,
.format-postcard-large .flyer-copy-block,
.format-yard-sign .flyer-copy-block,
.format-email-header .flyer-copy-block,
.format-business-card .flyer-copy-block,
.format-instagram-square .flyer-copy-block {
  display: none;
}

.format-facebook-post .flyer-footer,
.format-linkedin-post .flyer-footer,
.format-youtube-thumbnail .flyer-footer,
.format-horizontal-video .flyer-footer,
.format-postcard .flyer-footer,
.format-postcard-large .flyer-footer,
.format-yard-sign .flyer-footer,
.format-email-header .flyer-footer,
.format-business-card .flyer-footer,
.format-instagram-square .flyer-footer,
.format-instagram-story .flyer-footer,
.format-instagram-reel .flyer-footer {
  padding: 10px 18px;
}

.format-instagram-square .stats-strip div,
.format-instagram-story .stats-strip div,
.format-linkedin-post .stats-strip div,
.format-youtube-thumbnail .stats-strip div,
.format-facebook-post .stats-strip div,
.format-horizontal-video .stats-strip div,
.format-postcard .stats-strip div,
.format-postcard-large .stats-strip div,
.format-yard-sign .stats-strip div,
.format-email-header .stats-strip div,
.format-business-card .stats-strip div {
  min-height: 54px;
}

.format-instagram-square .flyer-details,
.format-instagram-story .flyer-details,
.format-linkedin-post .flyer-details,
.format-youtube-thumbnail .flyer-details,
.format-facebook-post .flyer-details,
.format-horizontal-video .flyer-details,
.format-postcard .flyer-details,
.format-postcard-large .flyer-details,
.format-yard-sign .flyer-details,
.format-email-header .flyer-details,
.format-business-card .flyer-details {
  padding: 12px 18px 10px;
}

.format-email-header .stats-strip,
.format-business-card .stats-strip,
.format-business-card .flyer-details {
  display: none;
}

.format-email-header .flyer-headline h2,
.format-business-card .flyer-headline h2 {
  font-size: 28px;
}

.business-card-preview-shell {
  background:
    linear-gradient(135deg, #f2f3f6, #dfe3ea);
  place-items: center;
}

.studio-card-side-tabs {
  display: flex;
  gap: 8px;
  width: min(100%, 640px);
}

.studio-card-side-tabs button {
  flex: 1;
  border: 1px solid #cfd3dc;
  background: white;
  color: #303540;
  padding: 9px 12px;
  font-size: 12px;
  font-weight: 950;
}

.studio-card-side-tabs button.selected {
  border-color: #111318;
  background: #111318;
  color: white;
}

.studio-business-card-canvas {
  --accent: var(--nex-red);
  --card-gold: var(--nex-gold);
  position: relative;
  display: grid;
  width: min(100%, 640px);
  aspect-ratio: 3.5 / 2;
  overflow: hidden;
  border: 1px solid #cfd3dc;
  background:
    linear-gradient(110deg, white 0 58%, transparent 58%),
    linear-gradient(135deg, var(--accent), #111318 70%);
  box-shadow: 0 24px 54px rgb(15 18 26 / 0.22);
  padding: 24px;
}

.studio-business-card-canvas::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: var(--studio-bg-image, none);
  background-position: center;
  background-size: cover;
  opacity: var(--studio-bg-opacity, 0);
  mix-blend-mode: multiply;
}

.studio-business-card-canvas > * {
  position: relative;
  z-index: 1;
}

.studio-card-brand {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.studio-card-brand .brand-logo {
  width: 128px;
  max-height: 48px;
}

.studio-card-brand span {
  max-width: 190px;
  color: rgb(255 255 255 / 0.78);
  font-size: 10px;
  font-weight: 850;
  line-height: 1.35;
  text-align: right;
}

.studio-card-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 128px;
  gap: 18px;
  align-items: center;
  align-self: center;
}

.studio-card-agent-copy {
  min-width: 0;
}

.studio-card-agent-copy p {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.studio-card-agent-copy h2 {
  margin: 0;
  max-width: 330px;
  color: #111318;
  font-size: calc(36px * var(--headline-scale, 1));
  font-weight: 950;
  line-height: 0.94;
  overflow-wrap: anywhere;
}

.studio-card-agent-copy em {
  display: block;
  margin-top: 10px;
  max-width: 300px;
  color: #4b515d;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
  line-height: 1.35;
}

.studio-card-headshot {
  position: relative;
  display: grid;
  aspect-ratio: 1;
  overflow: hidden;
  place-items: center;
  border: 4px solid white;
  background:
    linear-gradient(135deg, rgb(255 255 255 / 0.18), rgb(255 255 255 / 0.04)),
    #111318;
  box-shadow: 0 16px 34px rgb(0 0 0 / 0.24);
}

.studio-card-headshot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.studio-card-headshot strong {
  color: white;
  font-size: 34px;
  font-weight: 950;
}

.canvas-headshot-button {
  position: absolute;
  right: 6px;
  bottom: 6px;
  width: 28px;
  height: 28px;
  justify-content: center;
  padding: 0;
  border-radius: 999px;
}

.studio-card-contact {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  align-self: end;
}

.studio-card-contact span {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 6px;
  color: #1f2430;
  font-size: 10px;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.studio-card-contact svg {
  flex: 0 0 auto;
  color: var(--accent);
}

.studio-business-card-back {
  align-content: stretch;
  background:
    radial-gradient(circle at 80% 10%, rgb(227 6 19 / 0.32), transparent 32%),
    linear-gradient(135deg, #050505, #181b22 70%);
  color: white;
}

.studio-card-back-brand {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
}

.studio-card-back-brand .brand-logo {
  width: 150px;
  max-height: 54px;
}

.studio-card-back-brand strong {
  max-width: 250px;
  color: white;
  font-size: 15px;
  font-weight: 950;
  line-height: 1.2;
  text-align: right;
}

.studio-card-back-grid {
  display: grid;
  grid-template-columns: 122px minmax(0, 1fr);
  gap: 22px;
  align-items: center;
}

.studio-card-qr-block {
  display: grid;
  aspect-ratio: 1;
  place-items: center;
  gap: 4px;
  border: 2px solid rgb(255 255 255 / 0.9);
  background: white;
  color: #111318;
  padding: 10px;
}

.qr-generated-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.studio-card-qr-block span {
  color: #111318;
  font-size: 9px;
  font-weight: 950;
  text-transform: uppercase;
}

.studio-card-back-copy {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.studio-card-back-copy h2 {
  margin: 0;
  color: white;
  font-size: 24px;
  font-weight: 950;
  overflow-wrap: anywhere;
}

.studio-card-back-copy span,
.studio-card-back-copy p,
.studio-card-back-footer {
  color: rgb(255 255 255 / 0.68);
  font-size: 11px;
  font-weight: 850;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.studio-card-back-footer {
  align-self: end;
  margin: 0;
  font-size: 8px;
}

.studio-flyer {
  position: relative;
  border: 1px solid #cfd3dc;
  background: var(--studio-bg-color, white);
}

.studio-flyer::before {
  content: "";
  position: absolute;
  inset: 14px;
  z-index: 1;
  pointer-events: none;
  border: 1px solid rgb(17 19 24 / 0.08);
}

.studio-flyer::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: var(--studio-bg-image, none);
  background-position: center;
  background-size: cover;
  opacity: var(--studio-bg-opacity, 0);
}

.studio-flyer > * {
  position: relative;
  z-index: 2;
}

.flyer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 70px;
  padding: 16px 20px;
}

.flyer-top .brand-logo {
  width: 132px;
  max-height: 52px;
}

.wordmark {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  color: #050505;
  font-size: 24px;
  font-weight: 950;
  line-height: 1;
}

.wordmark span {
  color: var(--nex-red);
}

.wordmark strong {
  color: currentColor;
  font-weight: 950;
}

.wordmark-compact {
  font-size: 22px;
}

.flyer-template-label {
  border: 1px solid #dfe1e7;
  color: #4b515d;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.12em;
  padding: 7px 8px;
  text-transform: uppercase;
}

.flyer-hero {
  position: relative;
  min-height: var(--hero-height, 274px);
  background: #181b20;
}

.flyer-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.flyer-hero img,
.photo-placeholder {
  display: block;
  height: var(--hero-height, 274px);
  width: 100%;
  object-fit: cover;
}

.photo-placeholder {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  color: rgb(255 255 255 / 0.7);
}

.flyer-headline {
  position: absolute;
  left: 18px;
  top: 18px;
  z-index: 2;
  width: min(var(--headline-width, 360px), calc(100% - 36px));
  max-width: calc(100% - 36px);
}

.flyer-headline span {
  display: inline-block;
  background: var(--accent);
  color: white;
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.08em;
  padding: 7px 10px;
  text-transform: uppercase;
}

.flyer-headline h2 {
  margin: 6px 0 0;
  width: 100%;
  max-width: none;
  background: rgb(5 5 5 / 0.88);
  color: white;
  font-size: calc(34px * var(--headline-scale, 1));
  font-weight: var(--headline-weight, 950);
  line-height: 0.95;
  padding: 10px 12px;
  text-align: var(--text-align, left);
  text-transform: uppercase;
  overflow-wrap: anywhere;
}

.flyer-photo-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  background: white;
  padding: 6px;
}

.flyer-photo-strip img,
.mini-placeholder {
  height: 78px;
  width: 100%;
  object-fit: cover;
}

.mini-placeholder {
  display: grid;
  place-items: center;
  background: #eceef2;
  color: #7a808c;
}

.flyer-details {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 16px 20px 12px;
}

.address-block {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 8px;
  align-items: start;
}

.address-block strong {
  display: block;
  color: #111318;
  font-size: 18px;
  font-weight: 950;
  line-height: 1.1;
}

.address-block span,
.price-block span {
  display: block;
  color: #68707d;
  font-size: 12px;
  font-weight: 800;
  margin-top: 4px;
}

.price-block {
  min-width: 132px;
  border-left: 3px solid var(--accent);
  padding-left: 14px;
}

.price-block strong {
  color: var(--accent);
  font-size: 22px;
  font-weight: 950;
  white-space: nowrap;
}

.stats-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: #dfe1e7;
  margin: 0 20px;
}

.stats-strip div {
  display: grid;
  place-items: center;
  gap: 3px;
  background: #111318;
  color: white;
  min-height: 74px;
  padding: 8px 4px;
}

.stats-strip strong {
  font-size: 18px;
  font-weight: 950;
  line-height: 1;
}

.stats-strip span {
  color: rgb(255 255 255 / 0.68);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.event-band {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: white;
  margin: 12px 20px 0;
  padding: 9px 12px;
  font-size: 13px;
  font-weight: 900;
}

.flyer-copy-block {
  display: grid;
  gap: 9px;
  padding: 15px 20px;
}

.flyer-copy-block p {
  margin: 0;
  color: #303540;
  font-size: 13px;
  line-height: 1.45;
  text-align: var(--text-align, left);
}

.flyer-copy-block strong {
  color: var(--accent);
  font-size: 15px;
  font-weight: 950;
  text-transform: uppercase;
}

.flyer-footer {
  margin-top: auto;
  background: #050505;
  color: white;
  padding: 15px 20px;
}

.agent-block {
  display: grid;
  grid-template-columns: 45px 1fr;
  gap: 10px;
  align-items: center;
}

.agent-block img,
.agent-placeholder {
  height: 45px;
  width: 45px;
  object-fit: cover;
}

.agent-placeholder {
  display: grid;
  place-items: center;
  background: rgb(255 255 255 / 0.12);
}

.agent-block strong {
  display: block;
  font-size: 14px;
  font-weight: 950;
}

.agent-block span {
  display: block;
  color: rgb(255 255 255 / 0.66);
  font-size: 11px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.agent-block em {
  display: block;
  color: rgb(255 255 255 / 0.5);
  font-size: 9px;
  font-style: normal;
  font-weight: 800;
  margin-top: 3px;
}

.flyer-footer p {
  margin: 10px 0 0;
  color: rgb(255 255 255 / 0.55);
  font-size: 8px;
  line-height: 1.35;
}

.selected-element {
  outline: 2px solid rgb(227 6 19 / 0.82);
  outline-offset: -2px;
}

.canvas-scalable-layer {
  position: relative;
  transform: scale(var(--layer-scale, 1));
  transform-origin: left center;
}

.price-block.canvas-scalable-layer {
  transform-origin: right center;
}

.resize-handles {
  position: absolute;
  inset: -8px;
  z-index: 8;
  pointer-events: none;
}

.resize-handles i {
  position: absolute;
  width: 11px;
  height: 11px;
  border: 2px solid white;
  border-radius: 999px;
  background: var(--nex-red);
  box-shadow: 0 5px 12px rgb(17 19 24 / 0.22);
  pointer-events: auto;
}

.resize-handles .handle-nw {
  top: 0;
  left: 0;
  cursor: nwse-resize;
}

.resize-handles .handle-ne {
  top: 0;
  right: 0;
  cursor: nesw-resize;
}

.resize-handles .handle-sw {
  bottom: 0;
  left: 0;
  cursor: nesw-resize;
}

.resize-handles .handle-se {
  right: 0;
  bottom: 0;
  cursor: nwse-resize;
}

.canvas-edit-hint {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 720px;
  border: 1px solid rgb(17 19 24 / 0.12);
  background: rgb(255 255 255 / 0.92);
  color: #343944;
  padding: 8px 10px;
  font-size: 11px;
  font-weight: 850;
  box-shadow: 0 10px 24px rgb(15 18 26 / 0.08);
}

.canvas-editable {
  border-radius: 4px;
  cursor: text;
  outline: 0;
  transition: box-shadow 0.16s ease, background 0.16s ease;
}

.canvas-editable:hover,
.canvas-editable:focus {
  background: rgb(255 255 255 / 0.12);
  box-shadow: 0 0 0 2px rgb(227 6 19 / 0.9);
}

.draggable-headline {
  cursor: grab;
  touch-action: none;
}

.draggable-headline:active {
  cursor: grabbing;
}

.canvas-image-toolbar {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 4;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.flyer-hero:hover .canvas-image-toolbar,
.flyer-hero.selected-element .canvas-image-toolbar,
.canvas-image-toolbar:focus-within {
  opacity: 1;
  transform: translateY(0);
}

.canvas-image-toolbar label,
.canvas-image-toolbar button,
.agent-headshot-replace,
.canvas-headshot-button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid rgb(255 255 255 / 0.22);
  background: rgb(17 19 24 / 0.82);
  color: white;
  padding: 7px 8px;
  font-size: 10px;
  font-weight: 900;
  cursor: pointer;
  backdrop-filter: blur(12px);
}

.canvas-image-toolbar input,
.agent-headshot-replace input,
.canvas-headshot-button input {
  display: none;
}

.agent-block {
  position: relative;
}

.agent-headshot-replace {
  position: absolute;
  left: 28px;
  bottom: -4px;
  width: 24px;
  height: 24px;
  justify-content: center;
  padding: 0;
  border-radius: 999px;
}

.qr-design-block {
  display: flex;
  align-items: center;
  gap: 10px;
  border-top: 1px solid #dfe2e8;
  padding: 12px 20px;
}

.qr-design-block div {
  display: grid;
  width: 62px;
  height: 62px;
  place-items: center;
  border: 2px solid #111318;
  background: white;
  color: #111318;
}

.qr-design-block span {
  color: #303540;
  font-size: 11px;
  font-weight: 850;
  overflow-wrap: anywhere;
}

.layout-luxury {
  width: min(100%, 500px);
}

.layout-luxury .flyer-hero {
  min-height: 330px;
}

.layout-luxury .flyer-hero img,
.layout-luxury .photo-placeholder {
  height: 330px;
}

.layout-luxury .flyer-headline {
  top: auto;
  bottom: 20px;
}

.layout-luxury .flyer-headline h2 {
  max-width: 390px;
  font-size: 39px;
}

.layout-magazine .flyer-hero {
  min-height: 360px;
}

.layout-magazine .flyer-hero img,
.layout-magazine .photo-placeholder {
  height: 360px;
}

.layout-magazine .flyer-headline {
  top: auto;
  bottom: 18px;
}

.layout-magazine .flyer-headline h2 {
  background: white;
  color: #111318;
  font-size: 38px;
}

.layout-social {
  width: min(100%, 500px);
  min-height: 620px;
}

.layout-social .flyer-headline h2 {
  font-size: 42px;
}

.layout-social .flyer-copy-block {
  border-top: 8px solid var(--accent);
}

.layout-clean .flyer-headline h2 {
  background: white;
  color: #111318;
}

.layout-clean .stats-strip div {
  background: #f4f5f7;
  color: #111318;
}

.layout-clean .stats-strip span {
  color: #626a76;
}

.finish-black-luxury {
  background: #111318;
  color: white;
}

.finish-black-luxury .flyer-top,
.finish-black-luxury .flyer-photo-strip,
.finish-black-luxury .flyer-details,
.finish-black-luxury .flyer-copy-block {
  background: #111318;
}

.finish-black-luxury .wordmark,
.finish-black-luxury .address-block strong,
.finish-black-luxury .flyer-copy-block p {
  color: white;
}

.finish-black-luxury .address-block span,
.finish-black-luxury .price-block span {
  color: rgb(255 255 255 / 0.62);
}

.finish-black-luxury .flyer-template-label {
  border-color: rgb(255 255 255 / 0.16);
  color: rgb(255 255 255 / 0.74);
}

.finish-black-luxury .stats-strip {
  background: rgb(255 255 255 / 0.16);
}

.finish-black-luxury .stats-strip div {
  background: #050505;
}

.finish-gold-accent {
  --accent: var(--brand-gold) !important;
}

.finish-gold-accent .flyer-footer {
  background: linear-gradient(120deg, #111318, #3a3020);
}

.finish-clean-white .flyer-footer {
  background: #111318;
}

.photo-dramatic-overlay .flyer-hero::after {
  background:
    linear-gradient(180deg, rgb(0 0 0 / 0.12), rgb(0 0 0 / 0.62)),
    linear-gradient(90deg, rgb(0 0 0 / 0.5), transparent 60%);
}

.photo-soft-contrast .flyer-hero img {
  filter: saturate(0.88) contrast(0.96) brightness(1.03);
}

.photo-gallery-strip .flyer-photo-strip {
  gap: 4px;
  padding: 4px;
}

.photo-gallery-strip .flyer-photo-strip img,
.photo-gallery-strip .mini-placeholder {
  height: 92px;
}

.video-builder-grid {
  display: grid;
  grid-template-columns: minmax(320px, 430px) minmax(0, 1fr);
  gap: 18px;
  padding-top: 22px;
}

.video-preview-shell {
  display: grid;
  min-height: calc(100vh - 130px);
  place-items: center;
  overflow: auto;
  border: 1px solid var(--nex-line);
  background:
    linear-gradient(90deg, rgb(255 255 255 / 0.5) 1px, transparent 1px),
    linear-gradient(0deg, rgb(255 255 255 / 0.5) 1px, transparent 1px),
    #dfe2e8;
  background-size: 28px 28px;
  padding: 28px;
}

.video-preview-frame {
  position: relative;
  width: min(100%, 360px);
  aspect-ratio: 9 / 16;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgb(0 0 0 / 0.18), rgb(0 0 0 / 0.88)),
    var(--video-bg),
    linear-gradient(135deg, #111318, var(--card-red));
  background-position: center;
  background-size: cover;
  box-shadow: 0 24px 70px rgb(18 22 30 / 0.22);
}

.video-preview-frame.orientation-horizontal {
  width: min(100%, 760px);
  aspect-ratio: 16 / 9;
}

.video-preview-overlay {
  position: absolute;
  inset: auto 0 0;
  display: grid;
  gap: 11px;
  background: linear-gradient(0deg, rgb(0 0 0 / 0.92), transparent);
  color: white;
  padding: 26px;
}

.video-preview-overlay .brand-logo {
  width: 150px;
  max-height: 56px;
}

.video-preview-overlay > span {
  width: fit-content;
  background: var(--card-red);
  padding: 7px 9px;
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.video-preview-overlay h3 {
  margin: 0;
  font-size: clamp(28px, 5.2vw, 48px);
  font-weight: 950;
  line-height: 0.96;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}

.video-preview-overlay p {
  margin: 0;
  color: rgb(255 255 255 / 0.76);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.35;
}

.video-preview-overlay strong {
  color: var(--card-gold);
  font-size: 14px;
  font-weight: 950;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.business-preview-shell {
  display: grid;
  min-height: calc(100vh - 130px);
  place-items: center;
  overflow: auto;
  border: 1px solid var(--nex-line);
  background:
    linear-gradient(135deg, #f4f5f7 0%, #dfe3ea 54%, #cfd4dd 100%);
  padding: 28px;
}

.business-card-export {
  display: grid;
  gap: 22px;
  background: #ffffff;
  padding: 22px;
}

.business-card {
  --card-red: var(--nex-red);
  --card-gold: var(--nex-gold);
  position: relative;
  display: grid;
  width: min(100%, 672px);
  aspect-ratio: 3.5 / 2;
  overflow: hidden;
  border: 1px solid #d9dce3;
  background: white;
}

.business-card.front {
  grid-template-rows: 1fr auto;
}

.card-red-bar {
  position: absolute;
  inset: 0 auto 0 0;
  width: 16px;
  background: var(--card-red);
}

.business-card-main {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 26px;
  align-items: center;
  padding: 34px 36px 22px 48px;
}

.business-photo-frame {
  display: grid;
  aspect-ratio: 1;
  place-items: center;
  overflow: hidden;
  border: 4px solid #111318;
  background: #f1f2f5;
  color: #68707d;
}

.business-photo-frame img {
  height: 100%;
  width: 100%;
  object-fit: cover;
}

.business-agent-info {
  min-width: 0;
}

.business-agent-info .wordmark {
  margin-bottom: 20px;
}

.business-agent-info h3 {
  margin: 0;
  color: #111318;
  font-size: clamp(28px, 5vw, 46px);
  font-weight: 950;
  line-height: 0.95;
  overflow-wrap: anywhere;
}

.business-agent-info p {
  margin: 10px 0 0;
  color: var(--card-red);
  font-size: 16px;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.business-agent-info span {
  display: block;
  margin-top: 8px;
  color: #626976;
  font-size: 13px;
  font-weight: 800;
}

.business-contact-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: #343943;
  margin-left: 16px;
}

.business-contact-row div {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
  background: #050505;
  color: white;
  padding: 14px 16px;
}

.business-contact-row span {
  min-width: 0;
  overflow-wrap: anywhere;
  color: rgb(255 255 255 / 0.82);
  font-size: 13px;
  font-weight: 800;
}

.business-card.back {
  align-content: space-between;
  background:
    linear-gradient(120deg, rgb(0 0 0 / 0.86), rgb(0 0 0 / 0.62)),
    linear-gradient(135deg, #24272d, var(--card-red));
  color: white;
  padding: 32px 36px;
}

.business-card.back .wordmark {
  color: white;
}

.business-card.back h3 {
  margin: 28px 0 0;
  max-width: 500px;
  font-size: clamp(28px, 5vw, 44px);
  font-weight: 950;
  line-height: 1;
}

.qr-block {
  display: flex;
  width: fit-content;
  align-items: center;
  gap: 14px;
  border: 1px solid rgb(255 255 255 / 0.22);
  background: rgb(255 255 255 / 0.1);
  padding: 12px 14px;
}

.qr-block span {
  color: rgb(255 255 255 / 0.82);
  font-size: 15px;
  font-weight: 900;
}

.business-card.back p {
  margin: 0;
  color: rgb(255 255 255 / 0.58);
  font-size: 10px;
  font-weight: 700;
}

.business-card-proof {
  display: grid;
  gap: 28px;
  width: min(100%, 820px);
}

.proof-label {
  margin: 0 0 8px;
  color: #5f6673;
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.print-card {
  --card-red: var(--nex-red);
  --card-gold: var(--nex-gold);
  position: relative;
  width: 100%;
  aspect-ratio: 3.5 / 2;
  overflow: hidden;
  border: 1px solid #cfd3dc;
  background: #ffffff;
  box-shadow: 0 24px 70px rgb(18 22 30 / 0.2);
  isolation: isolate;
}

.print-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 14px;
  background: var(--card-red);
}

.print-card::after {
  content: "";
  position: absolute;
  inset: 18px 18px auto auto;
  width: 88px;
  height: 5px;
  background: var(--card-gold);
}

.immersive-card .print-safe-area::before {
  content: "";
  position: absolute;
  inset: 22px 22px 22px 34px;
  z-index: -1;
  border: 1px solid rgb(17 19 24 / 0.08);
}

.immersive-card.style-signature-red::after {
  background: var(--card-gold);
}

.immersive-card.style-executive-black {
  background: #111318;
  color: white;
}

.immersive-card.style-executive-black::after {
  background: var(--card-red);
}

.immersive-card.style-executive-black .wordmark,
.immersive-card.style-executive-black .card-name-block h3,
.immersive-card.style-executive-black .card-contact-grid span {
  color: white;
}

.immersive-card.style-executive-black .card-name-block em,
.immersive-card.style-executive-black .card-header-line span,
.immersive-card.style-executive-black .card-contact-grid p {
  color: rgb(255 255 255 / 0.62);
}

.immersive-card.style-executive-black .card-contact-grid div,
.immersive-card.style-executive-black .print-safe-area::before {
  border-color: rgb(255 255 255 / 0.14);
}

.immersive-card.style-clean-white {
  background: linear-gradient(135deg, #ffffff, #f8f9fb);
}

.immersive-card.style-clean-white::before {
  width: 8px;
}

.immersive-card.style-clean-white::after {
  background: #111318;
}

.immersive-card.style-luxury-gold {
  --card-red: var(--card-gold);
  background:
    linear-gradient(135deg, rgb(255 255 255 / 0.94), rgb(248 244 235 / 0.98)),
    #ffffff;
}

.immersive-card.style-luxury-gold::after {
  background: #111318;
}

.print-safe-area {
  position: relative;
  z-index: 1;
  display: grid;
  height: 100%;
  grid-template-rows: auto 1fr auto;
  gap: 16px;
  padding: 30px 34px 24px 46px;
}

.card-header-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.card-header-line span {
  max-width: 280px;
  color: #6a717e;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.12em;
  line-height: 1.35;
  text-align: right;
  text-transform: uppercase;
}

.card-header-line .brand-logo {
  width: 136px;
  height: auto;
  max-height: 54px;
  object-fit: contain;
  object-position: left center;
}

.card-identity-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 152px;
  gap: 30px;
  align-items: center;
}

.card-name-block {
  min-width: 0;
}

.card-name-block p {
  margin: 0 0 10px;
  color: var(--card-red);
  font-size: 13px;
  font-weight: 950;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.card-name-block h3 {
  margin: 0;
  color: #111318;
  font-size: clamp(32px, 4.2vw, 50px);
  font-weight: 950;
  line-height: 0.94;
  overflow-wrap: anywhere;
}

.card-name-block em {
  display: block;
  max-width: 380px;
  margin-top: 10px;
  color: #5d6470;
  font-size: 13px;
  font-style: normal;
  font-weight: 800;
  line-height: 1.4;
}

.card-headshot {
  display: grid;
  aspect-ratio: 1;
  place-items: center;
  overflow: hidden;
  border: 1px solid #d4d8e0;
  background: linear-gradient(135deg, #f4f5f7, #ffffff);
  color: #111318;
  box-shadow: 0 18px 34px rgb(17 19 24 / 0.12);
}

.card-headshot img {
  height: 100%;
  width: 100%;
  transform-origin: center;
}

.card-headshot strong {
  color: var(--card-red);
  font-size: 42px;
  font-weight: 950;
  letter-spacing: 0.04em;
}

.card-headshot.shape-circle {
  border-radius: 999px;
}

.card-headshot.shape-arch {
  border-radius: 72px 72px 10px 10px;
}

.card-contact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 22px;
}

.card-contact-grid div {
  display: grid;
  grid-template-columns: 20px 1fr;
  grid-template-areas:
    "icon label"
    "icon value";
  column-gap: 8px;
  align-items: center;
  min-width: 0;
  border-top: 1px solid #dfe2e8;
  padding-top: 11px;
}

.card-contact-grid svg {
  grid-area: icon;
  color: var(--card-red);
}

.card-contact-grid p {
  grid-area: label;
  margin: 0;
  color: #7b828f;
  font-size: 9px;
  font-weight: 950;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.card-contact-grid span {
  grid-area: value;
  min-width: 0;
  overflow-wrap: anywhere;
  color: #17191d;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.25;
}

.card-back {
  background:
    linear-gradient(115deg, rgb(5 5 5 / 0.96), rgb(36 39 45 / 0.92)),
    var(--nex-charcoal);
  color: white;
}

.card-back.style-clean-white {
  background:
    linear-gradient(135deg, #ffffff, #f4f5f7);
  color: #111318;
}

.card-back.style-clean-white .wordmark,
.card-back.style-clean-white .back-message h3,
.card-back.style-clean-white .qr-card span {
  color: #111318;
}

.card-back.style-clean-white .back-message p,
.card-back.style-clean-white .qr-card small,
.card-back.style-clean-white .back-footer > p {
  color: #68707d;
}

.card-back.style-clean-white .qr-card {
  border-color: #d8dce4;
  background: white;
}

.card-back.style-luxury-gold {
  background:
    linear-gradient(120deg, rgb(5 5 5 / 0.94), rgb(38 34 24 / 0.9)),
    #171717;
}

.card-back.style-luxury-gold::after {
  background: var(--card-gold);
}

.card-back::before {
  width: 18px;
}

.card-back::after {
  inset: auto 28px 28px auto;
  width: 120px;
  background: var(--card-red);
}

.back-safe-area {
  grid-template-rows: auto 1fr auto;
  padding-left: 52px;
}

.card-back .wordmark {
  color: white;
}

.card-back .brand-logo {
  width: 150px;
  height: auto;
  max-height: 58px;
  object-fit: contain;
  object-position: left center;
}

.back-message {
  align-self: center;
}

.back-message h3 {
  max-width: 560px;
  margin: 0;
  color: white;
  font-size: clamp(30px, 4.2vw, 44px);
  font-weight: 950;
  line-height: 0.98;
}

.back-message p {
  margin: 16px 0 0;
  color: rgb(255 255 255 / 0.68);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.back-footer {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
}

.qr-card {
  display: flex;
  min-width: 200px;
  align-items: center;
  gap: 12px;
  border: 1px solid rgb(255 255 255 / 0.18);
  background: rgb(255 255 255 / 0.08);
  padding: 10px 12px;
}

.qr-card span {
  min-width: 0;
  overflow-wrap: anywhere;
  color: white;
  font-size: 13px;
  font-weight: 900;
}

.qr-card small {
  display: block;
  color: rgb(255 255 255 / 0.58);
  font-size: 10px;
  font-weight: 850;
  margin-top: 4px;
}

.back-footer > p {
  max-width: 330px;
  margin: 0;
  color: rgb(255 255 255 / 0.5);
  font-size: 9px;
  font-weight: 750;
  line-height: 1.4;
  text-align: right;
}

.settings-grid,
.template-layout,
.email-sms-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.8fr);
  gap: 18px;
  padding-top: 22px;
}

.color-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.color-field input {
  padding: 4px;
}

.muted {
  pointer-events: none;
  opacity: 0.72;
}

.brand-preview-panel {
  align-self: start;
}

.brand-preview {
  display: grid;
  min-height: 320px;
  align-content: end;
  gap: 16px;
  background:
    linear-gradient(135deg, rgb(0 0 0 / 0.86), rgb(0 0 0 / 0.56)),
    linear-gradient(45deg, var(--brand-red), var(--brand-gold));
  color: white;
  padding: 28px;
}

.brand-preview .wordmark {
  color: white;
}

.brand-preview .brand-logo {
  width: 210px;
  max-height: 120px;
}

.brand-logo-manager {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.logo-swatch {
  display: grid;
  min-height: 176px;
  align-content: space-between;
  gap: 14px;
  border: 1px solid var(--nex-line);
  padding: 14px;
}

.logo-swatch.light {
  background:
    linear-gradient(135deg, #ffffff, #f5f6f8);
}

.logo-swatch.dark {
  background:
    linear-gradient(135deg, #050505, #24272d);
}

.logo-swatch .brand-logo {
  width: 180px;
  max-height: 92px;
}

.logo-swatch.dark .field span {
  color: rgb(255 255 255 / 0.78);
}

.brand-preview h3 {
  margin: 0;
  max-width: 480px;
  font-size: 30px;
  font-weight: 950;
  line-height: 1.02;
}

.brand-preview p {
  margin: 0;
  color: rgb(255 255 255 / 0.66);
  font-size: 12px;
  line-height: 1.5;
}

.template-grid,
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 14px;
}

.template-card,
.project-card {
  border: 1px solid var(--nex-line);
  background: white;
  padding: 14px;
}

.template-card {
  display: grid;
  gap: 8px;
  align-content: start;
}

.premium-template-library .panel {
  align-self: start;
}

.premium-template-library .template-grid {
  align-content: start;
}

.template-card .brand-logo {
  width: 104px;
  max-height: 42px;
}

.template-accent {
  height: 7px;
}

.template-card p {
  margin: 0;
  color: #707783;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.template-card input {
  min-height: 36px;
  padding: 0 9px;
  font-weight: 800;
}

.template-card .mini-template-preview {
  min-height: 180px;
}

.template-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 6px;
}

.project-card {
  display: grid;
  gap: 10px;
}

.project-card .project-thumb {
  min-height: 145px;
}

.project-card h4 {
  margin: 0;
  color: #111318;
  font-size: 17px;
  font-weight: 950;
  line-height: 1.15;
}

.project-card > p:not(.eyebrow) {
  margin: 0;
  color: #626a76;
  font-size: 12px;
  line-height: 1.45;
}

.project-card-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.project-card-foot > span {
  flex: 1 1 100%;
  color: #717987;
  font-size: 11px;
  font-weight: 850;
}

.template-card span {
  color: var(--nex-red);
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
}

.project-card h4 {
  margin: 4px 0 8px;
  font-size: 18px;
  font-weight: 900;
}

.project-card p:not(.eyebrow) {
  display: -webkit-box;
  min-height: 64px;
  overflow: hidden;
  color: #59606d;
  font-size: 13px;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.project-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-top: 1px solid var(--nex-line);
  margin-top: 12px;
  padding-top: 12px;
}

.project-card-foot span {
  color: #747985;
  font-size: 12px;
  font-weight: 800;
}

.copy-pre {
  white-space: pre-wrap;
  word-break: break-word;
  color: #272c35;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.6;
}

.sms-card {
  border-left: 4px solid var(--nex-red);
  background: #f7f8fa;
  margin: 0;
  padding: 16px;
  color: #272c35;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.5;
}

.toast {
  position: fixed;
  bottom: 18px;
  right: 18px;
  z-index: 20;
  background: #050505;
  color: white;
  padding: 11px 15px;
  font-size: 13px;
  font-weight: 850;
  box-shadow: 0 12px 40px rgb(0 0 0 / 0.24);
}

.login-screen {
  display: grid;
  min-height: 100vh;
  place-items: center;
  background:
    linear-gradient(90deg, rgb(0 0 0 / 0.88), rgb(0 0 0 / 0.68)),
    url("data:image/svg+xml,%3Csvg width='1200' height='700' viewBox='0 0 1200 700' xmlns='http://www.w3.org/2000/svg'%3E%3Crect width='1200' height='700' fill='%2324272d'/%3E%3Cg fill='none' stroke='%23ffffff' stroke-opacity='.12' stroke-width='3'%3E%3Cpath d='M120 490 L330 290 L520 490 Z'/%3E%3Cpath d='M450 490 L700 240 L1010 490 Z'/%3E%3Cpath d='M205 490 V665 M420 490 V665 M620 490 V665 M855 490 V665'/%3E%3C/g%3E%3Crect x='690' y='295' width='42' height='195' fill='%23e30613'/%3E%3Crect x='734' y='250' width='42' height='240' fill='%23e30613' fill-opacity='.72'/%3E%3C/svg%3E");
  background-position: center;
  background-size: cover;
  padding: 22px;
}

.login-panel {
  width: min(100%, 480px);
  border: 1px solid rgb(255 255 255 / 0.16);
  background: white;
  padding: 26px;
  box-shadow: 0 24px 80px rgb(0 0 0 / 0.28);
}

.login-brand {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 14px;
  align-items: center;
}

.login-logo {
  width: 150px;
  max-height: 92px;
}

.login-brand h1 {
  margin: 2px 0 0;
  font-size: 26px;
  font-weight: 950;
  line-height: 1;
}

.login-panel > p {
  margin: 18px 0;
  color: #5e6571;
  font-size: 14px;
  line-height: 1.6;
}

.login-form,
.access-form {
  display: grid;
  gap: 12px;
}

.login-error {
  border-left: 4px solid var(--nex-red);
  background: rgb(227 6 19 / 0.08);
  color: #471217;
  padding: 10px 11px;
  font-size: 13px;
  font-weight: 850;
}

.login-error small {
  display: block;
  margin-top: 5px;
  color: #6d1b22;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.35;
}

.login-message {
  border-left: 4px solid #168a4a;
  background: rgb(22 138 74 / 0.1);
  color: #14532d;
  padding: 10px 11px;
  font-size: 13px;
  font-weight: 850;
  line-height: 1.4;
}

.auth-links {
  display: flex;
  justify-content: center;
}

.auth-links button {
  border: 0;
  background: transparent;
  color: var(--nex-red);
  cursor: pointer;
  font-size: 13px;
  font-weight: 900;
}

.settings-side {
  display: grid;
  align-self: start;
  gap: 18px;
}

.allowed-user-list {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.allowed-user-list article {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--nex-line);
  background: #fafafb;
  padding: 10px;
}

.allowed-user-list strong,
.allowed-user-list span {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.allowed-user-list strong {
  color: #17191d;
  font-size: 13px;
  font-weight: 950;
}

.allowed-user-list span {
  color: #67707d;
  font-size: 12px;
  font-weight: 750;
  margin-top: 2px;
}

.allowed-user-list em {
  color: var(--nex-red);
  font-size: 11px;
  font-style: normal;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.allowed-user-list em.inactive {
  color: #6b7280;
}

.user-edit-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.user-edit-grid .field {
  margin: 0;
}

.user-action-row {
  display: flex;
  flex-wrap: wrap;
  grid-column: 1 / -1;
  gap: 8px;
}

.user-action-row .btn {
  min-height: 36px;
}

.reset-link-box {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  border: 1px solid rgb(22 138 74 / 0.2);
  background: rgb(22 138 74 / 0.08);
  padding: 12px;
}

.reset-link-box strong {
  color: #14532d;
  font-size: 13px;
  font-weight: 950;
}

.reset-link-box p {
  margin: 0;
  color: #14532d;
  font-size: 12px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.access-empty {
  color: #69707d;
  font-size: 13px;
  line-height: 1.5;
  margin: 0;
}

@media (max-width: 1320px) {
  .app-shell {
    grid-template-columns: 240px minmax(0, 1fr);
  }

  .input-panel {
    grid-column: 1 / -1;
    position: static;
    height: auto;
    border-left: 0;
    border-top: 1px solid var(--nex-line);
  }

  .form-stack {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: start;
  }

  .studio-template-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .prompt-starters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .canva-workspace {
    grid-template-columns: 290px minmax(0, 1fr);
  }

  .studio-export-strip {
    grid-template-columns: 1fr;
  }

  .studio-export-actions {
    justify-content: start;
  }

  .studio-top-toolbar {
    grid-template-columns: 1fr;
  }

  .studio-toolbar-actions {
    justify-content: start;
  }

  .studio-start-strip {
    grid-template-columns: 1fr;
  }

  .studio-start-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .nex-hero-content,
  .nex-dashboard-grid,
  .nex-dashboard-grid.three {
    grid-template-columns: 1fr;
  }

  .nex-hero-agent {
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
  }

  .nex-hero-agent .brand-logo {
    grid-column: 1 / -1;
  }
}

@media (max-width: 1040px) {
  .app-shell {
    display: block;
  }

  .sidebar {
    position: static;
    height: auto;
  }

  .nav-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .role-card {
    margin-top: 0;
  }

  .chat-layout,
  .flyer-builder-grid,
  .video-builder-grid,
  .business-card-layout,
  .settings-grid,
  .template-layout,
  .email-sms-grid,
  .portal-two-column,
  .support-layout,
  .transaction-layout,
  .agent-assist-layout,
  .nexu-player-layout,
  .command-hero,
  .module-hero {
    grid-template-columns: 1fr;
  }

  .chat-card {
    min-height: 620px;
  }

  .form-stack,
  .stats-row,
  .portal-toolbar,
  .admin-form-grid,
  .link-admin-controls > div {
    grid-template-columns: 1fr;
  }

  .nexu-external-card,
  .nexu-internal-card {
    align-items: stretch;
    flex-direction: column;
  }

  .studio-template-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .business-card-controls,
  .card-control-group {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .crm-layout,
  .crm-dashboard-grid,
  .crm-import-grid,
  .crm-settings-grid,
  .crm-split-panels,
  .nex-chat-page,
  .production-grid.two-column,
  .production-activity-layout,
  .buyer-form-grid,
  .buyer-filter-grid,
  .buyer-detail-grid,
  .deadline-summary-card {
    grid-template-columns: 1fr;
  }

  .buyer-detail-hero {
    align-items: stretch;
    flex-direction: column;
  }

  .crm-wide-panel {
    grid-column: auto;
  }

  .crm-contact-list {
    max-height: 360px;
  }

  .production-score-card {
    justify-items: start;
    text-align: left;
  }

  .nex-chat-page {
    min-height: auto;
  }

  .nex-chat-sidebar {
    max-height: 360px;
    overflow: auto;
  }

  .canva-studio {
    height: auto;
    min-height: 0;
  }

  .canva-workspace,
  .studio-left-panel {
    grid-template-columns: 1fr;
  }

  .studio-left-panel {
    position: static;
    max-height: none;
  }

  .studio-tool-rail {
    display: flex;
    overflow-x: auto;
    border-right: 0;
    border-bottom: 1px solid var(--nex-line);
  }

  .studio-tool-rail button {
    min-width: 78px;
  }

  .studio-tool-panel {
    max-height: none;
  }

  .studio-canvas-panel {
    min-height: 620px;
  }

  .canvas-floating-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .canvas-format-pills {
    max-width: 100%;
  }

  .nex-metrics-row {
    grid-template-columns: repeat(8, minmax(180px, 1fr));
  }

  .nex-pulse-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  body {
    background: #f4f5f7;
  }

  .app-shell,
  .app-shell.portal-shell {
    display: block;
    min-height: 100dvh;
  }

  .main-area,
  .input-panel {
    padding: 16px;
  }

  .main-area {
    padding-bottom: calc(100px + env(safe-area-inset-bottom));
  }

  .input-panel {
    padding-bottom: calc(100px + env(safe-area-inset-bottom));
  }

  .studio-top-toolbar,
  .studio-tool-content,
  .studio-settings-content {
    padding: 12px;
  }

  .studio-toolbar-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .studio-export-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .studio-export-actions .btn {
    width: 100%;
  }

  .studio-toolbar-actions .btn {
    width: 100%;
  }

  .studio-start-strip {
    gap: 10px;
    padding: 10px;
  }

  .studio-start-actions {
    display: flex;
    overflow-x: auto;
    padding-bottom: 2px;
    -webkit-overflow-scrolling: touch;
  }

  .studio-start-actions button {
    flex: 0 0 168px;
  }

  .project-title-wrap input {
    font-size: 17px;
  }

  .nex-dashboard {
    gap: 14px;
    padding-top: 16px;
  }

  .nex-hero-content {
    min-height: auto;
    padding: 22px;
  }

  .nex-hero h1 {
    font-size: 40px;
  }

  .nex-hero p:not(.eyebrow) {
    font-size: 15px;
  }

  .nex-hero-actions,
  .nex-ai-bar > div {
    display: grid;
    grid-template-columns: 1fr;
  }

  .nex-hero-actions .btn {
    width: 100%;
  }

  .nex-hero-agent {
    grid-template-columns: 1fr;
  }

  .nex-ai-bar {
    grid-template-columns: 1fr;
  }

  .nex-metrics-row {
    margin: 0 -16px;
    padding: 0 16px 4px;
    scroll-snap-type: x mandatory;
  }

  .nex-metric-card {
    scroll-snap-align: start;
  }

  .nex-widget,
  .nex-launchpad {
    padding: 14px;
  }

  .nex-widget-head,
  .nex-section-head {
    align-items: stretch;
    flex-direction: column;
  }

  .nex-activity-feed button {
    grid-template-columns: 1fr;
  }

  .nex-activity-feed em,
  .nex-activity-feed small {
    grid-row: auto;
    text-align: left;
  }

  .nex-launchpad-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .nex-launchpad-grid button {
    min-height: 164px;
    padding: 13px;
  }

  .support-snapshot-grid {
    grid-template-columns: 1fr;
  }

  .canva-workspace {
    gap: 10px;
  }

  .studio-left-panel,
  .studio-right-panel,
  .studio-top-toolbar,
  .canvas-floating-bar {
    margin: 0 -2px;
  }

  .canvas-format-pills {
    overflow-x: auto;
  }

  .canvas-inspector-panel {
    position: static;
    width: 100%;
  }

  .inspector-head {
    grid-template-columns: 1fr;
  }

  .inspector-layers {
    flex-wrap: nowrap;
    overflow-x: auto;
  }

  .inspector-layers button {
    min-width: max-content;
  }

  .sidebar {
    position: fixed;
    top: auto !important;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 40;
    height: auto !important;
    max-height: none;
    overflow: hidden;
    border-top: 1px solid rgb(255 255 255 / 0.1);
    padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
    box-shadow: 0 -16px 34px rgb(0 0 0 / 0.2);
  }

  .brand-lockup,
  .role-card {
    display: none;
  }

  .nav-list {
    display: flex;
    grid-template-columns: none;
    gap: 7px;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .nav-list::-webkit-scrollbar {
    display: none;
  }

  .nav-item {
    grid-template-columns: 1fr;
    justify-items: center;
    min-width: 78px;
    gap: 4px;
    padding: 8px 7px;
  }

  .nav-item span {
    font-size: 10px;
    font-weight: 850;
    line-height: 1.15;
    text-align: center;
  }

  .nav-item.active {
    box-shadow: inset 0 3px 0 var(--nex-red);
  }

  .topbar {
    position: sticky;
    top: 0;
    z-index: 35;
    align-items: stretch;
    flex-direction: column;
    margin: -16px -16px 0;
    border-bottom: 1px solid rgb(230 231 235 / 0.9);
    background: rgb(255 255 255 / 0.92);
    padding: calc(14px + env(safe-area-inset-top)) 16px 14px;
    backdrop-filter: blur(18px);
  }

  .topbar h2 {
    font-size: 24px;
  }

  .topbar-actions,
  .hero-actions,
  .button-grid,
  .prompt-starters {
    display: grid;
    grid-template-columns: 1fr;
  }

  .nav-list {
    grid-template-columns: 1fr;
  }

  .chat-composer {
    grid-template-columns: 1fr;
  }

  .split-fields,
  .color-grid,
  .brand-logo-manager,
  .template-picker,
  .choice-grid,
  .stock-grid,
    .studio-template-row,
    .video-builder-grid,
    .crm-filter-grid,
    .crm-form-grid,
    .crm-form-grid.compact,
    .crm-task-table article,
    .buyer-form-grid,
    .buyer-filter-grid,
    .buyer-form-grid.compact,
    .nex-chat-header,
    .production-form-grid,
    .production-activity-form,
    .production-activity-row,
    .task-edit-grid,
    .notification-list article,
    .checklist-task-item {
    grid-template-columns: 1fr;
  }

  .dashboard-chat-preview {
    grid-template-columns: 40px minmax(0, 1fr);
    align-items: start;
  }

  .dashboard-chat-preview small {
    grid-column: 2;
    text-align: left;
  }

  .dashboard-chat-preview .chat-preview-icon {
    width: 40px;
    height: 40px;
  }

  .nexu-external-card,
  .nexu-internal-card {
    padding: 18px;
  }

  .nexu-external-card h3,
  .nexu-internal-card h3 {
    font-size: 20px;
  }

  .nexu-player-panel {
    min-height: 230px;
  }

  .nexu-player-panel iframe {
    min-height: 230px;
  }

  .link-admin-controls > div,
  .ticket-detail-card dl {
    grid-template-columns: 1fr;
  }

  .nex-chat-page {
    gap: 12px;
  }

  .nex-chat-sidebar,
  .nex-chat-main {
    border-radius: 14px;
  }

  .nex-chat-sidebar {
    max-height: 300px;
    padding: 12px;
  }

  .nex-chat-header {
    align-items: flex-start;
    flex-direction: column;
    padding: 14px;
  }

  .nex-chat-header h3 {
    font-size: 20px;
  }

  .nex-chat-stream {
    min-height: 360px;
    padding: 12px;
  }

  .nex-chat-message,
  .nex-chat-message.mine {
    grid-template-columns: 34px minmax(0, 1fr);
  }

  .nex-chat-message.mine .chat-avatar {
    grid-column: 1;
  }

  .nex-chat-message.mine .chat-message-body {
    grid-column: 2;
    justify-self: stretch;
  }

  .nex-chat-composer {
    padding: 12px;
  }

  .composer-row {
    grid-template-columns: 40px minmax(0, 1fr);
  }

  .composer-row .btn {
    grid-column: 1 / -1;
  }

  .production-daily-card {
    align-items: flex-start;
    flex-direction: column;
  }

  .production-daily-card h3 {
    font-size: 38px;
  }

  .production-period-toggle {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .production-score-ring {
    min-height: 120px;
  }

  .production-activity-row {
    align-items: start;
  }

  .checklist-task-item {
    gap: 10px;
  }

  .task-check {
    justify-content: start;
  }

  .task-title-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .deadline-summary-metrics {
    grid-template-columns: auto 1fr;
    text-align: left;
  }

  .crm-tabs {
    margin: 0 -4px;
    padding-bottom: 8px;
  }

  .crm-tabs button {
    padding: 9px 12px;
    font-size: 11px;
  }

  .crm-contact-head {
    align-items: stretch;
    flex-direction: column;
  }

  .crm-contact-head h3 {
    font-size: 22px;
  }

  .crm-ai-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .pipeline-board {
    grid-auto-columns: minmax(235px, 86vw);
  }

  .pipeline-column {
    min-height: 260px;
  }

  .business-card-controls {
    grid-template-columns: 1fr;
  }

  .card-control-group {
    grid-template-columns: 1fr;
  }

  .command-hero,
  .module-hero {
    min-height: 220px;
    padding: 22px;
  }

  .command-hero h3,
  .module-hero h3 {
    font-size: 34px;
  }

  .hero-brand-card {
    justify-items: start;
    min-width: 0;
  }

  .hero-brand-card .brand-logo,
  .module-hero .brand-logo {
    width: 168px;
  }

  .hero-content {
    padding: 24px;
  }

  .login-brand {
    grid-template-columns: 1fr;
  }

  .allowed-user-list article,
  .user-edit-grid {
    grid-template-columns: 1fr;
  }

  .user-action-row {
    display: grid;
    grid-template-columns: 1fr;
  }

  .preview-shell {
    padding: 10px;
  }

  .studio-business-card-canvas {
    width: min(100%, 340px);
    padding: 16px;
  }

  .studio-card-brand .brand-logo {
    width: 96px;
  }

  .studio-card-brand span {
    max-width: 124px;
    font-size: 7.5px;
  }

  .studio-card-main {
    grid-template-columns: minmax(0, 1fr) 76px;
    gap: 10px;
  }

  .studio-card-agent-copy p {
    margin-bottom: 4px;
    font-size: 8px;
  }

  .studio-card-agent-copy h2 {
    font-size: clamp(20px, 6vw, 27px);
  }

  .studio-card-agent-copy em {
    max-height: 24px;
    margin-top: 5px;
    overflow: hidden;
    font-size: 8px;
  }

  .studio-card-headshot strong {
    font-size: 20px;
  }

  .studio-card-contact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 5px 8px;
  }

  .studio-card-contact span {
    gap: 4px;
    font-size: 7.4px;
  }

  .studio-card-contact svg {
    height: 11px;
    width: 11px;
  }

  .studio-card-side-tabs {
    width: min(100%, 340px);
  }

  .studio-card-back-brand .brand-logo {
    width: 94px;
  }

  .studio-card-back-brand strong {
    font-size: 9px;
  }

  .studio-card-back-grid {
    grid-template-columns: 78px minmax(0, 1fr);
    gap: 12px;
  }

  .studio-card-back-copy h2 {
    font-size: 15px;
  }

  .studio-card-qr-block span,
  .studio-card-back-copy span,
  .studio-card-back-copy p {
    font-size: 7px;
  }

  .flyer-page {
    width: 100%;
  }

  .business-preview-shell {
    justify-content: start;
    overflow-x: auto;
    border-color: transparent;
    background:
      linear-gradient(135deg, #f7f8fa 0%, #e3e7ee 100%);
    padding: 14px;
    -webkit-overflow-scrolling: touch;
  }

  .business-card-proof {
    width: max(340px, min(100%, 430px));
    gap: 18px;
  }

  .print-card {
    border: 0;
    box-shadow: 0 18px 38px rgb(17 19 24 / 0.18);
  }

  .print-card::before {
    width: 8px;
  }

  .print-card::after {
    inset: 12px 12px auto auto;
    width: 48px;
    height: 3px;
  }

  .card-back::before {
    width: 10px;
  }

  .card-back::after {
    inset: auto 16px 16px auto;
    width: 70px;
    height: 3px;
  }

  .immersive-card .print-safe-area::before {
    display: none;
  }

  .video-preview-shell {
    min-height: 520px;
    padding: 14px;
  }

  .video-preview-frame.orientation-horizontal {
    width: 100%;
  }

  .business-headshot-upload {
    grid-template-columns: 58px minmax(0, 1fr);
  }

  .business-headshot-upload img,
  .business-headshot-upload > span {
    height: 58px;
    width: 58px;
  }

  .print-safe-area {
    gap: 9px;
    padding: 16px 14px 14px 22px;
  }

  .card-header-line span {
    display: none;
  }

  .card-header-line .brand-logo {
    width: 96px;
    max-height: 38px;
  }

  .card-identity-row {
    grid-template-columns: minmax(0, 1fr) 68px;
    gap: 10px;
  }

  .card-name-block p {
    margin-bottom: 4px;
    font-size: 7.5px;
    letter-spacing: 0.08em;
  }

  .card-name-block h3 {
    font-size: clamp(18px, 5.8vw, 26px);
    line-height: 0.96;
  }

  .card-name-block em {
    display: block;
    max-height: 24px;
    margin-top: 5px;
    overflow: hidden;
    font-size: 8.5px;
    line-height: 1.25;
  }

  .card-headshot {
    border-color: rgb(17 19 24 / 0.12);
    box-shadow: 0 10px 18px rgb(17 19 24 / 0.12);
  }

  .card-headshot strong {
    font-size: 21px;
  }

  .card-contact-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 5px 8px;
  }

  .card-contact-grid div {
    grid-template-columns: 13px minmax(0, 1fr);
    column-gap: 5px;
    border-top-color: rgb(17 19 24 / 0.1);
    padding-top: 4px;
  }

  .card-contact-grid p {
    display: none;
  }

  .card-contact-grid svg {
    height: 12px;
    width: 12px;
  }

  .card-contact-grid span {
    font-size: 7.6px;
    line-height: 1.15;
  }

  .back-safe-area {
    padding-left: 24px;
  }

  .card-back .brand-logo {
    width: 104px;
    max-height: 40px;
  }

  .back-message h3 {
    font-size: clamp(18px, 5.8vw, 26px);
  }

  .back-message p {
    margin-top: 8px;
    font-size: 8px;
    letter-spacing: 0.07em;
  }

  .back-footer {
    align-items: end;
    flex-direction: row;
    gap: 8px;
  }

  .qr-card {
    min-width: 116px;
    gap: 7px;
    padding: 6px 7px;
  }

  .qr-card svg {
    height: 24px;
    width: 24px;
  }

  .qr-card span {
    font-size: 8px;
  }

  .qr-card small {
    font-size: 7px;
  }

  .back-footer > p {
    max-width: 150px;
    font-size: 6.6px;
    line-height: 1.25;
    text-align: right;
  }

  .business-card-buttons {
    grid-template-columns: 1fr;
  }

  .flyer-details {
    grid-template-columns: 1fr;
  }

  .stats-strip {
    grid-template-columns: repeat(2, 1fr);
  }

  .toast {
    right: 16px;
    bottom: calc(90px + env(safe-area-inset-bottom));
    left: 16px;
    text-align: center;
  }
}

.print-card::after,
.card-back::after {
  content: none !important;
  display: none !important;
}

.print-card .brand-logo,
.business-card .brand-logo,
.card-header-line .brand-logo,
.card-back .brand-logo {
  height: auto;
  object-fit: contain;
  object-position: left center;
}

@media (max-width: 760px) {
  .buyer-checklist-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .buyer-checklist-toolbar .row-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .checklist-section-head {
    padding: 12px;
  }

  .checklist-section-preview {
    padding: 0 12px 12px;
  }

  .preview-task {
    grid-template-columns: 1fr;
  }

  .preview-task small {
    text-align: left;
  }

  .nex-dashboard-grid.three.lower .nex-widget:last-child {
    grid-column: auto;
  }
}

@media (max-width: 980px) {
  .crm-cockpit-hero,
  .crm-cockpit-grid,
  .crm-smart-layout,
  .crm-smart-plan-panel {
    grid-template-columns: 1fr;
  }

  .crm-cockpit-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .crm-accountability-table article,
  .crm-lead-table button,
  .crm-communication-form {
    grid-template-columns: 1fr;
  }

  .crm-next-action-strip {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .crm-cockpit-hero {
    padding: 18px;
  }

  .crm-cockpit-metrics {
    grid-template-columns: 1fr;
  }

  .crm-cockpit-card {
    min-height: 106px;
  }
}

@media (display-mode: standalone) {
  body {
    background: #f4f5f7;
  }

  .topbar {
    padding-top: calc(18px + env(safe-area-inset-top));
  }
}

/* Dashboard/interface stability pass */
html,
body,
#root {
  width: 100%;
  max-width: 100%;
}

body {
  overflow-x: hidden;
}

.app-shell,
.main-area,
.topbar,
.nex-dashboard,
.nex-hero,
.nex-ai-bar,
.nex-metrics-row,
.nex-dashboard-grid,
.nex-launchpad,
.nex-launchpad-grid,
.nex-widget {
  min-width: 0;
  max-width: 100%;
}

.nex-dashboard {
  width: 100%;
  max-width: 1480px;
  margin: 0 auto;
  gap: 16px;
}

.nex-hero {
  box-shadow: 0 18px 48px rgb(5 5 5 / 0.16);
}

.nex-hero-content {
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 20px;
  min-height: 260px;
  padding: 26px;
}

.nex-hero h1 {
  font-size: clamp(34px, 4vw, 52px);
  line-height: 1.02;
}

.nex-hero p:not(.eyebrow) {
  max-width: 670px;
  font-size: 14px;
  line-height: 1.5;
}

.nex-status-row span {
  max-width: 100%;
  white-space: nowrap;
}

.nex-hero-agent {
  padding: 16px;
}

.nex-hero-agent .brand-logo {
  width: 136px;
  max-height: 72px;
}

.nex-avatar {
  width: 58px;
  height: 58px;
  font-size: 19px;
}

.nex-ai-bar {
  box-shadow: 0 8px 24px rgb(18 22 30 / 0.045);
}

.nex-metrics-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  overflow: visible;
}

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

.metric-icon {
  width: 32px;
  height: 32px;
}

.metric-icon svg,
.nex-launchpad-grid svg {
  flex: 0 0 auto;
}

.nex-metric-card strong {
  font-size: 26px;
}

.nex-metric-card em {
  font-size: 11px;
}

.nex-dashboard-grid {
  grid-template-columns: minmax(280px, 0.82fr) minmax(0, 1.18fr);
}

.nex-widget,
.nex-launchpad {
  padding: 15px;
  box-shadow: 0 10px 28px rgb(18 22 30 / 0.045);
}

.nex-widget-head h2,
.nex-section-head h2 {
  font-size: 20px;
}

.nex-launchpad-grid {
  grid-template-columns: repeat(auto-fit, minmax(185px, 1fr));
}

.nex-launchpad-grid button {
  min-height: 128px;
}

.nex-launchpad-grid button > span {
  width: fit-content;
  max-width: 100%;
}

@media (max-width: 1040px) {
  .nex-metrics-row {
    display: flex;
    grid-template-columns: none;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
  }

  .nex-metric-card {
    flex: 0 0 170px;
  }
}

@media (max-width: 680px) {
  .main-area {
    width: 100%;
    overflow-x: hidden;
    padding: 12px;
    padding-bottom: calc(96px + env(safe-area-inset-bottom));
  }

  .topbar {
    margin: -12px -12px 0;
    padding: calc(12px + env(safe-area-inset-top)) 12px 12px;
  }

  .topbar h2 {
    font-size: 22px;
  }

  .topbar-actions {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .topbar-actions .btn,
  .topbar-actions .icon-btn {
    flex: 0 0 auto;
    min-height: 38px;
    padding: 0 11px;
    font-size: 12px;
  }

  .nex-dashboard {
    gap: 12px;
    padding-top: 12px;
    overflow: hidden;
  }

  .nex-hero-content {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 18px;
  }

  .nex-hero-glow {
    opacity: 0.45;
  }

  .nex-hero h1 {
    font-size: clamp(28px, 8.5vw, 34px);
    line-height: 1.05;
  }

  .nex-hero p:not(.eyebrow) {
    font-size: 13px;
    line-height: 1.45;
  }

  .nex-status-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  .nex-status-row span {
    width: 100%;
    min-width: 0;
    justify-content: start;
    padding: 6px 7px;
    font-size: 9px;
    line-height: 1.15;
    white-space: normal;
  }

  .nex-status-row span:nth-child(n+5) {
    display: none;
  }

  .nex-hero-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .nex-hero-actions .btn {
    width: 100%;
    min-width: 0;
    min-height: 42px;
    padding: 0 8px;
    font-size: 11px;
    line-height: 1.15;
  }

  .nex-hero-actions .btn span {
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .nex-hero-agent {
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    padding: 12px;
  }

  .nex-hero-agent .brand-logo {
    display: none;
  }

  .nex-avatar {
    width: 46px;
    height: 46px;
    font-size: 16px;
  }

  .nex-hero-agent strong {
    font-size: 16px;
  }

  .nex-ai-bar {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 8px;
    padding: 11px;
  }

  .nex-ai-bar > button {
    min-width: 0;
    padding: 4px 0;
    font-size: 13px;
    line-height: 1.35;
  }

  .nex-ai-bar > div {
    display: flex;
    grid-column: 1 / -1;
    overflow-x: auto;
  }

  .nex-ai-bar > div button {
    flex: 0 0 auto;
    max-width: 220px;
  }

  .nex-metrics-row {
    gap: 9px;
    margin: 0 -12px;
    padding: 0 12px 4px;
  }

  .nex-metric-card {
    flex: 0 0 154px;
    min-height: 102px;
    padding: 11px;
    scroll-snap-align: start;
  }

  .metric-icon {
    width: 30px;
    height: 30px;
  }

  .metric-icon svg {
    width: 17px;
    height: 17px;
  }

  .metric-status {
    position: static;
    width: fit-content;
    max-width: 100%;
    font-size: 8px;
    line-height: 1.1;
  }

  .nex-metric-card strong {
    font-size: 23px;
  }

  .nex-metric-card em {
    font-size: 10.5px;
  }

  .nex-dashboard-grid,
  .nex-dashboard-grid.three {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .nex-dashboard-grid.three.lower .nex-widget:last-child {
    grid-column: auto;
  }

  .nex-widget,
  .nex-launchpad {
    padding: 12px;
  }

  .nex-widget-head,
  .nex-section-head {
    gap: 8px;
    margin-bottom: 10px;
  }

  .nex-widget-head h2,
  .nex-section-head h2 {
    font-size: 18px;
  }

  .nex-focus-list label {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .nex-focus-list button {
    grid-column: 2;
    width: fit-content;
  }

  .nex-launchpad-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .nex-launchpad-grid button {
    grid-template-columns: 32px minmax(0, 1fr) auto;
    min-height: 0;
    align-items: center;
    gap: 8px;
    padding: 11px;
  }

  .nex-launchpad-grid button > svg {
    grid-row: span 2;
    width: 22px;
    height: 22px;
  }

  .nex-launchpad-grid button > span {
    grid-column: 3;
    width: fit-content;
    max-width: 92px;
    overflow: hidden;
    padding: 4px 6px;
    font-size: 8px;
    line-height: 1.1;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .nex-launchpad-grid strong {
    min-width: 0;
    font-size: 14px;
  }

  .nex-launchpad-grid p {
    grid-column: 2 / -1;
    font-size: 11px;
    line-height: 1.35;
  }

  .nex-pulse-grid,
  .support-snapshot-grid {
    grid-template-columns: 1fr;
  }

  .nex-chat-card p {
    min-height: 0;
    font-size: 14px;
  }

  .momentum-template-row button {
    flex-basis: 132px;
    min-height: 96px;
  }

  .sidebar {
    padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
  }

  .nav-list {
    gap: 8px;
  }

  .nav-item {
    min-width: 86px;
    padding: 9px 8px;
  }

  .nav-item svg {
    width: 20px;
    height: 20px;
  }

  .nav-item span {
    font-size: 10.5px;
  }
}

@media (max-width: 390px) {
  .nex-hero-actions {
    grid-template-columns: 1fr;
  }

  .nex-status-row {
    grid-template-columns: 1fr;
  }

  .nex-metric-card {
    flex-basis: 145px;
  }

  .nav-item {
    min-width: 78px;
  }
}
