:root {
  font-family: "Segoe UI", Inter, Arial, sans-serif;
  color: #101c3b;
  background: #f3f6fb;
  font-synthesis: none;
  --navy: #152338;
  --blue: #1677ef;
  --muted: #71819e;
  --border: #e8edf5;
  --shadow: 0 3px 14px #18345b08;
  --sidebar: 244px;
}
* {
  box-sizing: border-box;
}
/* Ampliación de lectura del panel y sus formularios administrativos. */
#shell,
#dialog {
  --admin-text-increase: 2px;
  font-size: 18px;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea,
summary {
  outline-offset: 4px;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 3px solid #4796fa;
}
button {
  cursor: pointer;
  border: 0;
  border-radius: 8px;
  padding: 11px 15px;
  font-weight: 600;
  min-height: 44px;
}
button:disabled {
  opacity: 0.55;
  cursor: wait;
}
button:hover {
  filter: brightness(0.96);
}
a {
  color: #0967d9;
}
.icon {
  width: 22px;
  height: 22px;
  display: inline-block;
  flex: none;
  vertical-align: middle;
}
button .icon {
  width: 19px;
  height: 19px;
}
.primary {
  background: #1576ed;
  color: white;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
}
.secondary {
  background: white;
  border: 1px solid #dee7f3;
  color: #365274;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.quiet {
  background: transparent;
  color: #596d8c;
  display: inline-flex;
  align-items: center;
  gap: 9px;
}
.text-button {
  color: #0868e3;
  background: transparent;
  padding: 4px;
  min-height: 32px;
  font-size: calc(11px + var(--admin-text-increase, 0px));
  white-space: nowrap;
  font-weight: 500;
}
.icon-button {
  display: inline-grid;
  place-items: center;
  padding: 9px;
  background: transparent;
  color: #64758e;
  width: 44px;
  height: 44px;
  border-radius: 8px;
}
[hidden] {
  display: none !important;
}
.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.skip-link {
  position: fixed;
  top: -70px;
  left: 12px;
  z-index: 100;
  background: #fff;
  padding: 12px 20px;
  border-radius: 6px;
}
.skip-link:focus {
  top: 10px;
}
.eyebrow {
  font-size: calc(10px + var(--admin-text-increase, 0px));
  font-weight: 700;
  letter-spacing: 1.8px;
  color: #637b9e;
}
.muted {
  color: var(--muted);
  line-height: 1.55;
}
h1,
h2,
p {
  margin-top: 0;
}
h1 {
  font-size: calc(29px + var(--admin-text-increase, 0px));
  line-height: 1.2;
  letter-spacing: -0.8px;
  margin: 0 0 5px;
  font-weight: 700;
}
h2 {
  font-size: calc(17px + var(--admin-text-increase, 0px));
  letter-spacing: -0.35px;
}
small {
  color: var(--muted);
  line-height: 1.6;
}
.wordmark {
  font-size: calc(21px + var(--admin-text-increase, 0px));
  font-weight: 700;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
  color: white;
  white-space: nowrap;
  letter-spacing: -0.4px;
}
.brand-mark {
  width: 36px;
  height: 36px;
  background: linear-gradient(145deg, #238af9, #0055bc);
  display: grid;
  place-items: center;
  border-radius: 9px;
  box-shadow: inset 0 1px 0 #ffffff44;
}
.brand-mark .icon {
  width: 25px;
  height: 25px;
  stroke-width: 2.2;
}
.brand-name {
  font-size: calc(20px + var(--admin-text-increase, 0px));
}
aside {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar);
  background: linear-gradient(160deg, #132034, #1c2c41);
  color: #dbe4f0;
  display: flex;
  flex-direction: column;
  z-index: 30;
  padding: 23px 0 18px;
}
aside .wordmark {
  margin: 0 18px 31px;
}
nav {
  display: grid;
  gap: 5px;
  overflow-y: auto;
  padding: 0 11px 0 0;
}
nav button {
  position: relative;
  display: flex;
  align-items: center;
  gap: 18px;
  text-align: left;
  padding: 14px 20px 14px 24px;
  min-height: 48px;
  border-radius: 0 9px 9px 0;
  background: transparent;
  color: #d8e1ed;
  font-size: calc(14px + var(--admin-text-increase, 0px));
  font-weight: 400;
  white-space: nowrap;
}
nav .icon {
  width: 22px;
  height: 22px;
  stroke-width: 1.9;
}
nav .active {
  color: white;
  background: linear-gradient(100deg, #2059a9, #194a92);
  box-shadow: 0 4px 10px #07152b35;
}
nav .active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 7px;
  background: #328ffd;
  border-radius: 0 5px 5px 0;
}
.nav-icon {
  width: 22px;
  display: flex;
}
.aside-bottom {
  margin: auto 22px 0;
  border-top: 1px solid #ffffff10;
  padding-top: 18px;
  color: #b1bfd1;
  font-size: calc(11px + var(--admin-text-increase, 0px));
}
.aside-bottom small {
  display: block;
  margin: 7px 0 0 12px;
  color: #99abc2;
  font-size: calc(10px + var(--admin-text-increase, 0px));
}
.status-dot {
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #42c794;
  margin-right: 5px;
}
.workspace {
  margin-left: var(--sidebar);
  min-width: 0;
}
.topbar {
  height: 72px;
  background: #fff;
  box-shadow: 0 2px 8px #253a6009;
  border-bottom: 1px solid #e4eaf3;
  padding: 0 25px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  position: sticky;
  top: 0;
  z-index: 20;
}
.global-search {
  position: relative;
  max-width: 490px;
  width: 45%;
  display: flex;
  align-items: center;
  background: #f0f4f8;
  border: 1px solid #dde5ef;
  border-radius: 8px;
  color: #7f8ba0;
  min-height: 42px;
  padding-left: 14px;
}
.global-search > .icon,
.global-search > [data-icon] > .icon {
  width: 19px;
  height: 19px;
}
.global-search input {
  border: 0;
  background: transparent;
  padding: 10px 12px;
  min-height: 40px;
  font-size: calc(13px + var(--admin-text-increase, 0px));
  color: #283f61;
  outline: none;
  min-width: 0;
}
.global-search:focus-within {
  outline: 2px solid #82b6fa;
  outline-offset: 2px;
}
.search-shortcut {
  margin-right: 14px;
  font-size: calc(10px + var(--admin-text-increase, 0px));
  white-space: nowrap;
  color: #8b97aa;
}
.search-results {
  position: absolute;
  top: 48px;
  left: 0;
  right: 0;
  background: white;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 6px;
  box-shadow: 0 9px 25px #1b376629;
  max-height: 350px;
  overflow: auto;
}
.search-results button {
  display: flex;
  gap: 12px;
  width: 100%;
  background: transparent;
  color: #365274;
  text-align: left;
  font-size: calc(13px + var(--admin-text-increase, 0px));
}
.search-results p {
  padding: 10px;
  font-size: calc(12px + var(--admin-text-increase, 0px));
  line-height: 1.6;
  margin: 0;
}
.topbar-right {
  display: flex;
  align-items: center;
  gap: 18px;
  flex: none;
}
.environment {
  font-size: calc(9px + var(--admin-text-increase, 0px));
  font-weight: 700;
  color: #7b8a9e;
  letter-spacing: 1px;
}
.notification-control,
.profile-control {
  position: relative;
}
.notification-dot {
  position: absolute;
  right: 5px;
  top: 3px;
  min-width: 15px;
  height: 15px;
  border: 2px solid white;
  border-radius: 12px;
  background: #ed5461;
  color: white;
  font-size: calc(8px + var(--admin-text-increase, 0px));
  display: grid;
  place-items: center;
  padding: 0 2px;
}
.profile-control {
  border-left: 1px solid #edf0f5;
  padding-left: 18px;
}
.profile-button {
  display: flex;
  align-items: center;
  gap: 10px;
  background: white;
  padding: 0;
  color: #162747;
  font-size: calc(12px + var(--admin-text-increase, 0px));
  text-align: left;
  font-weight: 500;
}
.profile-button > .icon,
.profile-button > [data-icon] .icon {
  width: 16px;
  height: 16px;
  color: #7686a0;
}
.profile-label {
  display: grid;
  gap: 2px;
  min-width: 84px;
}
.profile-label strong {
  font-weight: 500;
  font-size: calc(13px + var(--admin-text-increase, 0px));
}
.profile-label small {
  font-size: calc(11px + var(--admin-text-increase, 0px));
}
.avatar {
  width: 35px;
  height: 35px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(130deg, #e7f1ff, #cfe2fc);
  color: #2472d2;
  font-size: calc(12px + var(--admin-text-increase, 0px));
  font-weight: 650;
  flex: none;
}
.avatar.administrator {
  background: linear-gradient(135deg, #e4ebf6, #b8c9e1);
  color: #243d62;
  box-shadow:
    inset 0 0 0 2px white,
    0 0 0 1px #dae4f1;
  width: 37px;
  height: 37px;
}
.avatar.tiny {
  width: 29px;
  height: 29px;
  font-size: calc(10px + var(--admin-text-increase, 0px));
}
.header-popover {
  position: absolute;
  right: 0;
  top: 52px;
  width: 285px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 10px 30px #243f6729;
  padding: 20px;
  color: #30496c;
  font-size: calc(13px + var(--admin-text-increase, 0px));
  line-height: 1.6;
}
.header-popover h2 {
  font-size: calc(16px + var(--admin-text-increase, 0px));
  margin-bottom: 16px;
}
.header-popover p {
  margin-bottom: 10px;
}
.header-popover button {
  display: block;
}
.profile-menu {
  width: 225px;
}
.profile-menu > span {
  color: #7788a0;
  display: block;
  font-size: calc(11px + var(--admin-text-increase, 0px));
  margin-bottom: 8px;
}
.menu-toggle {
  display: none;
}
main {
  padding: 22px 24px 12px;
  max-width: 1900px;
  margin: 0 auto;
  min-height: calc(100vh - 124px);
}
.page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 19px;
}
.page-heading p {
  font-size: calc(14px + var(--admin-text-increase, 0px));
  margin: 0;
}
.actions {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
}
.refresh-button {
  font-size: calc(12px + var(--admin-text-increase, 0px));
  padding: 9px 11px;
  min-height: 40px;
}
.period-control {
  display: flex;
  align-items: center;
  gap: 10px;
  background: white;
  border: 1px solid #e5ebf4;
  border-radius: 8px;
  padding: 0 12px;
  box-shadow: var(--shadow);
  color: #6e81a0;
  margin: 0;
  min-height: 41px;
}
.period-control .icon {
  width: 19px;
  height: 19px;
}
.period-control input {
  border: 0;
  padding: 9px 0;
  font-size: calc(12px + var(--admin-text-increase, 0px));
  max-width: 165px;
  min-height: 39px;
  background: transparent;
  color: #263c5e;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}
.kpi-card {
  display: flex;
  align-items: center;
  gap: 17px;
  background: #fff;
  border-radius: 11px;
  padding: 23px 19px;
  box-shadow: var(--shadow);
  border: 1px solid #eef2f8;
  min-height: 130px;
  min-width: 0;
}
.kpi-card > div {
  min-width: 0;
}
.kpi-card h2 {
  font-size: calc(13px + var(--admin-text-increase, 0px));
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.4;
  margin: 0 0 5px;
}
.kpi-value {
  font-size: calc(29px + var(--admin-text-increase, 0px));
  font-weight: 700;
  letter-spacing: -0.8px;
  line-height: 1.2;
  display: block;
  overflow-wrap: anywhere;
  font-variant-numeric: tabular-nums;
}
.kpi-icon {
  width: 65px;
  height: 65px;
  flex: none;
  border-radius: 50%;
  display: grid;
  place-items: center;
}
.kpi-icon .icon {
  width: 30px;
  height: 30px;
  stroke-width: 2.2;
}
.blue {
  background: #e4efff;
  color: #087aff;
}
.amber {
  background: #fff2d6;
  color: #dc991a;
}
.green {
  background: #e1f6ed;
  color: #00a56a;
}
.kpi-detail {
  font-size: calc(11px + var(--admin-text-increase, 0px));
  color: #788aa7;
  margin: 6px 0 0;
  line-height: 1.45;
}
.kpi-detail.positive {
  font-size: calc(12px + var(--admin-text-increase, 0px));
  color: #058457;
}
.kpi-card small {
  font-size: calc(11px + var(--admin-text-increase, 0px));
}
.panel {
  background: white;
  border: 1px solid #ecf0f7;
  border-radius: 11px;
  box-shadow: var(--shadow);
  min-width: 0;
  overflow: hidden;
  margin-bottom: 17px;
}
.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 17px 18px 8px;
  min-height: 53px;
}
.panel-heading h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: calc(15px + var(--admin-text-increase, 0px));
  font-weight: 650;
  margin: 0;
  line-height: 1.3;
  letter-spacing: -0.2px;
}
.panel-heading h2 > .icon {
  color: #087bfa;
  width: 22px;
  height: 22px;
}
.panel-heading h2 > .icon.green-text {
  color: #13ac72;
}
.panel-heading small,
.panel-heading > .muted {
  font-size: calc(10px + var(--admin-text-increase, 0px));
}
.panel-body {
  padding: 18px 20px;
}
.charts-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 15px;
}
.chart-panel {
  min-height: 255px;
}
.chart-body {
  padding: 4px 17px 0;
  min-height: 175px;
}
.chart-period select {
  padding: 7px 28px 7px 10px;
  font-size: calc(11px + var(--admin-text-increase, 0px));
  border-color: #e3eaf4;
  max-width: 156px;
  min-height: 32px;
  border-radius: 6px;
  background: #fbfcfe;
  color: #4e6486;
}
.chart-period {
  margin: 0;
  flex: none;
}
.sales-bars {
  display: block;
  width: 100%;
  height: 175px;
}
.chart-gridline {
  stroke: #edf1f7;
  stroke-width: 1;
}
.chart-x,
.chart-y {
  fill: #6f83a4;
  font-family: inherit;
  font-size: calc(11px + var(--admin-text-increase, 0px));
}
.chart-caption {
  font-size: calc(10px + var(--admin-text-increase, 0px));
  color: #7f90aa;
  text-align: center;
  line-height: 1.4;
  padding: 0 0 7px;
}
.distribution-caption {
  margin: 0 0 5px;
}
.chart-data {
  padding: 3px 17px 10px;
  font-size: calc(10px + var(--admin-text-increase, 0px));
  color: #6c7e99;
}
.chart-data summary {
  cursor: pointer;
  min-height: 20px;
  display: list-item;
  width: max-content;
  max-width: 100%;
  padding: 3px 0;
}
.chart-data table {
  margin-top: 8px;
}
.donut-layout {
  display: flex;
  align-items: center;
  gap: 22px;
  min-height: 178px;
  padding: 0 3px 8px;
}
.donut-figure {
  width: 174px;
  height: 174px;
  position: relative;
  flex: none;
}
.donut-figure svg {
  width: 100%;
  height: 100%;
  display: block;
}
.donut-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.donut-center strong {
  font-size: calc(25px + var(--admin-text-increase, 0px));
  color: #101c36;
  line-height: 1.2;
}
.donut-center span {
  font-size: calc(11px + var(--admin-text-increase, 0px));
  color: #7185a4;
}
.donut-legend {
  list-style: none;
  padding: 0;
  margin: 0;
  flex: 1;
  min-width: 0;
  max-height: 178px;
  overflow: auto;
}
.donut-legend li {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 47px;
  margin: 0 0 3px;
  font-size: calc(12px + var(--admin-text-increase, 0px));
}
.donut-legend li > div {
  flex: 1;
  min-width: 0;
}
.donut-legend small {
  font-size: calc(10px + var(--admin-text-increase, 0px));
  display: block;
}
.donut-legend b {
  font-size: calc(12px + var(--admin-text-increase, 0px));
  font-weight: 500;
  white-space: nowrap;
  margin-left: auto;
}
.product-label {
  line-height: 1.4;
  display: block;
  overflow-wrap: anywhere;
}
.legend-dot {
  display: inline-block;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  flex: none;
}
.color-0 {
  background: #348bf9;
}
.color-1 {
  background: #2bbb83;
}
.color-2 {
  background: #8464ef;
}
.color-3 {
  background: #e7a337;
}
.color-4 {
  background: #de6d8a;
}
.color-5 {
  background: #43a5b0;
}
.tubille-product {
  color: #007e39;
  font-weight: 600;
}
.lower-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr 1fr 1.1fr;
  gap: 13px;
}
.recent-panel {
  min-height: 292px;
}
.lower-grid .panel-heading {
  padding: 13px 13px 9px;
  gap: 5px;
}
.lower-grid .panel-heading h2 {
  font-size: calc(12px + var(--admin-text-increase, 0px));
  letter-spacing: -0.3px;
  gap: 7px;
  line-height: 1.35;
}
.lower-grid .panel-heading h2 > .icon {
  width: 20px;
  height: 20px;
}
.lower-grid .text-button {
  font-size: calc(9px + var(--admin-text-increase, 0px));
}
.lower-grid .panel-heading:has(.icon.whatsapp) h2 .icon {
  color: #07ad64;
}
.panel-empty {
  min-height: 175px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 20px 18px;
  gap: 9px;
  color: #8495ad;
}
.panel-empty > .icon {
  width: 32px;
  height: 32px;
  color: #9eb9da;
  stroke-width: 1.4;
}
.panel-empty strong {
  color: #566d8d;
  font-size: calc(12px + var(--admin-text-increase, 0px));
  font-weight: 500;
  line-height: 1.5;
}
.panel-empty span {
  font-size: calc(11px + var(--admin-text-increase, 0px));
  line-height: 1.6;
  max-width: 260px;
}
.table-wrap {
  overflow-x: auto;
  max-width: 100%;
}
table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: calc(12px + var(--admin-text-increase, 0px));
}
th {
  background: #f5f7fb;
  color: #405678;
  font-size: calc(10px + var(--admin-text-increase, 0px));
  font-weight: 650;
  padding: 13px 16px;
  border-bottom: 1px solid #eaf0f7;
  white-space: nowrap;
}
td {
  padding: 15px 16px;
  max-width: 270px;
  border-bottom: 1px solid #edf1f7;
  overflow-wrap: anywhere;
  color: #233b61;
  vertical-align: middle;
  line-height: 1.45;
}
tr:last-child td {
  border-bottom: 0;
}
td small {
  display: block;
  font-size: calc(10px + var(--admin-text-increase, 0px));
}
.compact-table th {
  padding: 9px 7px;
  font-size: calc(9px + var(--admin-text-increase, 0px));
}
.compact-table td {
  padding: 10px 7px;
  font-size: calc(10px + var(--admin-text-increase, 0px));
  max-width: 150px;
}
.compact-table {
  padding: 0 9px 8px;
}
.customer-cell {
  display: flex;
  align-items: center;
  gap: 7px;
}
.customer-cell > div {
  min-width: 0;
}
.customer-cell span:not(.avatar) {
  font-size: calc(10px + var(--admin-text-increase, 0px));
  display: block;
  line-height: 1.45;
}
.customer-cell small {
  font-size: calc(9px + var(--admin-text-increase, 0px));
  line-height: 1.5;
  max-width: 120px;
}
.compact-table .amount {
  white-space: nowrap;
  font-size: calc(10px + var(--admin-text-increase, 0px));
}
.badge {
  display: inline-block;
  border-radius: 12px;
  background: #e5f5eb;
  color: #127247;
  font-size: calc(10px + var(--admin-text-increase, 0px));
  font-weight: 500;
  padding: 4px 8px;
  line-height: 1.3;
  text-align: center;
}
.badge.pending {
  color: #925d04;
  background: #fff2cf;
}
.badge.rejected {
  background: #fce9e9;
  color: #a5353e;
}
.badge.neutral {
  background: #e5f0ff;
  color: #1766bc;
}
.compact-table .badge {
  font-size: calc(9px + var(--admin-text-increase, 0px));
  padding: 4px 6px;
  max-width: 100px;
}
.code-link {
  display: block;
  padding: 0;
  background: transparent;
  color: #1a6ccb;
  font-size: calc(10px + var(--admin-text-increase, 0px));
  min-height: 22px;
  text-align: left;
  white-space: nowrap;
}
.proof-list {
  list-style: none;
  margin: 0;
  padding: 0 13px 8px;
}
.proof-list li {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 10px 0;
  border-bottom: 1px solid #f0f3f8;
  font-size: calc(10px + var(--admin-text-increase, 0px));
}
.proof-list li > div {
  flex: 1;
  min-width: 0;
}
.proof-list strong {
  font-size: calc(10px + var(--admin-text-increase, 0px));
  font-weight: 500;
  margin-left: 6px;
  white-space: nowrap;
}
.proof-list small {
  font-size: calc(9px + var(--admin-text-increase, 0px));
  display: block;
}
.proof-button {
  display: inline-grid;
  place-items: center;
  min-width: 29px;
  min-height: 34px;
  border: 1px solid #e4e9f1;
  background: #f6f8fb;
  color: #8398b5;
  border-radius: 4px;
  padding: 4px;
}
.proof-button .icon {
  width: 20px;
  height: 20px;
}
.dashboard-footnote {
  font-size: calc(10px + var(--admin-text-increase, 0px));
  color: #7b8da7;
  line-height: 1.6;
  margin: 0 0 5px;
}
.row-actions {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}
.row-actions button {
  font-size: calc(11px + var(--admin-text-increase, 0px));
  min-height: 36px;
  padding: 8px 10px;
  background: #edf4ff;
  color: #2668ba;
}
.toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 17px 18px;
}
.toolbar input {
  max-width: 340px;
  min-height: 40px;
  font-size: calc(12px + var(--admin-text-increase, 0px));
  background: #fbfcfe;
}
.toolbar small {
  margin-left: auto;
  font-size: calc(11px + var(--admin-text-increase, 0px));
}
.pager {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  border-top: 1px solid var(--border);
  padding: 10px 16px;
}
.pager button {
  font-size: calc(11px + var(--admin-text-increase, 0px));
}
.empty {
  padding: 45px 22px;
  text-align: center;
  color: #7385a0;
  font-size: calc(13px + var(--admin-text-increase, 0px));
  line-height: 1.7;
}
.empty strong {
  display: block;
  font-size: calc(17px + var(--admin-text-increase, 0px));
  color: #344e75;
  margin-bottom: 7px;
}
.empty p {
  margin: 10px 0 20px;
}
.callout {
  background: #f0f6ff;
  border: 1px solid #dce9fd;
  border-radius: 8px;
  padding: 16px 18px;
  font-size: calc(12px + var(--admin-text-increase, 0px));
  color: #42648f;
  line-height: 1.7;
  margin: 16px 0;
}
.callout strong {
  display: block;
}
.key-value {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 14px;
  padding: 22px;
  font-size: calc(13px + var(--admin-text-increase, 0px));
  line-height: 1.6;
}
.key-value dt {
  color: #7b8ba3;
}
.key-value dd {
  margin: 0;
  color: #304e78;
  overflow-wrap: anywhere;
}
.state-count {
  display: inline-flex;
  gap: 7px;
  margin: 0 16px 12px 0;
  align-items: center;
  font-size: calc(11px + var(--admin-text-increase, 0px));
}
label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: calc(12px + var(--admin-text-increase, 0px));
  font-weight: 600;
  color: #314b70;
  margin-bottom: 17px;
}
input,
select,
textarea {
  border: 1px solid #d5dfec;
  border-radius: 7px;
  padding: 11px 12px;
  min-height: 44px;
  background: #fff;
  color: #263f64;
  width: 100%;
  min-width: 0;
}
textarea {
  min-height: 85px;
  resize: vertical;
}
input[type="checkbox"] {
  width: 19px;
  min-height: 19px;
  accent-color: #1677ef;
}
.check {
  flex-direction: row;
  align-items: center;
  line-height: 1.5;
}
.check input {
  margin: 0;
}
.inline-fields {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}
.inline-fields > label {
  flex: 1;
  min-width: 180px;
}
.lab p {
  font-size: calc(12px + var(--admin-text-increase, 0px));
  line-height: 1.7;
}
.lab .actions {
  margin-bottom: 18px;
}
.integration-panel {
  max-width: 760px;
  margin: 30px auto;
  text-align: center;
  padding: 45px 35px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
}
.integration-panel h2 {
  font-size: calc(23px + var(--admin-text-increase, 0px));
  margin: 0;
}
.integration-panel p {
  font-size: calc(14px + var(--admin-text-increase, 0px));
  max-width: 510px;
  line-height: 1.8;
  margin: 0;
}
.integration-icon {
  background: #e6f7ef;
  border-radius: 50%;
  width: 80px;
  height: 80px;
  display: grid;
  place-items: center;
  color: #10aa69;
}
.integration-icon .icon {
  width: 40px;
  height: 40px;
}
.integration-panel .secondary {
  margin-top: 8px;
}
.loading-state {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 13px;
  min-height: 270px;
  color: #6c80a0;
  font-size: calc(14px + var(--admin-text-increase, 0px));
}
.loading-ring {
  width: 22px;
  height: 22px;
  border: 2px solid #dfeafa;
  border-top-color: #2681ec;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
@media (prefers-reduced-motion: reduce) {
  .loading-ring {
    animation: none;
  }
  * {
    scroll-behavior: auto !important;
  }
}
#notice {
  background: #e6f4ed;
  color: #206948;
  padding: 13px 18px;
  border: 1px solid #d7eade;
  border-radius: 8px;
  font-size: calc(12px + var(--admin-text-increase, 0px));
  margin: 0 0 17px;
}
#notice.error {
  color: #98353b;
  background: #fff0ef;
  border-color: #f4d9d6;
}
footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 25px;
  font-size: calc(10px + var(--admin-text-increase, 0px));
  color: #8190a7;
  border-top: 1px solid #e9eef5;
}
dialog {
  border: 1px solid #e1e7f1;
  border-radius: 14px;
  width: min(580px, 94vw);
  max-height: 90vh;
  padding: 25px;
  color: #1b355e;
  box-shadow: 0 20px 90px #0d244733;
}
dialog::backdrop {
  background: #12234077;
  backdrop-filter: blur(3px);
}
.dialog-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}
.dialog-heading h2 {
  font-size: calc(22px + var(--admin-text-increase, 0px));
  margin: 8px 0;
}
.dialog-footer {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  border-top: 1px solid var(--border);
  padding-top: 18px;
  margin-top: 20px;
}
#form-error,
#login-error {
  font-size: calc(12px + var(--admin-text-increase, 0px));
  color: #a13d3e;
  line-height: 1.6;
}
pre {
  font-size: calc(11px + var(--admin-text-increase, 0px));
  line-height: 1.6;
  background: #f3f6fb;
  padding: 16px;
  border: 1px solid #e7edf5;
  border-radius: 8px;
  overflow: auto;
  max-height: 350px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.sidebar-overlay {
  display: none;
}
.login {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.login-story {
  background: linear-gradient(140deg, #122440, #1a3b68);
  color: white;
  padding: 55px clamp(28px, 6vw, 90px);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 28px;
}
.login-story h1 {
  font-size: clamp(36px, 4.2vw, 60px);
  line-height: 1.12;
  margin: 45px 0 0;
  letter-spacing: -2px;
}
.login-story > p {
  color: #bacce3;
  font-size: calc(18px + var(--admin-text-increase, 0px));
  line-height: 1.7;
}
.preview {
  border: 1px solid #ffffff24;
  background: #ffffff08;
  padding: 25px;
  border-radius: 15px;
  max-width: 410px;
}
.preview > span {
  font-size: calc(10px + var(--admin-text-increase, 0px));
  letter-spacing: 2px;
  color: #9dc9ff;
}
.preview h2 {
  font-size: calc(26px + var(--admin-text-increase, 0px));
  color: white;
  margin: 17px 0 12px;
}
.preview p {
  color: #b9cce4;
  line-height: 1.7;
  font-size: calc(14px + var(--admin-text-increase, 0px));
  margin: 0;
}
.login-story > small {
  margin-top: auto;
  color: #a8bfdc;
  font-size: calc(11px + var(--admin-text-increase, 0px));
}
.login-panel {
  display: grid;
  place-items: center;
  padding: 40px;
}
.login-panel > div {
  width: 100%;
  max-width: 375px;
}
.login-panel h2 {
  font-size: calc(30px + var(--admin-text-increase, 0px));
  margin: 15px 0;
}
.login-panel .muted {
  font-size: calc(14px + var(--admin-text-increase, 0px));
}
.login-panel form {
  margin: 30px 0 18px;
}
.login-panel form .primary {
  width: 100%;
  margin-top: 9px;
}
.login-panel small {
  font-size: calc(11px + var(--admin-text-increase, 0px));
}
.download-card {
  max-width: 540px;
  margin: 10vh auto;
  background: white;
  padding: 36px;
  border: 1px solid var(--border);
  border-radius: 15px;
}
.download-card .wordmark {
  color: #183e2a;
  margin-bottom: 24px;
}
.download-card .wordmark img {
  border-radius: 6px;
}
@media (min-width: 1700px) {
  :root {
    --sidebar: 260px;
  }
  main {
    padding: 25px 25px 14px;
  }
  .kpi-card {
    min-height: 145px;
    padding: 25px;
    gap: 24px;
  }
  .kpi-card h2 {
    font-size: calc(15px + var(--admin-text-increase, 0px));
  }
  .kpi-value {
    font-size: calc(33px + var(--admin-text-increase, 0px));
  }
  .kpi-icon {
    width: 74px;
    height: 74px;
  }
  .charts-grid {
    grid-template-columns: 1.35fr 1fr;
  }
  .chart-panel {
    min-height: 278px;
  }
  .sales-bars {
    height: 193px;
  }
  .donut-figure {
    width: 188px;
    height: 188px;
  }
  .chart-body {
    min-height: 193px;
  }
  .lower-grid .panel-heading h2 {
    font-size: calc(14px + var(--admin-text-increase, 0px));
  }
  .compact-table td {
    font-size: calc(11px + var(--admin-text-increase, 0px));
    padding: 11px 8px;
  }
  .compact-table th {
    font-size: calc(10px + var(--admin-text-increase, 0px));
  }
  .compact-table .amount {
    font-size: calc(11px + var(--admin-text-increase, 0px));
  }
  .compact-table .badge {
    font-size: calc(10px + var(--admin-text-increase, 0px));
  }
  .customer-cell span:not(.avatar) {
    font-size: calc(11px + var(--admin-text-increase, 0px));
  }
  .customer-cell small {
    font-size: calc(10px + var(--admin-text-increase, 0px));
  }
  .lower-grid .text-button {
    font-size: calc(10px + var(--admin-text-increase, 0px));
  }
  .proof-list li {
    font-size: calc(11px + var(--admin-text-increase, 0px));
    padding: 12px 0;
  }
  .recent-panel {
    min-height: 310px;
  }
}
@media (max-width: 1250px) {
  .kpi-card {
    gap: 12px;
    padding: 19px 14px;
  }
  .kpi-icon {
    width: 50px;
    height: 50px;
  }
  .kpi-icon .icon {
    width: 25px;
    height: 25px;
  }
  .kpi-value {
    font-size: calc(25px + var(--admin-text-increase, 0px));
  }
  .kpi-card h2 {
    font-size: calc(12px + var(--admin-text-increase, 0px));
  }
  .lower-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .lower-grid .panel-heading h2 {
    font-size: calc(14px + var(--admin-text-increase, 0px));
  }
  .lower-grid .text-button {
    font-size: calc(11px + var(--admin-text-increase, 0px));
  }
  .compact-table td {
    padding: 12px 10px;
  }
  .charts-grid {
    grid-template-columns: 1.2fr 1fr;
  }
  .donut-layout {
    gap: 12px;
  }
  .donut-figure {
    width: 140px;
    height: 140px;
  }
  .donut-legend li {
    font-size: calc(10px + var(--admin-text-increase, 0px));
  }
  .donut-legend small {
    font-size: calc(9px + var(--admin-text-increase, 0px));
  }
  .donut-legend b {
    font-size: calc(11px + var(--admin-text-increase, 0px));
  }
  .panel-heading h2 {
    font-size: calc(13px + var(--admin-text-increase, 0px));
  }
  .chart-period select {
    max-width: 130px;
    font-size: calc(10px + var(--admin-text-increase, 0px));
  }
}
@media (min-width: 701px) and (max-width: 1000px) {
  :root {
    --sidebar: 78px;
  }
  aside {
    padding-top: 20px;
  }
  aside .wordmark {
    margin: 0 auto 28px;
  }
  .brand-name,
  .nav-text,
  .aside-bottom {
    display: none;
  }
  nav {
    padding-right: 6px;
    gap: 8px;
  }
  nav button {
    padding: 15px 23px;
    gap: 0;
  }
  nav button::after {
    content: attr(aria-label);
    position: fixed;
    left: 80px;
    color: #20385a;
    background: white;
    border: 1px solid #e1e9f4;
    padding: 8px 12px;
    border-radius: 6px;
    box-shadow: var(--shadow);
    pointer-events: none;
    opacity: 0;
    font-size: calc(12px + var(--admin-text-increase, 0px));
  }
  nav button:hover::after,
  nav button:focus-visible::after {
    opacity: 1;
  }
  .metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .kpi-card {
    min-height: 115px;
  }
  .kpi-icon {
    width: 57px;
    height: 57px;
  }
  .charts-grid {
    grid-template-columns: 1fr;
  }
  .donut-layout {
    justify-content: center;
    gap: 35px;
  }
  .donut-figure {
    width: 170px;
    height: 170px;
  }
  .donut-legend {
    max-width: 330px;
  }
  .donut-legend li {
    font-size: calc(12px + var(--admin-text-increase, 0px));
  }
  .page-heading {
    align-items: flex-start;
  }
  h1 {
    font-size: calc(26px + var(--admin-text-increase, 0px));
  }
  .page-heading p {
    font-size: calc(12px + var(--admin-text-increase, 0px));
  }
  .page-heading .actions {
    max-width: 250px;
    justify-content: flex-end;
  }
  .topbar {
    padding: 0 20px;
    gap: 12px;
  }
  .global-search {
    width: 50%;
  }
  .topbar-right {
    gap: 9px;
  }
  .environment,
  .search-shortcut {
    display: none;
  }
  .profile-control {
    padding-left: 10px;
  }
}
@media (max-width: 700px) {
  :root {
    --sidebar: 244px;
  }
  .workspace {
    margin: 0;
  }
  aside {
    transform: translateX(-100%);
    transition: transform 0.2s ease;
    padding-top: 20px;
  }
  .sidebar-open aside {
    transform: translateX(0);
  }
  .sidebar-overlay:not([hidden]) {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 29;
    background: #13243d66;
    border-radius: 0;
  }
  .topbar {
    padding: 0 12px;
    height: 63px;
    gap: 9px;
  }
  .menu-toggle {
    display: inline-grid;
    flex: none;
    width: 34px;
    min-width: 34px;
    padding: 5px;
  }
  .topbar-right {
    gap: 3px;
  }
  .profile-control {
    padding-left: 9px;
    margin-left: 3px;
  }
  .profile-label,
  .profile-button > [data-icon],
  .environment,
  .search-shortcut {
    display: none;
  }
  .profile-button {
    padding: 0;
  }
  .avatar.administrator {
    width: 31px;
    height: 31px;
    font-size: calc(10px + var(--admin-text-increase, 0px));
  }
  .notification-control .icon-button {
    width: 34px;
    height: 38px;
    padding: 7px;
  }
  .global-search {
    max-width: none;
    width: auto;
    flex: 1;
    min-width: 0;
    min-height: 36px;
    padding-left: 9px;
  }
  .global-search input {
    font-size: calc(12px + var(--admin-text-increase, 0px));
    min-height: 35px;
    padding: 8px;
  }
  .global-search .icon {
    width: 17px !important;
    height: 17px !important;
  }
  .header-popover {
    position: fixed;
    top: 62px;
    right: 12px;
    width: min(295px, calc(100vw - 24px));
  }
  main {
    padding: 20px 14px 10px;
  }
  .page-heading {
    flex-direction: column;
    align-items: flex-start;
    gap: 13px;
    margin-bottom: 15px;
  }
  .page-heading h1 {
    font-size: calc(25px + var(--admin-text-increase, 0px));
  }
  .page-heading p {
    font-size: calc(12px + var(--admin-text-increase, 0px));
    line-height: 1.6;
  }
  .actions {
    width: 100%;
    gap: 8px;
  }
  .actions > .secondary {
    font-size: calc(11px + var(--admin-text-increase, 0px));
  }
  .period-control {
    flex: 1;
    max-width: 225px;
    min-height: 38px;
  }
  .period-control input {
    max-width: none;
    flex: 1;
    font-size: calc(11px + var(--admin-text-increase, 0px));
    min-height: 36px;
  }
  .refresh-button {
    min-height: 38px;
  }
  .refresh-button span {
    display: none;
  }
  .metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
    margin-bottom: 12px;
  }
  .kpi-card {
    position: relative;
    min-height: 130px;
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
    padding: 15px 13px;
  }
  .kpi-icon {
    width: 34px;
    height: 34px;
    border-radius: 50%;
  }
  .kpi-icon .icon {
    width: 20px;
    height: 20px;
  }
  .kpi-card h2 {
    font-size: calc(11px + var(--admin-text-increase, 0px));
    line-height: 1.3;
    margin-bottom: 6px;
    padding-right: 3px;
  }
  .kpi-value {
    font-size: calc(24px + var(--admin-text-increase, 0px));
  }
  .kpi-detail,
  .kpi-card small {
    font-size: calc(9px + var(--admin-text-increase, 0px));
  }
  .charts-grid,
  .lower-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .panel {
    margin-bottom: 12px;
  }
  .panel-heading {
    padding: 15px 13px 8px;
  }
  .panel-heading h2 {
    font-size: calc(14px + var(--admin-text-increase, 0px));
  }
  .chart-period select {
    max-width: 130px;
    font-size: calc(10px + var(--admin-text-increase, 0px));
  }
  .chart-body {
    padding: 3px 9px 0;
    min-height: 175px;
  }
  .chart-panel {
    min-height: 245px;
  }
  .sales-bars {
    height: 170px;
  }
  .chart-caption {
    font-size: calc(9px + var(--admin-text-increase, 0px));
    padding-top: 4px;
  }
  .donut-layout {
    gap: 17px;
    padding: 7px 4px 13px;
    justify-content: center;
  }
  .donut-figure {
    width: 142px;
    height: 142px;
  }
  .donut-center strong {
    font-size: calc(23px + var(--admin-text-increase, 0px));
  }
  .donut-legend {
    max-width: 180px;
  }
  .donut-legend li {
    font-size: calc(11px + var(--admin-text-increase, 0px));
    gap: 7px;
  }
  .donut-legend small {
    font-size: calc(9px + var(--admin-text-increase, 0px));
  }
  .donut-legend b {
    font-size: calc(10px + var(--admin-text-increase, 0px));
  }
  .recent-panel {
    min-height: 230px;
  }
  .lower-grid .panel-heading h2 {
    font-size: calc(14px + var(--admin-text-increase, 0px));
  }
  .lower-grid .text-button {
    font-size: calc(10px + var(--admin-text-increase, 0px));
  }
  .compact-table td {
    padding: 12px 8px;
  }
  .customer-cell span:not(.avatar) {
    font-size: calc(11px + var(--admin-text-increase, 0px));
  }
  .customer-cell small {
    font-size: calc(10px + var(--admin-text-increase, 0px));
  }
  .compact-table th {
    font-size: calc(10px + var(--admin-text-increase, 0px));
  }
  .compact-table .amount {
    font-size: calc(11px + var(--admin-text-increase, 0px));
  }
  .compact-table .badge {
    font-size: calc(10px + var(--admin-text-increase, 0px));
  }
  .proof-list li {
    padding: 12px 0;
    font-size: calc(11px + var(--admin-text-increase, 0px));
  }
  .toolbar {
    padding: 13px;
    flex-wrap: wrap;
    gap: 7px;
  }
  .toolbar input {
    max-width: none;
  }
  .toolbar small {
    margin-left: 0;
    font-size: calc(10px + var(--admin-text-increase, 0px));
  }
  footer {
    padding: 16px;
    flex-direction: column;
    font-size: calc(9px + var(--admin-text-increase, 0px));
    line-height: 1.6;
    gap: 5px;
  }
  .key-value {
    grid-template-columns: 1fr;
    gap: 7px;
    padding: 20px;
    font-size: calc(12px + var(--admin-text-increase, 0px));
  }
  .key-value dd {
    margin-bottom: 9px;
  }
  .integration-panel {
    padding: 28px 20px;
    margin: 10px auto;
  }
  .integration-panel h2 {
    font-size: calc(21px + var(--admin-text-increase, 0px));
  }
  .integration-panel p {
    font-size: calc(13px + var(--admin-text-increase, 0px));
  }
  dialog {
    padding: 20px;
    max-height: 92vh;
  }
  .dialog-heading h2 {
    font-size: calc(21px + var(--admin-text-increase, 0px));
  }
  .dialog-footer {
    gap: 7px;
  }
  .dialog-footer button {
    font-size: calc(12px + var(--admin-text-increase, 0px));
    padding: 10px 12px;
  }
  .login {
    grid-template-columns: 1fr;
  }
  .login-story {
    padding: 28px;
    gap: 17px;
  }
  .login-story h1 {
    font-size: calc(36px + var(--admin-text-increase, 0px));
    letter-spacing: -1px;
    margin: 10px 0;
  }
  .login-story > p,
  .preview,
  .login-story > small {
    display: none;
  }
  .login-story .wordmark {
    font-size: calc(22px + var(--admin-text-increase, 0px));
  }
  .login-panel {
    padding: 35px 25px;
  }
  .login-panel h2 {
    font-size: calc(27px + var(--admin-text-increase, 0px));
  }
  .download-card {
    margin: 7vh 14px;
    padding: 25px;
  }
}

.period-control {
  flex-direction: row;
}
.kpi-detail.negative {
  color: #a63646;
}
.panel-heading h2 > .icon.amber-text {
  color: #d99118;
}
.product-cell {
  display: flex;
  align-items: center;
  gap: 12px;
}
.product-cell img {
  border-radius: 8px;
  flex: none;
}

.sidebar-close {
  display: none;
}
@media (max-width: 700px) {
  .sidebar-close {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: -12px 20px 15px;
    color: #d9e5f4;
    background: #ffffff10;
    min-height: 36px;
    font-size: calc(12px + var(--admin-text-increase, 0px));
  }
}
/* Más espacio para los paneles con tipografía ampliada. */
@media (min-width: 701px) and (max-width: 1500px) {
  .lower-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.compact-table .badge {
  white-space: nowrap;
}
