:root {
  --bg: #f8fafc;
  --bg-alt: #f8fafc;
  --panel: #ffffff;
  --panel-strong: #ffffff;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --accent: #2563eb;
  --accent-strong: #1d4ed8;
  --warm: #f59e0b;
  --warm-strong: #f59e0b;
  --soft-green: #ecfdf5;
  --soft-warm: #fffbeb;
  --danger: #ef4444;
  --warning: #f59e0b;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  --radius-xl: 10px;
  --radius-lg: 10px;
  --radius-md: 10px;
  --accent-soft: #eff6ff;
  --received: #10b981;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Inter", sans-serif;
  color: var(--ink);
  overflow-x: hidden;
  background: var(--bg);
}

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

button {
  cursor: pointer;
}

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

.panel {
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
  border-radius: var(--radius-xl);
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: sticky;
  top: 20px;
  align-self: start;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  padding-right: 4px;
}

.brand-card,
.switch-panel,
.dark-panel,
.nav,
.section-view,
.hero {
  padding: 18px;
}

.brand-card {
  display: flex;
  gap: 14px;
  align-items: center;
  min-width: 0;
}

.brand-logo {
  width: 58px;
  height: 58px;
  border-radius: 20px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  background: #fffaf2;
  color: var(--accent-strong);
  font-family: "Inter", sans-serif;
  font-weight: 700;
  letter-spacing: 0.04em;
  box-shadow: 0 14px 28px rgba(43, 127, 99, 0.2);
  overflow: hidden;
}

.brand-logo img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.brand-copy {
  min-width: 0;
}

.brand-card h1,
.hero h2,
.section-header h3 {
  margin: 8px 0;
  font-family: "Inter", sans-serif;
  letter-spacing: 0;
}

.brand-card h1 {
  max-width: 100%;
  font-size: clamp(1.16rem, 1vw + 0.95rem, 1.3rem);
  line-height: 1.08;
  white-space: nowrap;
  overflow-wrap: normal;
}

.brand-card .eyebrow {
  max-width: 100%;
  white-space: normal;
  text-align: center;
  font-size: 0.72rem;
}

.brand-card p {
  max-width: 100%;
  line-height: 1.35;
  overflow-wrap: break-word;
}

.brand-card p,
.hero p,
.muted,
.section-header p,
.label {
  color: var(--muted);
}

