@import url("https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&display=swap");

:root {
  color-scheme: light;
  --ink: #061a33;
  --muted: #5f6b7a;
  --line: #dde3ec;
  --paper: #f6f5f2;
  --panel: #ffffff;
  --blue: #1058e8;
  --blue-soft: #eaf1ff;
  --navy: #061a33;
  --magenta: #ed1684;
  --amber: #f6b21a;
  --cyan: #18a8df;
  --green: #0b8f4d;
  --shadow: 0 18px 46px rgba(6, 26, 51, 0.1);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
}

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

button {
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  padding: 0 16px;
  background: var(--blue);
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(16, 88, 232, 0.22);
  outline-offset: 2px;
}

select,
input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
}

select,
input {
  min-height: 42px;
  padding: 0 12px;
}

textarea {
  min-height: 72px;
  max-height: 180px;
  padding: 12px;
  resize: vertical;
}

.hidden {
  display: none !important;
}

button[hidden],
[hidden] {
  display: none !important;
}

.detail-section-label {
  margin: 14px 0 8px;
  color: var(--ink);
  font-size: 0.98rem;
}

.login-screen {
  display: grid;
  grid-template-rows: auto auto;
  justify-items: center;
  gap: 28px;
  min-height: 100vh;
  padding: 48px 24px;
  background: #f8f7f4;
}

.login-brand {
  display: grid;
  justify-items: center;
  gap: 12px;
  max-width: 760px;
  text-align: center;
}

.login-brand img {
  width: min(560px, 86vw);
  height: auto;
  animation: softReveal 520ms ease both;
}

.login-brand h1 {
  margin: 0;
  font-size: clamp(26px, 4vw, 42px);
  line-height: 1.05;
  animation: riseIn 520ms ease 80ms both;
}

.login-brand p {
  margin: 0;
  max-width: 650px;
  color: var(--muted);
  line-height: 1.5;
  animation: riseIn 520ms ease 140ms both;
}

.login-card {
  display: grid;
  gap: 12px;
  width: min(420px, 100%);
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
  animation: riseIn 520ms ease 220ms both;
}

.login-card strong,
.login-card small {
  display: block;
}

.login-card small,
.field,
.tenant-card small,
.tenant-card span,
.topbar span,
.module-card small,
.chat-header span,
.quote-meta,
.history-card small,
.admin-card small,
.conversation-card small,
.metric-card span {
  color: var(--muted);
  font-size: 13px;
}

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

.app-sidebar {
  display: grid;
  grid-template-rows: auto auto auto auto 1fr;
  gap: 18px;
  padding: 22px;
  border-right: 1px solid var(--line);
  background: #ffffff;
  animation: slideFromLeft 420ms ease both;
}

.side-brand {
  display: grid;
  gap: 8px;
}

.side-brand img {
  width: 176px;
  height: auto;
}

.side-brand span {
  width: fit-content;
  padding: 5px 9px;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
}

.main-nav {
  display: grid;
  gap: 8px;
}

.nav-button {
  display: grid;
  grid-template-columns: 34px 1fr;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 6px 10px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink);
  text-align: left;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.nav-button:hover {
  transform: translateX(2px);
}

.nav-button span {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 8px;
  background: #eef2f7;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.nav-button.active {
  border-color: #bfd1fb;
  background: var(--blue-soft);
  color: var(--blue);
}

.nav-button.active span {
  background: var(--blue);
  color: #fff;
}

.tenant-card,
.mini-metrics div,
.line-item,
.total-box,
.status-box,
.history-card,
.admin-card,
.conversation-card,
.metric-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 14px;
}

.tenant-card {
  display: grid;
  gap: 4px;
  background: #fbfcff;
}

.tenant-card strong,
.tenant-card span,
.mini-metrics span {
  display: block;
}

.field {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
  font-weight: 800;
}

.field.compact {
  margin-bottom: 0;
}

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

.mini-metrics div {
  padding: 10px;
}

.mini-metrics span {
  font-weight: 900;
}

.workspace {
  min-width: 0;
  padding: 28px;
  animation: softReveal 420ms ease both;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

h2,
h3 {
  margin: 0;
  letter-spacing: 0;
}

h2 {
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1;
}

h3 {
  font-size: 22px;
}

.ghost-button,
.quick-actions button,
.state-button,
.admin-tab,
.filter-button {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
}

.view {
  display: none;
}

.view.active {
  display: block;
  animation: riseIn 320ms ease both;
}

.home-hero {
  display: grid;
  justify-items: center;
  gap: 8px;
  margin: 0 auto 28px;
  text-align: center;
}

.home-hero img {
  width: min(360px, 75vw);
  height: auto;
}

.home-hero p {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
}

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

.module-card {
  position: relative;
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 154px;
  padding: 24px 20px;
  border: 1px solid #d8dfeb;
  background: #fff;
  color: var(--ink);
  text-align: left;
  box-shadow: 0 12px 30px rgba(6, 26, 51, 0.06);
  animation: riseIn 420ms ease both;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.module-card:hover {
  border-color: #abc2f9;
  transform: translateY(-1px);
  box-shadow: 0 18px 34px rgba(16, 88, 232, 0.12);
}

.module-card:nth-child(2) {
  animation-delay: 60ms;
}

.module-card:nth-child(3) {
  animation-delay: 120ms;
}

.module-card:nth-child(4) {
  animation-delay: 180ms;
}

.module-card:nth-child(5) {
  animation-delay: 240ms;
}

.module-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}

.module-icon.blue {
  background: var(--blue);
}

.module-icon.magenta {
  background: var(--magenta);
}

.module-icon.amber {
  background: var(--amber);
  color: var(--ink);
}

.module-icon.cyan {
  background: var(--cyan);
}

.module-icon.navy {
  background: var(--navy);
}

.module-card .status-pill {
  position: absolute;
  top: 16px;
  right: 16px;
}

.quote-workbench {
  display: grid;
  grid-template-columns: minmax(420px, 1.35fr) minmax(320px, 0.85fr);
  gap: 18px;
  min-height: calc(100vh - 132px);
  align-items: start;
}

.chat-panel,
.result-panel {
  display: grid;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(6, 26, 51, 0.06);
}

.chat-panel {
  align-self: start;
}

.chat-panel {
  grid-template-rows: auto 1fr auto;
}

.result-panel {
  align-content: start;
  padding: 18px;
}

.chat-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
  background: #fbfcff;
}

.avatar {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 50%;
  background: var(--blue);
  color: white;
  font-weight: 900;
}

.chat-header strong,
.chat-header span {
  display: block;
}

.messages {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 22px;
  overflow: auto;
  background:
    linear-gradient(rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.8)),
    repeating-linear-gradient(45deg, #eef4ff 0, #eef4ff 12px, #faf8f2 12px, #faf8f2 24px);
}

.bubble {
  max-width: min(720px, 88%);
  padding: 14px 16px;
  border-radius: 8px;
  line-height: 1.45;
  white-space: pre-wrap;
  box-shadow: 0 8px 24px rgba(6, 26, 51, 0.08);
  animation: bubbleIn 220ms ease both;
}

.bubble.user {
  align-self: flex-end;
  background: #dcecff;
}

.bubble.bot {
  align-self: flex-start;
  background: #fff;
}

.composer {
  display: grid;
  grid-template-columns: minmax(190px, 0.45fr) 1fr auto;
  gap: 12px;
  padding: 16px;
  border-top: 1px solid var(--line);
  background: #fbfcff;
}

.client-field {
  margin-bottom: 0;
}

.panel-heading {
  display: grid;
  gap: 14px;
  margin-bottom: 14px;
}

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

.quick-actions button {
  min-height: 34px;
  padding: 0 12px;
  font-size: 13px;
}

.quote-details,
.view.active#dashboardPanel,
.view.active#historyPanel,
.view.active#conversationsPanel {
  display: grid;
  gap: 14px;
}

.line-item {
  display: grid;
  gap: 4px;
}

.technical-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
}

.technical-card-heading {
  display: grid;
  gap: 3px;
}

.technical-card-heading small,
.technical-variable span {
  color: var(--muted);
  font-size: 12px;
}

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

.technical-variable {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(7, 19, 45, 0.06);
}

.technical-variable strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

@media (max-width: 640px) {
  .technical-grid {
    grid-template-columns: 1fr;
  }
}

.line-item strong,
.total-box strong {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.total-box {
  display: grid;
  gap: 10px;
}

.total-box .grand {
  padding-top: 10px;
  border-top: 1px solid var(--line);
  color: var(--blue);
  font-size: 18px;
}

.assumptions {
  display: grid;
  gap: 8px;
  padding-left: 18px;
  color: var(--muted);
}

.status-box {
  border-color: #f4d37c;
  background: #fff9e9;
}

.history-card,
.admin-card,
.conversation-card {
  display: grid;
  gap: 10px;
  animation: riseIn 260ms ease both;
}

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

.metric-card {
  display: grid;
  gap: 4px;
}

.metric-card strong {
  color: var(--blue);
  font-size: 22px;
}

.history-card header,
.conversation-card header,
.admin-row,
.admin-params {
  display: grid;
  gap: 8px;
}

.history-card header,
.conversation-card header {
  grid-template-columns: 1fr auto;
  align-items: start;
}

.history-total {
  color: var(--blue);
  font-weight: 900;
}

.status-line,
.history-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.history-actions {
  flex-wrap: wrap;
  justify-content: flex-start;
}

.status-pill {
  width: fit-content;
  padding: 5px 9px;
  border-radius: 999px;
  background: #eef2f7;
  color: var(--navy);
  font-size: 12px;
  font-weight: 900;
  text-transform: capitalize;
}

.status-pill.disponible,
.status-pill.aprobada,
.status-pill.cotizado {
  background: #e5f7ec;
  color: var(--green);
}

.status-pill.rechazada,
.status-pill.vencida {
  background: #ffe8ec;
  color: #ad1b35;
}

.status-pill.enviada {
  background: var(--blue-soft);
  color: var(--blue);
}

.status-pill.datos_pendientes {
  background: #fff3cd;
  color: #8a5a00;
}

.state-button {
  min-height: 34px;
  padding: 0 10px;
  font-size: 12px;
  text-transform: capitalize;
}

.pdf-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 8px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.section-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.section-title strong {
  text-transform: capitalize;
}

.admin-layout {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.admin-subnav {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.admin-tab {
  text-align: left;
}

.admin-tab.active,
.filter-button.active {
  border-color: #bfd1fb;
  background: var(--blue-soft);
  color: var(--blue);
}

.admin-section {
  display: none;
}

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

.admin-content {
  min-width: 0;
}

.admin-params,
.brand-grid,
.tenant-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

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

.tenant-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.tenant-row small {
  display: block;
}

.brand-grid .field:nth-last-child(-n + 2) {
  grid-column: 1 / -1;
}

.pricing-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 10px;
  align-items: center;
}

#pricingList {
  display: grid;
  gap: 10px;
}

.filter-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.price-create-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid #c9d7fb;
  border-radius: 8px;
  background: #fbfcff;
}

.price-create-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.filter-button {
  min-height: 36px;
  padding: 0 12px;
  font-size: 13px;
}

.admin-row {
  grid-template-columns: 1fr 120px auto;
  align-items: center;
  padding: 10px 0;
  border-top: 1px solid var(--line);
  animation: riseIn 220ms ease both;
}

.admin-row:first-of-type {
  border-top: 0;
}

.admin-row input {
  min-height: 36px;
}

.admin-row button,
.admin-params button {
  min-height: 36px;
}

.digital-admin-special-prices {
  margin: 16px 0;
  padding: 14px;
  border: 1px solid #b9d5ff;
  border-left: 4px solid #ed0b87;
  border-radius: 10px;
  background: #f6f9ff;
}

.digital-admin-special-prices .section-title {
  margin-bottom: 10px;
}

.country-profile-list {
  display: grid;
  gap: 8px;
}

