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

:root {
  color-scheme: light;
  --bg: #f3ede4;
  --surface: rgba(255, 251, 245, 0.88);
  --surface-strong: #fffaf3;
  --line: rgba(29, 22, 15, 0.1);
  --line-strong: rgba(29, 22, 15, 0.16);
  --text: #161210;
  --muted: #675d52;
  --accent: #0a6e68;
  --accent-2: #be6119;
  --accent-3: #8d3f1f;
  --success: #1f8a58;
  --shadow: 0 30px 70px rgba(46, 29, 13, 0.14);
  --radius-xl: 30px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 12px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: "Manrope", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(244, 186, 93, 0.58), transparent 28%),
    radial-gradient(circle at top right, rgba(10, 110, 104, 0.18), transparent 26%),
    linear-gradient(180deg, #f7f1e8 0%, #eee1d0 100%);
}
body.widget-page,
body.preview-page {
  background: #fffdfa;
}
a { color: inherit; text-decoration: none; }
button, textarea { font: inherit; }
button { cursor: pointer; }

.bg-orb {
  position: fixed;
  z-index: -1;
  pointer-events: none;
  filter: blur(60px);
  opacity: 0.75;
}
.bg-orb--amber { width: 300px; height: 300px; right: 7%; top: -60px; background: radial-gradient(circle, rgba(222, 145, 53, 0.4), transparent 66%); }
.bg-orb--teal { width: 360px; height: 360px; left: -100px; bottom: -130px; background: radial-gradient(circle, rgba(10, 110, 104, 0.24), transparent 68%); }
.bg-orb--gold { width: 320px; height: 320px; right: 7%; top: -80px; background: radial-gradient(circle, rgba(196, 129, 33, 0.36), transparent 66%); }
.bg-orb--ink { width: 420px; height: 420px; left: -120px; bottom: -140px; background: radial-gradient(circle, rgba(41, 30, 20, 0.18), transparent 68%); }

.topbar,
.layout {
  width: min(1400px, calc(100% - 32px));
  margin: 0 auto;
}
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 20px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 251, 244, 0.75);
  backdrop-filter: blur(16px);
  box-shadow: 0 10px 40px rgba(43, 26, 8, 0.08);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
}
.brand__mark {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 18px;
  color: #fff7ee;
  background: linear-gradient(135deg, var(--accent), #124543);
  font-family: "Space Grotesk", sans-serif;
  letter-spacing: 0.12em;
  box-shadow: 0 18px 36px rgba(10, 110, 104, 0.28);
}
.brand__copy { display: grid; gap: 3px; }
.brand__copy strong, h1, h2, .eyebrow { font-family: "Space Grotesk", sans-serif; }
.brand__copy small { color: var(--muted); }

.topnav {
  display: inline-flex;
  gap: 8px;
  padding: 6px;
  border-radius: 999px;
  background: rgba(255, 248, 238, 0.72);
}
.topnav__link {
  padding: 11px 16px;
  border-radius: 999px;
  color: var(--muted);
  transition: 180ms ease;
}
.topnav__link:hover, .topnav__link--active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: inset 0 0 0 1px var(--line);
}

.layout {
  display: grid;
  gap: 22px;
  padding: 22px 0 32px;
}
.layout--chat { grid-template-columns: 0.92fr 1.08fr; align-items: start; }
.layout--admin { grid-template-columns: repeat(12, minmax(0, 1fr)); }
.layout--admin > * { grid-column: 1 / -1; }

.card {
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--surface);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
}
.hero, .panel { padding: 32px; }
.hero { position: sticky; top: 18px; }
.hero--admin { position: static; }

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.79rem;
}
h1, h2 {
  margin: 0;
  line-height: 0.95;
  letter-spacing: -0.04em;
}
h1 { max-width: 10ch; font-size: clamp(3rem, 5vw, 5.8rem); }
h2 { font-size: clamp(1.5rem, 2vw, 2.2rem); }
.lede {
  max-width: 58ch;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.7;
}

