/*
 * Sellios visual system — NiceDash-inspired reference layer.
 *
 * This file is presentation-only.  It intentionally does not create,
 * remove, rename, or reorder navigation entries, routes, data, or actions.
 * Keep it as the last workspace stylesheet so the visual contract is easy to
 * audit and so feature CSS can continue to own its component behaviour.
 */
:root {
  --nd-canvas: #f6f8fb;
  --nd-surface: #ffffff;
  --nd-surface-soft: #fbfcfd;
  --nd-border: #e7ebef;
  --nd-border-strong: #d9e0e5;
  --nd-ink: #152536;
  --nd-muted: #6d7785;
  --nd-muted-soft: #98a2ad;
  /* Sellios purple palette; layout and component content stay unchanged. */
  --nd-primary: #6d35d3;
  --nd-primary-dark: #4c1d95;
  --nd-primary-soft: #f1eaff;
  --nd-accent: #ac8bff;
  --nd-accent-soft: #f0eafd;
  --nd-warning: #f5ac24;
  --nd-danger: #db6565;
  --nd-radius-sm: 10px;
  --nd-radius-md: 14px;
  --nd-radius-lg: 20px;
  --nd-shadow-card: 0 10px 28px rgba(27, 45, 59, .055);
  --nd-shadow-hover: 0 16px 34px rgba(27, 45, 59, .10);
}

/* Typography and canvas -------------------------------------------------- */
body,
body.production-app-page,
body[data-production-page="app"] {
  background: var(--nd-canvas) !important;
  color: var(--nd-ink) !important;
  font-family: "Nunito Sans", Inter, ui-sans-serif, system-ui, -apple-system,
    BlinkMacSystemFont, "Segoe UI", sans-serif !important;
  -webkit-font-smoothing: antialiased;
}

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

.production-content,
.content {
  width: min(1440px, 100%);
  max-width: 1440px;
  padding: clamp(28px, 4vw, 48px) clamp(22px, 4vw, 54px) 64px;
}

.production-module,
.workspace-module {
  max-width: none;
}

.production-eyebrow,
.workspace-eyebrow,
.command-center-eyebrow {
  color: var(--nd-primary) !important;
  font-size: 10px !important;
  font-weight: 800 !important;
  letter-spacing: .13em !important;
  line-height: 1.3 !important;
  text-transform: uppercase;
}

.production-module h1,
.workspace-page-header h1,
.command-center-header h1,
.page-heading h1 {
  color: var(--nd-ink) !important;
  font-size: clamp(30px, 3.3vw, 44px) !important;
  font-weight: 800 !important;
  letter-spacing: -.055em !important;
  line-height: 1.08 !important;
}

.production-module > p:not(.production-eyebrow),
.production-module-heading p,
.workspace-page-header > div > p:last-child,
.command-center-header p,
.page-heading > div > p:last-child {
  color: var(--nd-muted) !important;
  font-size: 14px !important;
  line-height: 1.6 !important;
}

/* Shell ------------------------------------------------------------------ */
.production-shell {
  grid-template-columns: 258px minmax(0, 1fr) !important;
  background: var(--nd-canvas) !important;
}

.production-sidebar,
.sidebar {
  background: var(--nd-surface) !important;
  border-right: 1px solid var(--nd-border) !important;
  box-shadow: 4px 0 18px rgba(26, 44, 59, .025) !important;
  color: var(--nd-ink) !important;
}

.production-brand-lockup,
.brand-lockup {
  min-height: 78px;
  padding: 20px 20px 24px !important;
}

.production-brand-lockup img,
.brand-lockup .brand-logo-white {
  width: 146px !important;
}

.production-navigation,
.main-nav {
  gap: 5px !important;
  padding-inline: 12px !important;
}

.production-nav-section-title,
.nav-section-title,
.nav-section-subtitle {
  color: var(--nd-muted-soft) !important;
  font-size: 10px !important;
  font-weight: 800 !important;
  letter-spacing: .12em !important;
}