.country-profile-row {
  display: grid;
  grid-template-columns: minmax(150px, 1.2fr) repeat(3, minmax(90px, 0.7fr)) auto;
  gap: 10px;
  align-items: end;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.country-profile-row .field {
  margin-bottom: 0;
}

.country-profile-row button {
  min-height: 36px;
}

@media (max-width: 1180px) {
  .module-grid,
  .dashboard-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .quote-workbench {
    grid-template-columns: 1fr;
  }

  .composer {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .app-sidebar {
    position: static;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .main-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .workspace {
    padding: 20px;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .admin-layout,
  .admin-params,
  .brand-grid,
  .tenant-form,
  .price-create-grid,
  .tenant-row,
  .admin-row,
  .pricing-toolbar,
  .country-profile-row {
    grid-template-columns: 1fr;
  }

  .admin-subnav {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .module-grid,
  .dashboard-grid,
  .main-nav,
  .mini-metrics {
    grid-template-columns: 1fr;
  }

  .bubble {
    max-width: 100%;
  }
}

/* Optilito Enterprise */
.enterprise-shell {
  display: grid;
  gap: 18px;
}

.enterprise-intro {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 24px 26px;
  border: 1px solid #b9d8d4;
  border-top: 3px solid #18a999;
  border-radius: 10px;
  background: linear-gradient(135deg, #f4fffd, #ffffff 70%);
  box-shadow: 0 12px 28px rgba(15, 111, 104, 0.08);
}

.enterprise-intro h3 {
  margin: 0 0 8px;
  color: #123a47;
  font-family: Sora, Inter, sans-serif;
  font-size: clamp(22px, 2.3vw, 34px);
}

.enterprise-intro p:not(.eyebrow) {
  max-width: 720px;
  margin: 0;
  color: #5f7480;
}

.enterprise-badge,
.enterprise-result-status,
.enterprise-step {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid #8dd2ca;
  border-radius: 999px;
  color: #087a71;
  background: #e8fbf8;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.enterprise-workbench {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(350px, 0.75fr);
  gap: 18px;
  align-items: start;
}

.enterprise-form,
.enterprise-result {
  min-width: 0;
  border: 1px solid #cbdceb;
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 14px 32px rgba(24, 70, 139, 0.08);
}

.enterprise-form {
  display: grid;
  gap: 16px;
  padding: 22px;
}

.enterprise-result {
  position: sticky;
  top: 18px;
  display: grid;
  align-content: start;
  gap: 16px;
  min-height: 420px;
  padding: 22px;
}

.enterprise-form-heading,
.enterprise-section-heading,
.enterprise-result-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.enterprise-form-heading {
  padding-bottom: 14px;
  border-bottom: 1px solid #e2eaf4;
}

.enterprise-form-heading strong,
.enterprise-section-heading strong,
.enterprise-result-heading h3 {
  display: block;
  margin: 0;
  color: #172b52;
}

.enterprise-form-heading span,
.enterprise-section-heading small,
.enterprise-result-heading small {
  display: block;
  margin-top: 4px;
  color: #7384a5;
  font-size: 12px;
}

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

.enterprise-draft-grid {
  grid-template-columns: 1fr 1.5fr 0.6fr;
}

.enterprise-field-group,
.enterprise-builder-section {
  display: grid;
  gap: 12px;
}

.enterprise-builder-section {
  padding-top: 16px;
  border-top: 1px solid #e2eaf4;
}

.enterprise-subheading {
  color: #27746e;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.enterprise-draft-grid .field,
.enterprise-dimensions-grid .field,
.enterprise-form > .field {
  display: grid;
  gap: 6px;
  color: #405579;
  font-size: 12px;
  font-weight: 800;
}

.enterprise-draft-grid input,
.enterprise-draft-grid select,
.enterprise-dimensions-grid input,
.enterprise-dimensions-grid select,
.enterprise-form > .field input,
.enterprise-form > .field textarea,
.enterprise-form .field textarea {
  width: 100%;
  border-color: #bed1ee;
  border-radius: 7px;
  color: #172b52;
  background: #fbfdff;
}

.enterprise-form textarea {
  resize: vertical;
}

.enterprise-draft-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.enterprise-draft-actions small {
  color: #7384a5;
}

.secondary-button {
  min-height: 40px;
  padding: 0 15px;
  border: 1px solid #18a999;
  border-radius: 8px;
  color: #087a71;
  background: #e8fbf8;
  font-weight: 900;
}

.secondary-button:hover {
  color: #ffffff;
  background: #18a999;
}

.enterprise-component-list {
  display: grid;
  gap: 8px;
}

.enterprise-component-row {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid #dce6f5;
  border-radius: 8px;
  background: #f8fbff;
}

.enterprise-component-mark {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 8px;
  color: #087a71;
  background: #d9f6f1;
  font-size: 11px;
  font-weight: 900;
}

.enterprise-component-row strong,
.enterprise-component-row small {
  display: block;
}

.enterprise-component-row strong {
  overflow: hidden;
  color: #172b52;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.enterprise-component-row small,
.enterprise-list-empty {
  color: #7384a5;
  font-size: 12px;
}

.enterprise-list-empty {
  padding: 14px;
  border: 1px dashed #bed1ee;
  border-radius: 8px;
  text-align: center;
}

.enterprise-remove-component {
  width: 30px;
  height: 30px;
  border: 1px solid #f0b8c9;
  border-radius: 50%;
  color: #c42b63;
  background: #fff7fa;
  font-size: 18px;
}

.enterprise-submit {
  min-height: 48px;
  border: 1px solid #18a999;
  border-radius: 8px;
  color: #ffffff;
  background: linear-gradient(100deg, #087a71, #18a999);
  font-weight: 900;
  box-shadow: 0 10px 20px rgba(24, 169, 153, 0.2);
}

.enterprise-submit:hover {
  background: linear-gradient(100deg, #07655e, #108c7f);
}

.enterprise-result-heading h3 {
  font-size: 20px;
}

.enterprise-result-section,
.enterprise-exclusions {
  display: grid;
  gap: 10px;
}

.enterprise-result-section > strong,
.enterprise-exclusions > strong {
  color: #27746e;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.enterprise-result-components {
  display: grid;
  gap: 7px;
}

.enterprise-result-component,
.enterprise-cost-grid > div,
.enterprise-total-box > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid #dce6f5;
  border-radius: 7px;
  background: #fbfdff;
}

.enterprise-result-component span,
.enterprise-cost-grid span,
.enterprise-total-box span {
  color: #7384a5;
  font-size: 12px;
}

.enterprise-result-component strong,
.enterprise-cost-grid strong,
.enterprise-total-box strong {
  color: #172b52;
  text-align: right;
}

.enterprise-result-component span strong {
  display: block;
  overflow: hidden;
  max-width: 220px;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.enterprise-result-component small {
  display: block;
  margin-top: 3px;
  color: #8a97ac;
  font-size: 11px;
}

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

.enterprise-total-box {
  display: grid;
  gap: 7px;
  padding-top: 4px;
}

.enterprise-grand-total {
  border-color: #8dd2ca !important;
  background: #e8fbf8 !important;
}

.enterprise-grand-total span,
.enterprise-grand-total strong {
  color: #087a71;
  font-size: 16px;
  font-weight: 900;
}

.enterprise-exclusions {
  padding-top: 12px;
  border-top: 1px solid #e2eaf4;
}

.enterprise-exclusions ul {
  display: grid;
  gap: 6px;
  margin: 0;
  padding-left: 18px;
  color: #667b8b;
  font-size: 12px;
  line-height: 1.45;
}

.enterprise-empty-state,
.enterprise-loading {
  display: grid;
  min-height: 280px;
  place-content: center;
  gap: 8px;
  color: #7384a5;
  text-align: center;
}

.enterprise-empty-state strong,
.enterprise-loading strong {
  color: #172b52;
  font-size: 18px;
}

@media (max-width: 1180px) {
  .enterprise-workbench { grid-template-columns: 1fr; }
  .enterprise-result { position: static; }
}

@media (max-width: 700px) {
  .enterprise-intro,
  .enterprise-form-heading,
  .enterprise-section-heading,
  .enterprise-result-heading { flex-direction: column; }
  .enterprise-form,
  .enterprise-result { padding: 16px; }
  .enterprise-form-grid,
  .enterprise-draft-grid,
  .enterprise-dimensions-grid,
  .enterprise-cost-grid { grid-template-columns: 1fr; }
  .enterprise-draft-actions { align-items: stretch; flex-direction: column; }
  .enterprise-draft-actions button { width: 100%; }
}

/* Edition hub: the first workspace view for the modular Optilito platform. */
.edition-hub {
  display: grid;
  gap: 30px;
  min-height: min(680px, calc(100vh - 170px));
  padding: clamp(24px, 4vw, 52px);
  border: 1px solid #d4e0ef;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 22px 52px rgba(23, 56, 104, 0.1);
  overflow: hidden;
}

.edition-hub-header {
  display: flex;
  justify-content: space-between;
  gap: 28px;
  align-items: end;
  padding-bottom: 26px;
  border-bottom: 1px solid #dce6f2;
}

.edition-hub-brand {
  display: grid;
  grid-template-columns: minmax(170px, 250px) minmax(260px, 540px);
  gap: clamp(22px, 4vw, 56px);
  align-items: center;
}

.edition-hub-brand img {
  width: min(250px, 100%);
  height: auto;
  padding: 12px 16px;
  border: 1px solid #d6e0ef;
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 14px 30px rgba(23, 56, 104, 0.1);
}

.edition-hub-brand h3 {
  max-width: 520px;
  margin: 6px 0 10px;
  color: #07132d;
  font-size: clamp(28px, 3.4vw, 48px);
  line-height: 1.04;
}

.edition-hub-brand p:not(.eyebrow) {
  max-width: 500px;
  margin: 0;
  color: #61718c;
  font-size: 16px;
  line-height: 1.55;
}

.active-edition-card {
  display: grid;
  gap: 6px;
  min-width: 210px;
  padding: 16px 18px;
  border-left: 3px solid var(--blue);
  background: #f4f8ff;
}

.active-edition-card span,
.active-edition-card small {
  color: #6c7c96;
  font-size: 12px;
  font-weight: 700;
}

.active-edition-card strong {
  color: var(--navy);
  font-size: 20px;
}

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

.edition-card {
  position: relative;
  display: grid;
  align-content: start;
  min-height: 330px;
  padding: 22px;
  border: 1px solid #d5e0ee;
  border-top: 4px solid var(--blue);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(23, 56, 104, 0.07);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
  animation: editionRise 520ms ease both;
}

.edition-card:nth-child(2) { animation-delay: 80ms; }
.edition-card:nth-child(3) { animation-delay: 160ms; }

.edition-card:hover,
.edition-card.selected {
  transform: translateY(-4px);
  border-color: #9fc6f3;
  box-shadow: 0 20px 34px rgba(23, 56, 104, 0.13);
}

.edition-card.locked {
  opacity: 0.62;
  filter: saturate(0.65);
}

.edition-card.locked:hover {
  transform: none;
  box-shadow: none;
}

.edition-card .edition-action:disabled {
  cursor: not-allowed;
  opacity: 0.72;
  background: #a7b4ca;
  color: #ffffff;
  box-shadow: none;
}

.edition-card.featured {
  border-top-color: var(--magenta);
  background: #fffafd;
}

.edition-card.edition-suite {
  border-top-color: var(--amber);
}

.edition-card.edition-enterprise {
  border-top-color: #18a999;
}

.edition-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.edition-mark {
  color: #8292aa;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.edition-status {
  padding: 5px 8px;
  border-radius: 999px;
  background: #e9f7f0;
  color: #0b8f4d;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.edition-symbol {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin: 24px 0 16px;
  border-radius: 12px;
  background: var(--blue);
  color: #ffffff;
  font-size: 24px;
  font-weight: 900;
  box-shadow: 0 8px 18px rgba(16, 88, 232, 0.2);
}

.edition-pro .edition-symbol {
  background: var(--magenta);
  box-shadow: 0 8px 18px rgba(237, 22, 132, 0.18);
}

.edition-suite .edition-symbol {
  background: var(--amber);
  color: #07132d;
  box-shadow: 0 8px 18px rgba(246, 178, 26, 0.18);
}

.edition-enterprise .edition-symbol {
  background: #18a999;
  color: #ffffff;
  box-shadow: 0 8px 18px rgba(24, 169, 153, 0.2);
}

.edition-card h4 {
  margin: 0 0 8px;
  color: #07132d;
  font-size: 24px;
}

.edition-card p {
  min-height: 50px;
  margin: 0;
  color: #63738d;
  font-size: 14px;
  line-height: 1.5;
}

.edition-feature-list {
  display: grid;
  gap: 8px;
  margin: 18px 0 22px;
}

.edition-feature-list span {
  display: flex;
  gap: 8px;
  align-items: center;
  color: #273b59;
  font-size: 12px;
  font-weight: 700;
}

.edition-feature-list span::before {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--blue);
  content: "";
}

.edition-pro .edition-feature-list span::before { background: var(--magenta); }
.edition-suite .edition-feature-list span::before { background: var(--amber); }

.edition-action {
  align-self: end;
  min-height: 40px;
  margin-top: auto;
  background: #071d3c;
  font-size: 13px;
}

.edition-action:hover { background: var(--blue); }
.edition-pro .edition-action { background: var(--magenta); }
.edition-pro .edition-action:hover { background: #c20c68; }
.edition-suite .edition-action { background: var(--amber); color: #07132d; }
.edition-suite .edition-action:hover { background: #e29a06; }
.edition-enterprise .edition-action { background: #18a999; }
.edition-enterprise .edition-action:hover { background: #108c7f; }

.edition-hub-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 26px;
  padding-top: 4px;
  color: #657691;
  font-size: 12px;
  font-weight: 700;
}

.edition-hub-footer span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.edition-hub-footer i {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--cyan);
}

.artwork-upload {
  display: grid;
  grid-column: 1 / -1;
  gap: 6px;
  padding: 12px;
  border: 1px solid #b9d8f3;
  border-left: 3px solid var(--magenta);
  border-radius: 8px;
  background: #f7fbff;
}

.artwork-upload .field {
  display: grid;
  gap: 6px;
  color: #53627d;
  font-size: 12px;
  font-weight: 800;
}

.artwork-upload input[type="file"] {
  min-height: 42px;
  padding: 8px;
  border: 1px dashed #74b9ec;
  background: #ffffff;
  color: #07132d;
  cursor: pointer;
}

.artwork-upload input[type="file"]::file-selector-button {
  min-height: 28px;
  margin-right: 10px;
  padding: 0 10px;
  border: 0;
  border-radius: 6px;
  background: var(--magenta);
  color: #ffffff;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.artwork-upload small {
  color: #667792;
  font-size: 11px;
  line-height: 1.4;
}

.manual-artwork-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid #f0b7d8;
  border-left: 3px solid var(--magenta);
  border-radius: 8px;
  background: #fff8fc;
}

.manual-artwork-card p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.manual-artwork-card label {
  display: grid;
  gap: 5px;
  color: #53627d;
  font-size: 12px;
  font-weight: 800;
}

.manual-artwork-card input {
  min-height: 36px;
  padding: 0 10px;
  border: 1px solid #b9d8f3;
  border-radius: 6px;
  background: #ffffff;
  color: #07132d;
}

.manual-artwork-card button {
  min-height: 38px;
  border: 0;
  border-radius: 6px;
  background: var(--blue);
  color: #ffffff;
  font-weight: 800;
  cursor: pointer;
}

@keyframes editionRise {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 1080px) {
  .edition-hub-header { align-items: start; flex-direction: column; }
  .active-edition-card { width: min(100%, 340px); }
}

@media (max-width: 820px) {
  .edition-hub-brand { grid-template-columns: 1fr; }
  .edition-grid { grid-template-columns: 1fr; }
  .edition-card { min-height: auto; }
  .edition-card p { min-height: auto; }
}

@media (max-width: 520px) {
  .edition-hub { padding: 22px 16px; }
  .edition-hub-brand img { width: min(230px, 100%); }
  .edition-hub-footer { display: grid; gap: 10px; }
}

@keyframes riseIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideFromLeft {
  from {
    opacity: 0;
    transform: translateX(-12px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes softReveal {
  from {
    opacity: 0;
    transform: scale(0.985);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes bubbleIn {
  from {
    opacity: 0;
    transform: translateY(6px) scale(0.99);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
  }
}

/* Optilito technology theme: deep blue canvas, network texture and glass accents. */
:root {
  color-scheme: dark;
  --ink: #061a33;
  --muted: #71809c;
  --line: #dce5f4;
  --paper: #07156e;
  --panel: #ffffff;
  --blue: #1765eb;
  --blue-soft: #e8f0ff;
  --navy: #07124e;
  --magenta: #ef1686;
  --amber: #ffb51b;
  --cyan: #27c9ef;
  --green: #0b9b68;
  --tech: #071372;
  --tech-line: rgba(180, 220, 255, 0.2);
  --shadow: 0 24px 60px rgba(1, 8, 54, 0.28);
}

body {
  background: var(--tech);
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline-color: rgba(39, 201, 239, 0.7);
}

.login-screen {
  position: relative;
  isolation: isolate;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 430px);
  grid-template-rows: auto minmax(220px, 1fr);
  grid-template-areas: "brand card" "stage card";
  align-items: center;
  justify-items: stretch;
  gap: 20px clamp(28px, 6vw, 96px);
  min-height: 100vh;
  padding: clamp(28px, 5vw, 72px) clamp(24px, 7vw, 110px);
  overflow: hidden;
  background: #071474;
}

.login-screen::before,
.workspace::before {
  position: absolute;
  inset: 0;
  z-index: -1;
  content: "";
  opacity: 0.72;
  background-image: radial-gradient(circle at 7% 22%, rgba(255, 255, 255, 0.95) 0 2px, transparent 3px), radial-gradient(circle at 19% 68%, rgba(255, 255, 255, 0.85) 0 2px, transparent 3px), radial-gradient(circle at 44% 18%, rgba(255, 255, 255, 0.9) 0 2px, transparent 3px), radial-gradient(circle at 66% 52%, rgba(255, 255, 255, 0.9) 0 2px, transparent 3px), radial-gradient(circle at 91% 30%, rgba(255, 255, 255, 0.95) 0 2px, transparent 3px), linear-gradient(28deg, transparent 49.75%, var(--tech-line) 50%, transparent 50.25%), linear-gradient(151deg, transparent 49.75%, var(--tech-line) 50%, transparent 50.25%), linear-gradient(74deg, transparent 49.75%, rgba(39, 201, 239, 0.16) 50%, transparent 50.25%);
  background-size: auto, auto, auto, auto, auto, 420px 280px, 510px 340px, 360px 280px;
  animation: networkDrift 18s linear infinite alternate;
}

.login-screen::after {
  position: absolute;
  right: -14vw;
  bottom: -22vw;
  z-index: -1;
  width: 58vw;
  height: 58vw;
  content: "";
  border: 1px solid rgba(109, 185, 255, 0.18);
  border-radius: 50%;
  box-shadow: 0 0 0 36px rgba(109, 185, 255, 0.05), 0 0 0 72px rgba(109, 185, 255, 0.035);
  transform: rotate(-18deg);
}

.login-brand {
  grid-area: brand;
  justify-items: start;
  align-content: center;
  max-width: 760px;
  text-align: left;
  z-index: 1;
}

.login-brand img {
  width: min(500px, 82vw);
  padding: 14px 20px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 14px 42px rgba(0, 0, 0, 0.22);
}

.login-brand h1 {
  max-width: 700px;
  color: #ffffff;
  font-size: clamp(32px, 4.2vw, 58px);
  line-height: 0.98;
  letter-spacing: -1px;
}

.login-brand p {
  max-width: 640px;
  color: #d9e4ff;
  font-size: 16px;
}

.login-signals {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  color: #82e7ff;
  font-size: 11px;
  font-weight: 900;
}

.login-signals i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 14px rgba(255, 181, 27, 0.9);
}

.login-stage {
  position: relative;
  grid-area: stage;
  min-height: 230px;
  overflow: hidden;
  border-top: 1px solid rgba(177, 220, 255, 0.2);
  border-bottom: 1px solid rgba(177, 220, 255, 0.2);
  z-index: 1;
}

.network-grid {
  position: absolute;
  inset: 0;
  opacity: 0.56;
  background-image: linear-gradient(33deg, transparent 49.4%, rgba(150, 224, 255, 0.38) 50%, transparent 50.6%), linear-gradient(143deg, transparent 49.4%, rgba(150, 224, 255, 0.28) 50%, transparent 50.6%), radial-gradient(circle at 12% 24%, #ffffff 0 2px, transparent 3px), radial-gradient(circle at 86% 28%, #ffffff 0 2px, transparent 3px), radial-gradient(circle at 76% 78%, #ffffff 0 2px, transparent 3px);
  background-size: 230px 160px, 310px 200px, auto, auto, auto;
  animation: networkDrift 14s linear infinite alternate-reverse;
}

.print-stack {
  position: absolute;
  left: 28%;
  bottom: 22px;
  width: 250px;
  height: 150px;
  transform: rotate(-8deg);
  animation: stackFloat 6s ease-in-out infinite;
}

.print-sheet {
  position: absolute;
  width: 190px;
  height: 126px;
  border-radius: 8px;
  box-shadow: 0 20px 36px rgba(0, 0, 0, 0.24);
}

.sheet-back {
  left: 48px;
  top: 8px;
  background: var(--cyan);
  transform: rotate(12deg);
}

.sheet-middle {
  left: 24px;
  top: 16px;
  background: var(--magenta);
  transform: rotate(5deg);
}

.sheet-front {
  display: grid;
  align-content: center;
  gap: 5px;
  left: 0;
  top: 20px;
  padding: 18px 22px;
  background: #ffffff;
  color: var(--navy);
  transform: rotate(-3deg);
}

.sheet-front::after {
  position: absolute;
  right: 20px;
  bottom: 18px;
  width: 62px;
  height: 4px;
  content: "";
  background: var(--blue);
  box-shadow: 0 -10px 0 var(--amber), 0 -20px 0 var(--magenta);
}

.sheet-front span {
  color: var(--blue);
  font-size: 42px;
  font-weight: 950;
  line-height: 0.8;
}

.sheet-front small {
  color: var(--navy);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 1px;
}

.stage-node {
  position: absolute;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 0 0 5px rgba(255, 255, 255, 0.08), 0 0 20px rgba(144, 235, 255, 0.9);
  animation: nodePulse 2.8s ease-in-out infinite;
}

.node-one { top: 34px; left: 12%; }
.node-two { top: 72px; right: 17%; animation-delay: 500ms; }
.node-three { right: 31%; bottom: 28px; animation-delay: 900ms; }

.stage-label {
  position: absolute;
  right: 10px;
  bottom: 8px;
  color: #9beeff;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 1px;
}

.login-card {
  grid-area: card;
  position: relative;
  width: 100%;
  padding: 28px;
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.26);
  z-index: 2;
}

.login-card strong { color: var(--navy); font-size: 20px; }
.login-card small { color: #677695; }
.login-card button { min-height: 48px; box-shadow: 0 12px 24px rgba(23, 101, 235, 0.3); }

.app-shell {
  background: var(--tech);
  color: #ffffff;
}

.app-sidebar {
  position: relative;
  overflow: hidden;
  border-right: 1px solid rgba(151, 213, 255, 0.16);
  background: linear-gradient(180deg, #061160 0%, #040b43 100%);
  box-shadow: 12px 0 40px rgba(0, 0, 0, 0.16);
}

.app-sidebar::before {
  position: absolute;
  inset: 0;
  content: "";
  opacity: 0.22;
  background-image: radial-gradient(circle at 20% 12%, #ffffff 0 1px, transparent 2px), linear-gradient(145deg, transparent 49.7%, rgba(111, 214, 255, 0.4) 50%, transparent 50.3%);
  background-size: auto, 240px 180px;
  pointer-events: none;
}

.app-sidebar > * { position: relative; z-index: 1; }

.side-brand img {
  width: 190px;
  padding: 9px 12px;
  border-radius: 13px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}

.side-brand span {
  border: 1px solid rgba(108, 227, 255, 0.4);
  background: rgba(16, 102, 235, 0.18);
  color: #8aeaff;
}

.nav-button { border-color: transparent; color: #c8d5fa; }
.nav-button span { background: rgba(255, 255, 255, 0.1); color: #9db0df; }
.nav-button:hover { background: rgba(38, 117, 241, 0.14); }
.nav-button.active { border-color: rgba(120, 221, 255, 0.4); background: #1765eb; color: #ffffff; box-shadow: 0 10px 24px rgba(23, 101, 235, 0.28); }
.nav-button.active span { background: #ffffff; color: var(--blue); }

.tenant-card,
.mini-metrics div {
  border-color: rgba(155, 218, 255, 0.18);
  background: rgba(255, 255, 255, 0.07);
}

.tenant-card strong,
.mini-metrics span { color: #ffffff; }
.tenant-card small,
.tenant-card span,
.mini-metrics small,
.app-sidebar .field { color: #9eafd8; }

.app-sidebar select {
  border-color: rgba(143, 205, 255, 0.25);
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.app-sidebar select#country {
  color-scheme: light;
}

.app-sidebar select option,
.app-sidebar select optgroup {
  background: #ffffff;
  color: var(--ink);
}

.workspace { position: relative; overflow: visible; background: var(--tech); }
.workspace::before { opacity: 0.42; pointer-events: none; }
.workspace > * { position: relative; z-index: 1; }
.topbar h2 { color: #ffffff; }
.topbar span { color: #c2d0f1; }
.eyebrow { color: #78e7ff; }
.ghost-button { border-color: rgba(187, 226, 255, 0.34); background: rgba(255, 255, 255, 0.09); color: #ffffff; }

.home-hero { justify-items: start; text-align: left; }
.home-hero img { width: min(380px, 78vw); padding: 10px 14px; border-radius: 14px; background: #ffffff; }
.home-hero p { color: #d6e1ff; }

.module-card,
.chat-panel,
.result-panel,
.history-card,
.admin-card,
.conversation-card,
.metric-card,
.line-item,
.total-box,
.status-box,
.admin-subnav {
  border-color: rgba(216, 231, 255, 0.86);
  box-shadow: 0 18px 40px rgba(1, 7, 48, 0.2);
}

.chat-panel,
.result-panel,
.history-card,
.admin-card,
.conversation-card,
.metric-card,
.line-item,
.total-box,
.status-box {
  color: var(--ink);
}

.chat-header,
.composer,
.panel-heading,
.chat-header strong,
.result-panel h3,
.line-item strong,
.total-box strong,
.status-box strong,
.history-card strong,
.admin-card strong,
.conversation-card strong,
.metric-card strong,
.section-title strong,
.status-line strong,
.admin-row strong {
  color: var(--ink);
}

.chat-header span,
.chat-header .chat-header span,
.result-panel .quick-actions,
.line-item small,
.status-box p,
.history-card small,
.admin-card small,
.conversation-card small,
.metric-card span,
.assumptions {
  color: var(--muted);
}

.bubble.bot,
.bubble.user {
  color: var(--ink);
}

.module-card:hover { border-color: #73dffb; box-shadow: 0 18px 40px rgba(39, 201, 239, 0.2); }
.metric-card strong, .history-total, .total-box .grand { color: var(--blue); }
.status-pill.disponible, .status-pill.aprobada, .status-pill.cotizado { color: #08744d; }

.admin-subnav { border-color: rgba(164, 215, 255, 0.24); background: rgba(255, 255, 255, 0.08); }
.admin-tab { border-color: transparent; background: transparent; color: #c5d4f5; }
.admin-tab.active, .filter-button.active { border-color: rgba(133, 225, 255, 0.55); background: #1765eb; color: #ffffff; }
.quick-actions button, .state-button, .filter-button { border-color: #d9e5f7; background: #ffffff; color: var(--ink); }

@keyframes networkDrift {
  from { background-position: 0 0, 0 0, 0 0; }
  to { background-position: 36px -18px, -28px 22px, 0 0; }
}

@keyframes stackFloat {
  0%, 100% { transform: translateY(0) rotate(-8deg); }
  50% { transform: translateY(-8px) rotate(-5deg); }
}

@keyframes nodePulse {
  0%, 100% { opacity: 0.58; transform: scale(0.8); }
  50% { opacity: 1; transform: scale(1.15); }
}

@media (max-width: 900px) {
  .login-screen {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
    grid-template-areas: "brand" "stage" "card";
    align-content: center;
    padding: 34px 24px 48px;
  }

  .login-brand,
  .login-stage,
  .login-card { width: min(680px, 100%); }
  .login-stage { min-height: 190px; }
  .login-card { max-width: 430px; justify-self: center; }
}

@media (max-width: 620px) {
  .login-screen { padding: 24px 16px 34px; }
  .login-brand h1 { font-size: 36px; }
  .login-brand img { width: min(420px, 100%); padding: 10px; }
  .login-signals { gap: 7px; font-size: 9px; }
  .print-stack { left: 12%; transform: scale(0.82) rotate(-8deg); transform-origin: left bottom; }
  .stage-label { right: 6px; font-size: 8px; }
  .workspace { padding: 20px 16px; }
}

/* Optilito brand kit finish: navy canvas with blue, magenta and amber signals. */
:root {
  color-scheme: dark;
  --ink: #f5f7ff;
  --muted: #a6b1cb;
  --line: rgba(177, 193, 232, 0.2);
  --paper: #080b20;
  --panel: #12172f;
  --blue: #075be7;
  --blue-soft: #152650;
  --navy: #030615;
  --magenta: #ed1684;
  --amber: #ffb71b;
  --cyan: #16d4e8;
  --green: #39d89b;
  --tech: #080b20;
  --tech-line: rgba(178, 194, 238, 0.12);
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.34);
}

body,
.app-shell {
  background: var(--tech);
}

button,
select,
input,
textarea {
  color: var(--ink);
}

select,
input,
textarea {
  border-color: rgba(181, 198, 235, 0.24);
  background: #0e1430;
  color: var(--ink);
}

select::placeholder,
input::placeholder,
textarea::placeholder {
  color: #7783a1;
}

.login-screen,
.workspace {
  background: #080b20;
}

.login-screen::before,
.workspace::before {
  opacity: 0.62;
  background-image: linear-gradient(rgba(177, 193, 232, 0.08) 1px, transparent 1px), linear-gradient(90deg, rgba(177, 193, 232, 0.08) 1px, transparent 1px), radial-gradient(circle at 18% 30%, rgba(237, 22, 132, 0.7) 0 2px, transparent 3px), radial-gradient(circle at 78% 22%, rgba(22, 212, 232, 0.7) 0 2px, transparent 3px);
  background-size: 48px 48px, 48px 48px, auto, auto;
}

.login-screen::after {
  display: none;
}

.login-brand img,
.side-brand img,
.home-hero img {
  border: 1px solid rgba(255, 255, 255, 0.82);
  box-shadow: 0 14px 42px rgba(0, 0, 0, 0.34);
}

.login-brand h1 {
  max-width: 620px;
  font-size: clamp(30px, 3.8vw, 52px);
  letter-spacing: 0;
}

.login-brand p {
  color: #c0c9df;
}

.login-signals {
  color: #d7e0f7;
}

.login-stage {
  border-color: rgba(177, 193, 232, 0.18);
}

.network-grid {
  opacity: 0.48;
  background-image: linear-gradient(rgba(177, 193, 232, 0.08) 1px, transparent 1px), linear-gradient(90deg, rgba(177, 193, 232, 0.08) 1px, transparent 1px), radial-gradient(circle at 18% 24%, #ffffff 0 2px, transparent 3px), radial-gradient(circle at 86% 28%, #ffffff 0 2px, transparent 3px);
  background-size: 42px 42px, 42px 42px, auto, auto;
}

.login-card {
  border-color: rgba(22, 212, 232, 0.42);
  background: rgba(18, 23, 47, 0.96);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.42);
}

.login-card strong {
  color: #ffffff;
}

.login-card small {
  color: #9faaca;
}

.login-card input {
  background: #0a0e24;
}

.login-card button {
  background: var(--magenta);
  box-shadow: 0 12px 24px rgba(237, 22, 132, 0.28);
}

.app-sidebar {
  border-right-color: rgba(177, 193, 232, 0.16);
  background: #0b1028;
  box-shadow: 12px 0 40px rgba(0, 0, 0, 0.24);
}

.app-sidebar::before {
  opacity: 0.18;
  background-image: linear-gradient(rgba(177, 193, 232, 0.08) 1px, transparent 1px), linear-gradient(90deg, rgba(177, 193, 232, 0.08) 1px, transparent 1px);
  background-size: 36px 36px;
}

.nav-button.active {
  border-color: rgba(22, 212, 232, 0.58);
  background: var(--blue);
  box-shadow: 0 10px 24px rgba(7, 91, 231, 0.3);
}

.nav-button.active span {
  color: var(--blue);
}

.tenant-card,
.mini-metrics div,
.admin-subnav {
  border-color: rgba(177, 193, 232, 0.18);
  background: #101632;
}

.app-sidebar select {
  background: #111936;
  color: #ffffff;
}

.app-sidebar select option,
.app-sidebar select optgroup {
  background: #ffffff;
  color: #061a33;
}

.topbar h2 {
  color: #ffffff;
}

.topbar span {
  color: #aeb9d5;
}

.eyebrow {
  color: var(--amber);
}

.ghost-button {
  border-color: rgba(22, 212, 232, 0.44);
  background: transparent;
  color: #ffffff;
}

.home-hero p {
  color: #c5cee5;
}

.module-card,
.chat-panel,
.result-panel,
.history-card,
.admin-card,
.conversation-card,
.metric-card,
.line-item,
.total-box,
.status-box,
.admin-subnav {
  border-color: rgba(177, 193, 232, 0.2);
  background: #12172f;
  color: var(--ink);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.24);
}

.module-card:hover {
  border-color: var(--cyan);
  box-shadow: 0 18px 40px rgba(22, 212, 232, 0.16);
}

.module-card small,
.line-item small,
.history-card small,
.admin-card small,
.conversation-card small,
.metric-card span,
.status-box p,
.assumptions {
  color: var(--muted);
}

.chat-header,
.composer {
  border-color: rgba(177, 193, 232, 0.16);
  background: #0e1430;
}

.messages {
  background: #0a0e24;
}

.bubble.bot {
  background: #171d3a;
  color: #f5f7ff;
}

.bubble.user {
  background: #0d5de2;
  color: #ffffff;
}

.quick-actions button,
.state-button,
.filter-button {
  border-color: rgba(22, 212, 232, 0.4);
  background: #101632;
  color: #f5f7ff;
}

.admin-tab {
  color: #b8c5e2;
}

.admin-tab.active,
.filter-button.active {
  border-color: var(--cyan);
  background: var(--blue);
  color: #ffffff;
}

.price-create-card {
  border-color: rgba(237, 22, 132, 0.42);
  background: #0e1430;
}

.status-box {
  border-color: rgba(255, 183, 27, 0.58);
  background: #211c29;
}

.total-box .grand,
.metric-card strong,
.history-total {
  color: #68e5f5;
}

.status-pill {
  background: #1d2544;
  color: #d8e1f5;
}

.status-pill.disponible,
.status-pill.aprobada,
.status-pill.cotizado {
  background: rgba(57, 216, 155, 0.14);
  color: #67e7b4;
}

/* Analytics direction: compact data-dashboard visual aligned with the Optilito logo. */
:root {
  font-family: "Space Grotesk", "Segoe UI Variable", "Inter", system-ui, sans-serif;
  --ink: #eef5ff;
  --muted: #96a6c2;
  --line: rgba(171, 195, 232, 0.18);
  --paper: #050811;
  --panel: #0c1324;
  --blue: #0879e8;
  --blue-soft: #102849;
  --navy: #02040a;
  --magenta: #ed1684;
  --amber: #ffbd24;
  --cyan: #1bd8f5;
  --green: #42d8a2;
  --tech: #050811;
  --tech-line: rgba(144, 174, 224, 0.13);
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.42);
}

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

body,
.app-shell,
.workspace,
.login-screen {
  background: #050811;
}

.login-screen::before,
.workspace::before {
  opacity: 0.58;
  background-image: linear-gradient(rgba(120, 153, 210, 0.09) 1px, transparent 1px), linear-gradient(90deg, rgba(120, 153, 210, 0.09) 1px, transparent 1px), radial-gradient(circle at 15% 28%, rgba(27, 216, 245, 0.84) 0 2px, transparent 3px), radial-gradient(circle at 78% 18%, rgba(237, 22, 132, 0.72) 0 2px, transparent 3px);
  background-size: 40px 40px, 40px 40px, auto, auto;
}

.login-screen::after {
  display: none;
}

.login-brand h1 {
  font-weight: 600;
  letter-spacing: 0;
}

.login-brand p,
.login-signals,
.login-card small {
  color: #aebdd6;
}

.login-card {
  border-color: rgba(27, 216, 245, 0.34);
  border-radius: 14px;
  background: rgba(12, 19, 36, 0.96);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.48);
}

.login-card input,
.app-sidebar select,
.workspace input,
.workspace textarea,
.workspace select {
  border-color: rgba(157, 184, 226, 0.24);
  background: #080e1d;
  color: #eef5ff;
}

.login-card button {
  background: var(--magenta);
  box-shadow: 0 12px 24px rgba(237, 22, 132, 0.28);
}

.app-sidebar {
  background: #070b17;
  border-right-color: rgba(152, 185, 228, 0.16);
}

.app-sidebar::before {
  opacity: 0.16;
  background-image: linear-gradient(rgba(120, 153, 210, 0.1) 1px, transparent 1px), linear-gradient(90deg, rgba(120, 153, 210, 0.1) 1px, transparent 1px);
  background-size: 32px 32px;
}

.side-brand img,
.home-hero img {
  border-radius: 12px;
}

.side-brand span {
  border-color: rgba(27, 216, 245, 0.42);
  background: rgba(27, 216, 245, 0.1);
  color: #7feaff;
}

.nav-button {
  color: #b7c4db;
  font-weight: 600;
}

.nav-button span {
  border: 1px solid rgba(144, 174, 224, 0.18);
  background: #111a2c;
}

.nav-button.active {
  border-color: rgba(27, 216, 245, 0.62);
  background: #0b63d8;
  box-shadow: 0 10px 24px rgba(8, 121, 232, 0.26);
}

.nav-button.active span {
  color: var(--blue);
}

.tenant-card,
.mini-metrics div,
.admin-subnav {
  border-color: rgba(152, 185, 228, 0.18);
  background: #0c1324;
}

.workspace {
  background: #050811;
}

.topbar h2,
.home-hero p,
.topbar span {
  color: #eef5ff;
}

.eyebrow {
  color: var(--cyan);
}

.ghost-button {
  border-color: rgba(27, 216, 245, 0.4);
  background: #0c1324;
  color: #eef5ff;
}

.home-hero {
  justify-items: start;
  margin-bottom: 22px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(144, 174, 224, 0.16);
}

.home-hero img {
  width: min(320px, 74vw);
}

.home-hero p {
  color: #9fb0cb;
  font-weight: 500;
}

.module-grid {
  gap: 12px;
}

.module-card,
.chat-panel,
.result-panel,
.history-card,
.admin-card,
.conversation-card,
.metric-card,
.line-item,
.total-box,
.status-box,
.admin-subnav {
  border-color: rgba(152, 185, 228, 0.2);
  border-radius: 10px;
  background: #0c1324;
  color: #eef5ff;
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.28);
}

.module-card {
  min-height: 142px;
  padding: 20px 18px;
}

.module-card::after,
.metric-card::after {
  position: absolute;
  right: 18px;
  bottom: 15px;
  width: 44px;
  height: 2px;
  content: "";
  background: var(--cyan);
  box-shadow: -18px 0 0 rgba(237, 22, 132, 0.7), -34px 0 0 rgba(255, 189, 36, 0.72);
}

.module-card:hover {
  border-color: var(--cyan);
  background: #101b32;
  box-shadow: 0 16px 34px rgba(27, 216, 245, 0.14);
}

.module-card small,
.line-item small,
.history-card small,
.admin-card small,
.conversation-card small,
.metric-card span,
.status-box p,
.assumptions {
  color: var(--muted);
}

.module-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
}

.module-icon.blue { background: var(--blue); }
.module-icon.magenta { background: var(--magenta); }
.module-icon.amber { background: var(--amber); }
.module-icon.cyan { background: var(--cyan); color: #04101e; }

.chat-header,
.composer {
  border-color: rgba(152, 185, 228, 0.16);
  background: #091022;
}

.messages {
  background-color: #070c19;
  background-image: linear-gradient(rgba(120, 153, 210, 0.07) 1px, transparent 1px), linear-gradient(90deg, rgba(120, 153, 210, 0.07) 1px, transparent 1px);
  background-size: 32px 32px;
}

.bubble.bot {
  background: #111a2d;
  color: #edf4ff;
}

.bubble.user {
  background: #0b64d8;
  color: #ffffff;
}

.quick-actions button,
.state-button,
.filter-button {
  border-color: rgba(27, 216, 245, 0.36);
  background: #10192c;
  color: #eef5ff;
}

.admin-tab {
  color: #b7c4db;
}

.admin-tab.active,
.filter-button.active {
  border-color: var(--cyan);
  background: var(--blue);
  color: #ffffff;
}

.price-create-card {
  border-color: rgba(237, 22, 132, 0.38);
  background: #091022;
}

.status-box {
  border-color: rgba(255, 189, 36, 0.54);
  background: #1d1a1d;
}

.total-box .grand,
.metric-card strong,
.history-total {
  color: #68e4f7;
}

.status-pill {
  background: #19243a;
  color: #d6e1f5;
}

.status-pill.disponible,
.status-pill.aprobada,
.status-pill.cotizado {
  background: rgba(66, 216, 162, 0.14);
  color: #72e6b9;
}

/* Light workspace finish: remove the striped canvas and let the brand accents breathe. */
.login-screen::before,
.workspace::before,
.app-sidebar::before,
.network-grid {
  opacity: 0;
  background-image: none;
  animation: none;
}

.workspace {
  --ink: #07132d;
  --muted: #6b7a93;
  --line: #d6e0ef;
  --blue: #075be7;
  --blue-soft: #e6f0ff;
  --cyan: #0fa7d9;
  --magenta: #ed1684;
  --amber: #f6b21a;
  background: #eef3fa;
  color: #07132d;
}

.topbar h2 {
  color: #07132d;
}

.topbar span {
  color: #66758f;
}

.workspace .chat-header strong,
.workspace .result-panel h3,
.workspace .panel-heading h3,
.workspace .composer .field,
.workspace .composer label {
  color: #07132d;
}

.workspace .chat-header span {
  color: #60708a;
}

.eyebrow {
  color: #075be7;
}

.ghost-button {
  border-color: #cbd8eb;
  background: #ffffff;
  color: #07132d;
}

.home-hero {
  border-bottom-color: #d6e0ef;
}

.home-hero p {
  color: #60708a;
}

.module-card,
.chat-panel,
.result-panel,
.history-card,
.admin-card,
.conversation-card,
.metric-card,
.line-item,
.total-box,
.status-box,
.admin-subnav {
  border-color: #d6e0ef;
  background: #ffffff;
  color: #07132d;
  box-shadow: 0 16px 34px rgba(23, 56, 104, 0.1);
}

.module-card:hover {
  background: #ffffff;
  border-color: #60cfee;
  box-shadow: 0 16px 34px rgba(7, 91, 231, 0.14);
}

.module-card small,
.line-item small,
.history-card small,
.admin-card small,
.conversation-card small,
.metric-card span,
.status-box p,
.assumptions {
  color: #6b7a93;
}

.chat-header,
.composer {
  border-color: #d6e0ef;
  background: #f8fbff;
}

.messages {
  background: #f5f8fc;
  background-image: none;
}

.bubble.bot {
  background: #ffffff;
  color: #07132d;
  border: 1px solid #dbe5f2;
}

.bubble.user {
  background: #dcecff;
  color: #07132d;
}

.quick-actions button,
.state-button,
.filter-button {
  border-color: #cbd8eb;
  background: #ffffff;
  color: #07132d;
}

.workspace .quick-actions button:hover,
.workspace .state-button:hover,
.workspace .filter-button:hover {
  border-color: #0fa7d9;
  background: #f2fbff;
  color: #07132d;
}

.workspace .composer > button {
  border-color: #075be7;
  background: #0b78e8;
  color: #ffffff;
  box-shadow: 0 10px 20px rgba(7, 91, 231, 0.2);
}

.workspace .composer > button:hover {
  background: #064fc9;
}

.admin-subnav {
  background: #f8fbff;
}

.admin-tab {
  color: #53627d;
}

.admin-tab.active,
.filter-button.active {
  border-color: #5bd8f2;
  background: #075be7;
  color: #ffffff;
}

.price-create-card {
  border-color: #c7d9f0;
  background: #f7faff;
}

.status-box {
  border-color: #f0cc70;
  background: #fff9e9;
}

.total-box .grand,
.metric-card strong,
.history-total {
  color: #075be7;
}

.workspace input,
.workspace textarea,
.workspace select {
  border-color: #cbd8eb;
  background: #ffffff;
  color: #07132d;
}

.workspace input::placeholder,
.workspace textarea::placeholder {
  color: #8a97ac;
}

/* Keep the pricing status cards compact instead of stretching them to fill the sidebar. */
.app-sidebar {
  grid-template-rows: auto auto auto auto auto;
  align-content: start;
  overflow: visible;
}

.mini-metrics {
  align-self: start;
}

.mini-metrics div {
  min-width: 0;
  overflow: hidden;
  padding-inline: 6px;
}

.mini-metrics span {
  min-width: 0;
  overflow-wrap: anywhere;
  line-height: 1.1;
}

.mini-metrics #countryLabel {
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
}

.country-picker {
  position: relative;
  z-index: 20;
}

.country-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 44px;
  padding: 0 13px;
  border: 1px solid rgba(143, 205, 255, 0.3);
  border-radius: 10px;
  background: #0c1324;
  color: #f5f8ff;
  text-align: left;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.country-trigger:hover,
.country-trigger[aria-expanded="true"] {
  border-color: #1bd8f5;
  background: #101d38;
}

.country-chevron {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-right: 2px solid #d9e8ff;
  border-bottom: 2px solid #d9e8ff;
  transform: rotate(45deg) translateY(-2px);
  transition: transform 160ms ease;
}

.country-trigger[aria-expanded="true"] .country-chevron {
  transform: rotate(225deg) translate(-1px, -1px);
}

.country-menu {
  position: absolute;
  bottom: calc(100% + 8px);
  right: 0;
  left: 0;
  display: grid;
  max-height: min(420px, calc(100vh - 250px));
  padding: 6px;
  overflow-y: auto;
  border: 1px solid rgba(27, 216, 245, 0.42);
  border-radius: 12px;
  background: #0b1223;
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.38), 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.country-menu[hidden] {
  display: none;
}

.country-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 36px;
  padding: 0 10px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: #dbe7fb;
  font-size: 13px;
  font-weight: 600;
  text-align: left;
}

.country-option:hover,
.country-option:focus-visible {
  border-color: rgba(27, 216, 245, 0.42);
  background: #13284b;
  color: #ffffff;
}

.country-option.active {
  border-color: rgba(27, 216, 245, 0.4);
  background: #0b63d8;
  color: #ffffff;
}

.country-option-currency {
  color: #8de5fa;
  font-size: 11px;
  font-weight: 800;
}

.country-option.active .country-option-currency {
  color: #ffffff;
}

.home-presentation {
  display: grid;
  gap: 30px;
  min-height: min(620px, calc(100vh - 170px));
  align-content: center;
  padding: clamp(28px, 5vw, 72px) clamp(24px, 6vw, 96px);
  border: 1px solid #d6e0ef;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 22px 52px rgba(23, 56, 104, 0.1);
}

.presentation-main {
  display: grid;
  grid-template-columns: minmax(230px, 0.8fr) minmax(300px, 1.2fr);
  gap: clamp(28px, 6vw, 92px);
  align-items: center;
  max-width: 1100px;
}

.presentation-brand {
  display: grid;
  gap: 16px;
  align-content: center;
}

.presentation-brand img {
  width: min(380px, 100%);
  height: auto;
  padding: 16px 18px;
  border: 1px solid #d6e0ef;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 18px 38px rgba(23, 56, 104, 0.12);
}

.presentation-brand span {
  max-width: 360px;
  color: #60708a;
  font-size: 15px;
  line-height: 1.5;
}

.presentation-copy {
  display: grid;
  gap: 14px;
  max-width: 560px;
}

.presentation-copy h3 {
  max-width: 520px;
  color: #07132d;
  font-size: clamp(30px, 4vw, 52px);
  line-height: 1.05;
}

.presentation-copy > p:not(.eyebrow) {
  max-width: 500px;
  margin: 0;
  color: #60708a;
  font-size: 17px;
  line-height: 1.6;
}

.presentation-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}

.presentation-primary,
.presentation-secondary {
  min-height: 46px;
  padding-inline: 18px;
}

.presentation-primary {
  background: #0b78e8;
  color: #ffffff;
  box-shadow: 0 12px 24px rgba(7, 91, 231, 0.2);
}

.presentation-primary:hover {
  background: #064fc9;
}

.presentation-secondary {
  border: 1px solid #cbd8eb;
  background: #ffffff;
  color: #07132d;
}

.presentation-secondary:hover {
  border-color: #0fa7d9;
  background: #f2fbff;
}

.finish-category-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px;
  border: 1px solid #d6e0ef;
  border-radius: 10px;
  background: #f7faff;
}

.finish-category-group.hidden {
  display: none;
}

.finish-category-button {
  min-height: 34px;
  padding-inline: 11px;
  border-color: #cbd8eb;
  background: #ffffff;
  color: #53627d;
  font-size: 12px;
}

.finish-category-button.active {
  border-color: #ed1684;
  background: #ed1684;
  color: #ffffff;
}

.logo-file-helper {
  color: #6b7a93;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
}

.admin-card input[type="file"] {
  min-height: 46px;
  padding: 10px;
  border: 1px dashed #74b9ec;
  background: #f5faff;
  color: #07132d;
  cursor: pointer;
}

.admin-card input[type="file"]::file-selector-button {
  min-height: 30px;
  margin-right: 10px;
  padding: 0 12px;
  border: 0;
  border-radius: 7px;
  background: #0b78e8;
  color: #ffffff;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.presentation-signals {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  max-width: 1100px;
  padding-top: 22px;
  border-top: 1px solid #d6e0ef;
}

.presentation-signals div {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: start;
}

.presentation-signals strong {
  color: #ed1684;
  font-size: 13px;
}

.presentation-signals span {
  color: #53627d;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
}

@media (max-width: 900px) {
  .presentation-main {
    grid-template-columns: 1fr;
  }

  .presentation-brand img {
    width: min(320px, 100%);
  }
}

@media (max-width: 620px) {
  .home-presentation {
    min-height: auto;
    padding: 28px 20px;
  }

  .presentation-signals {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .presentation-actions {
    display: grid;
  }
}

/* Optilito 3.0 visual layer: keeps the operational UI, updates its visual language. */
:root {
  color-scheme: dark;
  --ink: #f3f5fc;
  --muted: #8d96b2;
  --line: rgba(255, 255, 255, 0.13);
  --paper: #070912;
  --panel: rgba(255, 255, 255, 0.045);
  --blue: #3e6bff;
  --blue-soft: #7c97ff;
  --navy: #070912;
  --magenta: #ff2e92;
  --amber: #ffc24d;
  --cyan: #33e6ff;
  --green: #54e2aa;
  --shadow: 0 28px 70px rgba(0, 0, 0, 0.34);
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
}

body {
  background:
    radial-gradient(circle at 10% 0%, rgba(62, 107, 255, 0.18), transparent 34%),
    radial-gradient(circle at 92% 20%, rgba(255, 46, 146, 0.11), transparent 32%),
    radial-gradient(circle at 58% 100%, rgba(51, 230, 255, 0.07), transparent 36%),
    var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: radial-gradient(rgba(255, 255, 255, 0.055) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: linear-gradient(to bottom, black, transparent 72%);
  opacity: 0.28;
}

h1,
h2,
h3,
h4,
.eyebrow,
.edition-mark,
.edition-status,
.stage-label {
  font-family: Sora, Inter, sans-serif;
}

button,
input,
textarea,
select {
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
}

button {
  border-radius: 999px;
  background: linear-gradient(120deg, var(--blue), var(--magenta));
  box-shadow: 0 10px 28px rgba(62, 107, 255, 0.2);
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease, background 160ms ease;
}

button:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 32px rgba(255, 46, 146, 0.2);
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline-color: rgba(51, 230, 255, 0.55);
}

select,
input,
textarea {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.055);
  color: var(--ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

select::placeholder,
input::placeholder,
textarea::placeholder {
  color: #707a99;
}

.login-screen {
  grid-template-columns: minmax(0, 1fr) minmax(320px, 410px);
  grid-template-rows: auto 1fr;
  grid-template-areas:
    "brand card"
    "stage card";
  align-items: center;
  justify-items: stretch;
  gap: 28px 64px;
  padding: 56px clamp(24px, 7vw, 110px);
  background: transparent;
  overflow: hidden;
}

.login-brand {
  grid-area: brand;
  justify-items: start;
  max-width: 720px;
  text-align: left;
}

.login-brand img {
  width: min(450px, 82vw);
  padding: 18px 24px;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
}

.login-brand h1 {
  max-width: 690px;
  font-family: Sora, Inter, sans-serif;
  font-size: clamp(30px, 4.5vw, 58px);
  line-height: 1.02;
  letter-spacing: -0.03em;
}

.login-brand p {
  max-width: 600px;
  color: var(--muted);
  font-size: 17px;
}

.login-signals {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 10px;
  color: var(--cyan);
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.12em;
}

.login-signals i {
  width: 6px;
  height: 6px;
  align-self: center;
  border-radius: 50%;
  background: var(--magenta);
  box-shadow: 0 0 12px var(--magenta);
}

.login-stage {
  grid-area: stage;
  min-height: 210px;
  border-top: 1px solid var(--line);
  opacity: 0.84;
}

.login-card {
  grid-area: card;
  align-self: center;
  width: 100%;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.055);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.login-card strong {
  font-family: Sora, Inter, sans-serif;
  font-size: 20px;
}

.login-card small,
.field,
.tenant-card small,
.tenant-card span,
.topbar span,
.module-card small,
.chat-header span,
.quote-meta,
.history-card small,
.admin-card small,
.conversation-card small,
.metric-card span {
  color: var(--muted);
}

.app-shell {
  grid-template-columns: 264px minmax(0, 1fr);
  background: transparent;
}

.app-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 22px 18px;
  border-right: 1px solid var(--line);
  background: rgba(7, 9, 18, 0.9);
  box-shadow: 18px 0 60px rgba(0, 0, 0, 0.16);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.side-brand img {
  width: 182px;
  padding: 12px 15px;
  border-radius: 14px;
  background: #fff;
}

.side-brand span {
  border: 1px solid rgba(51, 230, 255, 0.45);
  background: rgba(51, 230, 255, 0.08);
  color: var(--cyan);
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.04em;
}

.main-nav {
  gap: 6px;
}

.nav-button {
  border: 1px solid transparent;
  color: #aab2c9;
  border-radius: 10px;
  background: transparent;
  box-shadow: none;
}

.nav-button:hover {
  background: rgba(255, 255, 255, 0.055);
  color: #fff;
  box-shadow: none;
}

.nav-button span {
  background: rgba(255, 255, 255, 0.075);
  color: var(--muted);
  border: 1px solid var(--line);
}

.nav-button.active {
  border-color: rgba(62, 107, 255, 0.8);
  background: linear-gradient(100deg, rgba(62, 107, 255, 0.78), rgba(62, 107, 255, 0.25));
  color: #fff;
  box-shadow: 0 14px 28px rgba(62, 107, 255, 0.18);
}

.nav-button.active span {
  background: #fff;
  color: var(--blue);
}

.tenant-card,
.mini-metrics div,
.line-item,
.total-box,
.status-box,
.history-card,
.admin-card,
.conversation-card,
.metric-card {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.045);
  box-shadow: none;
}

.tenant-card {
  background: rgba(255, 255, 255, 0.035);
}

.tenant-card strong,
.mini-metrics span {
  color: var(--ink);
}

.country-trigger {
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.06);
  color: var(--ink);
  box-shadow: none;
}

.country-trigger:hover {
  border-color: var(--cyan);
  box-shadow: none;
}

.country-menu {
  border-color: var(--line);
  background: #111526;
  box-shadow: var(--shadow);
}

.country-menu button {
  background: transparent;
  box-shadow: none;
  color: var(--ink);
  border-radius: 6px;
}

.country-menu button:hover,
.country-menu button.active {
  background: rgba(62, 107, 255, 0.3);
  color: #fff;
}

.workspace {
  min-width: 0;
  background: transparent;
}

.topbar {
  padding: 30px clamp(22px, 4vw, 56px) 24px;
  border-bottom-color: var(--line);
  background: rgba(7, 9, 18, 0.38);
}

.topbar h2 {
  font-family: Sora, Inter, sans-serif;
  letter-spacing: -0.04em;
}

.eyebrow {
  color: var(--cyan);
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.14em;
}

.ghost-button {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  box-shadow: none;
}

.ghost-button:hover {
  border-color: var(--cyan);
  background: rgba(51, 230, 255, 0.08);
  box-shadow: none;
}

.view {
  padding: 30px clamp(22px, 4vw, 56px) 56px;
}

.edition-hub,
.quote-workbench,
.admin-layout,
.dashboard-grid,
.history-layout,
.conversation-layout {
  border-color: var(--line);
}

.edition-hub,
.edition-card,
.quote-workbench,
.chat-panel,
.result-panel,
.admin-section,
.dashboard-card,
.history-card,
.conversation-card,
.admin-card {
  background: rgba(255, 255, 255, 0.045);
  border-color: var(--line);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.edition-hub {
  padding: clamp(22px, 4vw, 42px);
  border-radius: 18px;
}

.edition-hub-brand h3,
.edition-card h4,
.panel-heading h3,
.admin-section h3,
.result-panel h3 {
  font-family: Sora, Inter, sans-serif;
}

.edition-hub-brand p,
.edition-card p,
.edition-hub-footer,
.edition-feature-list span {
  color: var(--muted);
}

.active-edition-card,
.edition-card-top,
.edition-feature-list span {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.04);
}

.edition-card {
  border-radius: 16px;
  transition: transform 220ms ease, border-color 220ms ease, box-shadow 220ms ease;
}

.edition-card:hover {
  transform: translateY(-5px);
  border-color: rgba(51, 230, 255, 0.65);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
}

.edition-card.featured {
  border-color: rgba(62, 107, 255, 0.85);
  box-shadow: 0 24px 62px rgba(62, 107, 255, 0.2);
}

.edition-action,
.admin-tab.active,
.quote-workbench .composer button {
  background: linear-gradient(120deg, var(--blue), var(--magenta));
  color: #fff;
}

.edition-action:hover,
.admin-tab:hover {
  box-shadow: 0 12px 28px rgba(255, 46, 146, 0.2);
}

.edition-status {
  color: var(--cyan);
}

.quote-workbench,
.chat-panel,
.result-panel,
.admin-section {
  border-radius: 16px;
}

.chat-header,
.panel-heading,
.composer,
.admin-subnav {
  border-color: var(--line);
}

.chat-header,
.panel-heading {
  background: rgba(255, 255, 255, 0.035);
}

.avatar {
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  color: #fff;
  box-shadow: 0 0 24px rgba(51, 230, 255, 0.25);
}

.messages {
  background: rgba(7, 9, 18, 0.28);
}

.messages .message {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.055);
  color: var(--ink);
}

.messages .message.user,
.brief-message {
  background: linear-gradient(120deg, rgba(62, 107, 255, 0.85), rgba(62, 107, 255, 0.42));
  color: #fff;
}

.quote-details,
.technical-grid > div,
.quote-summary,
.variable-card {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.045);
}

.status-box {
  color: var(--ink);
}

.admin-tab {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.045);
  color: var(--ink);
  box-shadow: none;
}

.admin-card input[type="file"] {
  border-color: rgba(51, 230, 255, 0.55);
  background: rgba(51, 230, 255, 0.055);
  color: var(--ink);
}

.admin-card input[type="file"]::file-selector-button {
  background: linear-gradient(120deg, var(--blue), var(--magenta));
}

.presentation-signals {
  border-top-color: var(--line);
}

.presentation-signals strong {
  color: var(--magenta);
}

.presentation-signals span {
  color: var(--muted);
}

@media (max-width: 900px) {
  .login-screen {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
    grid-template-areas: "brand" "stage" "card";
    gap: 26px;
    padding: 36px 22px;
  }

  .login-brand {
    justify-items: center;
    text-align: center;
  }

  .login-signals {
    justify-content: center;
  }

  .login-stage {
    width: min(600px, 100%);
  }

  .login-card {
    width: min(420px, 100%);
    justify-self: center;
  }

  .app-sidebar {
    position: static;
    height: auto;
  }
}

@media (max-width: 760px) {
  .app-shell {
    display: block;
  }

  .app-sidebar {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .main-nav {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .nav-button {
    grid-template-columns: 30px 1fr;
    min-width: 0;
    padding-inline: 7px;
    font-size: 12px;
  }
}

/* Contrast correction for the dark product hub. */
.topbar h2,
.edition-hub-brand h3,
.active-edition-card strong,
.edition-card:not(.featured) h4 {
  color: #f3f5fc !important;
}

.topbar span,
.edition-hub-brand p:not(.eyebrow),
.active-edition-card span,
.active-edition-card small,
.edition-card:not(.featured) p,
.edition-card:not(.featured) .edition-feature-list span,
.edition-hub-footer {
  color: #b5bfd8 !important;
}

.edition-card:not(.featured) .edition-card-top,
.edition-card:not(.featured) .edition-feature-list span {
  background: rgba(255, 255, 255, 0.055);
}

.edition-card:not(.featured) .edition-mark {
  color: #aeb8d0;
}

.edition-card.featured h4 {
  color: #07132d !important;
}

.edition-card.featured p,
.edition-card.featured .edition-feature-list span {
  color: #55627d !important;
}

/* Shared contrast tokens for every operational view. */
#appShell .view h1,
#appShell .view h2,
#appShell .view h3,
#appShell .view h4,
#appShell .view .chat-header strong,
#appShell .view .technical-variable strong,
#appShell .view .line-item strong,
#appShell .view .total-box strong,
#appShell .view .status-box strong,
#appShell .view .history-card strong,
#appShell .view .admin-card strong,
#appShell .view .conversation-card strong,
#appShell .view .metric-card strong,
#appShell .view .section-title strong,
#appShell .view .status-line strong,
#appShell .view .admin-row strong,
#appShell .view .tenant-row strong {
  color: #f3f5fc !important;
}

#appShell .view p,
#appShell .view label,
#appShell .view .field,
#appShell .view small,
#appShell .view .chat-header span,
#appShell .view .technical-card-heading small,
#appShell .view .technical-variable span,
#appShell .view .line-item small,
#appShell .view .status-box p,
#appShell .view .history-card small,
#appShell .view .admin-card small,
#appShell .view .conversation-card small,
#appShell .view .metric-card span,
#appShell .view .section-title small,
#appShell .view .quote-meta,
#appShell .view .assumptions,
#appShell .view .admin-row small,
#appShell .view .tenant-row small {
  color: #b5bfd8 !important;
}

#appShell .view .quick-actions button,
#appShell .view .state-button,
#appShell .view .filter-button,
#appShell .view .finish-category-button {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.055);
  color: #e7ecfa !important;
  box-shadow: none;
}

#appShell .view .quick-actions button:hover,
#appShell .view .state-button:hover,
#appShell .view .filter-button:hover,
#appShell .view .finish-category-button:hover,
#appShell .view .filter-button.active,
#appShell .view .finish-category-button.active {
  border-color: rgba(51, 230, 255, 0.65);
  background: rgba(62, 107, 255, 0.42);
  color: #fff !important;
}

#appShell .view .pdf-link {
  border: 1px solid rgba(51, 230, 255, 0.5);
  background: rgba(51, 230, 255, 0.1);
  color: #8bedff !important;
}

#appShell .view .admin-row,
#appShell .view .tenant-row,
#appShell .view .country-profile-row {
  border-color: var(--line);
}

#appShell .view .country-profile-row {
  grid-template-columns: minmax(150px, 1.2fr) repeat(4, minmax(90px, 0.7fr)) auto;
}

#appShell .app-sidebar .mini-metrics {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

@media (max-width: 1180px) {
  #appShell .view .country-profile-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  #appShell .app-sidebar .mini-metrics {
    grid-template-columns: 1fr;
  }
}

#appShell .view .admin-card input[type="text"],
#appShell .view .admin-card input[type="number"],
#appShell .view .admin-card input[type="email"],
#appShell .view .admin-card select,
#appShell .view .admin-card textarea,
#appShell .view .price-create-card input,
#appShell .view .price-create-card select {
  color: #f3f5fc;
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--line);
}

#appShell .view .price-create-card,
#appShell .view .country-profile-row,
#appShell .view .technical-variable {
  background: rgba(255, 255, 255, 0.045);
  border-color: var(--line);
}

#appShell #homeView .edition-card.featured h4 {
  color: #07132d !important;
}

#appShell #homeView .edition-card.featured p,
#appShell #homeView .edition-card.featured .edition-feature-list span {
  color: #55627d !important;
}

/* Cotizador: keep the composer and upload flow inside the shared dark interface. */
#appShell #quoteView .quote-workbench {
  background: transparent;
  border-color: var(--line);
}

#appShell #quoteView .chat-panel,
#appShell #quoteView .result-panel {
  background: rgba(255, 255, 255, 0.045);
  border-color: var(--line);
  color: var(--ink);
}

#appShell #quoteView .chat-header,
#appShell #quoteView .panel-heading {
  background: rgba(255, 255, 255, 0.035);
  border-color: var(--line);
}

#appShell #quoteView .messages {
  background: rgba(7, 9, 18, 0.3);
}

#appShell #quoteView .composer {
  background: rgba(7, 9, 18, 0.78);
  border-color: var(--line);
  color: var(--ink);
}

#appShell #quoteView .composer .field,
#appShell #quoteView .composer > label {
  color: #b5bfd8 !important;
}

#appShell #quoteView .composer input,
#appShell #quoteView .composer textarea {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.06);
  color: #f3f5fc;
}

#appShell #quoteView .composer input::placeholder,
#appShell #quoteView .composer textarea::placeholder {
  color: #8d96b2;
}

#appShell #quoteView .artwork-upload {
  border-color: rgba(51, 230, 255, 0.42);
  border-left-color: var(--magenta);
  background: rgba(51, 230, 255, 0.055);
}

#appShell #quoteView .artwork-upload .field {
  color: #e7ecfa !important;
}

#appShell #quoteView .artwork-upload input[type="file"] {
  border-color: rgba(51, 230, 255, 0.5);
  background: rgba(255, 255, 255, 0.035);
  color: #e7ecfa;
}

