:root {
  --navy: #071d36;
  --navy-2: #032342;
  --blue: #0967f2;
  --blue-2: #0d7df5;
  --text: #111d3a;
  --muted: #64708d;
  --line: #dfe6f0;
  --soft: #f4f7fb;
  --green: #10a565;
  --amber: #f5a400;
  --red: #ef4444;
  --gray: #8a96aa;
  --shadow: 0 12px 30px rgba(20, 34, 56, .08);
}

* { box-sizing: border-box; }
html { min-height: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background: #f6f8fc;
  color: var(--text);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  letter-spacing: 0;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }

.ui-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  color: currentColor;
}
.ui-icon svg {
  display: block;
  width: 18px;
  height: 18px;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 310px;
  padding: 24px 18px;
  color: #fff;
  background:
    radial-gradient(circle at 78% 12%, rgba(255, 255, 255, .08), transparent 30%),
    linear-gradient(180deg, #111111 0%, #000000 100%);
  display: flex;
  flex-direction: column;
  z-index: 10;
}
.logo {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 4px 8px 26px;
}
.logo-icon, .brand-mark {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #2e2e2e, #000000);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.12);
  font-weight: 900;
  font-size: 28px;
}
.logo-image {
  width: 62px;
  height: 62px;
  flex: 0 0 62px;
  border-radius: 14px;
  object-fit: cover;
  background: #fff;
  box-shadow: 0 10px 22px rgba(0, 0, 0, .16);
}
.brand-image {
  width: 220px;
  max-width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  display: block;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 18px 40px rgba(0, 0, 0, .16);
}
.logo strong { display: block; font-size: 28px; line-height: 1; }
.logo small { color: rgba(255,255,255,.82); font-size: 14px; }
.sidebar nav {
  display: grid;
  gap: 8px;
}
.sidebar nav a {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 56px;
  padding: 0 20px;
  border-radius: 7px;
  color: rgba(255,255,255,.94);
  font-size: 17px;
}
.sidebar nav a .ui-icon {
  width: 22px;
  height: 22px;
}
.sidebar nav a .ui-icon svg { width: 22px; height: 22px; }
.sidebar nav a.active, .sidebar nav a:hover {
  background: linear-gradient(135deg, #2b2b2b, #000000);
  box-shadow: 0 12px 24px rgba(0, 0, 0, .28);
}
.help-card {
  margin: auto 0 28px;
  padding: 18px;
  border-radius: 9px;
  background: linear-gradient(135deg, rgba(255, 255, 255, .08), rgba(255, 255, 255, .03));
  box-shadow: var(--shadow);
}
.help-card .btn.primary.small {
  background: linear-gradient(135deg, #2b2b2b, #000000);
  color: #fff;
  box-shadow: 0 9px 18px rgba(0, 0, 0, .28);
}
.help-icon {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  margin-bottom: 14px;
  background: linear-gradient(135deg, #2e2e2e, #000000);
  font-size: 26px;
}
.help-icon .ui-icon svg { width: 28px; height: 28px; }
.whatsapp-icon { color: #25d366; }
.help-card strong { font-size: 17px; }
.help-card p { color: rgba(255,255,255,.9); line-height: 1.45; }
.sidebar footer {
  padding: 0 18px;
  color: rgba(255,255,255,.82);
  line-height: 1.7;
}
.sidebar footer span { color: rgba(255,255,255,.62); }

.main {
  margin-left: 310px;
  min-height: 100vh;
}
.topbar {
  height: 98px;
  background: rgba(255,255,255,.92);
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: 48px 260px minmax(280px, 1fr) 58px auto;
  gap: 18px;
  align-items: center;
  padding: 0 32px;
  position: sticky;
  top: 0;
  z-index: 5;
  backdrop-filter: blur(10px);
}
.topbar h1 {
  margin: 0;
  font-size: 23px;
}
.hamburger {
  width: 42px;
  height: 42px;
  border: 0;
  background: transparent;
  color: #14335a;
  font-size: 25px;
  cursor: pointer;
}
.hamburger .ui-icon svg { width: 24px; height: 24px; }
.search {
  justify-self: center;
  width: min(560px, 100%);
  height: 50px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 14px;
  box-shadow: 0 4px 16px rgba(20, 34, 56, .04);
}
.search span { color: #697794; font-size: 23px; }
.search .ui-icon svg { width: 20px; height: 20px; }
.search input {
  flex: 1;
  border: 0;
  outline: 0;
  color: var(--text);
}
.search kbd {
  border: 1px solid var(--line);
  border-radius: 5px;
  color: #6d7891;
  padding: 3px 8px;
  background: #fbfcff;
}
.notification {
  position: relative;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  font-size: 27px;
  color: #132849;
}
.notification .ui-icon svg { width: 20px; height: 20px; }
.notification span {
  position: absolute;
  top: 0;
  right: 2px;
  min-width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #ff2525;
  color: #fff;
  font-size: 12px;
  border: 2px solid #fff;
}
.profile {
  display: flex;
  align-items: center;
  gap: 12px;
}
.profile img {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
}
.profile strong { display: block; white-space: nowrap; }
.profile small { display: block; color: var(--muted); }
.profile a { color: #d8d8d8; font-size: 13px; }
.content { padding: 22px 24px; }

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  margin-bottom: 20px;
}
.metric-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.metric-card {
  min-height: 148px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  padding: 28px 30px;
  display: flex;
  align-items: center;
  gap: 26px;
  box-shadow: var(--shadow);
}
.metric-card.compact { min-height: 110px; }
.metric-icon {
  width: 66px;
  height: 66px;
  flex: 0 0 66px;
  border-radius: 15px;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 31px;
  font-weight: 800;
}
.blue { background-color: var(--blue); color: #075fe7; }
.green { background-color: var(--green); color: #078c50; }
.amber { background-color: var(--amber); color: #f59e00; }
.red { background-color: var(--red); color: #dc2626; }
.gray { background-color: var(--gray); color: #627087; }
.metric-icon.blue { background: linear-gradient(135deg, #127cff, #075adc); color: #fff; }
.metric-icon.green { background: linear-gradient(135deg, #15b970, #079151); color: #fff; }
.metric-icon.amber { background: linear-gradient(135deg, #ffb703, #f59e00); color: #fff; }
.metric-card span, .staff-card span { color: #243657; }
.metric-card .ui-icon {
  width: 66px;
  height: 66px;
  flex: 0 0 66px;
  border-radius: 15px;
  background: linear-gradient(135deg, #127cff, #075adc);
  color: #fff;
}
.metric-card .ui-icon svg { width: 30px; height: 30px; }
.metric-card strong {
  display: block;
  margin: 8px 0;
  font-size: 36px;
  line-height: 1;
}
.metric-card small { color: var(--blue); }
.metric-card .green + div small { color: var(--green); }
.metric-card .amber + div small { color: var(--amber); }

.panel {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--shadow);
  margin-bottom: 20px;
  overflow: hidden;
}
.panel.split { padding: 18px; }
.panel-head {
  min-height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 18px;
  border-bottom: 1px solid var(--line);
}
.panel h2, .panel-head h2 {
  margin: 0;
  font-size: 21px;
}
.staff-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(180px, 1fr));
  gap: 14px;
  padding: 14px;
}
.staff-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px;
}
.staff-top {
  display: flex;
  gap: 14px;
  align-items: center;
}
.staff-card img {
  width: 74px;
  height: 74px;
  border-radius: 50%;
  object-fit: cover;
  background: #e9eef7;
}
.staff-card h3 {
  margin: 14px 0 2px;
  font-size: 17px;
}
.staff-card small { color: #465679; }
.staff-card hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 20px 0;
}
.staff-card > strong {
  display: block;
  margin: 8px 0 16px;
  font-size: 26px;
}
.dot {
  display: inline-block;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  margin-right: 8px;
  vertical-align: middle;
}

.btn {
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: 7px;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  font-weight: 700;
}
.btn .ui-icon svg { width: 16px; height: 16px; }
.btn.primary {
  background: linear-gradient(135deg, #147cff, #0861e8);
  color: #fff;
  box-shadow: 0 9px 18px rgba(8, 97, 232, .25);
}
.btn.ghost {
  border-color: #b9d1ff;
  color: #075fe7;
  background: #fff;
}

.btn.whatsapp {
  border-color: #25d366;
  color: #fff;
  background: linear-gradient(135deg, #25d366, #128c7e);
  box-shadow: 0 9px 18px rgba(18, 140, 126, .22);
}
.btn.small {
  min-height: 36px;
  padding: 0 14px;
  font-size: 14px;
}
.install-app-btn {
  white-space: nowrap;
}
.profile .install-app-btn {
  color: #075fe7;
  border-color: #b9d1ff;
}

.table-wrap { overflow-x: auto; }
table {
  width: 100%;
  border-collapse: collapse;
  min-width: 840px;
}
.users-scroll-table {
  width: max-content;
  min-width: 100%;
}
.users-scroll-table th,
.users-scroll-table td {
  min-width: 110px;
}
.users-scroll-table th:first-child,
.users-scroll-table td:first-child {
  min-width: 72px;
}
th, td {
  padding: 16px 24px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}
th {
  background: #fbfcff;
  font-size: 14px;
  color: #1c2946;
}
td { color: #263758; }
td a { color: var(--blue); font-weight: 700; }
.badge {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  padding: 0 11px;
  border-radius: 6px;
  font-size: 14px;
  background: #eef4ff;
}
.badge.blue { background: #eaf2ff; color: #075fe7; }
.badge.amber { background: #fff3dd; color: #d98000; }
.badge.green { background: #e5f8ef; color: #078c50; }
.badge.gray { background: #eef1f5; color: #59667a; }
.badge.red { background: #fee2e2; color: #dc2626; }

.form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.form-grid h2, .form-grid .wide { grid-column: 1 / -1; }
label {
  display: grid;
  gap: 7px;
  color: #263758;
  font-weight: 700;
}
input, select, textarea {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  outline: 0;
  background: #fff;
  color: var(--text);
}
textarea { min-height: 92px; resize: vertical; }
input:focus, select:focus, textarea:focus {
  border-color: #8cb9ff;
  box-shadow: 0 0 0 4px rgba(9, 103, 242, .10);
}
.alert {
  margin-bottom: 16px;
  border-radius: 8px;
  padding: 12px 14px;
  background: #e5f8ef;
  color: #078c50;
  border: 1px solid #bcebd4;
}
.alert.danger {
  background: #fee2e2;
  color: #b91c1c;
  border-color: #fecaca;
}
.report-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  padding: 18px;
}

.reports-page {
  display: grid;
  gap: 22px;
}

.reports-toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(340px, 560px) auto;
  gap: 22px;
  align-items: end;
}

.reports-toolbar h2 {
  margin: 0 0 8px;
  font-size: 32px;
  line-height: 1;
  color: #08265a;
}

.reports-toolbar p {
  margin: 0;
  color: #53617a;
  font-weight: 600;
}

.reports-search {
  height: 54px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 0 16px;
  box-shadow: 0 8px 24px rgba(20, 34, 56, .06);
}

.reports-search input {
  border: 0;
  min-height: 0;
  padding: 0;
  flex: 1;
  box-shadow: none;
}

.reports-search kbd {
  border: 1px solid var(--line);
  border-radius: 5px;
  color: #738096;
  padding: 2px 8px;
  background: #fbfcff;
}

.reports-period {
  display: grid;
  gap: 8px;
  min-width: 560px;
}

.reports-period > span {
  color: #59667e;
  font-size: 13px;
  font-weight: 700;
}

.reports-period div {
  display: flex;
  gap: 0;
}

.reports-period a {
  min-height: 44px;
  min-width: 112px;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  background: #fff;
  color: #253655;
  font-weight: 700;
  box-shadow: 0 5px 16px rgba(20, 34, 56, .04);
}

.reports-period a:first-child { border-radius: 7px 0 0 7px; }
.reports-period a:last-child {
  min-width: 210px;
  border-radius: 0 7px 7px 0;
}
.reports-period a.active {
  border-color: #e3a72d;
  background: #fff8e8;
  color: #08265a;
}

.reports-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 20px;
}

.reports-custom-period {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 14px;
  display: flex;
  align-items: end;
  gap: 12px;
  box-shadow: var(--shadow);
}

.reports-custom-period label {
  min-width: 180px;
}

.reports-summary-card {
  min-height: 138px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 22px;
  box-shadow: var(--shadow);
}

.reports-summary-card > span {
  width: 70px;
  height: 70px;
  flex: 0 0 70px;
  border-radius: 14px;
  display: grid;
  place-items: center;
}

.reports-summary-card > span svg {
  width: 31px;
  height: 31px;
}

.reports-summary-card small {
  display: block;
  color: #1b2947;
  font-weight: 800;
}

.reports-summary-card strong {
  display: block;
  margin: 8px 0;
  color: #071d3f;
  font-size: 30px;
  line-height: 1;
}

.reports-summary-card em {
  color: #0861e8;
  font-style: normal;
  font-weight: 700;
}

.reports-summary-card.blue-soft > span { background: #e8f0ff; color: #1767df; }
.reports-summary-card.amber-soft > span { background: #fff2d8; color: #222b3d; }
.reports-summary-card.green-soft > span { background: #e5f7e9; color: #278448; }
.reports-summary-card.purple-soft > span { background: #f1defa; color: #9333c8; }

.reports-catalog {
  display: grid;
  grid-template-columns: repeat(4, minmax(280px, 1fr));
  gap: 18px;
}

.reports-card {
  min-height: 338px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  padding: 22px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 18px;
  box-shadow: var(--shadow);
}

.reports-card-head {
  display: flex;
  align-items: center;
  gap: 14px;
}

.reports-card-head h2 {
  margin: 0;
  color: #08265a;
  font-size: 22px;
}

.reports-card-icon {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: #fff;
}

.reports-card-icon svg {
  width: 24px;
  height: 24px;
}

.reports-card-icon.navy { background: linear-gradient(135deg, #174277, #061a39); }
.reports-card-icon.green { background: linear-gradient(135deg, #61b95a, #228137); color: #fff; }
.reports-card-icon.violet { background: linear-gradient(135deg, #8b7df0, #5d51c9); }
.reports-card-icon.orange { background: linear-gradient(135deg, #f5a43b, #e27619); }
.reports-card-icon.blue { background: linear-gradient(135deg, #3d8dff, #1460e2); color: #fff; }
.reports-card-icon.teal { background: linear-gradient(135deg, #3fa6b3, #217a86); }
.reports-card-icon.gold { background: linear-gradient(135deg, #ddbf41, #b8900a); }

.reports-list {
  display: grid;
  align-content: start;
}

.reports-row {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  overflow: hidden;
}

.reports-row + .reports-row { margin-top: -1px; }

.reports-row-name {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  color: #273653;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.reports-row-name .ui-icon svg {
  width: 15px;
  height: 15px;
}

.report-actions {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 7px;
}

.report-action {
  width: 31px;
  height: 31px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fff;
  display: inline-grid;
  place-items: center;
  color: #0d315f;
  font-size: 10px;
  font-weight: 900;
}

.report-action svg {
  width: 15px;
  height: 15px;
}

.report-action.pdf {
  color: #ef4444;
}

.report-action.excel {
  color: #198a3e;
}

.reports-see-all {
  justify-self: center;
  color: #08265a;
  font-weight: 800;
}

.reports-footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  padding: 10px 34px 8px;
}

.reports-legend {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #5d6880;
  font-weight: 700;
}

.reports-custom {
  min-height: 52px;
  padding: 0 24px;
  border-radius: 7px;
  background: #071d3f;
  color: #fff;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  box-shadow: 0 12px 24px rgba(7, 29, 63, .22);
}

.report-preview {
  margin: 0;
}

.report-preview-meta {
  padding: 14px 18px;
  color: #5d6880;
  font-weight: 700;
  border-bottom: 1px solid var(--line);
}

.report-preview-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.report-filter-form {
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: end;
  gap: 12px;
  background: #fbfcff;
}

.report-filter-form label {
  min-width: 240px;
}

.report-pdf-body {
  background: #fff;
  color: #111d3a;
  overflow-x: hidden;
}

.report-pdf-page {
  width: min(1320px, 100%);
  margin: 0 auto;
  padding: 28px;
  overflow-x: hidden;
}

.report-pdf-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 18px;
}

.report-pdf-page header {
  display: grid;
  gap: 6px;
  margin-bottom: 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.report-pdf-page header strong {
  color: #08265a;
}

.report-pdf-page h1 {
  margin: 0;
  font-size: 28px;
}

.report-pdf-page p {
  margin: 0;
  color: #5d6880;
  font-weight: 700;
}

.report-pdf-page .report-totals {
  margin-top: 18px;
}

.report-pdf-page .table-wrap {
  overflow: visible;
}

.report-pdf-page table {
  min-width: 0;
  table-layout: fixed;
}

.report-pdf-page th,
.report-pdf-page td {
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
}

@media print {
  @page {
    margin: 10mm;
  }
  body.report-pdf-body {
    background: #fff;
    overflow: hidden;
  }
  .report-pdf-actions {
    display: none;
  }
  .report-pdf-page {
    width: 100%;
    padding: 0;
  }
  .report-pdf-page table {
    min-width: 0;
    font-size: 11px;
  }
  .report-pdf-page th,
  .report-pdf-page td {
    padding: 8px;
  }
}
.settings-list {
  display: grid;
  gap: 0;
}
.settings-list div {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 22px;
  border-top: 1px solid var(--line);
}
.settings-list span { color: var(--muted); }

.product-picker {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px;
  background: #fbfcff;
}
.product-picker-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.product-picker h3 {
  margin: 0;
  font-size: 17px;
}
.product-list {
  display: grid;
  gap: 10px;
}
.product-row {
  display: grid;
  grid-template-columns: 54px minmax(220px, 1fr) 120px auto;
  gap: 10px;
  align-items: center;
}

.product-thumb {
  width: 54px;
  height: 54px;
  border-radius: 12px;
  background: linear-gradient(135deg, #eef4ff, #dfe9fb);
  color: #2464d8;
  font-weight: 900;
  display: grid;
  place-items: center;
  overflow: hidden;
}

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

.product-thumb.is-clickable,
.part-image.is-clickable,
.selected-product-thumb.is-clickable {
  cursor: zoom-in;
}

.image-viewer-dialog {
  width: min(94vw, 920px);
  border: 0;
  padding: 0;
  background: transparent;
}

.image-viewer-dialog::backdrop {
  background: rgba(4, 10, 24, 0.78);
}

.image-viewer-dialog img {
  display: block;
  max-width: 100%;
  max-height: 82vh;
  margin: 0 auto;
  border-radius: 18px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  background: #fff;
}

.report-viewer-dialog {
  width: min(1380px, 98vw);
  max-height: 92vh;
  border: 0;
  padding: 0;
  background: transparent;
}

.report-viewer-dialog::backdrop {
  background: rgba(7, 20, 38, 0.72);
}

.report-viewer-shell {
  position: relative;
  width: 100%;
  height: 100%;
  max-height: none;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: #f7f9fd;
  border-radius: 18px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.3);
}

.report-viewer-close {
  position: sticky;
  top: 12px;
  float: right;
  margin: 12px 12px 0 0;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 999px;
  background: rgba(255,255,255,0.96);
  color: #0f1c31;
  font-size: 28px;
  line-height: 1;
  box-shadow: 0 12px 30px rgba(0,0,0,0.2);
  z-index: 2;
}

.report-viewer-content {
  padding: 24px 26px;
  flex: 1;
  overflow: auto;
}

.report-viewer-resize {
  position: absolute;
  right: 6px;
  bottom: 6px;
  width: 22px;
  height: 22px;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: nwse-resize;
  z-index: 3;
}

.report-viewer-resize::before {
  content: "";
  position: absolute;
  right: 3px;
  bottom: 3px;
  width: 12px;
  height: 12px;
  border-right: 2px solid #9db2d3;
  border-bottom: 2px solid #9db2d3;
}

.user-avatar-fallback {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: inline-grid;
  place-items: center;
  background: #eef4ff;
  color: #2d5fd6;
  font-size: 12px;
  font-weight: 800;
}

body.report-viewer-resizing,
body.report-viewer-resizing * {
  cursor: nwse-resize !important;
  user-select: none !important;
}

.report-totals {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
  margin: 0 0 16px;
}

.report-total-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 14px 16px;
  box-shadow: 0 8px 20px rgba(20, 34, 56, .05);
}

.report-total-card span {
  display: block;
  color: #5d6880;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 6px;
}

.report-total-card strong {
  display: block;
  color: #08265a;
  font-size: 22px;
  line-height: 1.1;
}

.report-viewer-loading {
  padding: 30px;
  color: #5d6880;
  font-weight: 700;
}

.report-modal-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 16px;
  padding: 8px 0 16px;
}

.report-modal-head strong {
  display: block;
  font-size: 22px;
  color: #08265a;
}

.report-modal-head small {
  color: #5d6880;
  font-weight: 700;
}

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

.report-modal-filters {
  display: flex;
  gap: 12px;
  align-items: end;
  margin-bottom: 14px;
}

.report-modal-filters label {
  min-width: 280px;
}

.report-modal-filters input {
  width: 100%;
}

.report-empty-state {
  margin: 10px 0 14px;
  padding: 12px 14px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: #5d6880;
  background: #fff;
  font-weight: 700;
}

.image-viewer-close {
  position: fixed;
  top: 18px;
  right: 18px;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 999px;
  background: rgba(255,255,255,0.95);
  color: #111;
  font-size: 28px;
  line-height: 1;
  box-shadow: 0 12px 30px rgba(0,0,0,0.25);
}

.login-body {
  background:
    radial-gradient(circle at 15% 15%, rgba(18, 124, 255, .20), transparent 28%),
    linear-gradient(135deg, #051b32, #082b4b 55%, #f7f9fd 55%);
  display: grid;
  place-items: center;
  padding: 24px;
}
.login-shell {
  width: min(980px, 100%);
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 30px;
  align-items: center;
}
.login-brand {
  color: #fff;
}
.login-brand h1 {
  margin: 18px 0 8px;
  font-size: 58px;
}
.login-brand p {
  max-width: 520px;
  color: rgba(255,255,255,.86);
  font-size: 19px;
  line-height: 1.5;
}
.login-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 28px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 16px;
}
.login-card h2 { margin: 0; font-size: 24px; }
.login-card small { color: var(--muted); }
.checkline {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  color: #33415f;
}
.checkline input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: #0861e8;
}

.home-body {
  background: #fff;
  color: #081a3c;
}

.home-topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  min-height: 88px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 28px;
  padding: 0 118px;
  background: linear-gradient(180deg, #061f44, #041731);
  border-bottom: 1px solid rgba(255,255,255,.08);
  box-shadow: 0 16px 34px rgba(0, 0, 0, .16);
}

.home-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  min-width: 250px;
}

.home-logo .logo-image {
  width: 58px;
  height: 58px;
}

.home-logo span strong {
  font-size: 25px;
  letter-spacing: 0;
}

.home-logo b,
.home-hero-copy h1 b {
  color: #ffc400;
}

.home-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 26px;
  min-width: 0;
}

.home-nav a {
  color: #fff;
  font-weight: 800;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.home-nav .ui-icon svg {
  width: 15px;
  height: 15px;
}

.home-actions,
.home-hero-actions,
.home-cta-actions {
  display: flex;
  gap: 16px;
  align-items: center;
}

.home-page {
  width: min(100% - 170px, 1720px);
  margin: 0 auto;
}

.home-hero {
  min-height: 640px;
  padding-top: 88px;
  background:
    radial-gradient(circle at 0 32%, rgba(24, 118, 255, .26) 0 1px, transparent 2px) 0 0 / 12px 12px,
    radial-gradient(circle at 15% 50%, rgba(36, 110, 217, .24), transparent 25%),
    linear-gradient(118deg, #072d66 0%, #082a5b 40%, #061f49 68%, #03152f 100%);
  color: #fff;
  overflow: hidden;
}

.home-hero-grid {
  display: grid;
  grid-template-columns: minmax(500px, .92fr) minmax(680px, 1.08fr);
  gap: 76px;
  align-items: center;
  min-height: 552px;
}

.home-hero-copy h1 {
  margin: 22px 0 16px;
  font-size: 78px;
  line-height: .92;
  color: #fff;
  font-weight: 950;
  letter-spacing: 0;
}

.home-hero-copy h1 span {
  text-shadow: 0 12px 30px rgba(0, 0, 0, .24);
}

.home-hero-copy h2 {
  margin: 0 0 20px;
  font-size: 25px;
  line-height: 1.25;
  color: #fff;
}

.home-kicker {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0;
  padding: 8px 12px;
  border: 1px solid rgba(255, 196, 0, .55);
  border-radius: 5px;
  color: #fff;
  font-weight: 800;
  font-size: 13px;
  background: rgba(5, 31, 68, .72);
}

.home-kicker .ui-icon {
  color: #ffc400;
}

.home-kicker .ui-icon svg {
  width: 15px;
  height: 15px;
}

.home-lead {
  margin: 0;
  max-width: 640px;
  color: rgba(255,255,255,.86);
  font-size: 19px;
  line-height: 1.6;
}

.home-hero-actions-wrap {
  display: flex;
  gap: 18px;
  align-items: stretch;
  margin-top: 34px;
}

.home-highlight {
  min-width: 282px;
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 0;
  padding: 18px 20px;
  border-radius: 8px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.08);
  color: #ffc400;
}

.home-highlight .ui-icon svg {
  width: 32px;
  height: 32px;
}

.home-highlight span {
  display: grid;
  gap: 5px;
}

.home-highlight strong {
  font-size: 16px;
  color: #ffc400;
}

.home-highlight small {
  color: rgba(255,255,255,.76);
}

.home-highlight::before {
  content: none;
}

.home-hero-actions .btn,
.home-cta-actions .btn {
  min-height: 64px;
  min-width: 216px;
  border-radius: 8px;
  justify-content: center;
  font-weight: 900;
}

.home-hero-actions .btn.primary,
.home-cta-actions .btn.primary {
  background: linear-gradient(180deg, #ffd033, #ffba00);
  color: #071b3b;
  border: 1px solid #f1ad00;
  box-shadow: 0 18px 34px rgba(255, 186, 0, .26);
}

.home-hero-actions .btn.ghost,
.home-cta-actions .btn.ghost {
  background: transparent;
  border-color: rgba(255,255,255,.48);
  color: #fff;
}

.home-pills {
  display: flex;
  gap: 54px;
  margin-top: 36px;
}

.home-pills span {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: rgba(255,255,255,.68);
  font-weight: 700;
  white-space: nowrap;
}

.home-pills .ui-icon {
  color: #4f94ff;
}

.home-preview-shell {
  position: relative;
  border: 8px solid rgba(19, 31, 54, .9);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .38);
  overflow: hidden;
  transform: translateX(20px);
}

.home-preview-shell:focus-visible {
  outline: 3px solid #ffc400;
  outline-offset: 5px;
}

.home-carousel-track {
  position: relative;
}

.home-preview-shell img {
  width: 100%;
  display: none;
  height: auto;
}

.home-preview-shell img.active {
  display: block;
  animation: homeSlideIn .28s ease;
}

.home-carousel-arrow {
  position: absolute;
  top: 50%;
  z-index: 2;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.55);
  background: rgba(4, 20, 45, .72);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  transform: translateY(-50%);
  box-shadow: 0 12px 24px rgba(0,0,0,.24);
}

.home-carousel-arrow:hover {
  background: #ffc400;
  color: #071b3b;
  border-color: #ffc400;
}

.home-carousel-arrow.prev {
  left: 16px;
}

.home-carousel-arrow.next {
  right: 16px;
}

.home-carousel-arrow.prev .ui-icon {
  transform: rotate(180deg);
}

.home-carousel-arrow .ui-icon svg {
  width: 20px;
  height: 20px;
}

.home-carousel-dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 16px;
  display: flex;
  justify-content: center;
  gap: 8px;
  z-index: 2;
}

.home-carousel-dots button {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 1px solid rgba(255,255,255,.72);
  border-radius: 50%;
  background: rgba(4, 20, 45, .4);
  cursor: pointer;
}

.home-carousel-dots button.active {
  width: 28px;
  border-radius: 999px;
  background: #ffc400;
  border-color: #ffc400;
}

@keyframes homeSlideIn {
  from {
    opacity: .15;
    transform: scale(1.015);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.home-feature-band {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 24px;
  margin-top: -32px;
  position: relative;
  z-index: 3;
}

.home-feature-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 24px 18px 22px;
  text-align: center;
  box-shadow: 0 18px 42px rgba(9, 31, 66, .10);
}

.home-feature-icon {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  margin: 0 auto 16px;
  color: #fff;
}

.home-feature-icon.blue { background: linear-gradient(135deg, #2f73ff, #1f45bd); }
.home-feature-icon.cyan { background: linear-gradient(135deg, #23c5cd, #1497a1); }
.home-feature-icon.green { background: linear-gradient(135deg, #46c95f, #239647); }
.home-feature-icon.purple { background: linear-gradient(135deg, #a55be9, #7338c2); }
.home-feature-icon.orange { background: linear-gradient(135deg, #ff7a38, #e95b1b); }
.home-feature-icon.yellow { background: linear-gradient(135deg, #ffc833, #e5a900); }
.home-feature-icon.gray { background: linear-gradient(135deg, #8996a7, #627082); }

.home-feature-icon svg {
  width: 26px;
  height: 26px;
}

.home-feature-card h2 {
  margin: 0 0 10px;
  font-size: 16px;
  color: #08265a;
}

.home-feature-card p {
  margin: 0;
  color: #5d6880;
  line-height: 1.45;
  font-size: 14px;
}

.home-steps {
  margin: 24px 0 8px;
}

.home-steps > h2 {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin: 0 0 18px;
  color: #092654;
  font-size: 21px;
}

.home-steps > h2 span {
  width: 48px;
  height: 1px;
  background: #1d64d4;
}

.home-step-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 72px;
  align-items: center;
  width: min(1220px, 100%);
  margin: 0 auto;
}

.home-steps article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  min-height: 88px;
  padding: 18px 26px;
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  position: relative;
  box-shadow: 0 12px 28px rgba(9, 31, 66, .08);
}

.home-steps article:not(:last-child)::after {
  content: "";
  position: absolute;
  right: -62px;
  top: 50%;
  width: 50px;
  border-top: 1px dashed #8ca0c3;
}

.home-steps strong {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #1450b9;
  color: #fff;
  font-size: 22px;
  box-shadow: inset 0 -4px 0 rgba(0,0,0,.14);
}

.home-steps article > .ui-icon {
  color: #1450b9;
}

.home-steps article > .ui-icon svg {
  width: 34px;
  height: 34px;
}

.home-steps b {
  display: block;
  color: #071f49;
  margin-bottom: 5px;
}

.home-steps p,
.home-cta p {
  margin: 0;
  color: #5d6880;
  line-height: 1.5;
}

.home-cta {
  display: flex;
  justify-content: space-between;
  gap: 22px;
  align-items: center;
  margin: 10px 0 26px;
  border-radius: 8px;
  background: linear-gradient(120deg, #062a60, #041a3c 78%);
  color: #fff;
  padding: 26px 48px;
  box-shadow: 0 20px 40px rgba(4, 26, 60, .22);
}

.home-cta h2 {
  margin: 0 0 6px;
  color: #fff;
  font-size: 27px;
}

.home-cta p {
  color: rgba(255,255,255,.86);
  font-size: 16px;
}

.home-cta-icon {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #ffc400;
  border: 2px solid #ffc400;
  flex: 0 0 auto;
}

.home-cta-icon svg {
  width: 38px;
  height: 38px;
}

.home-pricing {
  margin: 22px 0 10px;
}

.home-pricing-head {
  text-align: center;
  max-width: 860px;
  margin: 0 auto 20px;
}

.home-pricing-head h2 {
  margin: 14px 0 10px;
  color: #08265a;
  font-size: 30px;
}

.home-pricing-head p:last-child {
  margin: 0;
  color: #5d6880;
  line-height: 1.55;
}

.home-pricing-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.home-pricing-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: linear-gradient(180deg, #fff, #f8fbff);
  box-shadow: 0 16px 34px rgba(9, 31, 66, .08);
  padding: 24px 20px 22px;
  display: grid;
  gap: 12px;
  text-align: left;
}

.home-pricing-card.consult {
  background: linear-gradient(135deg, #062a60, #041a3c);
  color: #fff;
}

.home-pricing-card h3 {
  margin: 0;
  color: inherit;
  font-size: 22px;
}

.home-pricing-card strong {
  color: #ffc400;
  font-size: 28px;
  line-height: 1;
}

.home-pricing-card p {
  margin: 0;
  color: inherit;
  opacity: .84;
  line-height: 1.5;
}

.home-pricing-card small {
  color: #5d6880;
  font-weight: 800;
}

.home-pricing-card.consult small {
  color: rgba(255,255,255,.78);
}

.home-pricing-card .btn {
  justify-content: center;
}

.home-pricing-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(13, 103, 242, .08);
  color: #0d67f2;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .02em;
}

.home-pricing-card.consult .home-pricing-badge {
  background: rgba(255, 196, 0, .14);
  color: #ffc400;
}

.home-alert {
  margin-top: 14px;
}

.signup-body {
  background:
    radial-gradient(circle at 10% 10%, rgba(8, 103, 242, .12), transparent 28%),
    linear-gradient(135deg, #051b32 0%, #0a2f55 44%, #f7f9fd 44%, #f7f9fd 100%);
  padding: 24px;
}

.signup-shell {
  width: min(1240px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 460px;
  gap: 28px;
  align-items: center;
}

.signup-intro {
  color: #fff;
}

.signup-intro h1 {
  margin: 18px 0 10px;
  font-size: 60px;
  line-height: .98;
}

.signup-intro p {
  max-width: 620px;
  color: rgba(255,255,255,.88);
  font-size: 18px;
  line-height: 1.55;
}

.signup-list {
  margin: 18px 0 22px;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.signup-list li {
  padding-left: 18px;
  position: relative;
  color: rgba(255,255,255,.92);
}

.signup-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .55em;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #0d67f2;
}

.signup-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 28px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 14px;
}

.signup-card h2 {
  margin: 0 0 4px;
  font-size: 26px;
  color: #08265a;
}

.signup-card small {
  color: var(--muted);
}

@media (max-width: 1300px) {
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .staff-grid { grid-template-columns: repeat(3, minmax(190px, 1fr)); }
  .topbar { grid-template-columns: 42px 180px minmax(220px, 1fr) 48px auto; }
  .home-topbar {
    padding: 0 34px;
    gap: 18px;
  }
  .home-logo {
    min-width: 210px;
  }
  .home-nav {
    gap: 14px;
    justify-content: flex-start;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .home-nav::-webkit-scrollbar {
    display: none;
  }
  .home-page {
    width: min(100% - 54px, 1280px);
  }
  .home-hero-grid {
    grid-template-columns: minmax(420px, .95fr) minmax(520px, 1.05fr);
    gap: 34px;
  }
  .home-feature-band {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .home-pricing-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .home-step-row {
    gap: 28px;
  }
  .home-steps article:not(:last-child)::after {
    right: -24px;
    width: 20px;
  }
  .reports-toolbar {
    grid-template-columns: 1fr;
    align-items: start;
  }
  .reports-period { min-width: 0; }
  .reports-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .reports-catalog { grid-template-columns: repeat(2, minmax(280px, 1fr)); }
}

@media (max-width: 880px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform .2s ease;
  }
  .sidebar-open .sidebar { transform: translateX(0); }
  .main { margin-left: 0; }
  .topbar {
    height: auto;
    min-height: 80px;
    grid-template-columns: 42px 1fr auto;
    padding: 14px;
  }
  .search { grid-column: 1 / -1; order: 5; }
  .notification { display: none; }
  .profile span { display: none; }
  .profile .install-app-btn { padding: 0 10px; font-size: 12px; }
  .metric-grid, .metric-grid.two, .staff-grid, .form-grid, .report-grid, .login-shell {
    grid-template-columns: 1fr;
  }
  .reports-summary, .reports-catalog {
    grid-template-columns: 1fr;
  }
  .reports-toolbar h2 { font-size: 26px; }
  .reports-period div {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .reports-period a,
  .reports-period a:first-child,
  .reports-period a:last-child {
    min-width: 0;
    border-radius: 7px;
  }
  .reports-footer {
    align-items: stretch;
    flex-direction: column;
    padding: 4px 0 0;
  }
  .reports-legend {
    flex-wrap: wrap;
  }
  .product-row {
    display: flex;
    flex-wrap: wrap;
  }
  .product-thumb { flex: 0 0 54px; }
  .product-row input[name="produto_busca[]"] { flex: 1 1 220px; min-width: 0; }
  .product-row input[name="produto_qtd[]"] { width: 100px; }
  .product-row [data-remove-product] { width: 100%; }
  .content { padding: 14px; }
  .metric-card { padding: 20px; }
  .login-brand h1 { font-size: 42px; }
  .home-page { width: min(100% - 32px, 1480px); }
  .home-feature-band { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-pricing-grid { grid-template-columns: 1fr; }
  .home-step-row { grid-template-columns: 1fr; gap: 14px; }
  .home-steps article::after { display: none; }
  .signup-shell { grid-template-columns: 1fr; }
}

@media (max-width: 960px) {
  .home-topbar {
    position: static;
    min-height: 0;
    grid-template-columns: 1fr;
    padding: 18px 16px;
    gap: 14px;
  }
  .home-logo { min-width: 0; }
  .home-logo .logo-image { width: 48px; height: 48px; }
  .home-nav { justify-content: flex-start; }
  .home-actions {
    justify-content: stretch;
  }
  .home-actions .btn {
    flex: 1;
    justify-content: center;
  }
  .home-hero {
    padding-top: 0;
    min-height: 0;
  }
  .home-hero-grid {
    grid-template-columns: 1fr;
    min-height: 0;
    padding: 42px 0 64px;
    gap: 34px;
  }
  .home-hero-copy h1 {
    font-size: clamp(46px, 13vw, 64px);
  }
  .home-hero-copy h2 {
    font-size: 22px;
  }
  .home-hero-actions-wrap,
  .home-hero-actions,
  .home-pills {
    flex-direction: column;
    align-items: stretch;
  }
  .home-pills {
    gap: 14px;
  }
  .home-feature-band {
    grid-template-columns: 1fr;
    margin-top: -36px;
  }
  .home-pricing-grid {
    grid-template-columns: 1fr;
  }
  .home-preview-shell {
    transform: none;
    border-width: 5px;
  }
  .home-cta {
    flex-direction: column;
    align-items: flex-start;
    padding: 26px;
  }
  .home-cta-actions {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }
  .home-cta-actions .btn {
    width: 100%;
  }
}