.production-nav-item,
.nav-item {
  min-height: 44px !important;
  border-radius: var(--nd-radius-sm) !important;
  color: #50606b !important;
  font-size: 14px !important;
  font-weight: 700 !important;
}

.production-nav-item:hover,
.nav-item:hover {
  background: #f7f3ff !important;
  color: var(--nd-primary) !important;
}

.production-nav-item.is-active,
.nav-item.is-active {
  background: var(--nd-primary) !important;
  box-shadow: none !important;
  color: #fff !important;
  font-weight: 800 !important;
}

.production-nav-item.is-active::before {
  display: none !important;
}

.production-nav-item.is-active .production-nav-icon,
.nav-item.is-active svg {
  color: var(--nd-accent) !important;
}

.production-nav-icon,
.nav-item svg {
  color: #87939c !important;
}

.production-sidebar-footer,
.sidebar-footer {
  border-color: var(--nd-border) !important;
}

.production-help-card,
.help-card {
  color: var(--nd-muted) !important;
}

.production-help-card:hover,
.help-card:hover {
  background: #faf8ff !important;
}

.production-topbar,
.topbar {
  min-height: 76px !important;
  background: rgba(255, 255, 255, .94) !important;
  border-bottom: 1px solid var(--nd-border) !important;
  box-shadow: 0 1px 0 rgba(30, 46, 58, .015) !important;
}

.production-topbar .brand-switcher,
.topbar .brand-switcher {
  height: 46px;
  border: 1px solid var(--nd-border) !important;
  border-radius: var(--nd-radius-md) !important;
  background: var(--nd-surface) !important;
  box-shadow: var(--nd-shadow-card) !important;
}

.production-topbar-tool,
.search-button,
.notification-button,
.production-profile-card,
.account-card {
  border-color: var(--nd-border) !important;
  border-radius: var(--nd-radius-md) !important;
  color: #56636e !important;
  background: var(--nd-surface) !important;
}

.production-topbar-tool:hover,
.search-button:hover,
.notification-button:hover,
.production-profile-card:hover,
.account-card:hover {
  border-color: #cdb8f2 !important;
  color: var(--nd-primary) !important;
  background: #fbf9ff !important;
}

/* Common controls and cards --------------------------------------------- */
.production-button,
.button,
.workspace-button {
  min-height: 42px;
  border-radius: var(--nd-radius-sm) !important;
  font-size: 13px !important;
  font-weight: 800 !important;
}

.production-button-primary,
.button-primary,
.workspace-button-primary {
  background: var(--nd-primary) !important;
  box-shadow: 0 8px 16px rgba(109, 53, 211, .16) !important;
  color: #fff !important;
}

.production-button-primary:hover,
.button-primary:hover,
.workspace-button-primary:hover {
  background: var(--nd-primary-dark) !important;
}

.production-button-secondary,
.button-secondary,
.workspace-button-secondary {
  border-color: var(--nd-border-strong) !important;
  background: var(--nd-surface) !important;
  color: #53616c !important;
}

.production-button-secondary:hover,
.button-secondary:hover,
.workspace-button-secondary:hover {
  border-color: #cdb8f2 !important;
  color: var(--nd-primary) !important;
}

.production-panel,
.production-record-list,
.production-inline-form,
.production-detail-grid,
.production-journey-section,
.production-workspace-panel,
.workspace-panel,
.workspace-module-stat,
.production-metric-card,
.merchant-context-grid article,
.panel {
  border: 1px solid var(--nd-border) !important;
  border-radius: var(--nd-radius-lg) !important;
  background: var(--nd-surface) !important;
  box-shadow: var(--nd-shadow-card) !important;
}

.production-panel:hover,
.workspace-panel:hover,
.production-metric-card:hover {
  border-color: #e3d5fa !important;
  box-shadow: var(--nd-shadow-hover) !important;
}