.hero__actions, .composer__footer, .section-head, .panel__actions, .chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.hero__actions { margin-top: 26px; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: 180ms ease;
  font-weight: 700;
}
.button:hover { transform: translateY(-1px); }
.button--primary {
  color: #fff7ef;
  background: linear-gradient(135deg, var(--accent), #124543);
  box-shadow: 0 16px 30px rgba(10, 110, 104, 0.22);
}
.button--ghost {
  color: var(--text);
  background: rgba(255, 255, 255, 0.7);
  box-shadow: inset 0 0 0 1px var(--line);
}
.button--small { min-height: 40px; padding: 0 14px; }
.button--send { min-width: 120px; }

.pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}
.pill {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
  font-size: 0.93rem;
}
.pill--live {
  color: var(--success);
  background: rgba(40, 158, 101, 0.12);
  border-color: rgba(40, 158, 101, 0.22);
}
.pill--soft {
  color: var(--accent-2);
  background: rgba(186, 106, 27, 0.1);
  border-color: rgba(186, 106, 27, 0.18);
}

.stats, .kpis {
  display: grid;
  gap: 14px;
  margin-top: 28px;
}
.stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.mini-card, .kpi {
  padding: 18px;
  border-radius: 22px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.66);
}
.mini-card { display: grid; gap: 8px; }
.mini-card span, .kpi span, .summary__row span, .section-head--compact .eyebrow { color: var(--muted); font-size: 0.85rem; }
.mini-card strong, .kpi strong { font-family: "Space Grotesk", sans-serif; font-size: 1.65rem; letter-spacing: -0.04em; }
.mini-card small, .kpi small { color: var(--muted); line-height: 1.5; }

.chat {
  padding: 22px;
}
.widget-shell,
.preview-shell {
  width: min(100%, 1440px);
  margin: 0 auto;
}
.widget-shell {
  max-width: 440px;
  min-height: 100dvh;
  padding: 14px;
}
.widget-card {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-height: calc(100dvh - 28px);
  border-radius: 32px;
  background: #fffefa;
  box-shadow: 0 24px 60px rgba(37, 24, 11, 0.08);
}
.widget-card__header,
.widget-card__meta,
.preview-toolbar,
.preview-toolbar__actions,
.preview-toggle {
  display: flex;
  align-items: center;
  gap: 12px;
}
.widget-card__header,
.preview-toolbar {
  justify-content: space-between;
}
.widget-card__header {
  margin-bottom: 14px;
}
.widget-card__status,
.widget-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.widget-card__meta {
  margin-bottom: 18px;
}
.widget-body,
.widget-conversation {
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.widget-body {
  flex: 1;
}
.widget-conversation {
  flex: 1;
}
.messages--widget {
  flex: 1;
  min-height: 320px;
  max-height: none;
}
.composer--widget textarea {
  min-height: 92px;
}
.composer__footer--widget {
  align-items: stretch;
}

.preview-shell {
  min-height: 100dvh;
  padding: 28px;
}
.preview-toolbar {
  flex-wrap: wrap;
  padding-bottom: 18px;
}
.preview-copy {
  max-width: 56ch;
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.6;
}
.preview-toolbar__actions {
  margin-left: auto;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.preview-toggle {
  padding: 6px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: 0 12px 30px rgba(29, 22, 15, 0.06);
}
.preview-toggle__button {
  min-height: 42px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  color: var(--muted);
  background: transparent;
  font-weight: 700;
}
.preview-toggle__button.is-active {
  color: #fff7ef;
  background: linear-gradient(135deg, var(--accent), #124543);
}
.preview-stage {
  display: grid;
  place-items: center;
  min-height: calc(100dvh - 180px);
  padding: 26px;
  border-radius: 32px;
  border: 1px solid rgba(29, 22, 15, 0.08);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 242, 233, 0.96)),
    radial-gradient(circle at top, rgba(10, 110, 104, 0.08), transparent 38%);
}
.preview-frame {
  overflow: hidden;
  border: 1px solid rgba(29, 22, 15, 0.1);
  background: #fffdfa;
  box-shadow: 0 24px 60px rgba(37, 24, 11, 0.12);
  transition: width 220ms ease, height 220ms ease, border-radius 220ms ease;
}
.preview-frame--desktop {
  width: min(420px, 100%);
  height: min(760px, 78dvh);
  border-radius: 34px;
}
.preview-frame--mobile {
  width: min(390px, 100%);
  height: min(844px, 82dvh);
  border-radius: 38px;
}
.preview-frame--fluid {
  width: min(100%, 1120px);
  height: min(820px, 82dvh);
  border-radius: 34px;
}
.preview-frame__viewport {
  width: 100%;
  height: 100%;
  border: 0;
  background: #fffdfa;
}
.section-head {
  justify-content: space-between;
  margin-bottom: 18px;
}
.section-head--compact { margin-bottom: 14px; }

.chat__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.8fr);
  gap: 18px;
}
.chat__column { min-width: 0; }