.eyebrow {
  display: inline-flex;
  width: fit-content;
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(43, 127, 99, 0.12);
  color: var(--accent-strong);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.label {
  display: block;
  margin-bottom: 10px;
  font-size: 0.9rem;
  font-weight: 700;
}

.segmented {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 6px;
  border-radius: 16px;
  background: rgba(46, 38, 29, 0.06);
}

.segmented button,
.nav-link,
.action-btn,
.chip-btn {
  border: 0;
  border-radius: 14px;
  font-weight: 700;
  transition: 0.2s ease;
}

.segmented button {
  padding: 11px 8px;
  background: transparent;
  color: var(--muted);
}

.segmented button.active,
.nav-link.active,
.chip-btn.active {
  background: var(--panel-strong);
  color: var(--accent-strong);
  box-shadow: inset 0 0 0 1px rgba(43, 127, 99, 0.16);
}

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

.nav-link {
  padding: 12px 14px;
  text-align: left;
  background: transparent;
  color: var(--muted);
}

.nav-link:hover {
  background: rgba(43, 127, 99, 0.1);
  color: var(--accent-strong);
}

.mobile-section-jump {
  display: none;
}

.dark-panel {
  margin-top: auto;
  background: linear-gradient(180deg, rgba(31, 95, 74, 0.98), rgba(42, 57, 40, 0.96));
  color: #fffaf2;
}

.dark-panel p {
  color: rgba(255, 250, 242, 0.78);
}

.main-content {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.hero {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  background:
    linear-gradient(135deg, rgba(255, 250, 242, 0.96), rgba(229, 241, 232, 0.9)),
    linear-gradient(135deg, rgba(43, 127, 99, 0.12), rgba(200, 111, 49, 0.1));
}

.hero-stack {
  display: grid;
  gap: 12px;
  min-width: 230px;
}

.hero-stack article {
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 252, 247, 0.85);
}

.hero-stack span {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.section-view {
  display: none;
}

.section-view.active {
  display: block;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 18px;
}

.section-header h3 {
  font-size: 1.35rem;
}

.action-row,
.filter-row,
.status-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.action-btn {
  padding: 11px 14px;
}

.action-btn.primary {
  background: var(--accent);
  color: white;
}

.action-btn.secondary,
.chip-btn {
  background: rgba(46, 38, 29, 0.07);
  color: var(--ink);
}

.cards-grid,
.market-grid,
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 14px;
}

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

.connect-explainer article {
  padding: 14px;
  border: 1px solid rgba(46, 38, 29, 0.08);
  border-radius: 20px;
  background: var(--panel-strong);
}

.connect-explainer strong,
.connect-explainer span {
  display: block;
}

.connect-explainer strong {
  margin-bottom: 6px;
}

.connect-explainer span {
  color: var(--muted);
  line-height: 1.45;
}

.card,
.metric-card,
.supplier-card,
.order-card,
.catalog-card,
.note-card {
  border: 1px solid rgba(46, 38, 29, 0.08);
  border-radius: 20px;
  background: var(--panel-strong);
  padding: 17px;
  box-shadow: 0 10px 24px rgba(49, 54, 37, 0.04);
}

.metric-card strong {
  display: block;
  margin-top: 8px;
  font-family: "Inter", sans-serif;
  font-size: 1.45rem;
}

.supplier-card,
.order-card,
.catalog-card {
  display: grid;
  gap: 12px;
}

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

.card-title h4 {
  margin: 0;
  font-size: 1.05rem;
}

.pill {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(46, 38, 29, 0.07);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.pill.ok {
  background: rgba(43, 127, 99, 0.12);
  color: var(--accent-strong);
}

.pill.warn {
  background: rgba(217, 146, 46, 0.14);
  color: #8d5b0d;
}

.pill.danger {
  background: rgba(163, 61, 51, 0.12);
  color: var(--danger);
}

.catalog-price {
  font-family: "Inter", sans-serif;
  font-size: 1.25rem;
}

.table-wrap {
  margin-top: 14px;
  overflow-x: auto;
  border-radius: 18px;
  border: 1px solid rgba(46, 38, 29, 0.08);
}

table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  background: var(--panel-strong);
}

th,
td {
  padding: 13px 14px;
  text-align: left;
  border-bottom: 1px solid rgba(46, 38, 29, 0.06);
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.inline-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
  padding: 16px;
  border: 1px solid rgba(46, 38, 29, 0.08);
  border-radius: 20px;
  background: rgba(255, 252, 247, 0.72);
}

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

.field span {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
}

.field-wide {
  grid-column: 1 / -1;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid rgba(46, 38, 29, 0.1);
  border-radius: 14px;
  padding: 11px 12px;
  background: var(--panel-strong);
  color: var(--ink);
}

.timeline {
  display: grid;
  gap: 10px;
}

.demo-path {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.demo-path article {
  display: grid;
  gap: 5px;
  padding: 14px;
  border-radius: 18px;
  background: rgba(43, 127, 99, 0.08);
  border: 1px solid rgba(43, 127, 99, 0.12);
}

.demo-path span {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--accent);
  color: white;
  font-weight: 700;
}

.demo-path small,
.line-list span {
  color: var(--muted);
}

.integration-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.integration-strip article {
  display: grid;
  gap: 8px;
  padding: 16px;
  border-radius: 18px;
  background: rgba(200, 111, 49, 0.08);
  border: 1px solid rgba(200, 111, 49, 0.12);
}

.order-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(360px, 1.1fr);
  gap: 16px;
  align-items: start;
}

.order-list {
  display: grid;
  gap: 12px;
}

.order-detail {
  position: sticky;
  top: 20px;
  display: grid;
  gap: 16px;
  padding: 18px;
  border-radius: 22px;
  background: var(--panel-strong);
  border: 1px solid rgba(46, 38, 29, 0.08);
  box-shadow: 0 12px 28px rgba(49, 54, 37, 0.06);
}

.order-detail h4 {
  margin: 10px 0 0;
  font-family: "Inter", sans-serif;
}

.order-detail h5 {
  margin: 0 0 8px;
  font-size: 0.95rem;
}

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

.detail-grid article {
  padding: 12px;
  border-radius: 16px;
  background: rgba(46, 38, 29, 0.05);
}

.detail-grid span,
.detail-grid strong {
  display: block;
}

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

.line-list div {
  display: grid;
  gap: 3px;
  padding: 11px 12px;
  border-radius: 14px;
  background: rgba(43, 127, 99, 0.07);
}

.timeline-item {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 12px;
  padding: 13px;
  border-radius: 16px;
  background: rgba(43, 127, 99, 0.08);
}

.empty-note {
  padding: 18px;
  border-radius: 18px;
  background: rgba(46, 38, 29, 0.05);
  color: var(--muted);
}

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

  .sidebar {
    position: static;
    max-height: none;
    padding-right: 0;
  }
}