#appShell #quoteView .artwork-upload input[type="file"]::file-selector-button {
  background: linear-gradient(120deg, var(--blue), var(--magenta));
  color: #fff;
}

#appShell #quoteView .artwork-upload small,
#appShell #quoteView #artworkHelper {
  color: #8d96b2 !important;
}

#appShell #quoteView .composer > button[type="submit"] {
  background: linear-gradient(120deg, var(--blue), var(--magenta));
  color: #fff;
  box-shadow: 0 12px 28px rgba(62, 107, 255, 0.24);
}

#appShell #quoteView .composer > button[type="submit"]:hover {
  box-shadow: 0 16px 34px rgba(255, 46, 146, 0.28);
}

/* Balanced Optilito theme: clearer surfaces with the same technological accents. */
:root {
  --ink: #17213f;
  --muted: #66738f;
  --line: #d7e0f0;
  --paper: #eef2fb;
  --panel: #ffffff;
  --blue: #1768e8;
  --blue-soft: #e9f1ff;
  --navy: #0a1230;
  --magenta: #ed1684;
  --amber: #f8b41a;
  --cyan: #13a9dc;
  --green: #0b8f69;
  --shadow: 0 18px 46px rgba(35, 59, 112, 0.12);
  color-scheme: light;
}

body,
.app-shell,
.workspace {
  background: #eef2fb !important;
  color: #17213f;
}