.welcome-banner {
  display: none;
  margin-bottom: 14px;
  padding: 16px 18px;
  border-radius: 22px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
  line-height: 1.6;
}
.welcome-banner strong {
  display: block;
  margin-bottom: 4px;
  color: var(--text);
  font-family: "Space Grotesk", sans-serif;
}

.intent-menu {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}
.intent-card {
  display: grid;
  gap: 8px;
  padding: 16px;
  text-align: left;
  border-radius: 22px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.76);
  transition: 180ms ease;
}
.intent-card:hover {
  transform: translateY(-1px);
  border-color: rgba(10, 110, 104, 0.28);
  box-shadow: 0 14px 26px rgba(43, 26, 8, 0.08);
}
.intent-card__label {
  color: var(--text);
  font-weight: 800;
}
.intent-card small {
  color: var(--muted);
  line-height: 1.5;
}

.messages {
  display: grid;
  gap: 14px;
  min-height: 480px;
  padding: 20px;
  border-radius: 26px;
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.66), rgba(255, 251, 246, 0.92)),
    repeating-linear-gradient(135deg, rgba(181, 153, 117, 0.08) 0, rgba(181, 153, 117, 0.08) 1px, transparent 1px, transparent 14px);
  overflow-y: auto;
}
.message {
  display: grid;
  gap: 6px;
  max-width: 82%;
  padding: 14px 16px;
  border-radius: 22px;
  border: 1px solid var(--line);
  animation: floatUp 300ms ease both;
}
.message--assistant { justify-self: start; background: #fffdf7; }
.message--user {
  justify-self: end;
  color: #fffaf3;
  background: linear-gradient(135deg, var(--accent), #125d58);
  border-color: rgba(0, 0, 0, 0.02);
}
.message__meta {
  font-size: 0.78rem;
  opacity: 0.72;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.message__text {
  line-height: 1.65;
  white-space: pre-wrap;
}
.message--system {
  max-width: 100%;
  justify-self: stretch;
  background: rgba(255, 250, 242, 0.92);
}
.message--system .message__text {
  display: grid;
  gap: 12px;
}
.message__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.message--products {
  max-width: 100%;
}
.message__product-grid {
  display: grid;
  gap: 12px;
}
.action-button {
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--text);
  background: rgba(255, 255, 255, 0.9);
  font-weight: 700;
}
.action-button--primary {
  color: #fff7ef;
  background: linear-gradient(135deg, var(--accent), #125d58);
  border-color: transparent;
}

/* Opcoes clicaveis dentro do balao de boas-vindas */
.welcome-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 14px;
}
.welcome-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.85);
  color: var(--text);
  font-weight: 600;
  font-size: 0.9rem;
  text-align: left;
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
}
.welcome-option:hover:not(:disabled) {
  background: rgba(10, 110, 104, 0.07);
  border-color: var(--accent);
  transform: translateX(2px);
}
.welcome-option__emoji {
  font-size: 1.1rem;
  flex-shrink: 0;
}
.welcome-option--selected {
  background: linear-gradient(135deg, var(--accent), #125d58);
  color: #fff7ef;
  border-color: transparent;
}
.welcome-option--used {
  opacity: 0.45;
  cursor: default;
}

/* ── Order list cards ─────────────────────────────────────────────────────── */
.order-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 14px;
}
.order-card {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.9);
  color: var(--text);
  text-align: left;
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
}
.order-card:hover:not(:disabled) {
  background: rgba(10, 110, 104, 0.07);
  border-color: var(--accent);
  transform: translateX(2px);
}
.order-card--selected {
  border-color: var(--accent);
  background: rgba(10, 110, 104, 0.05);
  opacity: 0.7;
}
.order-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}
.order-card__number { font-weight: 700; font-size: 0.9rem; }
.order-card__badge {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
}
.order-card__row {
  display: flex;
  gap: 16px;
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 4px;
}
.order-card__status { font-size: 0.82rem; font-weight: 600; }