@media (max-width: 720px) {
  .app-shell {
    padding: 12px;
    gap: 12px;
  }

  .brand-card,
  .switch-panel,
  .dark-panel,
  .section-view,
  .hero {
    padding: 16px;
  }

  .brand-card p,
  .hero p,
  .hero-stack,
  .dark-panel {
    display: none;
  }

  .brand-logo {
    width: 50px;
    height: 50px;
  }

  .nav.panel {
    display: none;
  }

  .mobile-section-jump {
    display: grid;
    gap: 8px;
    padding: 14px 16px;
    position: sticky;
    top: 10px;
    z-index: 10;
  }

  .mobile-section-jump span {
    color: var(--muted);
    font-size: 0.86rem;
    font-weight: 700;
  }

  .mobile-section-jump select {
    min-height: 48px;
    font-weight: 700;
  }

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

  .hero,
  .section-header {
    flex-direction: column;
  }

  .inline-form {
    grid-template-columns: 1fr;
  }

  .demo-path,
  .connect-explainer,
  .integration-strip,
  .order-layout,
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .order-detail {
    position: static;
  }

  .timeline-item {
    grid-template-columns: 1fr;
  }
}

/* BrasaConnect clean marketplace identity */
.panel,
.brand-card,
.switch-panel,
.dark-panel,
.nav,
.section-view,
.hero,
.card,
.metric-card,
.supplier-card,
.order-card,
.catalog-card,
.note-card,
.inline-form,
.order-detail,
.connect-explainer article,
.hero-stack article,
.table-wrap,
.demo-path article,
.integration-strip article,
.detail-grid article,
.line-list div,
.timeline-item,
.empty-note {
  background: var(--panel);
  border-color: var(--line);
  box-shadow: var(--shadow);
  border-radius: var(--radius-xl);
}

.sidebar .brand-card,
.sidebar .switch-panel,
.sidebar .nav,
.mobile-section-jump {
  background: #ffffff;
}

.dark-panel {
  background: #0f172a;
  color: #ffffff;
}

.dark-panel p {
  color: #cbd5e1;
}

.brand-logo {
  background: var(--accent-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
}

.brand-card h1,
.hero h2,
.section-header h3,
.card-title h4,
.metric-card strong,
.catalog-price {
  font-family: "Inter", sans-serif;
  color: var(--ink);
  letter-spacing: 0;
}

.brand-card p,
.hero p,
.muted,
.section-header p,
.label,
.hero-stack span,
.metric-card span,
.metric-card small,
.card p,
.supplier-card p,
.order-card p,
.catalog-card p,
.note-card p,
small {
  color: var(--muted);
}

.eyebrow,
.brand-card .eyebrow {
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid #bfdbfe;
  border-radius: var(--radius-xl);
}

.hero {
  background: linear-gradient(135deg, #ffffff, #eff6ff);
}

.segmented,
.segmented button.active,
.nav-link,
.chip-btn,
.action-btn,
select,
input,
textarea,
.status-pill,
.pill {
  border-radius: var(--radius-xl);
}

.segmented {
  background: #f1f5f9;
}

.segmented button.active,
.nav-link:hover,
.nav-link.active,
.chip-btn.active {
  background: var(--accent-soft);
  color: var(--accent);
  box-shadow: inset 0 0 0 1px #bfdbfe;
}

.action-btn,
.action-btn.primary {
  background: var(--accent);
  color: #ffffff;
  box-shadow: var(--shadow);
}

.action-btn:hover,
.action-btn.primary:hover {
  background: var(--accent-strong);
  color: #ffffff;
}

.action-btn.secondary,
.chip-btn {
  background: #ffffff;
  color: var(--ink);
  border: 1px solid var(--line);
}

.metric-card,
.supplier-card,
.order-card,
.catalog-card,
.note-card,
.card,
.order-detail,
.hero-stack article,
.inline-form {
  background: #ffffff;
}

.status-pill,
.pill {
  background: #f1f5f9;
  color: var(--muted);
}

.status-pill.ok,
.pill.ok {
  background: #ecfdf5;
  color: #10b981;
}

.status-pill.warn,
.pill.warn {
  background: var(--accent-soft);
  color: #2563eb;
}

.status-pill.danger,
.pill.danger {
  background: #fef2f2;
  color: #ef4444;
}

.status-pill.active,
.pill.active {
  background: var(--accent-soft);
  color: var(--accent);
}

.order-card .pill.warn,
.order-detail .pill.warn {
  background: #fffbeb;
  color: #f59e0b;
}

table {
  background: #ffffff;
}

th {
  background: #f8fafc;
  color: var(--muted);
}

th,
td {
  border-bottom-color: var(--line);
}

.table-wrap {
  border-color: var(--line);
  background: #ffffff;
}

input,
select,
textarea {
  background: #ffffff;
  border-color: var(--line);
  color: var(--ink);
}

.demo-path article,
.line-list div,
.timeline-item {
  background: var(--accent-soft);
  border-color: #bfdbfe;
}

.demo-path span {
  background: var(--accent);
  color: #ffffff;
  border-radius: var(--radius-xl);
}

.integration-strip article {
  background: #f8fafc;
}

@media (max-width: 720px) {
  .mobile-section-jump {
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(12px);
  }
}
