@import url('https://fonts.googleapis.com/css2?family=Anton&family=Montserrat:ital,wght@0,400;0,500;0,600;0,700;1,400&display=swap');

:root {
  --bg: #f5f8fa;
  --panel: #ffffff;
  --ink: #09161d;
  --ink-soft: #173542;
  --muted: #627887;
  --line: rgba(9, 22, 29, 0.1);
  --accent: #49b6d3;
  --accent-deep: #228cab;
  --accent-ink: #0f4f64;
  --accent-soft: rgba(73, 182, 211, 0.14);
  --accent-mist: rgba(73, 182, 211, 0.08);
  --ok: #11796d;
  --warn: #c4652a;
  --bad: #ad2d2d;
  --shadow: 0 22px 44px rgba(9, 22, 29, 0.08);
  --shadow-sm: 0 12px 28px rgba(9, 22, 29, 0.06);
  --radius: 18px;
  --radius-sm: 12px;
  --font-body: "Montserrat", Arial, Helvetica, sans-serif;
  --font-title: "Anton", Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background:
    radial-gradient(920px 560px at 8% -10%, rgba(73, 182, 211, 0.16), transparent 62%),
    radial-gradient(760px 540px at 92% 0%, rgba(73, 182, 211, 0.08), transparent 62%),
    linear-gradient(180deg, #ffffff 0%, var(--bg) 100%);
}

.app {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
}

.sidebar {
  padding: 22px 18px;
  border-right: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(245, 248, 250, 0.94));
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: auto;
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 14px 18px;
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--line);
  position: relative;
  overflow: hidden;
}

.brand::after {
  content: "";
  position: absolute;
  inset: 0 0 auto auto;
  width: 140px;
  height: 4px;
  background: linear-gradient(90deg, transparent, var(--accent));
}

.brand-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo {
  width: 52px;
  height: 52px;
  object-fit: contain;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 8px 20px rgba(9, 22, 29, 0.08);
  border: 1px solid rgba(73, 182, 211, 0.18);
  padding: 4px;
}

.brand-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.brand .kicker {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.brand .title {
  margin-top: 2px;
  font-family: var(--font-title);
  font-size: clamp(24px, 2vw, 30px);
  line-height: 0.92;
  letter-spacing: 0.02em;
  color: var(--ink);
  word-break: break-word;
}

.brand .subtitle {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
  max-width: 26ch;
}

.nav {
  margin-top: 16px;
  display: grid;
  gap: 10px;
}

.nav-group {
  padding: 12px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.78);
}

.nav-group-title {
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}

.nav a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  border: 1px solid transparent;
}

.nav a:hover {
  border-color: rgba(73, 182, 211, 0.42);
  background: rgba(73, 182, 211, 0.08);
}

.nav a.active {
  border-color: rgba(73, 182, 211, 0.64);
  background: var(--accent-soft);
  color: var(--accent-ink);
}

.nav-mini {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.nav-mini a {
  flex: 1 1 auto;
  justify-content: center;
  padding: 8px 10px;
  border-color: var(--line);
  color: var(--muted);
  font-size: 12px;
  background: rgba(255, 255, 255, 0.56);
}

.badge {
  font-size: 11px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.82);
}

.content {
  padding: 18px 26px 52px;
}

.page {
  max-width: 1260px;
  margin: 0 auto;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 18px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(10px);
  margin: 0 auto 18px;
  max-width: 1260px;
}

.topbar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.topbar-logo {
  width: 36px;
  height: 36px;
  object-fit: contain;
  border-radius: 10px;
  background: #ffffff;
  border: 1px solid rgba(73, 182, 211, 0.18);
  padding: 2px;
}

.topbar-title {
  font-family: var(--font-title);
  font-size: clamp(22px, 1.6vw, 26px);
  line-height: 0.95;
  letter-spacing: 0.03em;
}

.topbar-sub {
  margin-top: 2px;
  font-size: 12px;
  color: var(--muted);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-panel {
  width: min(420px, 100%);
  display: grid;
  gap: 18px;
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.login-brand img {
  width: 58px;
  height: 58px;
  object-fit: contain;
  border-radius: 14px;
  padding: 5px;
  background: #fff;
  border: 1px solid var(--line);
}

.login-form {
  display: grid;
  gap: 12px;
}

.login-form label {
  display: grid;
  gap: 7px;
  font-size: 12px;
  font-weight: 800;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.login-error {
  min-height: 20px;
  color: var(--bad);
  font-size: 13px;
  font-weight: 700;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.7);
  font-weight: 900;
  color: var(--muted);
  white-space: nowrap;
}

.status-pill.online {
  border-color: rgba(15, 118, 110, 0.35);
  background: rgba(15, 118, 110, 0.1);
  color: var(--ok);
}

.status-pill.stale {
  border-color: rgba(194, 65, 12, 0.35);
  background: rgba(194, 65, 12, 0.1);
  color: var(--warn);
}

.status-pill.waiting {
  border-color: rgba(73, 182, 211, 0.35);
  background: rgba(73, 182, 211, 0.1);
  color: var(--accent-ink);
}

.page-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

h1 {
  margin: 0;
  font-family: var(--font-title);
  font-size: clamp(26px, 2.7vw, 44px);
  line-height: 0.98;
  font-weight: 400;
  letter-spacing: 0.02em;
  color: var(--ink);
}

h2,
h3 {
  font-family: var(--font-title);
  font-weight: 400;
  letter-spacing: 0.02em;
  line-height: 1;
}

.lead {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.6;
  max-width: 74ch;
  font-size: 14px;
}

.grid {
  display: grid;
  gap: 14px;
}

.grid.kpis {
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.grid.two {
  grid-template-columns: 1.2fr 0.8fr;
}

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 20px;
  position: relative;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: linear-gradient(90deg, rgba(73, 182, 211, 0.18), transparent 55%);
}

.route-link:hover {
  border-color: rgba(73, 182, 211, 0.5);
  background: rgba(73, 182, 211, 0.08);
}

.route-link strong {
  display: block;
  font-size: 16px;
  line-height: 1.25;
}

.route-link span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.workflow-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
  margin: 14px 0;
}

.route-link {
  display: grid;
  gap: 6px;
  min-height: 82px;
  padding: 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
  text-decoration: none;
  color: var(--ink);
}

.kpi-label {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.kpi-value {
  font-family: var(--font-title);
  font-size: 32px;
  line-height: 0.95;
  font-weight: 400;
  letter-spacing: 0.03em;
  margin-top: 10px;
  color: var(--ink-soft);
  overflow-wrap: anywhere;
}

.kpi-sub {
  margin-top: 8px;
  font-size: 12px;
  color: var(--muted);
}

.row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.btn {
  border: 0;
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-family: var(--font-body);
  font-weight: 900;
  cursor: pointer;
  background: linear-gradient(180deg, var(--accent) 0%, var(--accent-deep) 100%);
  color: white;
  transition: transform 120ms ease, opacity 120ms ease;
  box-shadow: 0 12px 22px rgba(73, 182, 211, 0.18);
}

.btn:hover {
  transform: translateY(-1px);
}

.btn.secondary {
  background: rgba(73, 182, 211, 0.08);
  color: var(--ink);
  box-shadow: none;
}

.btn.danger {
  background: rgba(185, 28, 28, 0.12);
  color: var(--bad);
  box-shadow: none;
}

.inline-actions {
  position: relative;
}

.inline-actions summary {
  list-style: none;
}

.inline-actions summary::-webkit-details-marker {
  display: none;
}

.inline-actions-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 220px;
  display: grid;
  gap: 8px;
  padding: 10px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow-sm);
  z-index: 20;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.table th,
.table td {
  padding: 12px 12px;
  border-bottom: 1px solid rgba(9, 22, 29, 0.07);
  text-align: left;
  vertical-align: top;
  overflow-wrap: anywhere;
}

.table th {
  color: var(--muted);
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 12px;
}

.product-ranking-table {
  min-width: 1120px;
}

.product-ranking-table th,
.product-ranking-table td {
  overflow-wrap: normal;
  word-break: normal;
}

.product-ranking-table th,
.product-ranking-table td:not(:nth-child(3)) {
  white-space: nowrap;
}

.product-ranking-table th:first-child,
.product-ranking-table td:first-child {
  min-width: 122px;
}

.product-ranking-table th:nth-child(3),
.product-ranking-table td:nth-child(3) {
  min-width: 260px;
  white-space: normal;
  overflow-wrap: break-word;
}

.abc-rank-line {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.abc-rank-line .tag {
  padding: 2px 7px;
  font-size: 11px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(73, 182, 211, 0.08);
  border: 1px solid rgba(217, 226, 236, 0.9);
  font-weight: 800;
  color: var(--muted);
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-weight: 900;
  font-size: 12px;
  border: 1px solid rgba(217, 226, 236, 0.9);
  background: rgba(255, 255, 255, 0.8);
  color: var(--muted);
}

.tag.ok {
  border-color: rgba(15, 118, 110, 0.35);
  background: rgba(15, 118, 110, 0.1);
  color: var(--ok);
}

.tag.warn {
  border-color: rgba(194, 65, 12, 0.35);
  background: rgba(194, 65, 12, 0.1);
  color: var(--warn);
}

.tag.bad {
  border-color: rgba(173, 45, 45, 0.35);
  background: rgba(173, 45, 45, 0.1);
  color: var(--bad);
}

.op-view[hidden] {
  display: none;
}

.empty {
  color: var(--muted);
  line-height: 1.6;
  padding: 14px;
  border: 1px dashed rgba(73, 182, 211, 0.24);
  border-radius: 16px;
  background: rgba(73, 182, 211, 0.04);
}

.counting-layout {
  display: grid;
  gap: 14px;
}

.counting-step h2 {
  margin: 8px 0 0;
  font-size: 20px;
}

.counting-setup {
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) minmax(0, 1.2fr);
  gap: 14px 24px;
  align-items: end;
}

.counting-setup #countStatus {
  grid-column: 1 / -1;
}

.counting-count-picker,
.counting-quantity-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
  margin-top: 16px;
}

.counting-quantity-form {
  grid-template-columns: minmax(125px, 0.7fr) minmax(180px, 1fr) minmax(150px, 0.8fr) auto;
}

.counting-search-field {
  margin-top: 16px;
}

.counting-station {
  background: linear-gradient(135deg, rgba(73, 182, 211, 0.1), rgba(255, 255, 255, 0.92) 42%);
}

.counting-station-head,
.counting-session-head {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  justify-content: space-between;
}

.counting-station-head h2 {
  margin: 8px 0 0;
  font-size: 24px;
}

.counting-scan-input {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.counting-scan-input input {
  min-height: 58px;
  border: 2px solid rgba(22, 140, 162, 0.68);
  background: rgba(229, 251, 238, 0.82);
  font-size: 20px;
  font-weight: 700;
}

.counting-helper {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.counting-search-results {
  display: grid;
  gap: 7px;
  margin-top: 4px;
}

.counting-search-result {
  display: grid;
  grid-template-columns: minmax(110px, 0.35fr) minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  width: 100%;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.82);
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.counting-search-result:hover,
.counting-search-result:focus-visible {
  border-color: var(--accent);
  outline: none;
}

.counting-search-result span,
.counting-selected-product span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.counting-search-result small,
.counting-selected-product small {
  color: var(--muted);
}

.counting-selected-product {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 5px 12px;
  align-items: center;
  margin-top: 16px;
  padding: 14px;
  border: 1px solid rgba(73, 182, 211, 0.28);
  border-radius: var(--radius-sm);
  background: rgba(73, 182, 211, 0.06);
}

.counting-selected-product small {
  grid-column: 1 / -1;
}

.counting-system-stock,
.counting-difference {
  display: grid;
  gap: 4px;
  align-self: stretch;
  min-width: 145px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
  font-size: 12px;
}

.counting-system-stock strong {
  color: var(--ink);
  font-size: 22px;
}

.counting-difference {
  align-content: center;
  font-weight: 700;
}

.counting-difference.is-positive { color: #16803c; background: rgba(34, 197, 94, 0.09); }
.counting-difference.is-negative { color: var(--bad); background: rgba(185, 28, 28, 0.07); }
.counting-difference.is-equal { color: var(--accent); }

.counting-note {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.counting-session {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.counting-session h3 {
  margin: 0;
  font-size: 15px;
}

.counting-session-head span {
  color: var(--muted);
  font-size: 12px;
}

.counting-session-items {
  display: grid;
  gap: 7px;
  margin-top: 12px;
}

.counting-session-item {
  display: grid;
  grid-template-columns: minmax(100px, 0.2fr) minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid rgba(73, 182, 211, 0.2);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.66);
}

.counting-session-item span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.counting-session-item small { color: var(--muted); }

.counting-status-error {
  color: var(--bad);
  border-color: rgba(185, 28, 28, 0.3);
  background: rgba(185, 28, 28, 0.06);
}

@media (max-width: 767px) {
  .counting-setup {
    grid-template-columns: 1fr;
  }

  .counting-count-picker,
  .counting-quantity-form {
    grid-template-columns: 1fr;
  }

  .counting-count-picker .btn,
  .counting-quantity-form .btn {
    width: 100%;
  }

  .counting-search-result {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .counting-scan-input {
    grid-template-columns: 1fr;
  }

  .counting-scan-input .btn {
    width: 100%;
  }

  .counting-session-item {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}

.field {
  display: grid;
  gap: 6px;
  min-width: 0;
}

label {
  font-size: 12px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 900;
  overflow-wrap: anywhere;
  line-height: 1.25;
}

input,
select,
textarea {
  width: 100%;
  padding: 12px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  outline: none;
  font-family: var(--font-body);
  background: rgba(255, 255, 255, 0.92);
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(73, 182, 211, 0.5);
  box-shadow: 0 0 0 4px rgba(73, 182, 211, 0.1);
}

textarea {
  resize: vertical;
  min-height: 120px;
}

.btn.ghost {
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  border: 1px solid var(--line);
  box-shadow: none;
}

.btn.small {
  padding: 9px 12px;
  font-size: 12px;
  border-radius: 12px;
}

.status-box {
  margin-top: 12px;
}

.status-box.success {
  border-style: solid;
  border-color: rgba(17, 121, 109, 0.18);
  background: rgba(17, 121, 109, 0.08);
  color: var(--ok);
}

.status-box.error {
  border-style: solid;
  border-color: rgba(173, 45, 45, 0.18);
  background: rgba(173, 45, 45, 0.08);
  color: var(--bad);
}

.status-box.info {
  border-style: solid;
  border-color: rgba(73, 182, 211, 0.2);
}

.progress {
  width: 100%;
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(9, 22, 29, 0.06);
}

.progress-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent-deep));
  transition: width 220ms ease;
}

.crm-profile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.customer-profile-focus {
  display: grid;
  gap: 12px;
}

.customer-profile-toolbar,
.crm-profile-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 12px;
}

.customer-profile-toolbar input {
  max-width: 260px;
}

.crm-profile-actions {
  margin-top: 12px;
}

.crm-profile-field {
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(245, 248, 250, 0.66);
  min-width: 0;
}

.crm-profile-field span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.crm-profile-field strong {
  display: block;
  margin-top: 6px;
  font-size: 14px;
  line-height: 1.35;
  word-break: break-word;
}

.crm-mini-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.crm-mini-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
}

.crm-mini-item strong,
.crm-mini-item span {
  word-break: break-word;
}

.crm-priority-section {
  align-items: start;
}

.crm-action-metrics,
.crm-quality-grid {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.crm-action-metrics {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.crm-quality-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.crm-action-metric,
.crm-quality-item {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(245, 248, 250, 0.68);
}

.crm-action-metric.wide {
  grid-column: 1 / -1;
}

.crm-action-metric span,
.crm-quality-item span {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.crm-action-metric strong,
.crm-quality-item strong {
  display: block;
  margin-top: 6px;
  font-family: var(--font-title);
  font-size: 26px;
  line-height: 1;
  font-weight: 400;
}

.crm-action-metric small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.ops-metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.ops-metric {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(245, 248, 250, 0.68);
}

.ops-metric span {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ops-metric strong {
  display: block;
  margin-top: 6px;
  font-family: var(--font-title);
  font-size: 26px;
  line-height: 1;
  font-weight: 400;
}

.status-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.status-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(73, 182, 211, 0.2);
  border-radius: 12px;
  padding: 9px 12px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 900;
  cursor: pointer;
}

.status-tab span {
  min-width: 28px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(73, 182, 211, 0.1);
  color: var(--accent-ink);
  text-align: center;
  font-size: 12px;
}

.status-tab.active {
  border-color: rgba(73, 182, 211, 0.68);
  background: var(--accent-soft);
  color: var(--accent-ink);
}

.purchase-actions {
  gap: 8px;
}

.purchase-actions .btn {
  padding: 9px 12px;
  border: 1px solid transparent;
  border-radius: 12px;
  font-size: 12px;
}

.purchase-actions .action-need {
  border-color: rgba(17, 121, 109, 0.24);
  background: rgba(17, 121, 109, 0.1);
  color: var(--ok);
}

.purchase-actions .action-skip {
  border-color: rgba(98, 120, 135, 0.24);
  background: rgba(98, 120, 135, 0.1);
  color: var(--muted);
}

.purchase-actions .action-keep {
  border-color: rgba(73, 182, 211, 0.28);
  background: rgba(73, 182, 211, 0.08);
  color: var(--accent-ink);
}

.compras-minimal .page-head {
  margin-bottom: 14px;
}

.compras-list-card {
  padding: 18px;
}

.compras-minimal-toolbar {
  display: grid;
  grid-template-columns: minmax(130px, 160px) minmax(140px, 170px) minmax(160px, 190px) minmax(180px, 240px) minmax(220px, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.compras-minimal-toolbar .pill {
  justify-self: end;
  align-self: end;
}

.compras-priority-table th:first-child,
.compras-priority-table td:first-child {
  width: 86px;
}

.compras-priority-table td {
  line-height: 1.35;
}

.priority-rank {
  display: inline-flex;
  min-width: 42px;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  font-weight: 900;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.8);
}

.priority-rank.p1 {
  color: var(--bad);
  border-color: rgba(173, 45, 45, 0.28);
  background: rgba(173, 45, 45, 0.08);
}

.priority-rank.p2 {
  color: var(--warn);
  border-color: rgba(194, 101, 42, 0.28);
  background: rgba(194, 101, 42, 0.08);
}

.priority-rank.p3 {
  color: var(--ok);
  border-color: rgba(17, 121, 109, 0.24);
  background: rgba(17, 121, 109, 0.08);
}

.queue-signal {
  display: inline-flex;
  min-width: 72px;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.82);
  color: var(--ink);
  font-size: 11px;
  font-weight: 900;
  line-height: 1.1;
  text-align: center;
  white-space: nowrap;
}

.queue-signal.signal-decision {
  color: #1d4ed8;
  border-color: rgba(29, 78, 216, 0.24);
  background: rgba(29, 78, 216, 0.08);
}

.queue-signal.signal-buy,
.queue-signal.signal-attention {
  color: var(--warn);
  border-color: rgba(194, 101, 42, 0.28);
  background: rgba(194, 101, 42, 0.08);
}

.queue-signal.signal-progress {
  color: #4318ff;
  border-color: rgba(67, 24, 255, 0.25);
  background: rgba(67, 24, 255, 0.08);
}

.queue-signal.signal-done {
  color: var(--ok);
  border-color: rgba(17, 121, 109, 0.24);
  background: rgba(17, 121, 109, 0.08);
}

.queue-signal.signal-muted {
  color: var(--muted);
  border-color: var(--line);
  background: rgba(98, 120, 135, 0.07);
}

.compras-workflow {
  gap: 16px;
}

.purchase-capture {
  display: grid;
  grid-template-columns: minmax(220px, 0.75fr) minmax(0, 1.45fr);
  gap: 16px;
  align-items: end;
  padding: 18px;
  border: 1px solid rgba(73, 182, 211, 0.22);
  border-radius: var(--radius);
  background: linear-gradient(135deg, #ffffff, rgba(73, 182, 211, 0.08));
  box-shadow: var(--shadow-sm);
}

.purchase-capture-title {
  margin-top: 4px;
  font-weight: 900;
  font-size: 22px;
  color: var(--ink);
}

.purchase-capture-form {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(76px, 92px) minmax(150px, 190px) auto;
  gap: 10px;
  align-items: end;
}

.compact-field input {
  text-align: center;
}

.quick-results {
  grid-column: 2;
  display: grid;
  gap: 8px;
}

.quick-result,
.supplier-summary-row {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  font-family: var(--font-body);
  text-align: left;
  cursor: pointer;
}

.quick-result:hover,
.quick-result.selected,
.supplier-summary-row:hover {
  border-color: rgba(73, 182, 211, 0.46);
  background: var(--accent-soft);
}

.quick-result span,
.supplier-summary-row span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.quick-result strong,
.supplier-summary-row strong {
  overflow-wrap: anywhere;
}

.quick-result small,
.supplier-summary-row small {
  color: var(--muted);
  font-weight: 800;
  font-size: 11px;
}

.purchase-kpis {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.purchase-toolbar {
  margin-bottom: 16px;
}

.purchase-search-field input {
  min-width: 0;
}

.purchase-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 300px);
  gap: 16px;
  align-items: start;
}

.purchase-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.purchase-queue {
  display: grid;
  gap: 10px;
}

.purchase-item {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-left: 5px solid rgba(98, 120, 135, 0.34);
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(9, 22, 29, 0.05);
}

.purchase-item.priority-urgente {
  border-left-color: var(--bad);
}

.purchase-item.priority-atencao {
  border-left-color: var(--warn);
}

.purchase-item-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
}

.purchase-item-title {
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.purchase-item-title strong,
.purchase-item-title div {
  overflow-wrap: anywhere;
}

.purchase-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.purchase-metrics {
  display: grid;
  grid-template-columns: repeat(5, minmax(96px, 1fr));
  gap: 8px;
}

.purchase-metrics div {
  min-width: 0;
  padding: 9px 10px;
  border-radius: 10px;
  background: rgba(98, 120, 135, 0.07);
}

.purchase-metrics span,
.purchase-item-actions label span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.purchase-metrics strong {
  display: block;
  margin-top: 3px;
  overflow-wrap: anywhere;
  font-size: 14px;
}

.purchase-reason {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.purchase-reason strong {
  color: var(--ink);
}

.purchase-item-actions {
  display: grid;
  grid-template-columns: 82px repeat(5, auto);
  gap: 8px;
  align-items: end;
}

.purchase-item-actions label {
  display: grid;
  gap: 4px;
}

.purchase-item-actions input {
  width: 82px;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px;
  font: inherit;
  font-weight: 900;
}

.supplier-summary {
  display: grid;
  gap: 8px;
}

.purchase-details {
  margin-top: 18px;
}

.purchase-details summary {
  cursor: pointer;
  color: var(--accent-ink);
  font-weight: 900;
}

@media (max-width: 820px) {
  .compras-minimal-toolbar {
    grid-template-columns: 1fr;
  }

  .compras-minimal-toolbar .pill {
    justify-self: start;
  }

  .purchase-capture,
  .purchase-capture-form,
  .purchase-layout,
  .purchase-item-main,
  .purchase-item-actions {
    grid-template-columns: 1fr;
  }

  .quick-results {
    grid-column: auto;
  }

  .purchase-kpis,
  .purchase-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .purchase-badges {
    justify-content: flex-start;
  }

  .purchase-item-actions input {
    width: 100%;
  }
}

.seo-layout {
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
}

.seo-output-grid {
  display: grid;
  gap: 12px;
}

.seo-output-card {
  padding: 14px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(73, 182, 211, 0.04));
}

.seo-output-card textarea,
.seo-output-card input {
  background: rgba(255, 255, 255, 0.98);
}

.seo-output-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.seo-output-head label {
  margin: 0;
}

.seo-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.history-list {
  display: grid;
  gap: 12px;
}

.history-item {
  padding: 16px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.9);
}

.history-item p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.history-item strong {
  color: var(--ink);
}

.history-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.bullet-list {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.7;
}

.helper-copy {
  font-size: 12px;
  color: var(--muted);
}

.spark {
  display: block;
  color: rgba(14, 165, 233, 0.85);
}

.bars {
  display: block;
  color: rgba(15, 118, 110, 0.85);
}

.spark-empty {
  font-size: 12px;
  color: var(--muted);
}

@media (max-width: 1100px) {
  .grid.kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .grid.two {
    grid-template-columns: 1fr;
  }
  .seo-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .app {
    grid-template-columns: 1fr;
  }
  .sidebar {
    position: relative;
    height: auto;
  }
  .content {
    padding: 18px 14px 40px;
  }
}

@media (max-width: 520px) {
  .topbar {
    align-items: flex-start;
  }

  .topbar-right {
    width: 100%;
  }

  .status-pill {
    max-width: 100%;
    white-space: normal;
    line-height: 1.35;
  }

  .grid.kpis {
    grid-template-columns: 1fr;
  }

  .page-head .row,
  .page-head select,
  .page-head .btn {
    width: 100%;
  }

  .crm-mini-item {
    flex-direction: column;
  }

  .crm-action-metrics,
  .crm-quality-grid,
  .ops-metric-grid {
    grid-template-columns: 1fr;
  }
}

/* Reduced-copy mode */
.lead,
.brand .subtitle,
.topbar-sub,
.badge {
  display: none;
}

.page-head {
  align-items: center;
  margin-bottom: 16px;
}

.nav a {
  justify-content: flex-start;
}

.kpi-sub {
  font-size: 11px;
  line-height: 1.45;
}

.empty {
  padding: 12px;
}

/* Professional dashboard refresh */
:root {
  --bg: #eef4f7;
  --panel: #ffffff;
  --ink: #09161d;
  --ink-soft: #14313d;
  --muted: #647887;
  --line: rgba(11, 31, 42, 0.1);
  --accent: #28a9c9;
  --accent-deep: #087f9e;
  --accent-ink: #07556b;
  --accent-soft: rgba(40, 169, 201, 0.14);
  --accent-mist: rgba(40, 169, 201, 0.08);
  --nav-bg: #071922;
  --nav-panel: rgba(255, 255, 255, 0.06);
  --nav-line: rgba(255, 255, 255, 0.1);
  --nav-ink: #eef9fc;
  --nav-muted: rgba(238, 249, 252, 0.62);
  --shadow: 0 24px 70px rgba(7, 25, 34, 0.12);
  --shadow-sm: 0 12px 34px rgba(7, 25, 34, 0.08);
  --shadow-xs: 0 6px 18px rgba(7, 25, 34, 0.06);
  --radius: 22px;
}

body {
  background:
    radial-gradient(900px 520px at 8% -12%, rgba(40, 169, 201, 0.18), transparent 62%),
    radial-gradient(820px 560px at 96% -4%, rgba(9, 36, 48, 0.1), transparent 64%),
    linear-gradient(180deg, #fbfdfe 0%, var(--bg) 100%);
  min-height: 100vh;
}

.app {
  grid-template-columns: 288px 1fr;
}

.sidebar {
  padding: 20px 18px;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  background:
    radial-gradient(280px 240px at 22% 0%, rgba(40, 169, 201, 0.28), transparent 70%),
    linear-gradient(180deg, #071922 0%, #092531 52%, #071922 100%);
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.24) transparent;
}

.brand {
  padding: 16px;
  color: var(--nav-ink);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.06));
  border: 1px solid var(--nav-line);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.18);
}

.brand::after {
  background: linear-gradient(90deg, transparent, rgba(63, 205, 235, 0.95));
}

.brand-logo {
  border-radius: 16px;
  border-color: rgba(255, 255, 255, 0.24);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.22);
}