/* ── Order detail ─────────────────────────────────────────────────────────── */
.order-detail { display: flex; flex-direction: column; gap: 12px; }
.order-detail__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
}
.order-detail__status-badge {
  font-size: 0.82rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(10, 110, 104, 0.1);
  color: var(--accent);
}
.order-detail__meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.85rem;
  background: rgba(255,255,255,0.5);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  border: 1px solid var(--line);
}
.order-detail__section { display: flex; flex-direction: column; gap: 6px; }
.order-detail__section-title {
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.order-detail__items { display: flex; flex-direction: column; gap: 6px; }
.order-detail__item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.83rem;
  padding: 6px 0;
  border-bottom: 1px solid var(--line);
}
.order-detail__item:last-child { border-bottom: none; }
.order-detail__item-desc { flex: 1; color: var(--text); }
.order-detail__item-right { display: flex; gap: 8px; flex-shrink: 0; }
.order-detail__item-qty { color: var(--muted); }
.order-detail__item-price { font-weight: 700; }
.order-detail__addr { font-size: 0.83rem; line-height: 1.6; color: var(--muted); }
.order-track-link {
  display: inline-block;
  margin-top: 4px;
  font-size: 0.83rem;
  font-weight: 700;
  color: var(--accent);
  text-decoration: underline;
}
.order-detail__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 4px;
}
.order-action-btn {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1.5px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.9);
  color: var(--text);
  font-size: 0.83rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  transition: background 0.15s, border-color 0.15s;
}
.order-action-btn:hover {
  background: rgba(10, 110, 104, 0.07);
  border-color: var(--accent);
}
.order-action-btn--primary {
  background: linear-gradient(135deg, var(--accent), #125d58);
  color: #fff7ef;
  border-color: transparent;
}
.order-action-btn--primary:hover {
  background: linear-gradient(135deg, #0d8a82, #0f4e4b);
}

.composer {
  margin-top: 14px;
  padding: 16px;
  border-radius: 26px;
  border: 1px solid var(--line);
  background: rgba(255, 252, 247, 0.82);
}
.composer textarea {
  width: 100%;
  resize: vertical;
  min-height: 108px;
  padding: 16px;
  border-radius: 20px;
  border: 1px solid var(--line);
  outline: none;
  color: var(--text);
  background: #fff;
}
.composer textarea:focus, .chip:focus, .button:focus, .topnav__link:focus {
  outline: 2px solid rgba(10, 110, 104, 0.22);
  outline-offset: 2px;
}
.composer__footer { justify-content: space-between; margin-top: 12px; align-items: flex-end; }

.chip {
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.76);
}

.insights {
  display: grid;
  gap: 16px;
}
.mini-panel {
  padding: 18px;
  border-radius: 24px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
}
.product-list { display: grid; gap: 12px; }
.product-card {
  padding: 14px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(250, 246, 239, 0.9));
}
.product-card--compact {
  padding: 13px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.98);
}
.product-card__top { display: flex; justify-content: space-between; gap: 10px; }
.product-card__name { font-weight: 800; line-height: 1.35; }
.product-card__price { color: var(--accent-2); font-weight: 800; }
.product-card__meta {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 0.9rem;
}
.product-card__link {
  display: inline-flex;
  margin-top: 12px;
  color: var(--accent);
  font-weight: 700;
}
.summary { display: grid; gap: 12px; }
.summary__row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}
.summary__row:first-child { border-top: 0; padding-top: 0; }
.empty-state {
  padding: 18px;
  border-radius: 18px;
  border: 1px dashed var(--line-strong);
  color: var(--muted);
  line-height: 1.6;
  background: rgba(255, 255, 255, 0.52);
}