.workspace {
  position: relative;
  background-image:
    radial-gradient(circle at 84% 8%, rgba(237, 22, 132, 0.08), transparent 28%),
    radial-gradient(circle at 42% 0%, rgba(24, 168, 223, 0.12), transparent 34%);
}

.workspace::before {
  opacity: 0.16 !important;
  background-image: radial-gradient(circle at 15% 20%, rgba(23, 104, 232, 0.2) 0 2px, transparent 3px) !important;
  background-size: 44px 44px !important;
}

#appShell .topbar h2,
#appShell .topbar span,
#appShell .view h1,
#appShell .view h2,
#appShell .view h3,
#appShell .view h4,
#appShell .view .chat-header strong,
#appShell .view .technical-variable strong,
#appShell .view .line-item strong,
#appShell .view .total-box strong,
#appShell .view .status-box strong,
#appShell .view .history-card strong,
#appShell .view .admin-card strong,
#appShell .view .conversation-card strong,
#appShell .view .metric-card strong,
#appShell .view .section-title strong,
#appShell .view .status-line strong,
#appShell .view .admin-row strong,
#appShell .view .tenant-row strong {
  color: #17213f !important;
}

#appShell .topbar span,
#appShell .view p,
#appShell .view label,
#appShell .view .field,
#appShell .view small,
#appShell .view .chat-header span,
#appShell .view .technical-card-heading small,
#appShell .view .technical-variable span,
#appShell .view .line-item small,
#appShell .view .status-box p,
#appShell .view .history-card small,
#appShell .view .admin-card small,
#appShell .view .conversation-card small,
#appShell .view .metric-card span,
#appShell .view .section-title small,
#appShell .view .quote-meta,
#appShell .view .assumptions,
#appShell .view .admin-row small,
#appShell .view .tenant-row small {
  color: #66738f !important;
}