.production-filter-bar,
.production-section-tabs,
.production-inbox-type-tabs,
.production-inbox-smart-views {
  border-color: var(--nd-border) !important;
  border-radius: var(--nd-radius-md) !important;
  background: var(--nd-surface) !important;
  box-shadow: var(--nd-shadow-card) !important;
}

.production-form input,
.production-form select,
.production-form textarea,
.production-inline-form input,
.production-inline-form select,
.production-inline-form textarea,
.production-filter-bar input,
.production-filter-bar select,
input,
select,
textarea {
  border-color: var(--nd-border-strong) !important;
  border-radius: var(--nd-radius-sm) !important;
  color: var(--nd-ink) !important;
  background: var(--nd-surface) !important;
}

input:focus,
select:focus,
textarea:focus {
  outline: 3px solid rgba(109, 53, 211, .14) !important;
  border-color: #a98be3 !important;
}

/* Command Center -------------------------------------------------------- */
.workspace-command-center {
  max-width: none !important;
}

.command-center-header {
  margin-bottom: 28px !important;
}

.command-center-kpis {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 16px !important;
  margin-bottom: 18px !important;
}

.command-center-kpi {
  min-height: 126px !important;
  border-color: var(--nd-border) !important;
  border-radius: var(--nd-radius-lg) !important;
  box-shadow: var(--nd-shadow-card) !important;
}

.command-center-kpi-icon,
.command-center-mini-icon,
.command-center-list-icon,
.command-center-timeline-icon,
.command-center-lead-response-icon {
  background: var(--nd-primary-soft) !important;
  color: var(--nd-primary) !important;
}

.command-center-kpi strong,
.command-center-mini-grid strong,
.command-center-panel > header h2 {
  color: var(--nd-ink) !important;
}

.command-center-kpi small {
  color: var(--nd-primary) !important;
}

.command-center-lead-response,
.command-center-panel {
  border-color: var(--nd-border) !important;
  border-radius: var(--nd-radius-lg) !important;
  box-shadow: var(--nd-shadow-card) !important;
}

.command-center-lead-response-item {
  border-color: var(--nd-border) !important;
  border-radius: var(--nd-radius-md) !important;
  background: var(--nd-surface-soft) !important;
}

.command-center-lead-response-item:hover {
  border-color: #cdb8f2 !important;
  background: #f7f3ff !important;
}

.command-center-progress span {
  background: var(--nd-primary) !important;
}

.command-center-timeline em {
  background: var(--nd-accent-soft) !important;
  color: var(--nd-primary-dark) !important;
}

.command-center-ai {
  border-color: #dfd1f7 !important;
  border-radius: var(--nd-radius-lg) !important;
  background: linear-gradient(100deg, #f1eaff, #fbf9ff 70%, #fff) !important;
  color: var(--nd-primary-dark) !important;
}

/* Consistent status language colours, without changing the text ---------- */
.production-status-pill,
.status,
.badge,
.production-nav-item b,
.production-nav-item i {
  border-radius: 999px !important;
}

.status.running,
.status.active,
.production-status-pill.is-active {
  color: var(--nd-primary) !important;
  background: var(--nd-primary-soft) !important;
}

/* Responsive ------------------------------------------------------------ */
@media (max-width: 1200px) {
  .command-center-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}

@media (max-width: 900px) {
  .production-shell { grid-template-columns: 1fr !important; }
  .production-content,
  .content { padding: 28px 22px 56px; }
}

@media (max-width: 700px) {
  .command-center-kpis { grid-template-columns: 1fr !important; gap: 10px !important; }
  .command-center-kpi { min-height: 104px !important; }
  .production-content,
  .content { padding: 24px 16px 48px; }
  .production-module h1,
  .workspace-page-header h1,
  .command-center-header h1 { font-size: 32px !important; }
}