.panel { padding: 22px; }
.dashboard {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 18px;
}
.metrics { display: grid; gap: 14px; }
.metric {
  display: grid;
  gap: 10px;
  padding: 16px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--line);
}
.metric__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.metric__head span { color: var(--muted); }
.metric__track {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(27, 18, 11, 0.07);
}
.metric__fill { display: block; height: 100%; width: 0; border-radius: inherit; transition: width 280ms ease; }
.metric__fill--teal { background: linear-gradient(90deg, #14746f, #27a09a); }
.metric__fill--rust { background: linear-gradient(90deg, #b94e1a, #f08d36); }
.metric__fill--gold { background: linear-gradient(90deg, #ba7b1d, #f2bc55); }

.timeline-wrap, .table-wrap {
  padding: 16px;
  border-radius: 24px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.64);
}
.filter-row {
  display: flex;
  justify-content: flex-start;
  margin-bottom: 14px;
}
.toggle-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(31, 138, 88, 0.12);
  color: var(--text);
  font-weight: 600;
}
.toggle-pill input {
  width: 16px;
  height: 16px;
  accent-color: var(--success);
}
.timeline { display: grid; gap: 12px; }
.timeline-item {
  padding: 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--line);
}
.timeline-item__meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.88rem;
}
.timeline-item__title { font-weight: 800; margin-bottom: 4px; }
.timeline-item__desc { color: var(--muted); line-height: 1.55; }

.catalog-table {
  width: 100%;
  border-collapse: collapse;
}
.catalog-table th, .catalog-table td {
  padding: 16px 14px;
  text-align: left;
  border-bottom: 1px solid rgba(29, 22, 15, 0.08);
}
.catalog-table th {
  color: var(--muted);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.catalog-table td:first-child { font-weight: 800; }
.table-wrap { overflow-x: auto; }
.catalog-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(31, 138, 88, 0.1);
  color: var(--success);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

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

@media (max-width: 1180px) {
  .layout--chat, .dashboard { grid-template-columns: 1fr; }
  .hero { position: static; }
}

@media (max-width: 920px) {
  .topbar, .section-head { flex-direction: column; align-items: start; }
  .topbar { border-radius: 24px; }
  .stats, .kpis { grid-template-columns: 1fr; }
  .chat__grid { grid-template-columns: 1fr; }
  .intent-menu { grid-template-columns: 1fr; }
  .messages { min-height: 380px; }
  .preview-toolbar,
  .preview-toolbar__actions {
    align-items: stretch;
    justify-content: flex-start;
  }
  .preview-stage {
    padding: 18px;
  }
}

@media (max-width: 640px) {
  .topbar, .layout { width: min(100% - 20px, 1400px); }
  .hero, .panel, .chat { padding: 18px; }
  h1 { font-size: clamp(2.4rem, 12vw, 3.6rem); }
  .brand__mark { width: 46px; height: 46px; border-radius: 16px; }
  .button, .chip { width: 100%; }
  .hero__actions, .composer__footer { flex-direction: column; align-items: stretch; }
  .message { max-width: 100%; }
  .widget-shell,
  .preview-shell {
    padding: 10px;
  }
  .widget-card {
    min-height: calc(100dvh - 20px);
    border-radius: 24px;
  }
  .messages--widget {
    min-height: 300px;
  }
  .preview-toggle {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .preview-toggle__button {
    width: 100%;
  }
  .preview-frame--desktop,
  .preview-frame--mobile,
  .preview-frame--fluid {
    width: 100%;
    height: calc(100dvh - 220px);
    border-radius: 28px;
  }
}