.edition-hub,
.edition-card,
.quote-workbench,
.chat-panel,
.result-panel,
.admin-section,
.dashboard-card,
.history-card,
.conversation-card,
.admin-card,
.metric-card,
.line-item,
.total-box,
.status-box {
  border-color: #d7e0f0 !important;
  background: rgba(255, 255, 255, 0.9) !important;
  color: #17213f !important;
  box-shadow: 0 18px 44px rgba(35, 59, 112, 0.1) !important;
}

.edition-card:not(.featured) h4,
.edition-card:not(.featured) p,
.edition-card:not(.featured) .edition-feature-list span,
.edition-hub-brand h3,
.active-edition-card strong,
.active-edition-card span,
.active-edition-card small {
  color: #17213f !important;
}

.edition-card:not(.featured) .edition-card-top,
.edition-card:not(.featured) .edition-feature-list span,
.active-edition-card,
.edition-hub-footer {
  border-color: #d7e0f0;
  background: #f5f8ff;
}

.edition-card.featured {
  background: #ffffff !important;
}

.edition-card.featured h4 {
  color: #17213f !important;
}

.edition-card.featured p,
.edition-card.featured .edition-feature-list span {
  color: #66738f !important;
}

.chat-header,
.panel-heading,
.composer {
  border-color: #d7e0f0 !important;
  background: #f8faff !important;
  color: #17213f !important;
}