.brand .kicker,
.brand .subtitle,
.nav-group-title {
  color: var(--nav-muted);
}

.brand .title {
  color: var(--nav-ink);
}

.nav {
  gap: 12px;
}

.nav-group {
  border-color: var(--nav-line);
  background: var(--nav-panel);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.nav a {
  padding: 11px 12px;
  border-radius: 15px;
  color: rgba(238, 249, 252, 0.9);
  font-weight: 800;
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease, color 160ms ease;
}

.nav a:hover {
  border-color: rgba(63, 205, 235, 0.3);
  background: rgba(255, 255, 255, 0.08);
  transform: translateX(2px);
}

.nav a.active {
  border-color: rgba(63, 205, 235, 0.46);
  background: linear-gradient(90deg, rgba(40, 169, 201, 0.26), rgba(255, 255, 255, 0.08));
  color: #ffffff;
  box-shadow: inset 3px 0 0 #42d5ef;
}

.badge {
  color: rgba(238, 249, 252, 0.72);
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.08);
}

.content {
  min-width: 0;
  padding: 22px 30px 56px;
}

.topbar {
  margin-bottom: 22px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(18px);
  position: sticky;
  top: 14px;
  z-index: 10;
}

.topbar-logo {
  width: 40px;
  height: 40px;
  box-shadow: var(--shadow-xs);
}

.page-head {
  margin-bottom: 22px;
  padding: 6px 2px 0;
}

.card {
  padding: 22px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 0.92));
  box-shadow: var(--shadow-sm);
}

.card::before {
  height: 3px;
  background: linear-gradient(90deg, rgba(40, 169, 201, 0.55), rgba(40, 169, 201, 0.04) 62%, transparent);
}

.kpi-value {
  color: var(--ink);
}

.btn {
  border-radius: 14px;
  padding: 12px 17px;
  background: linear-gradient(180deg, #36bddc 0%, var(--accent-deep) 100%);
  box-shadow: 0 14px 26px rgba(8, 127, 158, 0.24);
  transition: transform 140ms ease, opacity 140ms ease, box-shadow 140ms ease;
}

.btn:hover {
  box-shadow: 0 16px 30px rgba(8, 127, 158, 0.28);
}

.btn.secondary {
  color: var(--accent-ink);
  border: 1px solid rgba(40, 169, 201, 0.18);
  background: rgba(40, 169, 201, 0.1);
}

.btn.ghost {
  background: rgba(255, 255, 255, 0.92);
}

.table {
  border-collapse: separate;
  border-spacing: 0;
}

.table th {
  background: rgba(238, 244, 247, 0.58);
}

.table tbody tr {
  transition: background 140ms ease;
}

.table tbody tr:hover {
  background: rgba(40, 169, 201, 0.045);
}

input,
select,
textarea {
  padding: 13px;
  border-radius: 14px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.94);
  transition: border-color 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

input:focus,
select:focus,
textarea:focus {
  background: #ffffff;
  border-color: rgba(40, 169, 201, 0.52);
  box-shadow: 0 0 0 4px rgba(40, 169, 201, 0.12);
}

.seo-output-card,
.history-item {
  border-radius: 18px;
  box-shadow: var(--shadow-xs);
}

.seo-output-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(40, 169, 201, 0.045));
}

.empty {
  background: rgba(40, 169, 201, 0.045);
  border-color: rgba(40, 169, 201, 0.24);
}

@media (max-width: 820px) {
  .app {
    grid-template-columns: 1fr;
  }

  .sidebar {
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .topbar {
    position: relative;
    top: 0;
  }

  .page-head {
    align-items: start;
    flex-direction: column;
  }
}
.sync-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.sync-step {
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  padding: 7px 10px;
  text-transform: uppercase;
}

.sync-step.done {
  background: rgba(20, 184, 166, 0.1);
  border-color: rgba(20, 184, 166, 0.35);
  color: #0f766e;
}

.sync-step.active {
  background: rgba(8, 145, 178, 0.14);
  border-color: rgba(8, 145, 178, 0.4);
  color: #075985;
}

.sync-detail-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(auto-fit, minmax(104px, 1fr));
}

.sync-detail {
  background: rgba(241, 245, 249, 0.78);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px;
}