.messages {
  background: #f2f6fd !important;
}

.messages .message,
.bubble.bot {
  border-color: #d7e0f0;
  background: #ffffff;
  color: #17213f;
}

.messages .message.user,
.brief-message,
.bubble.user {
  background: #dcecff;
  color: #17213f;
}

.quote-details,
.technical-grid > div,
.quote-summary,
.variable-card,
#appShell .view .technical-variable,
#appShell .view .price-create-card,
#appShell .view .country-profile-row {
  border-color: #d7e0f0 !important;
  background: #ffffff !important;
  color: #17213f !important;
}

.topbar .ghost-button,
#appShell .view .quick-actions button,
#appShell .view .state-button,
#appShell .view .filter-button,
#appShell .view .finish-category-button,
.admin-subnav,
.admin-tab {
  border-color: #cbd7eb;
  background: rgba(255, 255, 255, 0.78);
  color: #17213f !important;
}

#appShell .view .quick-actions button:hover,
#appShell .view .state-button:hover,
#appShell .view .filter-button:hover,
#appShell .view .finish-category-button:hover,
#appShell .view .filter-button.active,
#appShell .view .finish-category-button.active,
.admin-tab.active {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff !important;
}

#appShell #quoteView .composer input,
#appShell #quoteView .composer textarea,
#appShell .view .admin-card input[type="text"],
#appShell .view .admin-card input[type="number"],
#appShell .view .admin-card input[type="email"],
#appShell .view .admin-card select,
#appShell .view .admin-card textarea,
#appShell .view .price-create-card input,
#appShell .view .price-create-card select,
#appShell .view input,
#appShell .view textarea,
#appShell .view select {
  border-color: #cbd7eb !important;
  background: #ffffff !important;
  color: #17213f !important;
}

#appShell .view input::placeholder,
#appShell .view textarea::placeholder {
  color: #8996b0 !important;
}

#appShell #quoteView .artwork-upload {
  border-color: #b9d8f3;
  background: #f4f9ff;
}

#appShell #quoteView .artwork-upload .field {
  color: #17213f !important;
}

#appShell #quoteView .artwork-upload input[type="file"] {
  border-color: #74b9ec;
  background: #ffffff;
  color: #17213f;
}

#appShell #quoteView .composer > button[type="submit"] {
  background: linear-gradient(120deg, var(--blue), var(--magenta));
  color: #fff;
}

.status-pill.disponible,
.status-pill.aprobada,
.status-pill.cotizado {
  color: #08744d !important;
  background: #ddf7ec;
}

.app-sidebar {
  background: #0a1230 !important;
  border-right-color: rgba(255, 255, 255, 0.12) !important;
}

.app-sidebar .nav-button {
  color: #c6d1ea !important;
}

.app-sidebar .nav-button span {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.08);
  color: #b9c5df;
}

.app-sidebar .nav-button.active {
  border-color: rgba(51, 230, 255, 0.7);
  background: linear-gradient(120deg, #1768e8, #2459c7);
  color: #ffffff !important;
}

.app-sidebar .tenant-card,
.app-sidebar .mini-metrics div {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
}

.app-sidebar .field,
.app-sidebar .tenant-card span,
.app-sidebar .mini-metrics span {
  color: #b9c5df !important;
}

.app-sidebar select {
  border-color: rgba(255, 255, 255, 0.18) !important;
  background: rgba(255, 255, 255, 0.08) !important;
  color: #ffffff !important;
}

.login-screen {
  background: #eef2fb !important;
  color: #17213f;
}

.login-screen::before {
  opacity: 0.14 !important;
  background-image: radial-gradient(circle at 18% 22%, rgba(23, 104, 232, 0.22) 0 2px, transparent 3px) !important;
  background-size: 44px 44px !important;
}

.login-brand h1,
.login-card h2,
.login-card label {
  color: #17213f !important;
}

.login-brand p,
.login-signals,
.login-card small {
  color: #66738f !important;
}

.login-card {
  border-color: #d7e0f0 !important;
  background: rgba(255, 255, 255, 0.94) !important;
  box-shadow: 0 22px 52px rgba(35, 59, 112, 0.14) !important;
}

.login-card input {
  border-color: #cbd7eb !important;
  background: #ffffff !important;
  color: #17213f !important;
}

/* Header and action contrast. */
#appShell .topbar {
  border: 1px solid #d7e0f0;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.82) !important;
  box-shadow: 0 14px 34px rgba(35, 59, 112, 0.08);
}

#appShell .topbar .eyebrow {
  color: #1768e8 !important;
}

#appShell .topbar h2 {
  color: #0d1b3e !important;
}

#appShell .topbar span {
  color: #5f6d89 !important;
}

#appShell .topbar .ghost-button {
  border: 1px solid #bfd0eb !important;
  background: #ffffff !important;
  color: #17213f !important;
  box-shadow: 0 8px 20px rgba(35, 59, 112, 0.08);
}

#appShell .topbar .ghost-button:hover {
  border-color: #1768e8 !important;
  background: #edf4ff !important;
  color: #1768e8 !important;
}

#appShell .admin-card > button,
#appShell .admin-section > button,
#appShell .workspace .composer > button,
#appShell .login-card button,
#appShell button[type="submit"] {
  color: #ffffff !important;
  text-shadow: 0 1px 1px rgba(8, 18, 48, 0.16);
}

#appShell .admin-card > button:hover,
#appShell .admin-section > button:hover,
#appShell button[type="submit"]:hover {
  color: #ffffff !important;
}

/* Sidebar controls and country picker. */
.app-sidebar .country-trigger {
  border: 1px solid rgba(51, 230, 255, 0.65) !important;
  background: #111c43 !important;
  color: #f4f8ff !important;
  box-shadow: 0 8px 20px rgba(4, 13, 47, 0.24);
}

.app-sidebar .country-trigger:hover,
.app-sidebar .country-trigger[aria-expanded="true"] {
  border-color: #33e6ff !important;
  background: #172b5a !important;
}

.app-sidebar .country-menu {
  border-color: rgba(51, 230, 255, 0.58) !important;
  background: #101936 !important;
  box-shadow: 0 18px 38px rgba(3, 10, 34, 0.42);
}

.app-sidebar .country-menu .country-option,
.app-sidebar .country-menu button {
  border-color: transparent;
  background: transparent;
  color: #e7efff !important;
}

.app-sidebar .country-menu .country-option:hover,
.app-sidebar .country-menu .country-option:focus-visible {
  border-color: rgba(51, 230, 255, 0.42);
  background: #18345f;
  color: #ffffff !important;
}

.app-sidebar .country-menu .country-option.active {
  border-color: rgba(51, 230, 255, 0.72);
  background: #245fd6;
  color: #ffffff !important;
}

.app-sidebar .country-menu .country-option-currency {
  color: #72edff !important;
}

/* Action buttons use Optilito's blue/cyan technology treatment. */
#appShell .view .pdf-link,
#appShell .view .admin-card > button,
#appShell .view .admin-section > button,
#appShell .view .composer > button,
#appShell .view button.primary,
#appShell .view button[type="submit"] {
  border: 1px solid #1768e8 !important;
  background: linear-gradient(120deg, #1768e8, #13a9dc) !important;
  color: #ffffff !important;
  box-shadow: 0 10px 24px rgba(23, 104, 232, 0.22);
  text-shadow: 0 1px 1px rgba(8, 18, 48, 0.16);
}

#appShell .view .pdf-link {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 8px;
  font-weight: 800;
  text-decoration: none;
}

#appShell .view .pdf-link:hover,
#appShell .view .admin-card > button:hover,
#appShell .view .admin-section > button:hover,
#appShell .view .composer > button:hover,
#appShell .view button.primary:hover,
#appShell .view button[type="submit"]:hover {
  border-color: #ed1684 !important;
  background: linear-gradient(120deg, #1768e8, #ed1684) !important;
  color: #ffffff !important;
  box-shadow: 0 14px 30px rgba(237, 22, 132, 0.2);
}

#appShell .view .history-actions .state-button {
  border-color: #cbd7eb !important;
  background: #ffffff !important;
  color: #17213f !important;
  box-shadow: none;
}

#appShell .view .history-actions .state-button:hover {
  border-color: #1768e8 !important;
  background: #edf4ff !important;
  color: #1768e8 !important;
}

/* Login presentation: show the Optilito promise before authentication. */
.login-capabilities {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  width: min(760px, 100%);
  margin-top: 18px;
}

.login-capability {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: start;
  min-height: 76px;
  padding: 13px 14px;
  border: 1px solid rgba(23, 104, 232, 0.14);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.68);
  box-shadow: 0 12px 24px rgba(35, 59, 112, 0.06);
  text-align: left;
  animation: riseIn 520ms ease both;
}

.login-capability:nth-child(2) { animation-delay: 80ms; }
.login-capability:nth-child(3) { animation-delay: 160ms; }

.capability-index {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 8px;
  background: linear-gradient(135deg, #1768e8, #13a9dc);
  color: #ffffff;
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  font-weight: 700;
}

.login-capability:nth-child(2) .capability-index {
  background: linear-gradient(135deg, #ed1684, #ff6ab4);
}

.login-capability:nth-child(3) .capability-index {
  background: linear-gradient(135deg, #f8b41a, #ffcf58);
  color: #17213f;
}

.login-capability strong,
.login-capability small {
  display: block;
}

.login-capability strong {
  color: #17213f !important;
  font-size: 13px;
}

.login-capability small {
  margin-top: 3px;
  color: #66738f !important;
  font-size: 11px;
  line-height: 1.35;
}

.login-card button {
  color: #ffffff !important;
  background: linear-gradient(120deg, #1768e8, #ed1684) !important;
}

@media (max-width: 900px) {
  .login-capabilities {
    grid-template-columns: 1fr;
  }
}

/* Technical finish for the welcome screen. */
.login-screen {
  background-image:
    radial-gradient(circle at 72% 18%, rgba(23, 104, 232, 0.11), transparent 28%),
    radial-gradient(circle at 92% 82%, rgba(237, 22, 132, 0.08), transparent 24%),
    linear-gradient(135deg, #eef2fb 0%, #f7f9ff 52%, #edf3ff 100%) !important;
}

.login-screen::before {
  opacity: 0.22 !important;
  background-image:
    linear-gradient(28deg, transparent 49.75%, rgba(23, 104, 232, 0.12) 50%, transparent 50.25%),
    linear-gradient(151deg, transparent 49.75%, rgba(19, 169, 220, 0.11) 50%, transparent 50.25%),
    radial-gradient(circle at 12% 18%, rgba(23, 104, 232, 0.3) 0 2px, transparent 3px),
    radial-gradient(circle at 82% 28%, rgba(237, 22, 132, 0.22) 0 2px, transparent 3px) !important;
  background-size: 420px 280px, 510px 340px, auto, auto !important;
  animation: networkDrift 20s linear infinite alternate !important;
}

.login-brand {
  position: relative;
}

.login-brand::after {
  display: block;
  width: min(520px, 80vw);
  height: 3px;
  margin-top: 18px;
  content: "";
  background: linear-gradient(90deg, #1768e8 0 42%, #ed1684 42% 70%, #f8b41a 70% 100%);
  box-shadow: 0 0 18px rgba(23, 104, 232, 0.16);
  animation: signalSweep 4s ease-in-out infinite;
}

.login-brand img {
  border: 1px solid rgba(23, 104, 232, 0.12);
  box-shadow: 0 18px 42px rgba(35, 59, 112, 0.15), 0 0 0 8px rgba(255, 255, 255, 0.34);
}

.login-signals {
  font-family: "JetBrains Mono", monospace;
  letter-spacing: 0.12em;
}

.login-capability {
  position: relative;
  overflow: hidden;
  border-color: rgba(23, 104, 232, 0.18);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.login-capability::after {
  position: absolute;
  right: -18px;
  bottom: -18px;
  width: 54px;
  height: 54px;
  content: "";
  border: 1px solid rgba(19, 169, 220, 0.24);
  border-radius: 50%;
}

.login-capability:hover {
  transform: translateY(-3px);
  border-color: rgba(19, 169, 220, 0.5);
  box-shadow: 0 16px 30px rgba(35, 59, 112, 0.12);
}

.login-stage {
  border-top-color: rgba(23, 104, 232, 0.18);
  border-bottom-color: rgba(23, 104, 232, 0.18);
}

.login-stage::before {
  position: absolute;
  inset: 18px 0;
  content: "";
  border-top: 1px solid rgba(19, 169, 220, 0.14);
  border-bottom: 1px solid rgba(237, 22, 132, 0.1);
  pointer-events: none;
}

.network-grid {
  opacity: 0.8;
}

.stage-label {
  color: #13a9dc;
  font-family: "JetBrains Mono", monospace;
  letter-spacing: 0.14em;
}

.login-card {
  position: relative;
  overflow: hidden;
  border-color: rgba(23, 104, 232, 0.2) !important;
}

.login-card::before {
  position: absolute;
  top: 0;
  right: 28px;
  left: 28px;
  height: 3px;
  content: "";
  background: linear-gradient(90deg, #1768e8, #13a9dc, #ed1684);
}

.login-card strong {
  font-family: Sora, Inter, sans-serif;
}

.login-card input:focus {
  border-color: #13a9dc !important;
  box-shadow: 0 0 0 4px rgba(19, 169, 220, 0.12);
}

@keyframes signalSweep {
  0%, 100% { opacity: 0.72; transform: scaleX(0.92); transform-origin: left; }
  50% { opacity: 1; transform: scaleX(1); transform-origin: left; }
}

.login-card button[type="submit"] {
  background: #1768e8 !important;
  color: #ffffff !important;
  box-shadow: 0 10px 24px rgba(23, 104, 232, 0.24);
  transition: background 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.login-card button[type="submit"]:hover {
  background: #ed1684 !important;
  color: #ffffff !important;
  box-shadow: 0 14px 28px rgba(237, 22, 132, 0.26);
  transform: translateY(-2px);
}

#appShell .admin-params button,
#appShell .country-profile-row button {
  border: 1px solid #1768e8 !important;
  background: linear-gradient(120deg, #1768e8, #ed1684) !important;
  color: #ffffff !important;
  text-shadow: 0 1px 1px rgba(8, 18, 48, 0.16);
  box-shadow: 0 8px 18px rgba(23, 104, 232, 0.18);
  transition: background 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

#appShell .admin-params button:hover,
#appShell .country-profile-row button:hover {
  border-color: #13a9dc !important;
  background: linear-gradient(120deg, #13a9dc, #ed1684) !important;
  color: #ffffff !important;
  box-shadow: 0 12px 24px rgba(237, 22, 132, 0.22);
  transform: translateY(-2px);
}

#appShell .admin-params button,
#appShell .country-profile-row button {
  border-color: #1768e8 !important;
  background: #1768e8 !important;
  color: #ffffff !important;
  box-shadow: 0 8px 18px rgba(23, 104, 232, 0.2);
}

#appShell .admin-params button:hover,
#appShell .country-profile-row button:hover {
  border-color: #ed1684 !important;
  background: #ed1684 !important;
  color: #ffffff !important;
  box-shadow: 0 12px 24px rgba(237, 22, 132, 0.24);
}

#appShell #pricingList .admin-row button,
#appShell #newPriceItemForm > button {
  border: 1px solid #1768e8 !important;
  background: #1768e8 !important;
  color: #ffffff !important;
  box-shadow: 0 8px 18px rgba(23, 104, 232, 0.2);
  transition: background 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

#appShell #pricingList .admin-row button:hover,
#appShell #newPriceItemForm > button:hover {
  border-color: #ed1684 !important;
  background: #ed1684 !important;
  color: #ffffff !important;
  box-shadow: 0 12px 24px rgba(237, 22, 132, 0.24);
  transform: translateY(-2px);
}

.digital-admin-family-filters {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin: 10px 0 14px;
  padding: 10px 0 2px;
  border-top: 1px solid #d7e0f0;
}

.digital-admin-family-filters .filter-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.digital-admin-filter-label {
  color: #1768e8;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.digital-admin-family-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 18px 0 0;
  padding: 12px 14px 9px;
  border: 1px solid #cbd7eb;
  border-bottom: 2px solid #1768e8;
  border-left: 4px solid #1768e8;
  border-radius: 9px 9px 0 0;
  background: #f3f8ff;
}

.digital-admin-family-heading strong {
  color: #17213f !important;
  font-size: 1rem;
}

.digital-admin-family-heading small {
  color: #66738f !important;
  font-size: 0.76rem;
}

@media (max-width: 650px) {
  .digital-admin-family-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
  }
}
/* Optilito Digital */
.digital-shell {
  display: grid;
  gap: 18px;
}

.digital-intro {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 28px 30px;
  border: 1px solid #c9d9f2;
  border-radius: 14px;
  background: linear-gradient(135deg, #ffffff 0%, #f3f8ff 100%);
  box-shadow: 0 16px 34px rgba(24, 70, 139, 0.1);
}

.digital-intro h3 {
  margin: 5px 0 8px;
  color: #071b46;
  font: 800 clamp(1.55rem, 3vw, 2.35rem) Sora, Inter, sans-serif;
}

.digital-intro p:not(.eyebrow) {
  max-width: 700px;
  margin: 0;
  color: #5e7193;
  line-height: 1.6;
}

.digital-badge {
  flex: 0 0 auto;
  padding: 9px 13px;
  border: 1px solid #9ad8ed;
  border-radius: 999px;
  background: #e9fbff;
  color: #047ca8;
  font: 700 0.72rem JetBrains Mono, monospace;
  letter-spacing: 0.08em;
}

.digital-category-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.digital-category {
  --family-accent: #0e75e5;
  --family-tint: #f4f8ff;
  position: relative;
  display: flex;
  align-items: center;
  min-height: 96px;
  gap: 11px;
  padding: 16px;
  border: 1px solid #c8d8f0;
  border-top: 3px solid var(--family-accent);
  border-radius: 10px;
  background: linear-gradient(135deg, var(--family-tint) 0%, #ffffff 68%);
  color: #0b1d43;
  text-align: left;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.digital-category-copy {
  display: grid;
  min-width: 0;
  gap: 7px;
}

.digital-category strong {
  font-size: 0.95rem;
}

.digital-category small {
  color: color-mix(in srgb, var(--family-accent) 62%, #7183a3);
  line-height: 1.35;
}

.digital-category:hover,
.digital-category.active {
  transform: translateY(-2px);
  border-color: #0e75e5;
  background: #eef6ff;
  box-shadow: 0 10px 24px rgba(14, 117, 229, 0.16);
}

.digital-category.active {
  box-shadow: inset 4px 0 var(--family-accent), 0 10px 24px rgba(14, 117, 229, 0.16);
}

/* Each Digital family has its own visual signal while sharing Optilito's light UI. */
.digital-category[data-digital-category="impresion_digital"] {
  --family-accent: #1769d1;
  --family-tint: #eff7ff;
}

.digital-category[data-digital-category="gran_formato"] {
  --family-accent: #0e75e5;
  --family-tint: #edf6ff;
}

.digital-category[data-digital-category="plotter_corte"] {
  --family-accent: #6a52d9;
  --family-tint: #f3efff;
}

.digital-category[data-digital-category="corte_laser"] {
  --family-accent: #e7832c;
  --family-tint: #fff7ed;
}

.digital-category[data-digital-category="estampados"] {
  --family-accent: #ec0c86;
  --family-tint: #fff0f8;
}

.digital-category[data-digital-category="dtf_uv"] {
  --family-accent: #00a6c7;
  --family-tint: #edfbff;
}

.digital-category[data-digital-category="dtf_textil"] {
  --family-accent: #d94e9a;
  --family-tint: #fff1f8;
}

.digital-category[data-digital-category="sublimacion_calandra"] {
  --family-accent: #d49b1f;
  --family-tint: #fff9e9;
}

.digital-category[data-digital-category="impresion_rigidos"] {
  --family-accent: #159b8c;
  --family-tint: #edfbf8;
}

.digital-category[data-digital-category="litografia"] {
  --family-accent: #5369b8;
  --family-tint: #f0f3ff;
}

.digital-category[data-digital-category="material_pop"] {
  --family-accent: #e6a523;
  --family-tint: #fff8e9;
}

.digital-technical-panel {
  position: relative;
  z-index: 4;
  display: grid;
  gap: 14px;
  padding: 20px 22px;
  border: 1px solid #c9d9f2;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 12px 26px rgba(24, 70, 139, 0.07);
}

.digital-technical-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #dce6f5;
}

.digital-technical-heading h3 {
  margin: 0 0 4px;
  color: #12234d;
  font-size: 1.2rem;
}

.digital-group-example {
  margin: 8px 0 0;
  color: #0e75e5;
  font-size: 0.82rem;
  font-weight: 600;
}

.digital-technical-heading small,
.digital-technical-heading span {
  color: #6d7f9e;
}

.digital-technical-heading span {
  padding: 8px 11px;
  border: 1px solid #b9d1ef;
  border-radius: 999px;
  background: #f3f8ff;
  color: #1269c7;
  font-size: 0.8rem;
  font-weight: 700;
}

.digital-product-groups {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(175px, 1fr));
  flex-wrap: wrap;
  gap: 9px;
}

.digital-product-group-block {
  position: relative;
  display: grid;
  align-content: start;
  gap: 6px;
  min-width: 0;
  z-index: 1;
}

.digital-product-group-block.expanded {
  z-index: 20;
}

.digital-product-group {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 13px;
  border: 1px solid #c8d8f0;
  border-radius: 9px;
  background: #ffffff;
  color: #18294e;
  text-align: left;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.digital-product-group-copy {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.digital-product-group-thumbnail {
  display: inline-grid;
  flex: 0 0 42px;
  place-items: center;
  width: 42px;
  height: 42px;
  overflow: hidden;
  border: 1px solid currentColor;
  border-radius: 9px;
  background: #f3f7ff;
  color: #1269c7;
}

.digital-product-group-thumbnail svg {
  width: 31px;
  height: 31px;
}

.digital-product-group-thumbnail-all { color: #516bc9; background: #f1f3ff; }
.digital-product-group-thumbnail-digital { color: #1269c7; background: #eaf5ff; }
.digital-product-group-thumbnail-fotocopias,
.digital-product-group-thumbnail-laser-bn { color: #52647e; background: #f0f3f8; }
.digital-product-group-thumbnail-laser-color { color: #1269c7; background: #eaf5ff; }
.digital-product-group-thumbnail-special-paper { color: #d17800; background: #fff5e5; }
.digital-product-group-thumbnail-inkjet,
.digital-product-group-thumbnail-foto { color: #b72c78; background: #fff0f8; }
.digital-product-group-thumbnail-scanner { color: #008d9a; background: #e8fbfc; }
.digital-product-group-thumbnail-plotter,
.digital-product-group-thumbnail-plotter-corte { color: #6855cf; background: #f2efff; }
.digital-product-group-thumbnail-fotoplanos { color: #356dc7; background: #eef4ff; }
.digital-product-group-thumbnail-botones,
.digital-product-group-thumbnail-gorras { color: #d17800; background: #fff5e5; }
.digital-product-group-thumbnail-gran-formato { color: #1269c7; background: #eaf5ff; }
.digital-product-group-thumbnail-laser { color: #e45d18; background: #fff0e8; }
.digital-product-group-thumbnail-laser-grabado { color: #a84c9f; background: #fff0fb; }
.digital-product-group-thumbnail-estampados,
.digital-product-group-thumbnail-dtf-textil { color: #d20b78; background: #fff0f8; }
.digital-product-group-thumbnail-dtf-uv { color: #008d9a; background: #e8fbfc; }
.digital-product-group-thumbnail-sublimacion { color: #bd8700; background: #fff7df; }
.digital-product-group-thumbnail-rigidos { color: #008e79; background: #e9fbf7; }
.digital-product-group-thumbnail-litografia { color: #5369bd; background: #eff2ff; }
.digital-product-group-thumbnail-material-pop { color: #c58b00; background: #fff7df; }

.digital-product-group small {
  color: #7082a0;
  font-size: 0.72rem;
}

.digital-product-group:hover,
.digital-product-group.active {
  transform: translateY(-1px);
  border-color: #0e75e5;
  background: #edf6ff;
  box-shadow: 0 8px 18px rgba(14, 117, 229, 0.14);
}

.digital-product-group.active {
  box-shadow: inset 3px 0 #ec0c86, 0 8px 18px rgba(14, 117, 229, 0.14);
}

.digital-product-group-block.priority .digital-product-group {
  position: relative;
  padding-right: 16px;
  border-color: #3b8df0;
  background: linear-gradient(135deg, #f5f9ff 0%, #e8f3ff 100%);
  color: #17284f;
  box-shadow: inset 4px 0 #ec0c86, 0 10px 22px rgba(14, 117, 229, 0.16);
}

.digital-product-group-block.priority .digital-product-group small {
  color: #65789b;
}

.digital-product-group-block.priority .digital-product-group::after {
  content: none;
  position: absolute;
  top: 8px;
  right: 9px;
  padding: 0;
  border: 1px solid #0e75e5;
  border-radius: 999px;
  background: #0e75e5;
  color: #ffffff;
  font: 700 0.56rem JetBrains Mono, monospace;
  letter-spacing: 0.05em;
}

.digital-reference-list {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 30;
  width: min(620px, calc(100vw - 52px));
  max-width: calc(100vw - 52px);
  max-height: min(520px, calc(100dvh - 190px));
  min-height: 0;
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: start;
  align-items: start;
  grid-auto-rows: max-content;
  gap: 5px;
  padding: 5px;
  border: 1px solid #d7e3f3;
  border-radius: 9px;
  background: #f7faff;
  scrollbar-gutter: stable;
  overscroll-behavior: contain;
}

.digital-product-group-block.opens-left .digital-reference-list {
  left: auto;
  right: 0;
}

.digital-reference {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-width: 0;
  padding: 8px 9px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: #ffffff;
  color: #18294e;
  text-align: left;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.digital-reference-main {
  display: flex;
  align-items: center;
  width: 100%;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.digital-reference-content {
  display: flex;
  align-items: start;
  gap: 7px;
  min-width: 0;
  width: 100%;
}

.digital-material-swatch {
  flex: 0 0 14px;
  width: 14px;
  height: 14px;
  margin-top: 2px;
  border: 1px solid #aebed4;
  border-radius: 4px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.45);
}

.digital-cap-image {
  flex: 0 0 96px;
  width: 96px;
  height: 70px;
  aspect-ratio: 721 / 527;
  object-fit: cover;
  object-position: left center;
  border-radius: 6px;
  background: #101010;
}

.material-swatch-clear {
  background: linear-gradient(135deg, #ffffff 0 42%, #cbd8e8 42% 58%, #ffffff 58% 100%);
}

.material-swatch-white { background: #ffffff; }
.material-swatch-eco { background: #a9b9c9; }
.material-swatch-multicolor { background: linear-gradient(135deg, #ef4444 0 25%, #facc15 25% 50%, #22c55e 50% 75%, #3b82f6 75%); }
.material-swatch-yellow { background: #facc15; }
.material-swatch-orange { background: #f97316; }
.material-swatch-red { background: #ef4444; }
.material-swatch-green { background: #22c55e; }
.material-swatch-blue { background: #3b82f6; }
.material-swatch-black { background: #202733; }
.material-swatch-gold { background: #eab308; }
.material-swatch-silver { background: #c5ccd6; }

.digital-reference-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
  flex: 1 1 0;
  overflow: hidden;
}

.digital-reference-main strong:first-child {
  overflow-wrap: break-word;
  word-break: normal;
  white-space: normal;
}

.digital-reference small {
  color: #7183a2;
  font-size: 0.7rem;
}

.digital-reference > strong {
  flex: 0 0 auto;
  color: #0e75e5;
  font-size: 0.76rem;
  white-space: nowrap;
}

.digital-reference-color {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  min-width: 0;
  color: #7183a2;
  font-size: 0.68rem;
  font-weight: 700;
}

.digital-reference-color select {
  min-width: 0;
  width: 100%;
  padding: 5px 7px;
  border: 1px solid #c7d8ef;
  border-radius: 6px;
  background: #f8fbff;
  color: #18294e;
  font: 700 0.72rem Inter, sans-serif;
}

.digital-reference-main:focus-visible,
.digital-reference-color select:focus-visible {
  outline: 3px solid rgba(14, 117, 229, 0.2);
  outline-offset: 2px;
}

.digital-reference:hover {
  transform: translateY(-1px);
  border-color: #0e75e5;
  background: #edf6ff;
}

.digital-groups-empty {
  color: #7384a5;
  font-size: 0.9rem;
}

.digital-workbench {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(320px, 0.78fr) minmax(0, 1.22fr);
  gap: 18px;
  align-items: start;
}

.digital-form,
.digital-result {
  min-width: 0;
  padding: 22px;
  border: 1px solid #c9d9f2;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 14px 30px rgba(24, 70, 139, 0.08);
}

.digital-form {
  display: grid;
  gap: 14px;
}

.digital-form-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 13px;
  border-bottom: 1px solid #dce6f5;
}

.digital-form-heading strong,
.digital-form-heading span {
  display: block;
}

.digital-form-heading strong {
  color: #0c1c40;
  font-size: 1.12rem;
}

.digital-form-heading span,
.digital-form-heading small {
  color: #7384a5;
  font-size: 0.78rem;
}

.digital-form textarea {
  width: 100%;
  min-height: 136px;
  resize: vertical;
  border: 1px solid #bed1ee;
  border-radius: 9px;
  padding: 13px;
  color: #10234c;
  font: inherit;
}

.digital-form textarea:focus,
.digital-form input:focus {
  outline: 3px solid rgba(14, 117, 229, 0.14);
  border-color: #0e75e5;
}

.digital-banner-finishes {
  display: grid;
  gap: 10px;
  padding: 13px;
  border: 1px solid #bcd5f5;
  border-left: 3px solid #ec0c86;
  border-radius: 10px;
  background: #f7faff;
}

.digital-banner-size {
  display: grid;
  gap: 10px;
  padding: 13px;
  border: 1px solid #bcd5f5;
  border-left: 3px solid #0e75e5;
  border-radius: 10px;
  background: #f7faff;
}

.digital-banner-size-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.digital-banner-size-grid label {
  display: grid;
  gap: 6px;
  color: #18294e;
  font-size: 0.82rem;
  font-weight: 700;
}

.digital-banner-size-grid input {
  width: 100%;
  border: 1px solid #bed1ee;
  border-radius: 7px;
  padding: 8px;
  color: #10234c;
  font: inherit;
}

.digital-inline-fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 6px;
}

.digital-inline-fields > span {
  color: #7384a5;
  font-weight: 800;
}

.digital-banner-finishes-heading {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #18294e;
}

.digital-banner-finishes-heading small {
  color: #7384a5;
  font-size: 0.76rem;
}

.digital-banner-finish-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.digital-banner-finish-grid label {
  display: grid;
  gap: 6px;
  padding: 8px;
  border: 1px solid #d6e3f5;
  border-radius: 8px;
  color: #18294e;
  font-size: 0.82rem;
  font-weight: 700;
}

.digital-banner-finish-grid label span {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}

.digital-banner-finish-grid label small {
  color: #7384a5;
  font-size: 0.7rem;
  font-weight: 500;
}

.digital-banner-finish-grid input[type="number"] {
  width: 100%;
  min-width: 0;
  border: 1px solid #bed1ee;
  border-radius: 7px;
  padding: 7px 8px;
  color: #10234c;
  font: inherit;
}

.digital-form > button {
  border: 1px solid #0e75e5;
  border-radius: 9px;
  padding: 13px 18px;
  background: #0e75e5;
  color: #ffffff;
  font: 700 0.95rem Inter, sans-serif;
  cursor: pointer;
  transition: background 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.digital-form > button:hover {
  transform: translateY(-1px);
  background: #ec0c86;
  border-color: #ec0c86;
  box-shadow: 0 10px 22px rgba(236, 12, 134, 0.2);
}

.digital-result {
  min-height: 318px;
}

.digital-empty-state {
  display: grid;
  min-height: 274px;
  place-content: center;
  gap: 8px;
  color: #7183a3;
  text-align: center;
}

.digital-empty-state strong {
  color: #10234c;
  font-size: 1.1rem;
}

.digital-empty-state span {
  max-width: 320px;
  line-height: 1.5;
}

.edition-manager-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.edition-manager-row select {
  flex: 1;
}

.edition-manager-note {
  margin: 12px 0 0;
  color: #7183a3;
  font-size: 0.82rem;
  line-height: 1.45;
}

.pricing-edition-switch {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 12px 0 14px;
  padding: 8px;
  border: 1px solid #d6e2f3;
  border-radius: 10px;
  background: #f7faff;
}

.pricing-edition-switch span {
  margin-right: auto;
  color: #7183a3;
  font-size: 0.82rem;
  font-weight: 700;
}

.pricing-edition-switch button {
  border: 1px solid #bfd2ee;
  border-radius: 8px;
  padding: 8px 14px;
  background: #ffffff;
  color: #17305f;
  font: 700 0.82rem Inter, sans-serif;
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.pricing-edition-switch button:hover,
.pricing-edition-switch button.active {
  border-color: #0e75e5;
  background: #0e75e5;
  color: #ffffff;
  transform: translateY(-1px);
}

.edition-gate {
  min-height: 100vh;
  padding: 28px;
  background: #eef5fd;
}

.edition-gate-shell {
  width: min(1260px, 100%);
  margin: 0 auto;
  padding: clamp(24px, 4vw, 52px);
  border: 1px solid #cbdcf2;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 24px 70px rgba(17, 55, 112, 0.12);
}

.edition-gate-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(230px, 300px);
  align-items: center;
  gap: 42px;
  padding-bottom: 32px;
  border-bottom: 1px solid #dce7f5;
}

.edition-gate-brand {
  display: grid;
  grid-template-columns: minmax(180px, 280px) minmax(0, 1fr);
  align-items: center;
  gap: 34px;
}

.edition-gate-brand img {
  width: 100%;
  max-width: 280px;
  padding: 20px;
  border: 1px solid #d7e4f4;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 14px 28px rgba(19, 60, 121, 0.12);
}

.edition-gate-brand h1 {
  max-width: 680px;
  margin: 8px 0 12px;
  color: #0b1d43;
  font: 800 clamp(2rem, 4vw, 3.5rem) Sora, sans-serif;
  line-height: 1.05;
}

.edition-gate-brand p:not(.eyebrow) {
  max-width: 620px;
  margin: 0;
  color: #657a9e;
  font-size: 1rem;
  line-height: 1.55;
}

.edition-gate-status {
  display: grid;
  gap: 7px;
  padding: 20px;
  border-left: 3px solid #0e75e5;
  background: #f5f9ff;
}

.edition-gate-status span,
.edition-gate-status small {
  color: #7183a3;
}

.edition-gate-status span {
  font-size: 0.78rem;
  font-weight: 700;
}

.edition-gate-status strong {
  color: #0b1d43;
  font: 800 1.4rem Sora, sans-serif;
}

.edition-gate-grid {
  margin: 32px 0;
}

.gate-setup {
  padding-top: 26px;
  border-top: 1px solid #dce7f5;
}

.gate-setup-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.gate-setup-heading h2 {
  margin: 5px 0 0;
  color: #0b1d43;
  font-size: 1.2rem;
}

.gate-setup-heading small {
  color: #7183a3;
}

.gate-setup-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(180px, 0.8fr) minmax(180px, 0.8fr);
  gap: 12px;
  align-items: stretch;
}

.gate-setup-action,
.gate-country-field,
.gate-profile-summary {
  min-height: 90px;
  padding: 15px;
  border: 1px solid #cbdcf2;
  border-radius: 10px;
  background: #f9fbff;
  color: #17305f;
}

.gate-setup-action {
  display: grid;
  align-content: center;
  gap: 6px;
  text-align: left;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.gate-setup-action:hover {
  border-color: #0e75e5;
  background: #eef6ff;
  transform: translateY(-2px);
}

.gate-setup-info {
  cursor: default;
}

.gate-setup-info:hover {
  border-color: #cbdcf2;
  background: #f9fbff;
  transform: none;
}

.gate-setup-action strong {
  color: #0b1d43;
}

.gate-setup-action span,
.gate-country-field {
  color: #7183a3;
  font-size: 0.8rem;
  line-height: 1.35;
}

.gate-country-field {
  display: grid;
  align-content: center;
  gap: 7px;
  font-weight: 700;
}

.gate-country-field select {
  width: 100%;
  min-width: 0;
  border: 0;
  background: transparent;
  color: #0b1d43;
  font: 700 0.9rem Inter, sans-serif;
}

.gate-profile-summary {
  display: grid;
  align-content: center;
  gap: 6px;
}

.gate-profile-summary span {
  color: #0e75e5;
  font: 800 1.25rem Sora, sans-serif;
}

.gate-profile-summary small {
  color: #7183a3;
}

.gate-profile-editor {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(150px, 0.55fr);
  gap: 12px;
  align-items: end;
  margin-top: 12px;
  padding: 14px;
  border: 1px solid #dce7f5;
  border-radius: 10px;
  background: #f5f9ff;
}

.gate-profile-editor label,
.gate-inline-grid label {
  display: grid;
  gap: 6px;
  color: #7183a3;
  font-size: 0.78rem;
  font-weight: 700;
}

.gate-profile-editor input,
.gate-inline-grid input,
.gate-inline-grid select,
.gate-logo-field input {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  padding: 10px 12px;
  border: 1px solid #cbdcf2;
  border-radius: 8px;
  background: #ffffff;
  color: #0b1d43;
  font: 700 0.88rem Inter, sans-serif;
}

.gate-profile-editor > button,
.gate-inline-panel > button {
  min-height: 42px;
  border: 0;
  border-radius: 9px;
  background: #146ee8;
  color: #ffffff;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(20, 110, 232, 0.2);
  transition: background 160ms ease, transform 160ms ease;
}

.gate-profile-editor > button:hover,
.gate-inline-panel > button:hover {
  background: #ec1487;
  transform: translateY(-1px);
}

.gate-edition-editor {
  display: grid;
  grid-template-columns: minmax(220px, 0.8fr) minmax(0, 1.6fr) minmax(150px, 0.45fr);
  gap: 12px;
  align-items: end;
  margin-top: 12px;
  padding: 14px;
  border: 1px solid #dce7f5;
  border-radius: 10px;
  background: #ffffff;
}

.gate-edition-editor label {
  display: grid;
  gap: 6px;
  color: #7183a3;
  font-size: 0.78rem;
  font-weight: 700;
}

.gate-edition-editor select {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  border: 1px solid #cbdcf2;
  border-radius: 8px;
  background: #ffffff;
  color: #0b1d43;
  font: 700 0.88rem Inter, sans-serif;
}

.gate-edition-editor small {
  color: #7183a3;
  line-height: 1.4;
}

.gate-edition-editor > button {
  min-height: 42px;
  border: 0;
  border-radius: 9px;
  background: #146ee8;
  color: #ffffff;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(20, 110, 232, 0.2);
  transition: background 160ms ease, transform 160ms ease;
}

.gate-edition-editor > button:hover {
  background: #ec1487;
  transform: translateY(-1px);
}

.gate-inline-panel {
  margin-top: 12px;
  padding: 16px;
  border: 1px solid #cbdcf2;
  border-left: 3px solid #ec1487;
  border-radius: 10px;
  background: #ffffff;
}

.gate-inline-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.gate-inline-panel > small {
  display: block;
  margin: -3px 0 12px;
  color: #7183a3;
}

.gate-logo-field {
  min-width: 0;
}

@media (max-width: 1050px) {
  .edition-gate-header { grid-template-columns: 1fr; }
  .edition-gate-status { border-left: 0; border-top: 3px solid #0e75e5; }
  .gate-setup-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gate-profile-editor { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gate-edition-editor { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gate-inline-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 650px) {
  .edition-gate { padding: 12px; }
  .edition-gate-shell { padding: 20px 16px; }
  .edition-gate-brand { grid-template-columns: 1fr; gap: 20px; }
  .edition-gate-brand img { max-width: 230px; }
  .edition-gate-grid { margin: 22px 0; }
  .gate-setup-heading { align-items: start; flex-direction: column; }
  .gate-setup-grid { grid-template-columns: 1fr; }
  .gate-profile-editor,
  .gate-edition-editor,
  .gate-inline-grid { grid-template-columns: 1fr; }
}

.pricing-toolbar .filter-button[data-price-section="digital"] {
  border-color: #0e75e5;
}

@media (max-width: 1050px) {
  .digital-category-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .digital-workbench { grid-template-columns: 1fr; }
}

@media (max-width: 650px) {
  .digital-intro { display: grid; padding: 22px; }
  .digital-category-grid { grid-template-columns: 1fr 1fr; }
  .digital-technical-heading { display: grid; }
  .digital-banner-finish-grid { grid-template-columns: 1fr; }
  .digital-banner-size-grid { grid-template-columns: 1fr; }
  .digital-form,
  .digital-result { padding: 16px; }
  .digital-reference-list {
    width: min(360px, calc(100vw - 32px));
    max-width: calc(100vw - 32px);
    grid-template-columns: 1fr;
    max-height: calc(100dvh - 150px);
    align-content: start;
    align-items: start;
    grid-auto-rows: max-content;
  }
  .edition-manager-row { align-items: stretch; flex-direction: column; }
}

/* Compact country profiles: only the selected country exposes its fields. */
#appShell .view .country-profile-row {
  display: block;
  padding: 0;
  overflow: hidden;
  border: 1px solid #d7e0f0;
  border-radius: 9px;
  background: #ffffff;
}

#appShell .view .country-profile-toggle {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto auto;
  align-items: center;
  width: 100%;
  gap: 14px;
  min-height: 54px;
  padding: 10px 14px;
  border: 0 !important;
  border-radius: 0;
  background: #ffffff !important;
  color: #17213f !important;
  text-align: left;
  cursor: pointer;
}

#appShell .view .country-profile-toggle:hover,
#appShell .view .country-profile-row.is-expanded .country-profile-toggle {
  background: #f3f8ff !important;
}

#appShell .view .country-profile-toggle > span:first-child {
  display: grid;
  gap: 3px;
}

#appShell .view .country-profile-toggle strong {
  color: #17213f !important;
}

#appShell .view .country-profile-toggle small,
#appShell .view .country-profile-summary {
  color: #66738f !important;
}

#appShell .view .country-profile-summary {
  font-size: 0.8rem;
  font-weight: 700;
  white-space: nowrap;
}

#appShell .view .country-profile-chevron {
  color: #1768e8;
  font-size: 1.1rem;
  font-weight: 900;
  transition: transform 160ms ease;
}

#appShell .view .country-profile-row.is-expanded .country-profile-chevron {
  transform: rotate(180deg);
}

#appShell .view .country-profile-fields {
  display: none;
  grid-template-columns: repeat(3, minmax(120px, 1fr)) auto;
  gap: 10px;
  align-items: end;
  padding: 12px 14px 14px;
  border-top: 1px solid #d7e0f0;
  background: #fbfdff;
}

#appShell .view .country-profile-row.is-expanded .country-profile-fields {
  display: grid;
}

#appShell .view .country-profile-fields .field {
  margin: 0;
  color: #66738f !important;
}

@media (max-width: 900px) {
  #appShell .view .country-profile-fields {
    grid-template-columns: repeat(2, minmax(120px, 1fr));
  }
}

@media (max-width: 620px) {
  #appShell .view .country-profile-toggle {
    grid-template-columns: 1fr auto;
  }

  #appShell .view .country-profile-summary {
    display: none;
  }

  #appShell .view .country-profile-fields {
    grid-template-columns: 1fr;
  }
}

#appShell .view .country-profile-picker {
  display: grid;
  grid-template-columns: minmax(180px, 0.35fr) minmax(240px, 1fr);
  gap: 10px;
  align-items: center;
  margin: 12px 0 14px;
  padding: 12px 14px;
  border: 1px solid #cbd7eb;
  border-left: 4px solid #1768e8;
  border-radius: 9px;
  background: #f3f8ff;
}

#appShell .view .country-profile-picker .field {
  margin: 0;
  color: #66738f !important;
  font-weight: 800;
}

#appShell .view .country-profile-picker select {
  min-height: 40px;
}

#appShell .view .country-profile-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px 10px;
  border-bottom: 1px solid #d7e0f0;
  background: #fbfdff;
}

#appShell .view .country-profile-heading > div {
  display: grid;
  gap: 3px;
}

#appShell .view .country-profile-heading strong {
  color: #17213f !important;
}

#appShell .view .country-profile-heading small,
#appShell .view .country-profile-heading .country-profile-summary {
  color: #66738f !important;
}

@media (max-width: 620px) {
  #appShell .view .country-profile-picker {
    grid-template-columns: 1fr;
  }

  #appShell .view .country-profile-heading {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* Mobile foundation: keep the operational shell usable with one hand. */
@media (max-width: 900px) {
  html,
  body {
    min-width: 0;
    overflow-x: hidden;
  }

  button,
  select,
  input,
  textarea {
    min-height: 44px;
  }

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

  .app-sidebar {
    position: sticky;
    top: 0;
    z-index: 40;
    display: grid;
    grid-template-columns: minmax(104px, 0.32fr) minmax(0, 1fr);
    grid-template-rows: auto auto;
    gap: 10px 14px;
    padding: 12px 14px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .side-brand {
    grid-row: 1 / span 2;
    align-content: center;
  }

  .side-brand img {
    width: min(150px, 100%);
  }

  .main-nav {
    display: flex;
    min-width: 0;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: thin;
  }

  .nav-button {
    flex: 0 0 auto;
    grid-template-columns: 30px auto;
    min-height: 46px;
    padding-inline: 9px;
    white-space: nowrap;
  }

  .tenant-card {
    display: none;
  }

  .app-sidebar > .field.compact,
  .app-sidebar > .mini-metrics {
    grid-column: 2;
    min-width: 0;
  }

  .app-sidebar > .field.compact {
    margin: 0;
  }

  .mini-metrics {
    grid-template-columns: repeat(4, minmax(64px, 1fr));
    gap: 6px;
  }

  .mini-metrics div {
    min-height: 58px;
  }

  .workspace {
    width: 100%;
    padding: 0 14px 28px;
    overflow-x: clip;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
    margin: 0 -14px 8px;
    padding: 20px 14px 16px;
  }

  .topbar h2 {
    font-size: clamp(26px, 8vw, 38px);
  }

  .topbar .ghost-button {
    align-self: stretch;
  }

  .view {
    min-width: 0;
    padding: 16px 0 30px;
  }

  .quote-workbench,
  .digital-workbench,
  .admin-layout {
    grid-template-columns: minmax(0, 1fr);
    min-height: 0;
  }

  .quote-workbench {
    gap: 14px;
  }

  .chat-panel,
  .result-panel,
  .digital-form,
  .digital-result,
  .admin-section {
    width: 100%;
    min-width: 0;
  }

  .messages {
    min-height: 240px;
    max-height: 46dvh;
  }

  .composer {
    grid-template-columns: minmax(0, 1fr);
  }

  .composer > button,
  .digital-form > button {
    width: 100%;
  }

  .digital-category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .digital-product-groups,
  .digital-reference-list {
    max-width: 100%;
  }

  .digital-reference-list {
    width: min(620px, calc(100vw - 48px));
    max-height: min(60dvh, 520px);
  }

  .admin-subnav {
    display: flex;
    min-width: 0;
    gap: 8px;
    overflow-x: auto;
  }

  .admin-tab {
    flex: 0 0 auto;
    min-width: 112px;
  }

  .admin-content,
  .admin-card,
  .history-card,
  .conversation-card,
  .metric-card {
    min-width: 0;
  }

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

  .history-card header,
  .conversation-card header,
  .admin-row,
  .admin-params,
  .tenant-row,
  .pricing-toolbar {
    min-width: 0;
  }

  .history-card,
  .admin-card,
  .line-item,
  .total-box,
  .status-box {
    overflow-wrap: anywhere;
  }

  [role="table"],
  .table-wrap,
  .pricing-list {
    max-width: 100%;
    overflow-x: auto;
  }
}

@media (max-width: 620px) {
  .app-sidebar {
    display: block;
    padding: 10px;
  }

  .side-brand {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
  }

  .side-brand img {
    width: min(148px, 55vw);
  }

  .main-nav {
    margin-bottom: 10px;
  }

  .app-sidebar > .field.compact,
  .app-sidebar > .mini-metrics {
    display: block;
    margin-top: 8px;
  }

  .mini-metrics {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(72px, 1fr));
    overflow-x: auto;
  }

  .workspace {
    padding-inline: 10px;
  }

  .topbar {
    margin-inline: -10px;
    padding-inline: 10px;
  }

  .digital-category-grid,
  .dashboard-grid,
  .module-grid {
    grid-template-columns: 1fr;
  }

  .digital-form,
  .digital-result,
  .result-panel,
  .chat-panel {
    padding: 14px;
  }

  .digital-reference-list {
    left: 0;
    right: auto;
    width: calc(100vw - 36px);
    max-width: calc(100vw - 36px);
    grid-template-columns: 1fr;
  }

  .digital-product-group-block.opens-left .digital-reference-list {
    left: 0;
    right: auto;
  }

  .technical-grid {
    grid-template-columns: 1fr;
  }

  .edition-hub,
  .home-presentation {
    min-height: 0;
    padding: 20px 16px;
  }

  .home-presentation .presentation-main,
  .presentation-main {
    grid-template-columns: 1fr;
  }

  .gate-setup-grid,
  .gate-profile-editor,
  .gate-edition-editor,
  .gate-inline-grid {
    grid-template-columns: 1fr;
  }
}