.sync-detail span {
  color: var(--muted);
  display: block;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.sync-detail strong {
  display: block;
  font-size: 18px;
  margin-top: 4px;
}

.sync-detail.danger strong {
  color: #b91c1c;
}

.attention-card {
  overflow: visible;
}

.attention-board-wrap {
  margin-top: 12px;
}

.kanban-board {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  align-items: start;
}

.kanban-column {
  display: grid;
  gap: 10px;
  min-width: 0;
  min-height: 190px;
  padding: 12px;
  border: 1px solid rgba(11, 31, 42, 0.1);
  border-radius: 16px;
  background: rgba(241, 245, 249, 0.68);
}

.kanban-column-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.kanban-column-head strong {
  font-size: 13px;
  line-height: 1.2;
}

.kanban-column-head span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.kanban-column-list {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.kanban-card {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 10px;
  min-width: 0;
  min-height: 92px;
  padding: 10px;
  border: 1px solid rgba(11, 31, 42, 0.1);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-xs);
}

.kanban-card[draggable="true"] {
  cursor: grab;
}

.kanban-card.is-dragging {
  opacity: 0.48;
}

.kanban-column.is-drop-target {
  border-color: rgba(40, 169, 201, 0.52);
  background: rgba(40, 169, 201, 0.1);
}

.kanban-card.is-done {
  background: rgba(17, 121, 109, 0.07);
}

.kanban-card.is-suggestion {
  border-style: dashed;
  background: rgba(40, 169, 201, 0.055);
}

.task-check {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid rgba(17, 121, 109, 0.32);
  border-radius: 999px;
  color: var(--ok);
  background: rgba(255, 255, 255, 0.92);
  font-weight: 900;
  cursor: pointer;
}

.task-check.is-checked {
  color: #ffffff;
  background: var(--ok);
}

.task-check.is-suggestion-dot {
  border-color: rgba(194, 101, 42, 0.3);
  color: var(--warn);
  cursor: default;
}

.kanban-card-body {
  min-width: 0;
}

.kanban-card-title {
  font-size: 13px;
  font-weight: 900;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.kanban-card-meta,
.kanban-card-note {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
  margin-top: 4px;
  overflow-wrap: anywhere;
}

.kanban-card-note {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.kanban-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.kanban-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(40, 169, 201, 0.18);
  border-radius: 999px;
  background: rgba(40, 169, 201, 0.08);
  color: var(--accent-ink);
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 900;
  padding: 6px 9px;
  text-decoration: none;
}

.kanban-action.primary {
  border-color: rgba(17, 121, 109, 0.28);
  background: rgba(17, 121, 109, 0.1);
  color: var(--ok);
}

.kanban-empty {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  padding: 10px;
  border: 1px dashed rgba(11, 31, 42, 0.12);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.58);
}

.decision-kanban-wrap {
  min-width: 0;
}

.task-decision-focus {
  margin-top: 14px;
}

.task-decision-card {
  min-height: calc(100vh - 164px);
}

.decision-kanban-board {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.decision-kanban-board .kanban-column {
  min-height: 420px;
}

.decision-card {
  grid-template-columns: minmax(0, 1fr);
  min-height: 116px;
}

.decision-product-meta {
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  line-height: 1.4;
  margin-top: 6px;
}

.decision-product-meta span,
.decision-product-grid span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.decision-product-meta strong {
  color: var(--ink-soft);
  font-size: 11px;
  overflow-wrap: anywhere;
}

.decision-product-grid {
  display: grid;
  gap: 7px;
  grid-template-columns: repeat(auto-fit, minmax(82px, 1fr));
  margin-top: 10px;
}

.decision-product-grid div {
  min-width: 0;
}

.decision-product-grid strong {
  display: block;
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.25;
  margin-top: 2px;
  overflow-wrap: anywhere;
}

.trend-chart-scroll {
  overflow-x: auto;
  padding: 4px 0 2px;
}

.trend-bars {
  display: grid;
  grid-template-columns: repeat(var(--bar-count), minmax(30px, 1fr));
  gap: 6px;
  align-items: end;
}

.trend-bar-item {
  display: grid;
  grid-template-rows: 122px auto;
  gap: 7px;
  min-width: 0;
  text-align: center;
}

.trend-bar-track {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  height: 122px;
  border-bottom: 2px solid rgba(40, 169, 201, 0.18);
}

.trend-bar-fill {
  width: min(100%, 24px);
  min-height: 2px;
  border-radius: 7px 7px 2px 2px;
  background: linear-gradient(180deg, rgba(78, 195, 218, 0.95), rgba(8, 127, 158, 0.86));
}

.trend-date {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  line-height: 1.1;
  min-height: 22px;
  overflow-wrap: anywhere;
}

@media (max-width: 920px) {
  .kanban-board {
    grid-template-columns: 1fr;
  }

  .kanban-column {
    min-height: 0;
  }
}

/* Operational focus refresh */
.page-head > div:first-child {
  display: none;
}

.page-head {
  justify-content: flex-end;
  margin-bottom: 12px;
  padding-top: 0;
}

.filter-bar,
.toolbar-card {
  display: grid;
  gap: 10px;
  align-items: end;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.toolbar-card {
  margin-bottom: 14px;
}

.toolbar-card .btn,
.filter-bar .btn {
  min-height: 44px;
}

.is-hidden {
  display: none !important;
}

.home-summary-grid {
  grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
}

.home-context-card {
  display: grid;
  gap: 14px;
}

.home-summary-text {
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.5;
  margin-top: 10px;
  max-width: 980px;
}

.home-overview-grid {
  align-items: stretch;
}

.attention-board-wrap .kanban-board {
  grid-template-columns: 1.05fr 1fr 0.9fr 1.05fr;
}

.product-abc-section {
  overflow: visible;
}

.abc-head-actions {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.abc-info-popover {
  position: relative;
}

.abc-info-trigger {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  color: var(--ink);
  cursor: pointer;
  font-size: 16px;
  font-weight: 900;
  line-height: 1;
  box-shadow: var(--shadow-sm);
  list-style: none;
}

.abc-info-trigger::-webkit-details-marker {
  display: none;
}

.abc-info-popover[open] .abc-info-trigger,
.abc-info-trigger:hover,
.abc-info-trigger:focus-visible {
  border-color: rgba(67, 24, 255, 0.35);
  color: #4318ff;
  outline: none;
}

.abc-info-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 20;
  width: min(360px, calc(100vw - 56px));
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.abc-info-title {
  color: var(--ink);
  font-weight: 900;
  font-size: 14px;
  margin-bottom: 10px;
}

.abc-info-list {
  display: grid;
  gap: 10px;
}

.abc-info-item {
  min-width: 0;
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 2px 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(245, 248, 250, 0.72);
}

.abc-info-item strong {
  grid-row: span 2;
  color: var(--ink);
  font-family: var(--font-title);
  font-size: 24px;
  font-weight: 400;
  line-height: 1;
}

.abc-info-item span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.abc-info-item.is-rule {
  background: rgba(40, 169, 201, 0.06);
}

.abc-board {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.abc-card {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(245, 248, 250, 0.72);
}

.abc-card strong {
  display: block;
  font-family: var(--font-title);
  font-size: 30px;
  font-weight: 400;
  line-height: 1;
}

.abc-card span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  margin-top: 8px;
}

.abc-card.is-rule {
  background: rgba(40, 169, 201, 0.06);
}

.crm-stack {
  display: grid;
  gap: 14px;
  margin-top: 14px;
}

.crm-action-toolbar,
.quality-toolbar,
.opportunity-toolbar,
.collection-toolbar {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  margin-top: 12px;
  align-items: end;
}

.pagination-controls {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.context-cell {
  min-width: 220px;
}

.collection-hero {
  display: grid;
  gap: 14px;
}

.collection-kpis {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.collection-note {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

@media (max-width: 1180px) {
  .attention-board-wrap .kanban-board,
  .abc-board {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .attention-board-wrap .kanban-board,
  .abc-board,
  .filter-bar,
  .toolbar-card {
    grid-template-columns: 1fr;
  }
}

body[data-page="tarefas"] .workflow-strip,
body[data-page="produtos"] .workflow-strip,
body[data-page="crm"] .workflow-strip,
body[data-page="crm"] .grid.kpis {
  display: none;
}

body[data-page="tarefas"] .page-head .row,
body[data-page="produtos"] .page-head .row {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-sm);
}

body[data-page="produtos"] article.card:has(#guidanceBox),
body[data-page="produtos"] section:has(#product360Title),
body[data-page="produtos"] .product-ranking-table th:last-child,
body[data-page="produtos"] .product-ranking-table td:last-child {
  display: none;
}

body[data-page="produtos"] .grid.two:has(#abcSummary) {
  grid-template-columns: 1fr;
}

body[data-page="crm"] .crm-priority-section,
body[data-page="crm"] #crmPortfolio {
  grid-template-columns: 1fr;
}

body[data-page="financeiro"] .grid.kpis article:nth-child(2) .kpi-sub,
body[data-page="financeiro"] .grid.kpis article:nth-child(3) .kpi-sub,
body[data-page="financeiro"] .grid.kpis article:nth-child(4) .kpi-sub {
  font-size: 0;
}

body[data-page="financeiro"] .grid.kpis article:nth-child(2) .kpi-sub::before {
  content: "Saldo calculado por recebimentos e vendas.";
  font-size: 11px;
}

body[data-page="financeiro"] .grid.kpis article:nth-child(3) .kpi-sub::before {
  content: "Primeira fila para cobrar.";
  font-size: 11px;
}

body[data-page="financeiro"] .grid.kpis article:nth-child(4) .kpi-sub::before {
  content: "Abordagem preventiva.";
  font-size: 11px;
}

/* SaaS analytics redesign */
:root {
  --bg: #f4f7f9;
  --panel: #ffffff;
  --panel-soft: #f8fbfc;
  --ink: #121f23;
  --ink-soft: #263a40;
  --muted: #697c84;
  --line: rgba(18, 31, 35, 0.1);
  --line-strong: rgba(18, 31, 35, 0.16);
  --accent: #42b4cc;
  --accent-deep: #167f98;
  --accent-ink: #0d5d70;
  --accent-soft: rgba(66, 180, 204, 0.14);
  --accent-mist: rgba(66, 180, 204, 0.08);
  --ok: #168461;
  --warn: #c77a22;
  --bad: #c44949;
  --violet: #6e6ab8;
  --nav-bg: #101719;
  --nav-panel: rgba(255, 255, 255, 0.055);
  --nav-line: rgba(255, 255, 255, 0.12);
  --nav-ink: #f2fbfd;
  --nav-muted: rgba(242, 251, 253, 0.62);
  --shadow: 0 18px 44px rgba(16, 23, 25, 0.1);
  --shadow-sm: 0 10px 28px rgba(16, 23, 25, 0.08);
  --shadow-xs: 0 6px 16px rgba(16, 23, 25, 0.06);
  --radius: 8px;
  --radius-sm: 6px;
  --font-body: "Inter", Arial, Helvetica, sans-serif;
  --font-title: "Plus Jakarta Sans", "Inter", Arial, Helvetica, sans-serif;
}

* {
  min-width: 0;
}

body {
  min-height: 100vh;
  color: var(--ink);
  background-color: var(--bg);
  background-image:
    linear-gradient(rgba(18, 31, 35, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(18, 31, 35, 0.035) 1px, transparent 1px);
  background-size: 44px 44px;
  font-family: var(--font-body);
}

.app {
  grid-template-columns: 276px minmax(0, 1fr);
}

.sidebar {
  padding: 18px 14px;
  background: var(--nav-bg);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.brand {
  gap: 14px;
  padding: 14px;
  color: var(--nav-ink);
  background: var(--nav-panel);
  border: 1px solid var(--nav-line);
  border-radius: var(--radius);
  box-shadow: none;
}

.brand::after {
  inset: auto 14px 0 14px;
  width: auto;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), rgba(22, 132, 97, 0.92), rgba(199, 122, 34, 0.7));
}

.brand-head {
  align-items: center;
}

.brand-logo,
.topbar-logo {
  background: #ffffff;
  border: 1px solid rgba(66, 180, 204, 0.22);
  border-radius: var(--radius-sm);
  box-shadow: none;
}

.brand-logo {
  width: 44px;
  height: 44px;
  padding: 4px;
}

.brand .kicker,
.brand .subtitle,
.nav-group-title {
  color: var(--nav-muted);
  letter-spacing: 0;
}

.brand .kicker,
.nav-group-title,
.kpi-label,
label,
.table th,
.sync-detail span,
.crm-action-metric span,
.crm-quality-item span,
.ops-metric span,
.decision-product-meta span,
.decision-product-grid span {
  letter-spacing: 0;
}

.brand .title {
  color: var(--nav-ink);
  font-family: var(--font-title);
  font-size: 18px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: 0;
}

.brand .subtitle {
  display: block;
  max-width: none;
  font-size: 12px;
  line-height: 1.45;
}

.sidebar-foot {
  margin-top: 14px;
  padding: 12px;
  border: 1px solid var(--nav-line);
  border-radius: var(--radius);
  background: rgba(66, 180, 204, 0.08);
  color: var(--nav-muted);
  font-size: 12px;
  line-height: 1.45;
}

.sidebar-foot strong {
  display: block;
  color: var(--nav-ink);
  font-size: 13px;
  margin-bottom: 4px;
}

.nav {
  gap: 10px;
}

.nav-group {
  padding: 10px;
  background: transparent;
  border: 0;
  border-radius: var(--radius);
  box-shadow: none;
}

.nav-group-title {
  margin: 4px 2px 8px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.nav a {
  position: relative;
  justify-content: space-between;
  min-height: 40px;
  padding: 10px 10px 10px 14px;
  color: rgba(242, 251, 253, 0.82);
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
}

.nav a::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 12px;
  bottom: 12px;
  width: 3px;
  border-radius: 99px;
  background: transparent;
}

.nav a:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.07);
  border-color: var(--nav-line);
  transform: none;
}

.nav a.active {
  color: #ffffff;
  background: rgba(66, 180, 204, 0.16);
  border-color: rgba(66, 180, 204, 0.32);
  box-shadow: none;
}

.nav a.active::before {
  background: var(--accent);
}

.badge {
  display: inline-flex;
  padding: 4px 8px;
  color: rgba(242, 251, 253, 0.62);
  background: rgba(255, 255, 255, 0.07);
  border-color: var(--nav-line);
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
}

.content {
  min-width: 0;
  padding: 18px 24px 48px;
}

.page,
.topbar {
  max-width: 1380px;
}

.topbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  min-height: 68px;
  margin-bottom: 18px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-xs);
  backdrop-filter: blur(14px);
}

.topbar-logo {
  width: 38px;
  height: 38px;
  padding: 3px;
}

.topbar-brand {
  gap: 10px;
}

.topbar-kicker {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
  text-transform: uppercase;
}

.topbar-title {
  color: var(--ink);
  font-family: var(--font-title);
  font-size: 20px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: 0;
}

.topbar-sub {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.topbar-right {
  gap: 8px;
  justify-content: flex-end;
}

.topbar-metric {
  display: grid;
  gap: 2px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel-soft);
}

.topbar-metric span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.topbar-metric strong {
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.status-pill {
  min-height: 34px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  background: var(--panel-soft);
  border-color: var(--line);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.status-pill.online {
  background: rgba(22, 132, 97, 0.1);
  border-color: rgba(22, 132, 97, 0.24);
  color: var(--ok);
}

.status-pill.stale {
  background: rgba(199, 122, 34, 0.1);
  border-color: rgba(199, 122, 34, 0.25);
  color: var(--warn);
}

.status-pill.waiting {
  background: var(--accent-soft);
  border-color: rgba(66, 180, 204, 0.28);
  color: var(--accent-ink);
}

.page-head > div:first-child {
  display: block;
}

.page-head {
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  padding: 0;
}

h1,
h2,
h3,
.kpi-value,
.crm-action-metric strong,
.crm-quality-item strong,
.ops-metric strong,
.abc-card strong {
  font-family: var(--font-title);
  letter-spacing: 0;
}

h1 {
  color: var(--ink);
  font-size: 30px;
  font-weight: 800;
  line-height: 1.15;
}

h2,
h3 {
  font-weight: 800;
  line-height: 1.18;
}

.lead {
  display: block;
  max-width: 68ch;
  margin-top: 7px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.grid {
  gap: 12px;
}

.grid.kpis {
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

.grid.two {
  grid-template-columns: minmax(0, 1.18fr) minmax(320px, 0.82fr);
}

.card,
.route-link,
.nav-group,
.empty,
.crm-profile-field,
.crm-mini-item,
.crm-action-metric,
.crm-quality-item,
.ops-metric,
.status-tab,
.compras-list-card,
.seo-output-card,
.history-item,
.sync-detail,
.kanban-column,
.kanban-card,
.abc-card {
  border-radius: var(--radius);
}

.card {
  padding: 18px;
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-xs);
}

.card::before {
  display: none;
}

.card:hover,
.route-link:hover {
  border-color: rgba(66, 180, 204, 0.26);
}

.workflow-strip {
  gap: 12px;
}

.route-link {
  background: var(--panel);
  border-color: var(--line);
  box-shadow: var(--shadow-xs);
}

.route-link {
  min-height: 78px;
}

.kpi-label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.kpi-value {
  margin-top: 8px;
  color: var(--ink);
  font-size: 30px;
  font-weight: 800;
  line-height: 1.08;
}

.kpi-sub,
.helper-copy,
.spark-empty {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.row {
  gap: 8px;
}

.btn,
.kanban-action {
  min-height: 38px;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-weight: 800;
  letter-spacing: 0;
  white-space: nowrap;
}

.btn {
  padding: 10px 14px;
  background: #167f98;
  color: #ffffff;
  box-shadow: none;
}

.btn:hover {
  transform: none;
  opacity: 0.92;
  box-shadow: none;
}

.btn.secondary,
.btn.ghost {
  color: var(--ink-soft);
  background: var(--panel-soft);
  border: 1px solid var(--line);
}

.btn.danger {
  background: rgba(196, 73, 73, 0.1);
  border: 1px solid rgba(196, 73, 73, 0.2);
  color: var(--bad);
}

.pill,
.tag {
  min-height: 30px;
  padding: 6px 10px;
  border-color: var(--line);
  background: var(--panel-soft);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
}

.tag.ok {
  background: rgba(22, 132, 97, 0.1);
  border-color: rgba(22, 132, 97, 0.22);
  color: var(--ok);
}

.tag.warn {
  background: rgba(199, 122, 34, 0.11);
  border-color: rgba(199, 122, 34, 0.24);
  color: var(--warn);
}

.tag.bad {
  background: rgba(196, 73, 73, 0.1);
  border-color: rgba(196, 73, 73, 0.22);
  color: var(--bad);
}

input,
select,
textarea {
  min-height: 40px;
  padding: 10px 11px;
  color: var(--ink);
  background: var(--panel);
  border-color: var(--line);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 13px;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(66, 180, 204, 0.48);
  box-shadow: 0 0 0 3px rgba(66, 180, 204, 0.12);
}

label {
  font-size: 11px;
  font-weight: 800;
}

.table {
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
}

.table th,
.table td {
  padding: 11px 12px;
  border-bottom: 1px solid rgba(18, 31, 35, 0.075);
}

.table th {
  background: #f3f7f8;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.table tbody tr:hover {
  background: rgba(66, 180, 204, 0.045);
}

.empty {
  background: var(--panel-soft);
  border-color: rgba(66, 180, 204, 0.22);
}

.progress {
  height: 10px;
  background: #e6eef1;
  border-color: rgba(18, 31, 35, 0.08);
}

.progress-fill,
.trend-bar-fill {
  background: linear-gradient(180deg, var(--accent), var(--accent-deep));
}

.spark {
  color: var(--accent-deep);
}

.bars {
  color: var(--ok);
}

.crm-profile-field,
.crm-action-metric,
.crm-quality-item,
.ops-metric,
.sync-detail,
.abc-card,
.kanban-column {
  background: var(--panel-soft);
  border-color: var(--line);
}

.crm-mini-item,
.kanban-card,
.history-item {
  background: var(--panel);
  border-color: var(--line);
  box-shadow: none;
}

.crm-action-metric strong,
.crm-quality-item strong,
.ops-metric strong,
.sync-detail strong,
.abc-card strong,
.priority-rank {
  overflow-wrap: anywhere;
}

.ops-metric strong {
  font-size: 23px;
  line-height: 1.1;
}

.kanban-card {
  min-height: 88px;
}

.kanban-action {
  min-height: 30px;
  padding: 6px 9px;
  background: rgba(66, 180, 204, 0.1);
  border-color: rgba(66, 180, 204, 0.22);
  color: var(--accent-ink);
}

.kanban-action.primary {
  background: rgba(22, 132, 97, 0.1);
  border-color: rgba(22, 132, 97, 0.22);
  color: var(--ok);
}

.task-check {
  width: 28px;
  height: 28px;
  border-radius: 999px;
}

.filter-bar,
.toolbar-card,
body[data-page="tarefas"] .page-head .row,
body[data-page="produtos"] .page-head .row {
  padding: 12px;
  background: var(--panel);
  border-color: var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-xs);
}

.inline-actions-menu {
  border-radius: var(--radius);
  background: #ffffff;
}

@media (max-width: 1100px) {
  .app {
    grid-template-columns: 248px minmax(0, 1fr);
  }

  .grid.two {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .app {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: relative;
    height: auto;
    padding: 12px;
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .brand {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .brand .subtitle,
  .sidebar-foot,
  .nav-group-title,
  .sidebar .badge {
    display: none;
  }

  .nav {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    max-width: 100%;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .nav-group {
    display: flex;
    flex: 0 0 auto;
    gap: 8px;
    padding: 0;
  }

  .nav a {
    min-height: 36px;
    padding: 9px 11px;
    white-space: nowrap;
  }

  .content {
    padding: 14px 12px 36px;
  }

  .topbar {
    position: relative;
    top: 0;
    grid-template-columns: 1fr;
  }

  .topbar-right {
    justify-content: flex-start;
  }

  .page-head {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (max-width: 520px) {
  h1 {
    font-size: 26px;
  }

  .topbar-right,
  .topbar-metric,
  .status-pill,
  .page-head .row,
  .page-head select,
  .page-head .btn,
  .btn {
    width: 100%;
  }

  .topbar-metric strong,
  .status-pill,
  .btn {
    white-space: normal;
  }
}

/* Website-style header layout */
.app {
  display: block;
}

.sidebar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  width: 100%;
  height: auto;
  min-height: 74px;
  padding: 10px 24px;
  overflow: visible;
  background: rgba(255, 255, 255, 0.94);
  border-right: 0;
  border-bottom: 1px solid var(--line);
  box-shadow: 0 10px 28px rgba(16, 23, 25, 0.07);
  backdrop-filter: blur(16px);
}

.brand {
  flex-direction: row;
  align-items: center;
  gap: 10px;
  min-width: 220px;
  padding: 0;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-radius: 0;
}

.brand::after {
  display: none;
}

.brand-logo {
  width: 42px;
  height: 42px;
  border-color: rgba(66, 180, 204, 0.24);
}

.brand .kicker {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.1;
  text-transform: uppercase;
}

.brand .title {
  color: var(--ink);
  font-size: 17px;
}

.brand .subtitle {
  display: none;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.nav::-webkit-scrollbar {
  display: none;
}

.nav-group {
  display: contents;
}

.nav-group-title,
.nav a .badge {
  display: none;
}

.nav a {
  flex: 0 0 auto;
  justify-content: center;
  min-height: 40px;
  padding: 9px 13px;
  color: var(--ink-soft);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.nav a::before {
  display: none;
}

.nav a:hover {
  color: var(--accent-ink);
  background: var(--accent-mist);
  border-color: rgba(66, 180, 204, 0.18);
}

.nav a.active {
  color: #ffffff;
  background: #167f98;
  border-color: #167f98;
}

.sidebar-foot {
  justify-self: end;
  margin-top: 0;
  padding: 9px 12px;
  color: var(--ink-soft);
  background: var(--panel-soft);
  border-color: var(--line);
  border-radius: 999px;
  font-size: 12px;
  line-height: 1.2;
  white-space: nowrap;
}

.sidebar-foot strong {
  display: none;
}

.content {
  padding: 20px 24px 48px;
}

.topbar {
  position: relative;
  top: 0;
}

@media (max-width: 1120px) {
  .sidebar {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .sidebar-foot {
    display: none;
  }
}

@media (max-width: 1320px) {
  .sidebar {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .sidebar-foot {
    display: none;
  }
}

@media (max-width: 820px) {
  .sidebar {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    min-height: 0;
    padding: 10px 12px;
  }

  .brand {
    min-width: 0;
    width: 100%;
  }

  .nav {
    justify-content: flex-start;
    max-width: 100%;
  }

  .nav-group {
    display: contents;
  }

  .nav a {
    min-height: 36px;
    padding: 8px 11px;
  }

  .content {
    padding: 14px 12px 36px;
  }
}

/* Finora-inspired premium web shell */
:root {
  --bg: #f2f6f5;
  --panel-soft: #f7fbfa;
  --ink: #111b1d;
  --ink-soft: #263a3e;
  --muted: #667a7e;
  --line: rgba(17, 27, 29, 0.1);
  --accent: #3ec7d6;
  --accent-deep: #148497;
  --accent-ink: #0d6370;
  --accent-soft: rgba(62, 199, 214, 0.14);
  --accent-mist: rgba(62, 199, 214, 0.08);
  --ok: #1a8f62;
  --warn: #ce8a2c;
  --bad: #c95355;
  --nav-bg: #081111;
  --nav-panel: rgba(255, 255, 255, 0.075);
  --nav-line: rgba(255, 255, 255, 0.13);
  --nav-ink: #f5fffd;
  --nav-muted: rgba(245, 255, 253, 0.64);
}

body {
  background-color: var(--bg);
  background-image:
    radial-gradient(680px 320px at 12% 0%, rgba(62, 199, 214, 0.24), transparent 68%),
    radial-gradient(620px 300px at 86% 4%, rgba(26, 143, 98, 0.2), transparent 66%),
    linear-gradient(180deg, #071111 0 338px, var(--bg) 338px 100%),
    linear-gradient(rgba(17, 27, 29, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(17, 27, 29, 0.035) 1px, transparent 1px);
  background-size: auto, auto, auto, 44px 44px, 44px 44px;
}

.sidebar {
  min-height: 78px;
  padding: 12px 28px;
  background: rgba(8, 17, 17, 0.9);
  border-bottom: 1px solid var(--nav-line);
  box-shadow: none;
}

.brand {
  min-width: 232px;
  color: var(--nav-ink);
}

.brand-logo {
  background: #ffffff;
  border-color: rgba(62, 199, 214, 0.32);
}

.brand .kicker {
  color: var(--nav-muted);
}

.brand .title {
  color: var(--nav-ink);
}

.nav {
  gap: 8px;
  overflow-x: visible;
}

.nav a {
  min-height: 42px;
  padding: 10px 15px;
  color: rgba(245, 255, 253, 0.76);
  background: rgba(255, 255, 255, 0.045);
  border-color: rgba(255, 255, 255, 0.08);
}

.nav a:hover {
  color: #ffffff;
  background: rgba(62, 199, 214, 0.11);
  border-color: rgba(62, 199, 214, 0.28);
}

.nav a.active {
  color: #061010;
  background: linear-gradient(180deg, #8eeadf, #3ec7d6);
  border-color: rgba(142, 234, 223, 0.8);
  box-shadow: 0 12px 24px rgba(62, 199, 214, 0.2);
}

.sidebar-foot {
  color: rgba(245, 255, 253, 0.76);
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--nav-line);
}

.content {
  padding-top: 24px;
}

.topbar {
  min-height: 138px;
  padding: 24px;
  color: var(--nav-ink);
  background:
    linear-gradient(135deg, rgba(62, 199, 214, 0.18), transparent 38%),
    linear-gradient(150deg, #0d1a1b 0%, #101f20 55%, #0b1313 100%);
  border-color: rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  box-shadow: 0 28px 72px rgba(5, 12, 12, 0.28);
}

.topbar::after {
  content: "";
  position: absolute;
  inset: auto 24px 0 24px;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--ok), var(--warn));
}

.topbar-logo {
  width: 48px;
  height: 48px;
  border-color: rgba(255, 255, 255, 0.22);
}

.topbar-kicker {
  color: rgba(245, 255, 253, 0.62);
}

.topbar-title {
  color: #ffffff;
  font-size: 28px;
}

.topbar-sub {
  color: rgba(245, 255, 253, 0.68);
}

.topbar-metric,
.status-pill {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.12);
}

.topbar-metric span {
  color: rgba(245, 255, 253, 0.58);
}

.topbar-metric strong,
.status-pill {
  color: rgba(245, 255, 253, 0.9);
}

.status-pill.online {
  background: rgba(26, 143, 98, 0.16);
  border-color: rgba(94, 220, 165, 0.26);
  color: #9ff0ca;
}

.status-pill.stale,
.status-pill.waiting {
  background: rgba(62, 199, 214, 0.14);
  border-color: rgba(62, 199, 214, 0.26);
  color: #a9eef6;
}

.page-head {
  margin-top: 2px;
}

.page-head h1 {
  font-size: 28px;
}

.card,
.route-link,
.crm-mini-item,
.kanban-card,
.history-item {
  box-shadow: 0 14px 34px rgba(17, 27, 29, 0.07);
}

.card {
  border-color: rgba(17, 27, 29, 0.08);
}

.card:hover,
.route-link:hover {
  border-color: rgba(62, 199, 214, 0.34);
}

.btn {
  background: linear-gradient(180deg, #13798b, #0a5261);
}

.btn.secondary,
.btn.ghost {
  background: #ffffff;
}

@media (max-width: 820px) {
  body {
    background-image:
      radial-gradient(520px 260px at 12% 0%, rgba(62, 199, 214, 0.22), transparent 68%),
      linear-gradient(180deg, #071111 0 304px, var(--bg) 304px 100%);
  }

  .sidebar {
    padding: 10px 12px;
  }

  .brand {
    min-width: 0;
  }

  .nav {
    overflow-x: auto;
  }

  .nav a {
    min-height: 36px;
    padding: 8px 12px;
  }

  .topbar {
    min-height: 0;
    padding: 18px;
  }

  .topbar-title {
    font-size: 24px;
  }
}

/* Typography and accessibility guardrails */
:root {
  --font-body: "Montserrat", Arial, Helvetica, sans-serif;
  --font-title: "Anton", Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  --ink: #10191b;
  --ink-soft: #263b40;
  --muted: #50646a;
  --on-dark: #f8fffd;
  --on-dark-muted: #cfe1e2;
  --on-dark-soft: #e6f3f3;
  --on-accent: #041b1f;
  --ok: #0f7352;
  --warn: #96570f;
  --bad: #a94043;
}

body,
button,
input,
select,
textarea {
  font-family: var(--font-body);
}

h1,
h2,
h3,
.brand .title,
.topbar-title,
.kpi-value,
.crm-action-metric strong,
.crm-quality-item strong,
.ops-metric strong,
.abc-card strong,
.sync-detail strong {
  font-family: var(--font-title);
  font-weight: 400;
  letter-spacing: 0;
}

.sidebar,
.topbar {
  color: var(--on-dark);
}

.brand .title,
.topbar-title {
  color: #ffffff;
}

.brand .kicker,
.topbar-kicker,
.topbar-sub,
.sidebar-foot,
.nav a,
.topbar-metric span {
  color: var(--on-dark-muted);
}

.nav a {
  background: rgba(255, 255, 255, 0.075);
  border-color: rgba(255, 255, 255, 0.16);
}

.nav a:hover {
  color: #ffffff;
  background: rgba(62, 199, 214, 0.18);
  border-color: rgba(142, 234, 223, 0.42);
}

.nav a.active {
  color: var(--on-accent);
}

.sidebar-foot,
.topbar-metric,
.status-pill {
  color: var(--on-dark-soft);
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

.topbar-metric strong,
.status-pill {
  color: #ffffff;
}

.status-pill.online {
  color: #c9f7de;
}

.status-pill.stale,
.status-pill.waiting {
  color: #c9f7ff;
}

.card,
.route-link,
.page-head,
.table,
.empty,
input,
select,
textarea {
  color: var(--ink);
}

.lead,
.kpi-sub,
.helper-copy,
.spark-empty,
.route-link span,
.kanban-card-meta,
.kanban-card-note,
.collection-note,
.pill,
.tag {
  color: var(--muted);
}

.tag.ok {
  color: var(--ok);
}

.tag.warn {
  color: var(--warn);
}

.tag.bad {
  color: var(--bad);
}

.btn {
  color: #ffffff;
}

.btn.secondary,
.btn.ghost {
  color: var(--ink-soft);
}

/* Horizon UI inspired dashboard shell */
:root {
  --bg: #f4f7fe;
  --panel: #ffffff;
  --panel-soft: #f8faff;
  --ink: #1b255a;
  --ink-soft: #2b3674;
  --muted: #8f9bba;
  --muted-strong: #707eae;
  --line: rgba(163, 174, 208, 0.24);
  --line-strong: rgba(163, 174, 208, 0.42);
  --accent: #4318ff;
  --accent-deep: #3311db;
  --accent-ink: #2d16a8;
  --accent-soft: rgba(67, 24, 255, 0.1);
  --accent-mist: rgba(67, 24, 255, 0.06);
  --ok: #05a66b;
  --warn: #d97706;
  --bad: #d84343;
  --shadow: 0 18px 45px rgba(112, 126, 174, 0.16);
  --shadow-sm: 0 10px 28px rgba(112, 126, 174, 0.12);
  --shadow-xs: 0 6px 18px rgba(112, 126, 174, 0.1);
  --radius: 8px;
  --radius-sm: 6px;
  --font-body: "DM Sans", "Inter", Arial, Helvetica, sans-serif;
  --font-title: "DM Sans", "Inter", Arial, Helvetica, sans-serif;
}

html {
  background: var(--bg);
}

body {
  min-height: 100vh;
  color: var(--ink);
  background: var(--bg);
  background-image: none;
  font-family: var(--font-body);
}

body,
button,
input,
select,
textarea {
  font-family: var(--font-body);
}

.app {
  display: grid;
  grid-template-columns: 284px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: block;
  width: auto;
  height: 100vh;
  min-height: 100vh;
  padding: 22px 18px;
  overflow-y: auto;
  color: var(--ink);
  background: var(--panel);
  border-right: 1px solid var(--line);
  border-bottom: 0;
  box-shadow: 14px 0 44px rgba(112, 126, 174, 0.1);
  backdrop-filter: none;
  scrollbar-width: thin;
  scrollbar-color: rgba(112, 126, 174, 0.34) transparent;
}

.brand {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 4px 4px 18px;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  box-shadow: none;
}

.brand::after {
  display: none;
}

.brand-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo {
  width: 44px;
  height: 44px;
  padding: 4px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-xs);
}

.brand .kicker {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.2;
  text-transform: uppercase;
}

.brand .title {
  color: var(--ink);
  font-family: var(--font-title);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.15;
}

.brand .subtitle {
  display: block;
  max-width: none;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.nav {
  display: grid;
  gap: 18px;
  margin-top: 18px;
  overflow: visible;
}

.nav-group {
  display: grid;
  gap: 6px;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.nav-group-title {
  display: block;
  margin: 0 8px 2px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.nav a {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 44px;
  padding: 10px 10px 10px 12px;
  color: var(--muted-strong);
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0;
  text-decoration: none;
  transition: background 140ms ease, border-color 140ms ease, color 140ms ease;
}

.nav a::before {
  display: none;
}

.nav-link-main {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.nav-icon {
  display: inline-grid;
  width: 22px;
  height: 22px;
  place-items: center;
  color: currentColor;
  flex: 0 0 auto;
}

.nav-icon svg {
  display: block;
  width: 19px;
  height: 19px;
}

.nav a:hover {
  color: var(--ink-soft);
  background: var(--panel-soft);
  border-color: var(--line);
  transform: none;
}

.nav a.active {
  color: var(--ink-soft);
  background: var(--accent-mist);
  border-color: rgba(67, 24, 255, 0.16);
  box-shadow: none;
}

.nav a.active .nav-icon {
  color: var(--accent);
}

.badge {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  padding: 4px 8px;
  color: var(--muted);
  background: var(--panel-soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1;
}

.sidebar-foot {
  margin-top: 18px;
  padding: 12px;
  color: var(--muted);
  background: var(--panel-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 12px;
  line-height: 1.45;
  white-space: normal;
}

.sidebar-foot strong {
  display: block;
  color: var(--ink-soft);
  font-size: 13px;
  margin-bottom: 3px;
}

.content {
  min-width: 0;
  padding: 24px 32px 56px;
}

.page,
.topbar {
  max-width: 1420px;
}

.topbar {
  position: sticky;
  top: 16px;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  min-height: 72px;
  margin: 0 auto 22px;
  padding: 12px 14px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(14px);
}

.topbar::after {
  display: none;
}

.topbar-left {
  min-width: 0;
}

.topbar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.topbar-logo {
  width: 42px;
  height: 42px;
  padding: 4px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-xs);
}

.topbar-kicker {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
  text-transform: uppercase;
}

.topbar-title {
  color: var(--ink);
  font-family: var(--font-title);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.2;
}

.topbar-sub {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.topbar-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
}

.topbar-metric,
.status-pill {
  color: var(--muted-strong);
  background: var(--panel-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.topbar-metric {
  display: grid;
  gap: 2px;
  padding: 8px 10px;
}

.topbar-metric span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.topbar-metric strong {
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.status-pill {
  min-height: 36px;
  padding: 8px 11px;
  color: var(--muted-strong);
  font-size: 12px;
  font-weight: 800;
}

.status-pill.online {
  color: var(--ok);
  background: rgba(5, 166, 107, 0.1);
  border-color: rgba(5, 166, 107, 0.22);
}

.status-pill.stale {
  color: var(--warn);
  background: rgba(217, 119, 6, 0.1);
  border-color: rgba(217, 119, 6, 0.22);
}

.status-pill.waiting,
.status-pill.unknown {
  color: var(--accent-ink);
  background: var(--accent-soft);
  border-color: rgba(67, 24, 255, 0.18);
}

.page-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  padding: 0 2px;
}

.page-head > div:first-child {
  display: block;
}

h1,
h2,
h3,
.kpi-value,
.crm-action-metric strong,
.crm-quality-item strong,
.ops-metric strong,
.abc-card strong,
.sync-detail strong {
  color: var(--ink);
  font-family: var(--font-title);
  font-weight: 800;
  letter-spacing: 0;
}

h1 {
  font-size: 30px;
  line-height: 1.16;
}

h2,
h3 {
  line-height: 1.2;
}

.lead {
  display: block;
  max-width: 72ch;
  margin-top: 7px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.grid {
  gap: 14px;
}

.grid.kpis {
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

.grid.two {
  grid-template-columns: minmax(0, 1.18fr) minmax(320px, 0.82fr);
}

.card,
.route-link,
.empty,
.crm-profile-field,
.crm-mini-item,
.crm-action-metric,
.crm-quality-item,
.ops-metric,
.status-tab,
.compras-list-card,
.seo-output-card,
.history-item,
.sync-detail,
.kanban-column,
.kanban-card,
.abc-card {
  border-radius: var(--radius);
}

.card {
  padding: 18px;
  overflow: hidden;
  color: var(--ink);
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.78);
  box-shadow: var(--shadow-xs);
}

.card::before {
  display: none;
}

.card:hover,
.route-link:hover {
  border-color: rgba(67, 24, 255, 0.18);
}

.workflow-strip {
  gap: 14px;
}

.route-link {
  color: var(--ink);
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.78);
  box-shadow: var(--shadow-xs);
}

.route-link {
  min-height: 78px;
  padding: 14px;
}

.route-link span,
.kpi-sub,
.helper-copy,
.spark-empty,
.collection-note,
.kanban-card-meta,
.kanban-card-note {
  color: var(--muted);
}

.kpi-label,
label,
.table th,
.sync-detail span,
.crm-action-metric span,
.crm-quality-item span,
.ops-metric span,
.decision-product-meta span,
.decision-product-grid span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.kpi-value {
  margin-top: 8px;
  color: var(--ink);
  font-size: 30px;
  line-height: 1.08;
}

.row {
  gap: 8px;
}

.btn,
.kanban-action {
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-weight: 800;
  letter-spacing: 0;
  white-space: nowrap;
}

.btn {
  min-height: 40px;
  padding: 10px 14px;
  color: #ffffff;
  background: var(--accent);
  border: 1px solid var(--accent);
  box-shadow: 0 10px 20px rgba(67, 24, 255, 0.18);
  transition: opacity 140ms ease, border-color 140ms ease, background 140ms ease;
}

.btn:hover {
  opacity: 0.92;
  transform: none;
  box-shadow: 0 10px 20px rgba(67, 24, 255, 0.18);
}

.btn.secondary,
.btn.ghost {
  color: var(--ink-soft);
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: none;
}

.btn.danger {
  color: var(--bad);
  background: rgba(216, 67, 67, 0.1);
  border: 1px solid rgba(216, 67, 67, 0.2);
  box-shadow: none;
}

.btn.small {
  min-height: 34px;
  padding: 8px 10px;
  font-size: 12px;
}

.pill,
.tag {
  min-height: 30px;
  padding: 6px 10px;
  color: var(--muted-strong);
  background: var(--panel-soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
}

.tag.ok {
  color: var(--ok);
  background: rgba(5, 166, 107, 0.1);
  border-color: rgba(5, 166, 107, 0.22);
}

.tag.warn {
  color: var(--warn);
  background: rgba(217, 119, 6, 0.1);
  border-color: rgba(217, 119, 6, 0.22);
}

.tag.bad {
  color: var(--bad);
  background: rgba(216, 67, 67, 0.1);
  border-color: rgba(216, 67, 67, 0.22);
}

input,
select,
textarea {
  min-height: 40px;
  padding: 10px 11px;
  color: var(--ink);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 13px;
}

input:focus,
select:focus,
textarea:focus {
  background: #ffffff;
  border-color: rgba(67, 24, 255, 0.42);
  box-shadow: 0 0 0 3px rgba(67, 24, 255, 0.1);
}

.table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  color: var(--ink);
  font-size: 13px;
}

.table th,
.table td {
  padding: 11px 12px;
  border-bottom: 1px solid rgba(163, 174, 208, 0.18);
}

.table th {
  background: var(--panel-soft);
}

.table tbody tr {
  transition: background 140ms ease;
}

.table tbody tr:hover {
  background: var(--accent-mist);
}

.empty {
  color: var(--muted-strong);
  background: var(--panel-soft);
  border: 1px dashed var(--line-strong);
}

.progress {
  height: 10px;
  background: #e9edf8;
  border: 1px solid var(--line);
}

.progress-fill,
.trend-bar-fill {
  background: linear-gradient(90deg, var(--accent), #0ea5e9);
}

.spark {
  color: var(--accent);
}

.bars {
  color: var(--ok);
}

.crm-profile-field,
.crm-action-metric,
.crm-quality-item,
.ops-metric,
.sync-detail,
.abc-card,
.kanban-column {
  background: var(--panel-soft);
  border: 1px solid var(--line);
}

.crm-mini-item,
.kanban-card,
.history-item {
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: none;
}

.kanban-column {
  min-height: 190px;
}

.kanban-card {
  min-height: 88px;
}

.kanban-action {
  min-height: 30px;
  padding: 6px 9px;
  color: var(--accent-ink);
  background: var(--accent-soft);
  border: 1px solid rgba(67, 24, 255, 0.18);
  box-shadow: none;
}

.kanban-action.primary,
.purchase-actions .action-need {
  color: var(--ok);
  background: rgba(5, 166, 107, 0.1);
  border-color: rgba(5, 166, 107, 0.22);
}

.purchase-actions .action-skip {
  color: var(--muted-strong);
  background: var(--panel-soft);
  border-color: var(--line);
}

.purchase-actions .action-keep {
  color: var(--accent-ink);
  background: var(--accent-soft);
  border-color: rgba(67, 24, 255, 0.18);
}

.task-check {
  width: 28px;
  height: 28px;
  color: var(--ok);
  background: #ffffff;
  border: 1px solid rgba(5, 166, 107, 0.24);
}

.task-check.is-checked {
  color: #ffffff;
  background: var(--ok);
}

.filter-bar,
.toolbar-card,
body[data-page="tarefas"] .page-head .row,
body[data-page="produtos"] .page-head .row {
  padding: 12px;
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: var(--radius);
  box-shadow: var(--shadow-xs);
}

.inline-actions-menu {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

@media (max-width: 1180px) {
  .app {
    grid-template-columns: 248px minmax(0, 1fr);
  }

  .content {
    padding: 20px 20px 48px;
  }

  .grid.two {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .app {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: sticky;
    height: auto;
    min-height: 0;
    padding: 14px 12px;
    overflow: visible;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-xs);
  }

  .brand {
    padding-bottom: 12px;
  }

  .brand .subtitle,
  .sidebar-foot,
  .nav-group-title,
  .sidebar .badge {
    display: none;
  }

  .nav {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    max-width: 100%;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
  }

  .nav::-webkit-scrollbar {
    display: none;
  }

  .nav-group {
    display: contents;
  }

  .nav a {
    flex: 0 0 auto;
    min-height: 38px;
    padding: 8px 11px;
    white-space: nowrap;
  }

  .nav-icon {
    width: 20px;
    height: 20px;
  }

  .content {
    padding: 16px 12px 38px;
  }

  .topbar {
    position: relative;
    top: 0;
    grid-template-columns: 1fr;
  }

  .topbar-right {
    justify-content: flex-start;
    flex-wrap: wrap;
    width: 100%;
  }

  .page-head {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (max-width: 560px) {
  h1 {
    font-size: 25px;
  }

  .topbar {
    padding: 12px;
  }

  .topbar-brand {
    align-items: flex-start;
  }

  .topbar-logo {
    width: 38px;
    height: 38px;
  }

  .topbar-title {
    font-size: 20px;
  }

  .topbar-metric,
  .status-pill,
  .page-head .row,
  .page-head select,
  .page-head .btn,
  .btn {
    width: 100%;
  }

  .topbar-metric strong,
  .status-pill,
  .btn {
    white-space: normal;
  }
}

/* Keep the page title in the topbar only. */
.page-head > div:first-child {
  display: none;
}

.page-head {
  justify-content: flex-end;
}

@media (max-width: 900px) {
  .page-head {
    align-items: stretch;
  }
}

.dashboard-chart-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  gap: 12px;
  margin-top: 12px;
}

.dashboard-chart-grid.equal {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.chart-panel {
  min-width: 0;
  padding: 12px;
  background: var(--panel-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.chart-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.chart-title {
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.25;
}

.chart-subtitle {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.chart-canvas {
  min-height: 236px;
}

.chart-canvas.compact {
  min-height: 210px;
}

.reserve-kpi-sub + .kpi-sub {
  display: none;
}

body[data-page="financeiro"] .grid.kpis article:nth-child(4) .reserve-kpi-sub {
  font-size: 11px;
}

body[data-page="financeiro"] .grid.kpis article:nth-child(4) .reserve-kpi-sub::before {
  content: none;
}

.chart-empty {
  min-height: 180px;
  display: grid;
  place-items: center;
}

.apexcharts-tooltip,
.apexcharts-tooltip-title {
  border-color: rgba(163, 174, 208, 0.28) !important;
  box-shadow: var(--shadow-xs) !important;
}

.apexcharts-legend-text,
.apexcharts-xaxis-label,
.apexcharts-yaxis-label {
  font-family: var(--font-body) !important;
}

@media (max-width: 980px) {
  .dashboard-chart-grid,
  .dashboard-chart-grid.equal {
    grid-template-columns: 1fr;
  }
}

/* Purchase workflow polish */
body[data-page="compras"] .content {
  background:
    linear-gradient(180deg, rgba(247, 250, 255, 0.94), rgba(245, 248, 250, 0.98)),
    var(--bg);
}

body[data-page="compras"] .topbar {
  border-color: rgba(73, 182, 211, 0.16);
  box-shadow: 0 18px 40px rgba(9, 22, 29, 0.06);
}

body[data-page="compras"] .page {
  gap: 14px;
}

body[data-page="compras"] .page-head {
  margin: 10px 0 6px;
}

body[data-page="compras"] .page-head .row {
  justify-content: flex-end;
}

body[data-page="compras"] .page-head .btn {
  min-height: 40px;
  padding: 10px 16px;
  border-radius: 10px;
}

body[data-page="compras"] .purchase-capture {
  grid-template-columns: minmax(230px, 0.62fr) minmax(0, 1.38fr);
  align-items: center;
  gap: 18px;
  padding: 18px;
  border-radius: 14px;
  border-color: rgba(73, 182, 211, 0.24);
  background:
    linear-gradient(90deg, rgba(73, 182, 211, 0.1), transparent 42%),
    #ffffff;
  box-shadow: 0 16px 38px rgba(9, 22, 29, 0.06);
}

body[data-page="compras"] .purchase-capture > div:first-child {
  display: grid;
  align-content: center;
  min-height: 88px;
  padding-left: 2px;
}

body[data-page="compras"] .purchase-capture-title {
  font-size: 21px;
  line-height: 1.1;
}

body[data-page="compras"] .purchase-capture .helper-copy {
  max-width: 40ch;
}

body[data-page="compras"] .purchase-capture-form {
  grid-template-columns: minmax(220px, 1fr) minmax(72px, 92px) minmax(156px, 190px) minmax(104px, auto);
  align-items: end;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(9, 22, 29, 0.08);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.88);
}

body[data-page="compras"] .purchase-capture-form .btn {
  min-height: 40px;
  border-radius: 10px;
  box-shadow: 0 12px 24px rgba(67, 24, 255, 0.22);
}

body[data-page="compras"] .field label {
  margin-bottom: 6px;
  color: #8090b8;
  font-size: 10px;
  letter-spacing: 0.08em;
}

body[data-page="compras"] input,
body[data-page="compras"] select {
  border-radius: 10px;
  border-color: rgba(9, 22, 29, 0.1);
  min-height: 40px;
}

body[data-page="compras"] .purchase-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  overflow: hidden;
  border: 1px solid rgba(9, 22, 29, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 16px 36px rgba(9, 22, 29, 0.05);
}

body[data-page="compras"] .purchase-kpis article {
  min-width: 0;
  padding: 16px 18px;
  border-right: 1px solid rgba(9, 22, 29, 0.08);
}

body[data-page="compras"] .purchase-kpis article:last-child {
  border-right: 0;
}

body[data-page="compras"] .purchase-kpis .kpi-value {
  margin-top: 6px;
  color: #101d4d;
  font-size: 31px;
}

body[data-page="compras"] .purchase-kpis .kpi-sub {
  min-height: 30px;
  line-height: 1.35;
}

body[data-page="compras"] .compras-list-card {
  padding: 16px 18px 18px;
  border-radius: 14px;
  border-color: rgba(9, 22, 29, 0.08);
  box-shadow: 0 18px 42px rgba(9, 22, 29, 0.06);
}

body[data-page="compras"] .purchase-toolbar {
  grid-template-columns: minmax(112px, 0.78fr) minmax(124px, 0.86fr) minmax(148px, 1fr) minmax(136px, 0.96fr) minmax(172px, 1.35fr) auto;
  gap: 10px;
  align-items: end;
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(9, 22, 29, 0.08);
}

body[data-page="compras"] .purchase-toolbar .field {
  min-width: 0;
}

body[data-page="compras"] .purchase-toolbar .pill {
  width: 58px;
  min-height: 58px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  border: 1px solid rgba(73, 182, 211, 0.18);
  background: #f7fbff;
  color: var(--accent-ink);
  font-weight: 900;
  line-height: 1.05;
  text-align: center;
}

body[data-page="compras"] .purchase-layout {
  grid-template-columns: minmax(0, 1fr) minmax(250px, 320px);
  gap: 18px;
}

body[data-page="compras"] .purchase-section-head {
  margin-bottom: 10px;
}

body[data-page="compras"] .purchase-section-head .chart-title {
  color: #101d4d;
  font-size: 14px;
}

body[data-page="compras"] .purchase-queue {
  gap: 9px;
}

body[data-page="compras"] .purchase-item {
  gap: 11px;
  padding: 14px 16px;
  border-radius: 14px;
  border-color: rgba(9, 22, 29, 0.08);
  border-left-width: 4px;
  box-shadow: 0 10px 28px rgba(9, 22, 29, 0.05);
  transition: border-color 120ms ease, box-shadow 120ms ease, transform 120ms ease;
}

body[data-page="compras"] .purchase-item:hover {
  border-color: rgba(73, 182, 211, 0.26);
  box-shadow: 0 14px 34px rgba(9, 22, 29, 0.08);
  transform: translateY(-1px);
}

body[data-page="compras"] .purchase-item.priority-atencao {
  border-left-color: #d97706;
}

body[data-page="compras"] .purchase-item.priority-urgente {
  border-left-color: #c24141;
}

body[data-page="compras"] .purchase-item-title {
  grid-template-columns: 48px minmax(0, 1fr);
}

body[data-page="compras"] .purchase-item-title > div > div {
  margin-top: 2px;
  color: #101d4d;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.25;
}

body[data-page="compras"] .priority-rank {
  min-width: 42px;
  min-height: 34px;
  border-radius: 9px;
}

body[data-page="compras"] .purchase-metrics {
  grid-template-columns: 0.9fr 0.9fr 1fr 0.95fr 1.1fr;
}

body[data-page="compras"] .purchase-metrics div {
  padding: 9px 10px;
  border: 1px solid rgba(9, 22, 29, 0.05);
  background: #f8fafc;
}

body[data-page="compras"] .purchase-metrics strong {
  color: #101d4d;
  font-size: 13px;
}

body[data-page="compras"] .purchase-reason {
  padding: 9px 10px;
  border-radius: 10px;
  background: rgba(73, 182, 211, 0.06);
  color: #627887;
}

body[data-page="compras"] .purchase-item-actions {
  grid-template-columns: 72px repeat(3, minmax(max-content, 1fr));
  align-items: end;
  padding-top: 2px;
}

body[data-page="compras"] .purchase-item-actions .btn {
  min-width: max-content;
  min-height: 34px;
  padding: 8px 12px;
  border-radius: 999px;
  white-space: nowrap;
}

body[data-page="compras"] .purchase-item-actions input {
  width: 72px;
  min-height: 34px;
}

body[data-page="compras"] .purchase-supplier-panel {
  position: sticky;
  top: 16px;
}

body[data-page="compras"] .supplier-summary {
  gap: 9px;
}

body[data-page="compras"] .supplier-summary-row {
  padding: 13px 14px;
  border-radius: 14px;
  border-color: rgba(9, 22, 29, 0.08);
  background:
    linear-gradient(180deg, #ffffff, #fbfdff);
  box-shadow: 0 8px 22px rgba(9, 22, 29, 0.04);
}

body[data-page="compras"] .supplier-summary-row strong {
  color: #101d4d;
}

body[data-page="compras"] .purchase-details {
  border-top: 1px solid rgba(9, 22, 29, 0.08);
  padding-top: 14px;
}

@media (max-width: 1100px) {
  body[data-page="compras"] .purchase-capture,
  body[data-page="compras"] .purchase-capture-form,
  body[data-page="compras"] .purchase-layout {
    grid-template-columns: 1fr;
  }

  body[data-page="compras"] .purchase-supplier-panel {
    position: static;
  }
}

@media (max-width: 820px) {
  body[data-page="compras"] .purchase-toolbar {
    grid-template-columns: 1fr;
  }

  body[data-page="compras"] .purchase-toolbar .pill {
    width: 100%;
    min-height: 38px;
    border-radius: 10px;
  }

  body[data-page="compras"] .purchase-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body[data-page="compras"] .purchase-kpis article:nth-child(2) {
    border-right: 0;
  }

  body[data-page="compras"] .purchase-kpis article:nth-child(-n + 2) {
    border-bottom: 1px solid rgba(9, 22, 29, 0.08);
  }

  body[data-page="compras"] .purchase-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body[data-page="compras"] .purchase-metrics div:last-child {
    grid-column: 1 / -1;
  }

  body[data-page="compras"] .purchase-item-actions {
    grid-template-columns: 1fr;
  }

  body[data-page="compras"] .purchase-item-actions .btn,
  body[data-page="compras"] .purchase-item-actions input {
    width: 100%;
  }
}

body[data-page="produtos"] .product-stock-hub {
  display: grid;
  gap: 14px;
}

body[data-page="produtos"] .product-stock-hub .page-head .row {
  width: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

body[data-page="produtos"] .product-quick-alert {
  grid-template-columns: minmax(230px, 0.62fr) minmax(0, 1.38fr);
  align-items: center;
  gap: 18px;
  padding: 18px;
  border-radius: 14px;
  border-color: rgba(73, 182, 211, 0.24);
  background:
    linear-gradient(90deg, rgba(73, 182, 211, 0.1), transparent 42%),
    #ffffff;
  box-shadow: 0 16px 38px rgba(9, 22, 29, 0.06);
}

body[data-page="produtos"] .product-quick-alert > div:first-child {
  display: grid;
  align-content: center;
  min-height: 88px;
}

body[data-page="produtos"] .product-quick-alert .purchase-capture-form {
  grid-template-columns: minmax(220px, 1fr) minmax(72px, 92px) minmax(156px, 190px) minmax(104px, auto);
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(9, 22, 29, 0.08);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.88);
}

body[data-page="produtos"] .product-quick-alert .quick-results,
body[data-page="produtos"] .product-quick-alert #quickMessage {
  grid-column: 2;
}

body[data-page="produtos"] .product-abc-section,
body[data-page="produtos"] .product-action-section {
  border-color: rgba(9, 22, 29, 0.08);
  box-shadow: 0 18px 42px rgba(9, 22, 29, 0.06);
}

body[data-page="produtos"] .product-action-head {
  align-items: center;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(9, 22, 29, 0.08);
}

body[data-page="produtos"] .product-action-head .chart-title {
  margin-top: 4px;
  color: #101d4d;
  font-size: 18px;
}

body[data-page="produtos"] .product-action-head .row {
  justify-content: flex-end;
  gap: 10px;
}

body[data-page="produtos"] .product-purchase-kpis {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  overflow: hidden;
  margin-top: 14px;
  border: 1px solid rgba(9, 22, 29, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.86);
}

body[data-page="produtos"] .product-purchase-kpis article {
  min-width: 0;
  padding: 14px 16px;
  border-right: 1px solid rgba(9, 22, 29, 0.08);
}

body[data-page="produtos"] .product-purchase-kpis article:last-child {
  border-right: 0;
}

body[data-page="produtos"] .product-purchase-kpis .kpi-value {
  margin-top: 5px;
  color: #101d4d;
  font-size: 28px;
}

body[data-page="produtos"] .product-purchase-toolbar {
  grid-template-columns: minmax(130px, 170px) minmax(180px, 230px) minmax(240px, 1fr);
  gap: 10px;
  align-items: end;
  margin: 14px 0;
}

body[data-page="produtos"] .product-purchase-queue {
  gap: 8px;
}

body[data-page="produtos"] .product-purchase-item {
  gap: 9px;
  padding: 12px 14px;
  border-radius: 12px;
  border-color: rgba(9, 22, 29, 0.08);
  border-left-width: 4px;
  box-shadow: 0 8px 22px rgba(9, 22, 29, 0.04);
}

body[data-page="produtos"] .product-purchase-item.priority-atencao {
  border-left-color: #d97706;
}

body[data-page="produtos"] .product-purchase-item.priority-urgente {
  border-left-color: #c24141;
}

body[data-page="produtos"] .product-purchase-item .purchase-item-title {
  grid-template-columns: minmax(78px, auto) minmax(0, 1fr);
}

body[data-page="produtos"] .product-purchase-item .purchase-item-title > div > div {
  margin-top: 2px;
  color: #101d4d;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.25;
}

body[data-page="produtos"] .product-purchase-metrics {
  grid-template-columns: 0.76fr 0.76fr 0.92fr 1.3fr;
  gap: 7px;
}

body[data-page="produtos"] .product-purchase-metrics div {
  padding: 8px 9px;
  border: 1px solid rgba(9, 22, 29, 0.05);
  background: #f8fafc;
}

body[data-page="produtos"] .product-purchase-metrics strong {
  color: #101d4d;
  font-size: 13px;
}

body[data-page="produtos"] .product-purchase-reason {
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(73, 182, 211, 0.06);
  font-size: 12px;
}

body[data-page="produtos"] .product-purchase-actions {
  grid-template-columns: 78px minmax(150px, 210px) auto;
  align-items: end;
  gap: 8px;
}

body[data-page="produtos"] .product-purchase-actions input,
body[data-page="produtos"] .product-purchase-actions select {
  min-height: 34px;
  padding: 7px 9px;
  border-radius: 10px;
}

body[data-page="produtos"] .product-purchase-actions .btn {
  min-height: 34px;
  border-radius: 999px;
  white-space: nowrap;
}

body[data-page="produtos"] .product-purchase-details {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(9, 22, 29, 0.08);
}

body[data-page="produtos"] .product-support-grid {
  display: grid;
  grid-template-columns: minmax(220px, 300px) minmax(0, 1fr);
  gap: 14px;
  margin-top: 14px;
  align-items: start;
}

body[data-page="produtos"] .quick-result.is-ordered {
  border-color: rgba(217, 119, 6, 0.42);
  background: rgba(217, 119, 6, 0.08);
}

body[data-page="produtos"] .product-order-history-section {
  border-color: rgba(9, 22, 29, 0.08);
  box-shadow: 0 18px 42px rgba(9, 22, 29, 0.06);
}

body[data-page="produtos"] .product-order-history-section .pill {
  white-space: nowrap;
}

body[data-page="produtos"] .product-order-history-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

body[data-page="produtos"] .product-order-history-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid rgba(9, 22, 29, 0.08);
  border-left: 4px solid rgba(98, 120, 135, 0.3);
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 8px 22px rgba(9, 22, 29, 0.04);
}

body[data-page="produtos"] .product-order-history-item.is-active {
  border-left-color: #d97706;
  background: linear-gradient(90deg, rgba(217, 119, 6, 0.08), #ffffff 42%);
}

body[data-page="produtos"] .product-order-history-main {
  display: grid;
  grid-template-columns: minmax(86px, auto) minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-width: 0;
}

body[data-page="produtos"] .product-order-history-main strong,
body[data-page="produtos"] .product-order-history-main span {
  overflow-wrap: anywhere;
}

body[data-page="produtos"] .product-order-history-main div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

body[data-page="produtos"] .product-order-history-main div > span,
body[data-page="produtos"] .product-order-history-meta {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

body[data-page="produtos"] .product-order-history-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
}

body[data-page="produtos"] .product-order-history-meta .btn {
  min-height: 32px;
  padding: 7px 11px;
  border-radius: 999px;
  white-space: nowrap;
}

body[data-page="aviso-produto"] {
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(73, 182, 211, 0.08), transparent 34%),
    #f6f9fd;
}

body[data-page="aviso-produto"] .quick-alert-page {
  min-height: 100vh;
  display: grid;
  place-items: start center;
  padding: 22px;
}

body[data-page="aviso-produto"] .quick-alert-panel {
  width: min(100%, 1320px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 18px;
  padding: clamp(18px, 3vw, 30px);
  border: 1px solid rgba(9, 22, 29, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 22px 54px rgba(9, 22, 29, 0.09);
}

body[data-page="aviso-produto"] .quick-alert-panel > :not(.quick-alert-brand):not(.quick-alert-requester) {
  grid-column: 1 / -1;
}

body[data-page="aviso-produto"] .quick-alert-brand {
  grid-column: 1;
  grid-row: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

body[data-page="aviso-produto"] .quick-alert-brand img {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  border: 1px solid rgba(73, 182, 211, 0.2);
  background: #ffffff;
}

body[data-page="aviso-produto"] .quick-alert-brand div {
  display: grid;
  min-width: 0;
}

body[data-page="aviso-produto"] .quick-alert-brand span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

body[data-page="aviso-produto"] .quick-alert-brand strong {
  color: var(--ink);
  font-size: 18px;
  line-height: 1.15;
}

body[data-page="aviso-produto"] .quick-alert-panel h1 {
  margin-top: 8px;
  font-size: clamp(34px, 9vw, 58px);
}

body[data-page="aviso-produto"] .quick-alert-panel .lead {
  max-width: 46ch;
  font-size: 16px;
}

body[data-page="aviso-produto"] .quick-alert-requester {
  grid-column: 2;
  grid-row: 1;
  justify-self: end;
  display: inline-flex;
  align-items: center;
  justify-content: end;
  gap: 10px;
  max-width: min(100%, 360px);
  padding: 7px 8px 7px 12px;
  border: 1px solid rgba(73, 182, 211, 0.2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
}

body[data-page="aviso-produto"] .quick-alert-requester div {
  display: grid;
  gap: 1px;
  min-width: 0;
}

body[data-page="aviso-produto"] .quick-alert-requester span,
body[data-page="aviso-produto"] .quick-alert-list-head span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

body[data-page="aviso-produto"] .quick-alert-requester strong,
body[data-page="aviso-produto"] .quick-alert-history-head strong,
body[data-page="aviso-produto"] .quick-alert-list-head strong {
  color: var(--ink);
  line-height: 1.2;
  overflow-wrap: anywhere;
}

body[data-page="aviso-produto"] .quick-alert-requester strong {
  max-width: 18ch;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-page="aviso-produto"] .quick-alert-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(82px, 104px) auto;
  gap: 10px;
  align-items: end;
}

body[data-page="aviso-produto"] .quick-alert-product-field {
  min-width: 0;
}

body[data-page="aviso-produto"] .quick-alert-search-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  align-items: stretch;
}

body[data-page="aviso-produto"] .quick-alert-form input {
  min-height: 48px;
  font-size: 16px;
}

body[data-page="aviso-produto"] .quick-alert-form .btn,
body[data-page="aviso-produto"] .quick-alert-scan-btn {
  min-height: 48px;
  white-space: nowrap;
}

body[data-page="aviso-produto"] .btn:disabled {
  box-shadow: none;
  cursor: not-allowed;
  filter: saturate(0.65);
  opacity: 0.52;
  transform: none;
}

body[data-page="aviso-produto"] .btn:disabled:hover {
  transform: none;
}

body[data-page="aviso-produto"] .quick-alert-scan-btn {
  display: none;
  padding-inline: 14px;
}

body[data-page="aviso-produto"] .quick-alert-results {
  grid-column: 1;
}

body[data-page="aviso-produto"] .quick-result.is-ordered {
  border-color: rgba(217, 119, 6, 0.42);
  background: rgba(217, 119, 6, 0.08);
}

body[data-page="aviso-produto"] .quick-alert-history {
  display: grid;
  gap: 12px;
}

body[data-page="aviso-produto"] .quick-alert-history-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

body[data-page="aviso-produto"] .quick-alert-history-head div {
  display: grid;
  gap: 3px;
}

body[data-page="aviso-produto"] .quick-alert-history-head span {
  color: #9a5b05;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

body[data-page="aviso-produto"] .quick-alert-history-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.72fr);
  grid-template-areas:
    "open draft"
    "open bought";
  gap: 12px;
  align-items: start;
}

body[data-page="aviso-produto"] .quick-alert-list-card,
body[data-page="aviso-produto"] .quick-alert-existing-card {
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 14px;
  min-height: 0;
  border-radius: 12px;
  box-shadow: 0 12px 28px rgba(9, 22, 29, 0.05);
}

body[data-page="aviso-produto"] .quick-alert-list-card {
  grid-area: draft;
  border: 1px solid rgba(73, 182, 211, 0.22);
  background:
    linear-gradient(180deg, rgba(73, 182, 211, 0.1), rgba(255, 255, 255, 0.68) 52%),
    #f8fcff;
}

body[data-page="aviso-produto"] .quick-alert-existing-card {
  border: 1px solid rgba(217, 119, 6, 0.18);
  background:
    linear-gradient(180deg, rgba(217, 119, 6, 0.1), rgba(255, 255, 255, 0.7) 52%),
    #fffaf3;
}

body[data-page="aviso-produto"] .quick-alert-existing-card-open {
  grid-area: open;
  min-height: 420px;
}

body[data-page="aviso-produto"] .quick-alert-existing-card-bought {
  grid-area: bought;
  border-color: rgba(15, 115, 82, 0.18);
  background:
    linear-gradient(180deg, rgba(15, 115, 82, 0.1), rgba(255, 255, 255, 0.72) 52%),
    #f5fbf8;
}

body[data-page="aviso-produto"] .quick-alert-list-head,
body[data-page="aviso-produto"] .quick-alert-existing-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

body[data-page="aviso-produto"] .quick-alert-list-head div,
body[data-page="aviso-produto"] .quick-alert-existing-head div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

body[data-page="aviso-produto"] .quick-alert-existing-head span {
  color: #9a5b05;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

body[data-page="aviso-produto"] .quick-alert-list-head span {
  color: #2d8ca4;
}

body[data-page="aviso-produto"] .quick-alert-existing-head strong {
  color: var(--ink);
  line-height: 1.2;
  overflow-wrap: anywhere;
}

body[data-page="aviso-produto"] .quick-alert-existing-card-bought .quick-alert-existing-head span {
  color: #0f7352;
}

body[data-page="aviso-produto"] .quick-alert-existing-list,
body[data-page="aviso-produto"] .quick-alert-list {
  display: grid;
  gap: 8px;
}

body[data-page="aviso-produto"] .quick-alert-existing-item,
body[data-page="aviso-produto"] .quick-alert-list-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 12px;
  padding: 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.88);
}

body[data-page="aviso-produto"] .quick-alert-existing-item {
  border: 1px solid rgba(217, 119, 6, 0.16);
  border-left: 4px solid rgba(217, 119, 6, 0.5);
}

body[data-page="aviso-produto"] .quick-alert-existing-item.status-bought {
  border-color: rgba(15, 115, 82, 0.18);
  border-left-color: rgba(15, 115, 82, 0.55);
  background: rgba(15, 115, 82, 0.06);
}

body[data-page="aviso-produto"] .quick-alert-existing-item .btn,
body[data-page="aviso-produto"] .quick-alert-existing-item .pill {
  min-height: 30px;
  padding: 7px 10px;
  border-radius: 999px;
  white-space: nowrap;
}

body[data-page="aviso-produto"] .quick-alert-existing-actions .btn:first-child {
  border-color: rgba(15, 115, 82, 0.2);
  background: rgba(15, 115, 82, 0.1);
  color: #0f7352;
}

body[data-page="aviso-produto"] .quick-alert-item-main {
  display: grid;
  gap: 7px;
  min-width: 0;
}

body[data-page="aviso-produto"] .quick-alert-existing-item .quick-alert-existing-actions {
  display: grid;
  justify-items: stretch;
  gap: 6px;
}

body[data-page="aviso-produto"] .quick-alert-code {
  justify-self: start;
  padding: 4px 7px;
  border: 1px solid rgba(9, 22, 29, 0.08);
  border-radius: 8px;
  background: rgba(9, 22, 29, 0.04);
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
}

body[data-page="aviso-produto"] .quick-alert-existing-item strong,
body[data-page="aviso-produto"] .quick-alert-list-item strong {
  color: var(--ink);
  font-size: 15px;
  line-height: 1.32;
  overflow-wrap: anywhere;
}

body[data-page="aviso-produto"] .quick-alert-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

body[data-page="aviso-produto"] .quick-alert-meta {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 8px;
  border: 1px solid rgba(9, 22, 29, 0.08);
  border-radius: 8px;
  background: rgba(9, 22, 29, 0.035);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
}

body[data-page="aviso-produto"] .quick-alert-status.status-need {
  border-color: rgba(217, 119, 6, 0.24);
  background: rgba(217, 119, 6, 0.1);
  color: #8a5a11;
}

body[data-page="aviso-produto"] .quick-alert-entry-review {
  border-color: rgba(14, 116, 144, 0.24);
  background: rgba(14, 116, 144, 0.1);
  color: #0f5f75;
}

body[data-page="aviso-produto"] .quick-alert-status.status-requested {
  border-color: rgba(73, 182, 211, 0.24);
  background: rgba(73, 182, 211, 0.1);
  color: var(--accent-ink);
}

body[data-page="aviso-produto"] .quick-alert-status.status-bought {
  border-color: rgba(15, 115, 82, 0.24);
  background: rgba(15, 115, 82, 0.1);
  color: #0f7352;
}

body[data-page="aviso-produto"] .quick-alert-list-item {
  border: 1px solid rgba(9, 22, 29, 0.08);
  background: #ffffff;
}

body[data-page="aviso-produto"] .quick-alert-whatsapp {
  justify-self: start;
  text-decoration: none;
}

body[data-page="aviso-produto"] .quick-alert-notice {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid rgba(217, 119, 6, 0.28);
  border-radius: 12px;
  background: #fff7ed;
  box-shadow: 0 14px 28px rgba(9, 22, 29, 0.08);
}

body[data-page="aviso-produto"] .quick-alert-notice[hidden] {
  display: none;
}

body[data-page="aviso-produto"] .quick-alert-notice div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

body[data-page="aviso-produto"] .quick-alert-notice strong {
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
}

body[data-page="aviso-produto"] .quick-alert-notice span {
  color: #8a5a11;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}

body[data-page="aviso-produto"] .quick-alert-notice button {
  border: 0;
  background: transparent;
  color: #8a5a11;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 900;
  text-decoration: underline;
  text-underline-offset: 3px;
}

body[data-page="aviso-produto"] .quick-alert-notice.is-success {
  border-color: rgba(15, 115, 82, 0.25);
  background: #f5fbf8;
}

body[data-page="aviso-produto"] .quick-alert-notice.is-success span,
body[data-page="aviso-produto"] .quick-alert-notice.is-success button {
  color: #0f7352;
}

body[data-page="aviso-produto"] .quick-alert-notice.is-info {
  border-color: rgba(73, 182, 211, 0.26);
  background: #f8fcff;
}

body[data-page="aviso-produto"] .quick-alert-notice.is-info span,
body[data-page="aviso-produto"] .quick-alert-notice.is-info button {
  color: #2d8ca4;
}

body[data-page="aviso-produto"] #quickMessage {
  min-height: 20px;
  font-weight: 800;
}

body[data-page="aviso-produto"] .quick-alert-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(9, 22, 29, 0.34);
}

body[data-page="aviso-produto"] .quick-alert-modal[hidden] {
  display: none;
}

body[data-page="aviso-produto"] .quick-alert-modal-card {
  width: min(100%, 430px);
  padding: 20px;
  border-radius: 16px;
  border: 1px solid rgba(9, 22, 29, 0.1);
  background: #ffffff;
  box-shadow: 0 24px 60px rgba(9, 22, 29, 0.18);
}

body[data-page="aviso-produto"] .quick-alert-scanner-card {
  width: min(100%, 520px);
  display: grid;
  gap: 14px;
}

body[data-page="aviso-produto"] .quick-alert-modal-card h2 {
  margin: 8px 0 0;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 0;
}

body[data-page="aviso-produto"] .quick-alert-modal-card .lead {
  margin-top: 6px;
  font-size: 13px;
}

body[data-page="aviso-produto"] .quick-alert-scanner-frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  border: 1px solid rgba(73, 182, 211, 0.25);
  border-radius: 14px;
  background: #09161d;
}

body[data-page="aviso-produto"] .quick-alert-scanner-frame video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

body[data-page="aviso-produto"] .quick-alert-scanner-frame span {
  position: absolute;
  left: 10%;
  right: 10%;
  top: 50%;
  height: 2px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 0 0 999px rgba(9, 22, 29, 0.14);
}

body[data-page="aviso-produto"] .quick-alert-scanner-card.is-unavailable .quick-alert-scanner-frame {
  display: none;
}

/* Counter flow: build a list first, then notify Purchasing in one action. */
body[data-page="aviso-produto"] .quick-alert-simple .quick-alert-scan-btn {
  display: none;
}

body[data-page="aviso-produto"] .quick-alert-simple .quick-alert-form {
  grid-template-columns: minmax(0, 1fr) auto;
}

body[data-page="aviso-produto"] .quick-alert-selected {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  padding: 16px;
  border: 1px solid rgba(73, 182, 211, 0.4);
  border-radius: 12px;
  background: rgba(73, 182, 211, 0.08);
}

body[data-page="aviso-produto"] .quick-alert-selected[hidden] {
  display: none;
}

body[data-page="aviso-produto"] .quick-alert-draft {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(73, 182, 211, 0.22);
  border-radius: 12px;
  background: rgba(248, 252, 255, 0.86);
}

body[data-page="aviso-produto"] .quick-alert-simple .quick-alert-existing-actions {
  grid-template-columns: 1fr;
  gap: 6px;
}

body[data-page="aviso-produto"] .quick-alert-selected > div:first-child {
  display: grid;
  gap: 5px;
}

body[data-page="aviso-produto"] .quick-alert-selected strong {
  color: var(--ink);
  font-size: 20px;
}

body[data-page="aviso-produto"] .quick-alert-selected small {
  color: var(--muted);
}

body[data-page="aviso-produto"] .quick-alert-existing-side {
  display: grid;
  justify-items: end;
  gap: 8px;
}

body[data-page="aviso-produto"] .quick-alert-card-date {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

body[data-page="aviso-produto"] .quick-alert-simple-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-areas: "open bought";
}

@media (max-width: 720px) {
  body[data-page="aviso-produto"] .quick-alert-simple .quick-alert-form,
  body[data-page="aviso-produto"] .quick-alert-simple-grid {
    grid-template-columns: 1fr;
    grid-template-areas: "open" "bought";
  }

  body[data-page="aviso-produto"] .quick-alert-selected {
    align-items: stretch;
    flex-direction: column;
  }

  body[data-page="aviso-produto"] .quick-alert-existing-side {
    justify-items: stretch;
  }

  body[data-page="aviso-produto"] .quick-alert-card-date {
    text-align: left;
  }
}

@media (max-width: 767px) {
  body[data-page="aviso-produto"] .quick-alert-simple .quick-alert-scan-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
}

body[data-page="aviso-produto"] .quick-alert-employee-form {
  display: grid;
  gap: 14px;
}

body[data-page="aviso-produto"] .quick-alert-employee-form h2 {
  margin: 8px 0 0;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 0;
}

body[data-page="aviso-produto"] .quick-alert-employee-form .lead {
  margin-top: 6px;
  font-size: 13px;
}

@media (max-width: 1100px) {
  body[data-page="produtos"] .product-quick-alert,
  body[data-page="produtos"] .product-quick-alert .purchase-capture-form,
  body[data-page="produtos"] .product-support-grid {
    grid-template-columns: 1fr;
  }

  body[data-page="produtos"] .product-quick-alert .quick-results,
  body[data-page="produtos"] .product-quick-alert #quickMessage {
    grid-column: 1;
  }
}

@media (max-width: 820px) {
  body[data-page="produtos"] .product-stock-hub .page-head {
    align-items: stretch;
  }

  body[data-page="produtos"] .product-stock-hub .page-head .row,
  body[data-page="produtos"] .product-purchase-toolbar,
  body[data-page="produtos"] .product-purchase-actions {
    grid-template-columns: 1fr;
  }

  body[data-page="produtos"] .product-stock-hub .page-head .row {
    display: grid;
  }

  body[data-page="produtos"] .product-purchase-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body[data-page="produtos"] .product-purchase-kpis article:nth-child(2) {
    border-right: 0;
  }

  body[data-page="produtos"] .product-purchase-kpis article:nth-child(-n + 2) {
    border-bottom: 1px solid rgba(9, 22, 29, 0.08);
  }

  body[data-page="produtos"] .product-order-history-item,
  body[data-page="produtos"] .product-order-history-main {
    grid-template-columns: 1fr;
  }

  body[data-page="produtos"] .product-order-history-meta {
    justify-content: flex-start;
  }

  body[data-page="produtos"] .product-purchase-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body[data-page="produtos"] .product-purchase-actions .btn,
  body[data-page="produtos"] .product-purchase-actions input,
  body[data-page="produtos"] .product-purchase-actions select {
    width: 100%;
  }

  body[data-page="aviso-produto"] .quick-alert-page {
    align-items: start;
    padding: 12px;
  }

  body[data-page="aviso-produto"] .quick-alert-panel {
    border-radius: 14px;
    grid-template-columns: 1fr;
  }

  body[data-page="aviso-produto"] .quick-alert-form {
    grid-template-columns: 1fr;
  }

  body[data-page="aviso-produto"] .quick-alert-search-control {
    grid-template-columns: 1fr;
  }

  body[data-page="aviso-produto"] .quick-alert-brand,
  body[data-page="aviso-produto"] .quick-alert-requester {
    grid-column: 1 / -1;
    grid-row: auto;
  }

  body[data-page="aviso-produto"] .quick-alert-requester {
    border-radius: 12px;
    justify-self: stretch;
    max-width: none;
  }

  body[data-page="aviso-produto"] .quick-alert-requester strong {
    max-width: none;
  }

  body[data-page="aviso-produto"] .quick-alert-requester,
  body[data-page="aviso-produto"] .quick-alert-history-head,
  body[data-page="aviso-produto"] .quick-alert-existing-head,
  body[data-page="aviso-produto"] .quick-alert-list-head,
  body[data-page="aviso-produto"] .quick-alert-existing-item,
  body[data-page="aviso-produto"] .quick-alert-list-item {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  body[data-page="aviso-produto"] .quick-alert-requester,
  body[data-page="aviso-produto"] .quick-alert-history-head,
  body[data-page="aviso-produto"] .quick-alert-existing-head,
  body[data-page="aviso-produto"] .quick-alert-list-head {
    display: grid;
  }

  body[data-page="aviso-produto"] .quick-alert-history-grid {
    grid-template-columns: 1fr;
    grid-template-areas:
      "draft"
      "open"
      "bought";
  }

  body[data-page="aviso-produto"] .quick-alert-existing-card-open {
    min-height: 0;
  }

  body[data-page="aviso-produto"] .quick-alert-notice {
    grid-template-columns: 1fr;
  }

  body[data-page="aviso-produto"] .quick-alert-form .btn,
  body[data-page="aviso-produto"] .quick-alert-requester .btn,
  body[data-page="aviso-produto"] .quick-alert-scan-btn,
  body[data-page="aviso-produto"] .quick-alert-history-head .btn,
  body[data-page="aviso-produto"] .quick-alert-existing-head .btn,
  body[data-page="aviso-produto"] .quick-alert-list-head .btn,
  body[data-page="aviso-produto"] .quick-alert-existing-item .btn,
  body[data-page="aviso-produto"] .quick-alert-list-item .btn,
  body[data-page="aviso-produto"] .quick-alert-whatsapp {
    width: 100%;
  }

  body[data-page="aviso-produto"] .quick-alert-existing-item .quick-alert-existing-actions {
    justify-items: stretch;
  }
}

body[data-page="home"] .home-ops-dashboard {
  display: grid;
  gap: 16px;
}

body[data-page="home"] .home-summary-link {
  color: inherit;
  text-decoration: none;
}

body[data-page="home"] .home-summary-link:hover {
  border-color: rgba(73, 182, 211, 0.55);
  transform: translateY(-2px);
}

body[data-page="home"] .home-summary-link small {
  display: block;
  margin-top: 10px;
  color: var(--muted);
}

body[data-page="home"] .home-ops-head {
  align-items: end;
}

body[data-page="home"] .home-command-grid,
body[data-page="home"] .home-split-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.65fr);
}

body[data-page="home"] .home-focus-card,
body[data-page="home"] .home-side-card,
body[data-page="home"] .home-split-grid .card,
body[data-page="home"] #estoque-parado .card {
  display: grid;
  gap: 14px;
}

body[data-page="home"] .home-panel-head {
  align-items: start;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr) auto;
}

body[data-page="home"] .home-panel-title {
  color: var(--ink);
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 0;
  margin-top: 6px;
}

body[data-page="home"] .home-hero-number {
  align-items: end;
  display: grid;
  gap: 10px;
  grid-template-columns: auto minmax(0, 1fr);
}

body[data-page="home"] .home-hero-number strong {
  color: var(--ink);
  font-family: var(--font-display);
  font-size: clamp(54px, 8vw, 92px);
  font-weight: 400;
  line-height: 0.9;
}

body[data-page="home"] .home-hero-number span {
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
  padding-bottom: 8px;
}

body[data-page="home"] .home-action-strip {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

body[data-page="home"] .home-action-strip a {
  background: rgba(9, 22, 29, 0.035);
  border: 1px solid rgba(9, 22, 29, 0.08);
  border-radius: 8px;
  color: var(--ink);
  display: grid;
  gap: 4px;
  min-height: 68px;
  padding: 12px;
  text-decoration: none;
}

body[data-page="home"] .home-action-strip a:hover {
  border-color: rgba(5, 166, 107, 0.32);
  box-shadow: 0 12px 28px rgba(9, 22, 29, 0.08);
}

body[data-page="home"] .home-action-strip span,
body[data-page="home"] .home-kpi-tile span,
body[data-page="home"] .home-order-row span,
body[data-page="home"] .home-kpi-tile small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

body[data-page="home"] .home-action-strip strong {
  font-size: 15px;
  font-weight: 900;
}

body[data-page="home"] .home-kpi-row {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

body[data-page="home"] .home-kpi-tile {
  background: #ffffff;
  border: 1px solid rgba(9, 22, 29, 0.08);
  border-radius: 8px;
  box-shadow: 0 14px 34px rgba(9, 22, 29, 0.06);
  display: grid;
  gap: 6px;
  min-height: 124px;
  padding: 16px;
}

body[data-page="home"] .home-kpi-tile strong {
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 34px;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1;
}

body[data-page="home"] .home-table-wrap {
  overflow: auto;
}

body[data-page="home"] .home-compact-table th,
body[data-page="home"] .home-compact-table td {
  white-space: nowrap;
}

body[data-page="home"] .home-compact-table td:first-child {
  min-width: 260px;
  white-space: normal;
}

body[data-page="home"] .home-sync-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

body[data-page="home"] .home-sync-grid div {
  background: rgba(9, 22, 29, 0.035);
  border: 1px solid rgba(9, 22, 29, 0.07);
  border-radius: 8px;
  display: grid;
  gap: 4px;
  min-height: 62px;
  padding: 10px;
}

body[data-page="home"] .home-sync-grid span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

body[data-page="home"] .home-sync-grid strong {
  color: var(--ink);
  font-size: 15px;
  font-weight: 900;
}

body[data-page="home"] .home-order-list {
  display: grid;
  gap: 8px;
}

body[data-page="home"] .home-order-row {
  align-items: center;
  background: rgba(9, 22, 29, 0.035);
  border: 1px solid rgba(9, 22, 29, 0.07);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) auto;
  min-height: 62px;
  padding: 10px 12px;
}

body[data-page="home"] .home-order-row div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

body[data-page="home"] .home-order-row strong {
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-page="home"] .home-order-row small {
  background: rgba(5, 166, 107, 0.1);
  border-radius: 999px;
  color: #066a47;
  font-weight: 900;
  min-width: 42px;
  padding: 5px 8px;
  text-align: center;
}

body[data-page="home"] .home-progress {
  margin-top: 2px;
}

body[data-page="home"] #estoque-parado {
  scroll-margin-top: 18px;
}

@media (max-width: 1180px) {
  body[data-page="home"] .home-command-grid,
  body[data-page="home"] .home-split-grid {
    grid-template-columns: 1fr;
  }

  body[data-page="home"] .home-kpi-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  body[data-page="home"] .home-ops-head,
  body[data-page="home"] .home-panel-head,
  body[data-page="home"] .home-hero-number,
  body[data-page="home"] .home-action-strip,
  body[data-page="home"] .home-kpi-row,
  body[data-page="home"] .home-sync-grid {
    grid-template-columns: 1fr;
  }

  body[data-page="home"] .home-ops-head .row,
  body[data-page="home"] .home-panel-head .row {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  body[data-page="home"] .home-ops-head .btn,
  body[data-page="home"] .home-panel-head .btn,
  body[data-page="home"] .home-panel-head .pill {
    width: 100%;
  }

  body[data-page="home"] .home-hero-number strong {
    font-size: 56px;
  }
}

/* Minimal counter workspace: the action and the current queue stay visible
   without decorative panels competing for attention. */
body[data-page="aviso-produto"] .quick-alert-page {
  padding: 16px;
  isolation: isolate;
  position: relative;
}

body[data-page="aviso-produto"] .quick-alert-page::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  content: '';
  pointer-events: none;
  opacity: 0.08;
  background: url('/logo-solucao.png') no-repeat right 6vw top 84px / min(38vw, 360px);
}

body[data-page="aviso-produto"] .quick-alert-simple {
  width: min(100%, 1040px);
  gap: 14px;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(9, 22, 29, 0.06);
}

body[data-page="aviso-produto"] .quick-alert-simple .quick-alert-brand img {
  width: 38px;
  height: 38px;
  border-radius: 8px;
}

body[data-page="aviso-produto"] .quick-alert-simple .quick-alert-brand strong {
  font-size: 16px;
}

body[data-page="aviso-produto"] .quick-alert-simple .quick-alert-requester {
  gap: 8px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

body[data-page="aviso-produto"] .quick-alert-simple .quick-alert-hero {
  display: grid;
  gap: 3px;
}

body[data-page="aviso-produto"] .quick-alert-simple h1 {
  margin: 0;
  font-size: clamp(28px, 5vw, 38px);
  line-height: 1.05;
}

body[data-page="aviso-produto"] .quick-alert-simple .lead {
  margin: 0;
  font-size: 14px;
}

body[data-page="aviso-produto"] .quick-alert-simple .quick-alert-form {
  gap: 8px;
}

body[data-page="aviso-produto"] .quick-alert-simple .quick-alert-form input,
body[data-page="aviso-produto"] .quick-alert-simple .quick-alert-form .btn,
body[data-page="aviso-produto"] .quick-alert-simple .quick-alert-scan-btn {
  min-height: 44px;
}

body[data-page="aviso-produto"] .quick-alert-simple .quick-alert-selected,
body[data-page="aviso-produto"] .quick-alert-simple .quick-alert-draft,
body[data-page="aviso-produto"] .quick-alert-simple .quick-alert-existing-card {
  padding: 12px;
  border: 1px solid rgba(9, 22, 29, 0.1);
  border-radius: 10px;
  background: #fff;
  box-shadow: none;
}

body[data-page="aviso-produto"] .quick-alert-simple .quick-alert-selected {
  background: #f6fbfc;
  border-color: rgba(73, 182, 211, 0.3);
}

body[data-page="aviso-produto"] .quick-alert-simple .quick-alert-history,
body[data-page="aviso-produto"] .quick-alert-simple .quick-alert-draft {
  gap: 8px;
}

body[data-page="aviso-produto"] .quick-alert-simple .quick-alert-history-grid {
  gap: 10px;
}

body[data-page="aviso-produto"] .quick-alert-simple .quick-alert-existing-item,
body[data-page="aviso-produto"] .quick-alert-simple .quick-alert-list-item {
  padding: 10px 0;
  border-radius: 0;
  border-width: 0 0 1px;
  background: transparent;
  box-shadow: none;
}

body[data-page="aviso-produto"] .quick-alert-simple .quick-alert-existing-item:last-child,
body[data-page="aviso-produto"] .quick-alert-simple .quick-alert-list-item:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

body[data-page="aviso-produto"] .quick-alert-simple .btn {
  border-radius: 8px;
}

body[data-page="aviso-produto"] .quick-alert-simple .quick-alert-modal-card {
  width: min(100%, 390px);
  padding: 18px;
  border-radius: 12px;
}

@media (max-width: 720px) {
  body[data-page="aviso-produto"] .quick-alert-page {
    padding: 10px;
  }

  body[data-page="aviso-produto"] .quick-alert-page::before {
    background-position: right -36px top 64px;
    background-size: 250px;
  }

  body[data-page="aviso-produto"] .quick-alert-simple {
    padding: 16px;
  }
}

body[data-page="perfil-financeiro"] {
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(73, 182, 211, 0.08), transparent 34%),
    #f6f9fd;
}

body[data-page="perfil-financeiro"] .finance-standalone-page {
  min-height: 100vh;
  display: grid;
  place-items: start center;
  padding: 22px;
}

body[data-page="perfil-financeiro"] .finance-standalone-panel {
  width: min(100%, 1320px);
  padding: clamp(18px, 4vw, 34px);
  border: 1px solid rgba(9, 22, 29, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 22px 54px rgba(9, 22, 29, 0.09);
}

body[data-page="perfil-financeiro"] .finance-standalone-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

body[data-page="perfil-financeiro"] .finance-standalone-brand img {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  border: 1px solid rgba(73, 182, 211, 0.2);
  background: #ffffff;
}

body[data-page="perfil-financeiro"] .finance-standalone-brand div {
  display: grid;
  min-width: 0;
}

body[data-page="perfil-financeiro"] .finance-standalone-brand span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

body[data-page="perfil-financeiro"] .finance-standalone-brand strong {
  color: var(--ink);
  font-size: 18px;
  line-height: 1.15;
}

body[data-page="perfil-financeiro"] .finance-workspace {
  display: grid;
  gap: 18px;
}

body[data-page="perfil-financeiro"] .finance-workspace > * {
  min-width: 0;
}

body[data-page="perfil-financeiro"] .finance-ops-head {
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 0;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

body[data-page="perfil-financeiro"] .finance-ops-head > div:first-child {
  display: block;
}

body[data-page="perfil-financeiro"] .finance-ops-head h1 {
  margin-top: 8px;
  font-size: clamp(34px, 7vw, 58px);
}

body[data-page="perfil-financeiro"] .finance-ops-head .lead {
  max-width: 48ch;
  font-size: 16px;
}

body[data-page="perfil-financeiro"] .finance-refresh-actions {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

body[data-page="perfil-financeiro"] .finance-title-block {
  display: grid;
  gap: 5px;
}

body[data-page="perfil-financeiro"] .finance-eyebrow,
body[data-page="perfil-financeiro"] .finance-status-kicker {
  color: var(--accent-ink);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

body[data-page="perfil-financeiro"] .finance-ops-head h1 {
  margin: 0;
  max-width: 18ch;
  font-size: clamp(32px, 5vw, 46px);
  line-height: 1;
}

body[data-page="perfil-financeiro"] .finance-ops-head .lead {
  margin: 2px 0 0;
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 700;
}

body[data-page="perfil-financeiro"] .finance-refresh-status {
  align-items: center;
  background: var(--accent-mist);
  border: 1px solid rgba(8, 127, 146, 0.16);
  border-radius: 12px;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  min-height: 52px;
  padding: 10px 14px;
}

body[data-page="perfil-financeiro"] .finance-refresh-status > div {
  display: grid;
  gap: 2px;
}

body[data-page="perfil-financeiro"] .finance-refresh-status strong {
  color: var(--ink);
  font-size: 13px;
}

body[data-page="perfil-financeiro"] .finance-sync-help {
  color: var(--accent-ink);
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 800;
}

body[data-page="perfil-financeiro"] .finance-sync-help summary {
  cursor: pointer;
  list-style: none;
}

body[data-page="perfil-financeiro"] .finance-sync-help summary::-webkit-details-marker {
  display: none;
}

body[data-page="perfil-financeiro"] .finance-sync-help summary::after {
  content: ' +';
  font-size: 15px;
}

body[data-page="perfil-financeiro"] .finance-sync-help[open] summary::after {
  content: ' −';
}

body[data-page="perfil-financeiro"] .finance-sync-help p {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow-xs);
  color: var(--muted-strong);
  font-size: 12px;
  line-height: 1.45;
  margin: 9px 0 0;
  max-width: 340px;
  padding: 10px 12px;
  position: absolute;
  right: 0;
  z-index: 3;
}

body[data-page="perfil-financeiro"] .finance-sync-help {
  position: relative;
}

body[data-page="perfil-financeiro"] .finance-refresh-guide {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow-xs);
}

body[data-page="perfil-financeiro"] .finance-refresh-guide div {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 4px 8px;
}

body[data-page="perfil-financeiro"] .finance-refresh-guide strong {
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
}

body[data-page="perfil-financeiro"] .finance-refresh-guide span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
}

body[data-page="perfil-financeiro"] .finance-kpi-row {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

body[data-page="perfil-financeiro"] .finance-kpi-tile {
  background:
    linear-gradient(180deg, rgba(73, 182, 211, 0.1), rgba(255, 255, 255, 0.7) 54%),
    #f8fcff;
  border: 1px solid rgba(73, 182, 211, 0.22);
  border-radius: 14px;
  box-shadow: 0 12px 28px rgba(9, 22, 29, 0.05);
  display: grid;
  gap: 7px;
  min-height: 104px;
  padding: 14px;
}

body[data-page="perfil-financeiro"] .finance-kpi-tile:nth-child(2) {
  background:
    linear-gradient(180deg, rgba(15, 115, 82, 0.1), rgba(255, 255, 255, 0.72) 54%),
    #f5fbf8;
  border-color: rgba(15, 115, 82, 0.18);
}

body[data-page="perfil-financeiro"] .finance-kpi-tile:nth-child(3) {
  background:
    linear-gradient(180deg, rgba(219, 74, 57, 0.1), rgba(255, 255, 255, 0.72) 54%),
    #fff7f6;
  border-color: rgba(219, 74, 57, 0.18);
}

body[data-page="perfil-financeiro"] .finance-kpi-tile:nth-child(4) {
  background:
    linear-gradient(180deg, rgba(217, 119, 6, 0.1), rgba(255, 255, 255, 0.72) 54%),
    #fffaf3;
  border-color: rgba(217, 119, 6, 0.18);
}

body[data-page="perfil-financeiro"] .finance-kpi-tile span,
body[data-page="perfil-financeiro"] .finance-kpi-tile small,
body[data-page="perfil-financeiro"] .finance-client-row small,
body[data-page="perfil-financeiro"] .finance-client-money span,
body[data-page="perfil-financeiro"] .finance-client-money small,
body[data-page="perfil-financeiro"] .finance-metric span,
body[data-page="perfil-financeiro"] .finance-metric small,
body[data-page="perfil-financeiro"] .finance-profile-identity span,
body[data-page="perfil-financeiro"] .finance-doc-row span,
body[data-page="perfil-financeiro"] .finance-data-list span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

body[data-page="perfil-financeiro"] .finance-kpi-tile strong {
  color: var(--ink);
  font-family: var(--font-title);
  font-size: 30px;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1;
}

body[data-page="perfil-financeiro"] .finance-command-grid {
  align-items: start;
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 1.45fr) minmax(340px, 0.75fr);
}

body[data-page="perfil-financeiro"] .finance-profile-column {
  display: grid;
  gap: 14px;
  min-width: 0;
}

body[data-page="perfil-financeiro"] .finance-queue-card,
body[data-page="perfil-financeiro"] .finance-load-card,
body[data-page="perfil-financeiro"] .finance-profile-card,
body[data-page="perfil-financeiro"] .finance-message-card,
body[data-page="perfil-financeiro"] .finance-followup-card,
body[data-page="perfil-financeiro"] .finance-data-card {
  display: grid;
  gap: 12px;
  border-radius: 14px;
  border-color: rgba(9, 22, 29, 0.08);
  box-shadow: 0 12px 28px rgba(9, 22, 29, 0.05);
}

body[data-page="perfil-financeiro"] .finance-queue-card {
  background:
    linear-gradient(180deg, rgba(73, 182, 211, 0.1), rgba(255, 255, 255, 0.68) 52%),
    #f8fcff;
  border-color: rgba(73, 182, 211, 0.22);
}

body[data-page="perfil-financeiro"] .finance-load-card {
  background:
    linear-gradient(110deg, rgba(18, 97, 158, 0.11), rgba(73, 182, 211, 0.08) 58%, rgba(255, 255, 255, 0.7)),
    #f8fcff;
  border-color: rgba(18, 97, 158, 0.18);
  display: grid;
  gap: 8px;
  padding-block: 14px;
}

body[data-page="perfil-financeiro"] .finance-progress-summary {
  align-items: end;
  display: grid;
  gap: 5px;
  justify-items: end;
}

body[data-page="perfil-financeiro"] .finance-progress-summary > strong {
  color: var(--accent-ink);
  font-family: var(--font-title);
  font-size: 30px;
  line-height: 0.9;
}

body[data-page="perfil-financeiro"] .finance-load-progress {
  background: rgba(18, 97, 158, 0.12);
  border-radius: 999px;
  height: 9px;
  overflow: hidden;
}

body[data-page="perfil-financeiro"] .finance-load-progress-fill {
  background: linear-gradient(90deg, #12619e, #49b6d3);
  border-radius: inherit;
  height: 100%;
  min-width: 0;
  transition: width 320ms ease;
}

body[data-page="perfil-financeiro"] .finance-load-progress.is-indeterminate .finance-load-progress-fill {
  animation: finance-load-pulse 1.35s ease-in-out infinite;
  min-width: 26%;
}

body[data-page="perfil-financeiro"] .finance-load-meta {
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.45;
}

body[data-page="perfil-financeiro"] .finance-load-details,
body[data-page="perfil-financeiro"] .finance-load-updated {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.4;
}

body[data-page="perfil-financeiro"] .finance-load-details {
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(9, 22, 29, 0.07);
  border-radius: 10px;
  padding: 7px 10px;
}

@keyframes finance-load-pulse {
  0% { transform: translateX(-130%); }
  52%, 100% { transform: translateX(380%); }
}

body[data-page="perfil-financeiro"] .finance-profile-card {
  background:
    linear-gradient(180deg, rgba(217, 119, 6, 0.1), rgba(255, 255, 255, 0.7) 52%),
    #fffaf3;
  border-color: rgba(217, 119, 6, 0.18);
}

body[data-page="perfil-financeiro"] .finance-message-card,
body[data-page="perfil-financeiro"] .finance-followup-card,
body[data-page="perfil-financeiro"] .finance-data-card {
  background:
    linear-gradient(180deg, rgba(15, 115, 82, 0.08), rgba(255, 255, 255, 0.72) 52%),
    #f5fbf8;
  border-color: rgba(15, 115, 82, 0.16);
}

body[data-page="perfil-financeiro"] .finance-panel-head {
  align-items: start;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) auto;
}

body[data-page="perfil-financeiro"] .finance-panel-head.compact {
  align-items: center;
}

body[data-page="perfil-financeiro"] .finance-panel-head h2 {
  color: var(--ink);
  font-size: 18px;
  font-weight: 900;
  line-height: 1.15;
  margin: 6px 0 0;
}

body[data-page="perfil-financeiro"] .finance-toolbar {
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(180px, 1.2fr) repeat(2, minmax(120px, 0.8fr));
}

body[data-page="perfil-financeiro"] .finance-note {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(9, 22, 29, 0.07);
  border-radius: 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  padding: 10px 12px;
}

body[data-page="perfil-financeiro"] .finance-queue-list {
  display: grid;
  gap: 8px;
}

body[data-page="perfil-financeiro"] .finance-client-row {
  align-items: center;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(9, 22, 29, 0.07);
  border-radius: 12px;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) minmax(150px, 0.38fr) auto;
  min-height: 76px;
  padding: 10px;
}

body[data-page="perfil-financeiro"] .finance-client-row.is-selected {
  background: rgba(5, 166, 107, 0.08);
  border-color: rgba(5, 166, 107, 0.32);
}

body[data-page="perfil-financeiro"] .finance-client-main,
body[data-page="perfil-financeiro"] .finance-client-money,
body[data-page="perfil-financeiro"] .finance-client-actions {
  display: grid;
  gap: 5px;
  min-width: 0;
}

body[data-page="perfil-financeiro"] .finance-client-name {
  background: transparent;
  border: 0;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-size: 15px;
  font-weight: 900;
  min-width: 0;
  overflow: hidden;
  padding: 0;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-page="perfil-financeiro"] .finance-client-money {
  justify-items: end;
  text-align: right;
}

body[data-page="perfil-financeiro"] .finance-client-money strong {
  color: var(--ink);
  font-size: 16px;
  font-weight: 900;
}

body[data-page="perfil-financeiro"] .finance-product-strip,
body[data-page="perfil-financeiro"] .finance-sequence-strip,
body[data-page="perfil-financeiro"] .finance-followup-strip,
body[data-page="perfil-financeiro"] .finance-product-list,
body[data-page="perfil-financeiro"] .finance-sequence-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

body[data-page="perfil-financeiro"] .finance-product-strip span,
body[data-page="perfil-financeiro"] .finance-sequence-strip span,
body[data-page="perfil-financeiro"] .finance-followup-strip span,
body[data-page="perfil-financeiro"] .finance-product-list span,
body[data-page="perfil-financeiro"] .finance-sequence-list span,
body[data-page="perfil-financeiro"] .finance-tag {
  background: rgba(9, 22, 29, 0.055);
  border: 1px solid rgba(9, 22, 29, 0.08);
  border-radius: 999px;
  color: var(--ink);
  font-size: 11px;
  font-weight: 900;
  max-width: 100%;
  overflow: hidden;
  padding: 5px 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-page="perfil-financeiro"] .finance-tag {
  justify-self: start;
}

body[data-page="perfil-financeiro"] .finance-tag.bad,
body[data-page="perfil-financeiro"] .pill.bad {
  background: rgba(219, 74, 57, 0.12);
  border-color: rgba(219, 74, 57, 0.26);
  color: #a92d1f;
}

body[data-page="perfil-financeiro"] .finance-tag.warn,
body[data-page="perfil-financeiro"] .pill.warn {
  background: rgba(238, 160, 53, 0.14);
  border-color: rgba(238, 160, 53, 0.3);
  color: #8b5708;
}

body[data-page="perfil-financeiro"] .finance-tag.ok,
body[data-page="perfil-financeiro"] .pill.ok {
  background: rgba(5, 166, 107, 0.12);
  border-color: rgba(5, 166, 107, 0.28);
  color: #066a47;
}

body[data-page="perfil-financeiro"] .finance-profile-search {
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) auto;
}

body[data-page="perfil-financeiro"] .finance-profile-box {
  display: grid;
  gap: 12px;
}

body[data-page="perfil-financeiro"] .finance-profile-identity,
body[data-page="perfil-financeiro"] .finance-metric-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

body[data-page="perfil-financeiro"] .finance-profile-identity div,
body[data-page="perfil-financeiro"] .finance-metric {
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(9, 22, 29, 0.07);
  border-radius: 12px;
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 10px;
}

body[data-page="perfil-financeiro"] .finance-profile-identity strong,
body[data-page="perfil-financeiro"] .finance-metric strong,
body[data-page="perfil-financeiro"] .finance-data-list strong {
  color: var(--ink);
  font-size: 14px;
  font-weight: 900;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-page="perfil-financeiro"] .finance-section-title {
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
  margin-top: 2px;
  text-transform: uppercase;
}

body[data-page="perfil-financeiro"] .finance-doc-list,
body[data-page="perfil-financeiro"] .finance-data-list {
  display: grid;
  gap: 8px;
}

body[data-page="perfil-financeiro"] .finance-doc-row,
body[data-page="perfil-financeiro"] .finance-data-list div {
  align-items: center;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(9, 22, 29, 0.07);
  border-radius: 12px;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) auto;
  min-height: 54px;
  padding: 10px;
}

body[data-page="perfil-financeiro"] .finance-doc-row div,
body[data-page="perfil-financeiro"] .finance-data-list div {
  min-width: 0;
}

body[data-page="perfil-financeiro"] .finance-doc-row strong,
body[data-page="perfil-financeiro"] .finance-doc-row span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-page="perfil-financeiro"] .finance-doc-row b {
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
}

body[data-page="perfil-financeiro"] .finance-profile-actions {
  display: grid;
  gap: 8px;
  grid-template-columns: 1fr;
}

body[data-page="perfil-financeiro"] .finance-followup-grid,
body[data-page="perfil-financeiro"] .finance-followup-actions {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

body[data-page="perfil-financeiro"] .finance-followup-actions {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

body[data-page="perfil-financeiro"] .finance-followup-history {
  display: grid;
  gap: 8px;
}

body[data-page="perfil-financeiro"] .finance-history-row {
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(9, 22, 29, 0.07);
  border-radius: 12px;
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 10px;
}

body[data-page="perfil-financeiro"] .finance-history-row strong,
body[data-page="perfil-financeiro"] .finance-history-row span,
body[data-page="perfil-financeiro"] .finance-history-row small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-page="perfil-financeiro"] .finance-history-row strong {
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
}

body[data-page="perfil-financeiro"] .finance-history-row small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

body[data-page="perfil-financeiro"] #financeMessageText {
  min-height: 136px;
  resize: vertical;
}

@media (max-width: 1180px) {
  body[data-page="perfil-financeiro"] .finance-command-grid,
  body[data-page="perfil-financeiro"] .finance-toolbar {
    grid-template-columns: 1fr;
  }

  body[data-page="perfil-financeiro"] .finance-kpi-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  body[data-page="perfil-financeiro"] .finance-standalone-page {
    padding: 12px;
  }

  body[data-page="perfil-financeiro"] .finance-standalone-panel {
    border-radius: 14px;
  }

  body[data-page="perfil-financeiro"] .finance-ops-head,
  body[data-page="perfil-financeiro"] .finance-panel-head,
  body[data-page="perfil-financeiro"] .finance-client-row,
  body[data-page="perfil-financeiro"] .finance-profile-search,
  body[data-page="perfil-financeiro"] .finance-profile-identity,
  body[data-page="perfil-financeiro"] .finance-metric-grid,
  body[data-page="perfil-financeiro"] .finance-profile-actions,
  body[data-page="perfil-financeiro"] .finance-followup-grid,
  body[data-page="perfil-financeiro"] .finance-followup-actions,
  body[data-page="perfil-financeiro"] .finance-kpi-row,
  body[data-page="perfil-financeiro"] .finance-doc-row,
  body[data-page="perfil-financeiro"] .finance-data-list div {
    grid-template-columns: 1fr;
  }

  body[data-page="perfil-financeiro"] .finance-ops-head .row,
  body[data-page="perfil-financeiro"] .finance-client-actions {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  body[data-page="perfil-financeiro"] .finance-client-money {
    justify-items: start;
    text-align: left;
  }

  body[data-page="perfil-financeiro"] .finance-refresh-actions,
  body[data-page="perfil-financeiro"] .finance-refresh-guide {
    grid-template-columns: 1fr;
  }

  body[data-page="perfil-financeiro"] .finance-refresh-status {
    align-items: start;
    flex-direction: column;
    gap: 8px;
  }

  body[data-page="perfil-financeiro"] .finance-sync-help p {
    left: 0;
    right: auto;
    width: min(340px, calc(100vw - 54px));
  }
}

/* Solução Hidroelétrica: a restrained storefront-inspired visual language for
   the operational pages.  It retains the compact dashboard layout while
   making product, stock and purchase actions feel like one coherent system. */
:root {
  --bg: #f4f8f8;
  --panel: #ffffff;
  --panel-soft: #f2f7f7;
  --ink: #12333d;
  --ink-soft: #2a4c56;
  --muted: #70838a;
  --muted-strong: #506a73;
  --line: rgba(18, 51, 61, 0.12);
  --line-strong: rgba(18, 51, 61, 0.24);
  --accent: #087f92;
  --accent-deep: #056474;
  --accent-ink: #075563;
  --accent-soft: rgba(8, 127, 146, 0.12);
  --accent-mist: rgba(8, 127, 146, 0.065);
  --ok: #16785f;
  --warn: #b8731f;
  --bad: #b94141;
  --shadow: 0 18px 42px rgba(18, 51, 61, 0.12);
  --shadow-sm: 0 10px 26px rgba(18, 51, 61, 0.1);
  --shadow-xs: 0 5px 16px rgba(18, 51, 61, 0.075);
  --radius: 10px;
  --radius-sm: 8px;
  --font-body: "DM Sans", "Inter", Arial, Helvetica, sans-serif;
  --font-title: "DM Sans", "Inter", Arial, Helvetica, sans-serif;
}

body {
  background:
    radial-gradient(860px 420px at 100% -12%, rgba(8, 127, 146, 0.1), transparent 66%),
    linear-gradient(180deg, #fafdfe 0%, var(--bg) 100%);
}

.sidebar {
  border-right-color: rgba(18, 51, 61, 0.1);
  box-shadow: 12px 0 34px rgba(18, 51, 61, 0.075);
}

.brand,
.topbar {
  border-color: var(--line);
}

.brand-logo,
.topbar-logo {
  border-color: rgba(8, 127, 146, 0.2);
  border-radius: 10px;
  box-shadow: none;
}

.nav a.active {
  color: var(--accent-ink);
  border-color: rgba(8, 127, 146, 0.18);
  background: var(--accent-mist);
}

.topbar {
  border-color: rgba(18, 51, 61, 0.1);
  box-shadow: var(--shadow-xs);
}

.card,
.route-link,
.filter-bar,
.toolbar-card,
body[data-page="tarefas"] .page-head .row,
body[data-page="produtos"] .page-head .row {
  border-color: rgba(18, 51, 61, 0.09);
  box-shadow: var(--shadow-xs);
}

.card:hover,
.route-link:hover {
  border-color: rgba(8, 127, 146, 0.26);
}

.btn {
  background: linear-gradient(180deg, #0b91a4 0%, var(--accent-deep) 100%);
  border-color: var(--accent-deep);
  box-shadow: 0 8px 18px rgba(5, 100, 116, 0.18);
}

.btn:hover {
  box-shadow: 0 10px 22px rgba(5, 100, 116, 0.22);
}

.btn.secondary,
.btn.ghost {
  color: var(--ink-soft);
  background: var(--panel);
  border-color: var(--line);
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(8, 127, 146, 0.52);
  box-shadow: 0 0 0 3px rgba(8, 127, 146, 0.12);
}

.progress-fill,
.trend-bar-fill {
  background: linear-gradient(90deg, var(--accent-deep), #2aaec0);
}

body[data-page="aviso-produto"] {
  background:
    radial-gradient(760px 440px at 100% 0%, rgba(8, 127, 146, 0.12), transparent 68%),
    #f4f8f8;
}

body[data-page="aviso-produto"] .quick-alert-page::before {
  display: none;
}

body[data-page="aviso-produto"] .quick-alert-simple {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-color: rgba(18, 51, 61, 0.1);
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 18px 42px rgba(18, 51, 61, 0.1);
}

body[data-page="aviso-produto"] .quick-alert-simple::after {
  position: absolute;
  top: 38px;
  right: -34px;
  z-index: 0;
  width: 510px;
  height: 510px;
  content: '';
  pointer-events: none;
  opacity: 0.14;
  background: url('/logo-solucao.png') center / contain no-repeat;
}

body[data-page="aviso-produto"] .quick-alert-simple > * {
  position: relative;
  z-index: 1;
}

body[data-page="aviso-produto"] .quick-alert-selected {
  border-color: rgba(8, 127, 146, 0.28);
  background: rgba(8, 127, 146, 0.07);
}

body[data-page="aviso-produto"] .quick-alert-draft {
  border-color: rgba(8, 127, 146, 0.2);
  background: rgba(247, 252, 252, 0.92);
}

@media (max-width: 720px) {
  body[data-page="aviso-produto"] .quick-alert-simple::after {
    top: 70px;
    right: -130px;
    width: 380px;
    height: 380px;
    opacity: 0.1;
  }
}

/* Tokens mirrored from solucao-gpt so the store and the internal panel share
   the same type, color, spacing and surface system. */
:root {
  --bg: #f6f8f9;
  --panel: #ffffff;
  --panel-soft: #f6f8f9;
  --ink: #2d2c2d;
  --ink-soft: #40494e;
  --muted: #5f666b;
  --muted-strong: #4f5b60;
  --line: #d9e5e8;
  --line-strong: #b7e8ee;
  --accent: #08788a;
  --accent-deep: #075e6a;
  --accent-ink: #075e6a;
  --accent-soft: #e0f7fa;
  --accent-mist: #f2fbfc;
  --ok: #15803d;
  --warn: #b45309;
  --bad: #dc2626;
  --shadow: 0 8px 24px rgba(11, 24, 32, 0.08);
  --shadow-sm: 0 4px 12px rgba(11, 24, 32, 0.06);
  --shadow-xs: 0 1px 3px rgba(11, 24, 32, 0.08);
  --radius: 8px;
  --radius-sm: 6px;
  --font-body: "Montserrat", Arial, Helvetica, sans-serif;
  --font-title: "Anton", Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  --font-display: "Anton", Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
}

body {
  color: var(--ink);
  background: var(--bg);
  font-family: var(--font-body);
}

.page,
.topbar {
  max-width: 1280px;
}

.sidebar {
  background: #ffffff;
  border-right: 1px solid var(--line);
  box-shadow: none;
}

.brand {
  border-bottom-color: var(--line);
}

.brand .kicker,
.topbar-kicker,
.nav-group-title,
.kpi-label,
label,
.table th {
  color: var(--accent-deep);
  font-weight: 800;
  letter-spacing: 0.12em;
}

.brand .title,
.topbar-title,
h1,
h2,
h3,
.kpi-value,
.crm-action-metric strong,
.crm-quality-item strong,
.ops-metric strong,
.abc-card strong,
.sync-detail strong {
  font-family: var(--font-title);
  font-weight: 400;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

.nav a {
  border-radius: 6px;
}

.nav a:hover,
.nav a.active {
  color: var(--accent-deep);
  border-color: var(--brand-border, #b7e8ee);
  background: var(--accent-soft);
}

.nav a.active .nav-icon {
  color: var(--accent);
}

.topbar {
  position: relative;
  top: auto;
  min-height: 80px;
  margin-bottom: 18px;
  padding: 12px 0;
  background: transparent;
  border-width: 0 0 1px;
  border-radius: 0;
  box-shadow: none;
  backdrop-filter: none;
}

.topbar-logo,
.brand-logo {
  padding: 3px;
  border-color: #b7e8ee;
  border-radius: 8px;
}

.topbar-metric,
.status-pill,
.badge,
.pill,
.tag {
  border-color: var(--line);
  border-radius: 999px;
}

.card,
.route-link,
.filter-bar,
.toolbar-card,
body[data-page="tarefas"] .page-head .row,
body[data-page="produtos"] .page-head .row {
  border-color: var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow-xs);
}

.card:hover,
.route-link:hover {
  border-color: #b7e8ee;
  box-shadow: var(--shadow-sm);
}

.btn {
  background: var(--accent);
  border-color: var(--accent);
  border-radius: 8px;
  box-shadow: none;
}

.btn:hover {
  background: var(--accent-deep);
  border-color: var(--accent-deep);
  box-shadow: none;
}

.btn.secondary,
.btn.ghost {
  color: var(--ink);
  background: #ffffff;
  border-color: #d8e8ea;
}

.btn.secondary:hover,
.btn.ghost:hover {
  color: var(--accent-deep);
  background: var(--accent-soft);
  border-color: var(--accent);
}

input,
select,
textarea {
  color: var(--ink);
  background: #fbfaf7;
  border-color: #d8d6cf;
  border-radius: 8px;
  font-weight: 600;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(8, 120, 138, 0.18);
}

body[data-page="aviso-produto"] {
  background: var(--bg);
}

body[data-page="aviso-produto"] .quick-alert-simple {
  border-color: var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
}

body[data-page="aviso-produto"] .quick-alert-simple h1 {
  max-width: 19ch;
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.06;
}

body[data-page="aviso-produto"] .quick-alert-simple::after {
  opacity: 0.11;
}

body[data-page="aviso-produto"] .quick-alert-selected,
body[data-page="aviso-produto"] .quick-alert-draft {
  border-color: #b7e8ee;
  background: #f7feff;
}

/* Full storefront frame: this applies the same two-level navigation and
   restrained component styling to every operational screen, not just alerts. */
.app {
  display: block;
  min-height: 100vh;
}

.sidebar {
  position: relative;
  top: auto;
  z-index: 30;
  display: grid;
  grid-template-columns: minmax(190px, auto) minmax(0, 1fr) auto;
  align-items: center;
  width: 100%;
  height: auto;
  min-height: 0;
  padding: 10px max(20px, calc((100vw - 1280px) / 2));
  overflow: visible;
  background: #ffffff;
  border: 0;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: block;
  padding: 0;
  border: 0;
}

.brand-head {
  gap: 9px;
}

.brand-logo {
  width: 40px;
  height: 40px;
  padding: 2px;
  border: 0;
  border-radius: 0;
}

.brand .kicker,
.brand .subtitle {
  display: none;
}

.brand .title {
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: none;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin: 0;
}

.nav-group {
  display: contents;
}

.nav-group-title,
.nav .badge {
  display: none;
}

.nav a {
  width: auto;
  min-height: 38px;
  padding: 8px 12px;
  color: var(--text-primary, #2d2c2d);
  border: 0;
  border-radius: 0;
  font-size: 13px;
  font-weight: 700;
}

.nav a:hover,
.nav a.active {
  color: var(--accent-deep);
  background: transparent;
  border-color: transparent;
  box-shadow: inset 0 -2px 0 var(--accent);
}

.nav-icon {
  display: none;
}

.sidebar-foot {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  margin: 0;
  padding: 7px 12px;
  color: var(--accent-deep);
  background: var(--accent-soft);
  border: 1px solid #b7e8ee;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}

.sidebar-foot strong {
  display: none;
}

.content {
  padding: 26px max(20px, calc((100vw - 1280px) / 2)) 56px;
}

.topbar {
  display: flex;
  justify-content: flex-end;
  min-height: 0;
  margin: 0 0 18px;
  padding: 0 0 14px;
}

.topbar-left {
  display: none;
}

.topbar-right {
  gap: 8px;
}

.topbar-metric,
.status-pill {
  min-height: 34px;
  padding: 6px 10px;
  background: #ffffff;
}

.topbar-metric {
  display: flex;
  align-items: center;
  gap: 7px;
}

.topbar-metric span {
  font-size: 10px;
}

.page-head {
  margin-bottom: 22px;
}

.page-head h1 {
  font-size: clamp(30px, 4vw, 44px);
}

.lead {
  color: var(--muted);
  font-weight: 500;
}

.store-ops-header {
  background: #ffffff;
  border-bottom: 1px solid var(--line);
}

.store-ops-header-main {
  display: grid;
  grid-template-columns: minmax(170px, auto) minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px;
  width: min(100% - 40px, 1280px);
  min-height: 64px;
  margin: 0 auto;
}

.store-ops-logo {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 800;
  text-decoration: none;
}

.store-ops-logo img {
  width: 38px;
  height: 38px;
  object-fit: contain;
}

.store-ops-nav {
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 4px;
  min-width: 0;
}

.store-ops-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 64px;
  padding: 0 13px;
  color: var(--ink);
  border-bottom: 2px solid transparent;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.store-ops-nav a:hover,
.store-ops-nav a.active {
  color: var(--accent-deep);
  border-bottom-color: var(--accent);
}

.store-ops-badge {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 12px;
  color: var(--accent-deep);
  background: var(--accent-soft);
  border: 1px solid #b7e8ee;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

body[data-page="home"] .home-ops-dashboard {
  gap: 18px;
}

body[data-page="home"] .home-ops-head {
  align-items: center;
  min-height: 220px;
  margin: 0;
  padding: clamp(24px, 4vw, 42px);
  background:
    linear-gradient(rgba(11, 24, 32, 0.94), rgba(11, 24, 32, 0.94)),
    linear-gradient(90deg, rgba(8, 120, 138, 0.2) 1px, transparent 1px),
    linear-gradient(rgba(8, 120, 138, 0.2) 1px, transparent 1px),
    #0b1820;
  background-size: auto, 24px 24px, 24px 24px, auto;
  border: 1px solid #0b1820;
  border-radius: 8px;
}

body[data-page="home"] .home-ops-head h1,
body[data-page="home"] .home-ops-head .lead {
  color: #ffffff;
}

body[data-page="home"] .home-ops-head .lead {
  max-width: 50ch;
  color: rgba(255, 255, 255, 0.72);
}

body[data-page="home"] .home-ops-head .btn.secondary {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.28);
}

body[data-page="home"] .home-command-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

body[data-page="home"] .home-focus-card,
body[data-page="home"] .home-side-card,
body[data-page="home"] .home-kpi-tile {
  min-height: 150px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow-xs);
}

body[data-page="home"] .home-focus-card {
  background: var(--accent-soft);
  border-color: #b7e8ee;
}

body[data-page="home"] .home-panel-title,
body[data-page="home"] .home-hero-number strong,
body[data-page="home"] .home-kpi-tile strong {
  font-family: var(--font-title);
  font-weight: 400;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

body[data-page="home"] .home-hero-number strong {
  color: var(--accent-deep);
}

body[data-page="home"] .home-kpi-row {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

body[data-page="home"] .home-kpi-tile {
  padding: 18px;
  box-shadow: none;
}

body[data-page="perfil-financeiro"],
body[data-page="aviso-produto"],
body[data-page="login"] {
  background: var(--bg);
}

body[data-page="perfil-financeiro"] .finance-standalone-page,
body[data-page="aviso-produto"] .quick-alert-page {
  min-height: calc(100vh - 64px);
  padding: 30px max(20px, calc((100vw - 1280px) / 2)) 56px;
}

body[data-page="perfil-financeiro"] .finance-standalone-panel {
  width: 100%;
  max-width: 1280px;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

body[data-page="perfil-financeiro"] .finance-standalone-brand {
  display: none;
}

body[data-page="perfil-financeiro"] .finance-ops-head {
  min-height: 190px;
  padding: clamp(24px, 4vw, 40px);
  background: #0b1820;
  border: 1px solid #0b1820;
  border-radius: 8px;
}

body[data-page="perfil-financeiro"] .finance-ops-head h1,
body[data-page="perfil-financeiro"] .finance-ops-head .lead {
  color: #ffffff;
}

body[data-page="perfil-financeiro"] .finance-ops-head .lead {
  color: rgba(255, 255, 255, 0.72);
}

body[data-page="perfil-financeiro"] .finance-ops-head .btn.secondary {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.3);
}

body[data-page="perfil-financeiro"] .finance-kpi-row {
  gap: 14px;
}

body[data-page="perfil-financeiro"] .finance-kpi-tile,
body[data-page="perfil-financeiro"] .finance-kpi-tile:nth-child(n) {
  min-height: 128px;
  padding: 18px;
  background: #ffffff;
  border-color: var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow-xs);
}

body[data-page="perfil-financeiro"] .finance-kpi-tile strong {
  color: var(--accent-deep);
  font-family: var(--font-title);
  font-weight: 400;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

body[data-page="perfil-financeiro"] .finance-queue-card,
body[data-page="perfil-financeiro"] .finance-load-card,
body[data-page="perfil-financeiro"] .finance-profile-card,
body[data-page="perfil-financeiro"] .finance-message-card,
body[data-page="perfil-financeiro"] .finance-followup-card,
body[data-page="perfil-financeiro"] .finance-data-card {
  border-color: var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow-xs);
}

body[data-page="login"] .login-shell {
  min-height: calc(100vh - 64px);
  padding: 48px 20px;
  background: var(--bg);
}

body[data-page="login"] .login-panel {
  border-color: var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
}

@media (max-width: 820px) {
  .sidebar {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 10px;
    padding: 8px 14px;
  }

  .nav {
    justify-content: flex-end;
    overflow-x: auto;
  }

  .nav a {
    padding: 8px;
    font-size: 12px;
  }

  .sidebar-foot,
  .store-ops-badge {
    display: none;
  }

  .content {
    padding: 20px 14px 40px;
  }

  .store-ops-header-main {
    grid-template-columns: auto minmax(0, 1fr);
    width: min(100% - 28px, 1280px);
    gap: 10px;
  }

  .store-ops-nav {
    justify-content: flex-end;
    overflow-x: auto;
  }

  .store-ops-nav a {
    min-height: 56px;
    padding: 0 8px;
    font-size: 12px;
  }

  body[data-page="home"] .home-command-grid,
  body[data-page="home"] .home-kpi-row {
    grid-template-columns: 1fr;
  }

  body[data-page="perfil-financeiro"] .finance-standalone-page,
  body[data-page="aviso-produto"] .quick-alert-page {
    padding: 20px 14px 36px;
  }
}

/* Shared editorial rhythm for every tab: context, direct title and one
   practical instruction. */
.page-eyebrow,
.page-head .page-eyebrow,
body[data-page="aviso-produto"] .quick-alert-hero .kpi-label,
body[data-page="perfil-financeiro"] .finance-ops-head .page-eyebrow,
body[data-page="login"] .login-brand .kpi-label {
  display: block;
  margin: 0 0 7px;
  color: var(--accent-deep);
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  line-height: 1.2;
  text-transform: uppercase;
}

.page-head h1,
body[data-page="aviso-produto"] .quick-alert-hero h1,
body[data-page="perfil-financeiro"] .finance-ops-head h1,
body[data-page="login"] .login-brand h1 {
  margin: 0;
}

.page-head .lead,
body[data-page="aviso-produto"] .quick-alert-hero .lead,
body[data-page="perfil-financeiro"] .finance-ops-head .lead {
  max-width: 60ch;
  margin: 9px 0 0;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.6;
}

.page-head .row,
body[data-page="perfil-financeiro"] .finance-ops-head .row {
  align-items: center;
}

.page-head .btn,
body[data-page="perfil-financeiro"] .finance-ops-head .btn,
body[data-page="aviso-produto"] .quick-alert-form .btn {
  min-height: 42px;
}

.card > .kpi-label:first-child,
.card .page-eyebrow:first-child {
  margin-bottom: 8px;
}

.empty,
.helper-copy {
  font-weight: 500;
}

body[data-page="home"] .home-ops-head .page-eyebrow,
body[data-page="perfil-financeiro"] .finance-ops-head .page-eyebrow {
  color: #5cd1df;
}

body[data-page="login"] .login-brand .kpi-label {
  margin-bottom: 5px;
}
