:root {
  --bg: #f1fbf4;
  --bg-accent: #ddf3e4;
  --surface: rgba(255, 255, 255, 0.84);
  --surface-strong: #ffffff;
  --surface-dark: #2e4a3d;
  --surface-soft: #edf8f0;
  --text: #203127;
  --muted: #647a6c;
  --line: rgba(32, 49, 39, 0.12);
  --primary: #8dc6a0;
  --primary-strong: #5f9b77;
  --primary-soft: #dff3e6;
  --secondary: #bfe3ca;
  --danger: #d85f6f;
  --warning: #d7b36f;
  --success: #6dac83;
  --shadow-sm: 0 10px 30px rgba(15, 23, 42, 0.08);
  --shadow-md: 0 20px 45px rgba(15, 23, 42, 0.12);
  --shadow-lg: 0 28px 60px rgba(15, 23, 42, 0.16);
  --radius-sm: 0.75rem;
  --radius-md: 1rem;
  --radius-lg: 1.5rem;
  --radius-xl: 2rem;
  --max-width: 1380px;
  --topbar-offset: 7.2rem;
  --transition: 180ms ease;
  --font-sans: "Segoe UI Variable", "Segoe UI", "Trebuchet MS", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--topbar-offset);
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font: 400 16px/1.5 var(--font-sans);
  background:
    radial-gradient(circle at top left, rgba(141, 198, 160, 0.16), transparent 26rem),
    radial-gradient(circle at top right, rgba(191, 227, 202, 0.18), transparent 18rem),
    linear-gradient(180deg, #fbfffc 0%, var(--bg) 42%, #edf8f0 100%);
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

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

button {
  cursor: pointer;
}

textarea {
  min-height: 120px;
  resize: vertical;
}

.icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.icon {
  width: 1.1rem;
  height: 1.1rem;
  flex: 0 0 auto;
}

.icon-lg {
  width: 1.25rem;
  height: 1.25rem;
}

.page-overlay {
  position: fixed;
  inset: 0;
  z-index: 130;
  background: #ffffff;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  opacity: 0;
  visibility: hidden;
  transition: none;
}


.page-overlay.active {
  opacity: 1;
  visibility: visible;
}

body.menu-open {
  overflow: hidden;
}

.page-chrome {
  padding: 1.2rem;
  padding-top: 1.2rem;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 120;
  padding-top: 1rem;
  margin-bottom: 1.35rem;
}

.topbar-inner {
  width: min(100%, var(--max-width));
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 5rem;
  padding: 0.9rem 1.1rem;
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: 1.8rem;
  background: #ffffff;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: var(--shadow-md);
}


.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
  min-width: 0;
  text-decoration: none;
}

.brand.compact {
  font-weight: 700;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 4.25rem;
  height: 4.25rem;
  border-radius: 1rem;
  background: linear-gradient(135deg, var(--primary-soft), #ffffff);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.brand-mark.small {
  width: 2.5rem;
  height: 2.5rem;
}

.brand-mark img {
  width: 3.45rem;
  height: 3.45rem;
  object-fit: contain;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.brand-copy strong {
  font-size: 1rem;
  line-height: 1.1;
}

.brand-copy small {
  color: var(--muted);
  font-size: 0.8rem;
}

.main-menu {
  display: none;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem;
  margin-left: auto;
  border-radius: 999px;
  background: rgba(141, 198, 160, 0.08);
}

.main-menu a,
.menu-link,
.tab-item {
  text-decoration: none;
}

.main-menu a {
  padding: 0.72rem 1rem;
  border-radius: 999px;
  color: var(--muted);
  font-weight: 600;
  transition: background var(--transition), color var(--transition), transform var(--transition);
}

.main-menu a:hover,
.main-menu a.active {
  color: var(--primary-strong);
  background: rgba(255, 255, 255, 0.9);
  transform: translateY(-1px);
}

.session-box {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-left: auto;
  flex-shrink: 0;
}

.session-copy {
  display: none;
  flex-direction: column;
  align-items: flex-end;
  min-width: 0;
}

.session-copy strong {
  max-width: 12rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.92rem;
}

.session-copy span {
  color: var(--muted);
  font-size: 0.78rem;
}

.notification-badge {
  align-items: center;
  justify-content: center;
  min-width: 1.1rem;
  height: 1.1rem;
  padding: 0 0.3rem;
  margin-left: 0.4rem;
  border-radius: 999px;
  background: var(--danger);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
}

.nav-notification-badge {
  position: absolute;
  top: -0.35rem;
  right: 0.35rem;
  z-index: 2;
  min-width: 1rem;
  height: 1rem;
  padding: 0 0.28rem;
  margin-left: 0;
  font-size: 0.62rem;
  line-height: 1;
  pointer-events: none;
}

.nav-cart-count {
  top: -0.35rem;
  right: 0.35rem;
  z-index: 2;
  min-width: 1rem;
  height: 1rem;
  padding: 0 0.28rem;
  margin-left: 0;
  font-size: 0.62rem;
  line-height: 1;
  pointer-events: none;
}

.menu-button,
.menu-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.9rem;
  height: 2.9rem;
  border: 0;
  border-radius: 1rem;
  color: var(--primary-strong);
  background: rgba(141, 198, 160, 0.12);
  transition: transform var(--transition), background var(--transition);
}

.menu-button:hover,
.menu-close:hover {
  transform: translateY(-1px);
  background: rgba(141, 198, 160, 0.18);
}

.content-layout {
  width: min(100%, var(--max-width));
  margin: 0 auto;
}

.side-menu {
  position: fixed;
  top: 1rem;
  bottom: 5.8rem;
  left: 1rem;
  z-index: 140;
  width: min(21rem, calc(100vw - 2rem));
  padding: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: 1.8rem;
  background: #ffffff;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: var(--shadow-lg);
  transform: translateX(calc(-100% - 1rem));
  transition: transform 220ms ease;
  overflow-y: auto;
}


.side-menu.active {
  transform: translateX(0);
}

.menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.menu-links {
  display: grid;
  gap: 0.45rem;
}

.menu-link {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.9rem 1rem;
  border-radius: 1.1rem;
  color: var(--muted);
  font-weight: 600;
  transition: background var(--transition), color var(--transition), transform var(--transition);
}

.menu-link:hover,
.menu-link.active {
  color: var(--primary-strong);
  background: linear-gradient(135deg, rgba(141, 198, 160, 0.14), rgba(191, 227, 202, 0.14));
  transform: translateX(2px);
}

.shell {
  position: relative;
  display: grid;
  gap: 1.2rem;
}

.glass-panel,
.dashboard-hero,
.work-panel,
.gps-panel,
.form-card,
.summary-card,
.product-card,
.empty-state,
.table-box {
  border: 1px solid rgba(255, 255, 255, 0.72);
  background: #ffffff;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  filter: none;
  opacity: 1;
  box-shadow: var(--shadow-sm);
}


.page-title,
.dashboard-hero,
.work-panel,
.empty-state,
.gps-panel,
.form-card,
.table-box {
  border-radius: var(--radius-lg);
}

.page-title {
  display: grid;
  gap: 1rem;
  padding: 1.5rem;
  background:
    radial-gradient(circle at top right, rgba(141, 198, 160, 0.16), transparent 18rem),
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(255, 242, 244, 0.9));
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  color: var(--muted);
  font-size: 0.85rem;
}

.breadcrumbs a {
  color: var(--primary);
}

.page-title-copy h1,
.dashboard-hero h2,
.delivery-hero h2,
.catalog-toolbar h2,
.work-panel h2,
.empty-state h2 {
  margin: 0;
  letter-spacing: -0.03em;
  line-height: 1.05;
}

.page-title-copy h1 {
  font-size: clamp(2rem, 5vw, 3.4rem);
}

.page-title-copy p,
.dashboard-hero p,
.delivery-hero p,
.work-panel p,
.empty-state p,
.catalog-toolbar p,
.gps-panel p {
  margin: 0.55rem 0 0;
  color: var(--muted);
}

.page-title-side {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.dashboard-hero-copy,
.dashboard-hero-side {
  display: grid;
  gap: 0.85rem;
}

.dashboard-hero-side {
  align-content: start;
  padding: 1.1rem;
  border-radius: 1.25rem;
  background: rgba(255, 255, 255, 0.72);
}

.dashboard-hero-side strong {
  font-size: clamp(2rem, 6vw, 3rem);
  line-height: 1;
}

.eyebrow,
.info-pill,
.category-chip,
.deal-badge,
.product-category,
.summary-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border-radius: 999px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.eyebrow {
  padding: 0.45rem 0.75rem;
  color: var(--primary-strong);
  background: rgba(141, 198, 160, 0.1);
  font-size: 0.78rem;
  text-transform: uppercase;
}

.info-pill,
.product-category,
.summary-kicker {
  padding: 0.45rem 0.8rem;
  background: rgba(255, 255, 255, 0.86);
  color: var(--primary-strong);
  font-size: 0.82rem;
}

.info-pill.subtle {
  color: var(--muted);
}

.delivery-hero,
.dashboard-hero {
  display: grid;
  gap: 1.2rem;
  padding: 1.5rem;
}

.delivery-hero {
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.14), transparent 20rem),
    radial-gradient(circle at bottom right, rgba(191, 227, 202, 0.22), transparent 16rem),
    linear-gradient(135deg, #365448, #8dc6a0 62%, #5f9b77 100%);
  color: #f7fffd;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
}

body.page-catalogo .delivery-hero {
  min-height: 0 !important;
  padding-top: 0.18rem !important;
  padding-bottom: 0.18rem !important;
  margin-bottom: 0.22rem !important;
}

body.page-catalogo .delivery-hero h2 {
  margin-bottom: 0.16rem !important;
}

body.page-catalogo .delivery-hero p {
  margin-bottom: 0.25rem !important;
}

body.page-catalogo .delivery-search {
  min-height: 34px !important;
}

body.page-catalogo .delivery-search input,
body.page-catalogo .delivery-search button,
body.page-catalogo .delivery-search .button {
  min-height: 34px !important;
  padding-top: 0.35rem !important;
  padding-bottom: 0.35rem !important;
}

body.page-catalogo .delivery-hero-visual {
  max-height: 220px !important;
}

body.page-catalogo .delivery-hero-visual img,
body.page-catalogo .catalog-store-logo {
  max-width: 390px !important;
  max-height: 220px !important;
}

.delivery-hero p,
.delivery-hero .muted {
  color: rgba(247, 255, 253, 0.82);
}

.delivery-hero .eyebrow {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.delivery-hero-visual {
  display: grid;
  place-items: center;
  gap: 1rem;
  padding: 1.5rem;
  border-radius: 0;
  min-height: 300px;
  background: transparent;
}

.delivery-hero-visual img {
  width: min(17rem, 68vw);
  filter: none;
}

.delivery-search {
  display: grid;
  gap: 0.75rem;
  margin-top: 1.35rem;
}

.hero-actions,
.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 2.9rem;
  padding: 0.85rem 1.1rem;
  border: 1px solid transparent;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition), border-color var(--transition), color var(--transition);
}

.button:hover {
  transform: translateY(-1px);
}

.button.primary {
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--primary-strong));
  box-shadow: 0 14px 24px rgba(141, 198, 160, 0.24);
}

.button.secondary {
  color: var(--primary-strong);
  border-color: rgba(141, 198, 160, 0.18);
  background: rgba(141, 198, 160, 0.08);
}

.button.light,
.button.ghost-light {
  color: #f8fffd;
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.18);
}

.button.light:hover,
.button.ghost-light:hover {
  background: rgba(255, 255, 255, 0.18);
}

.button.danger {
  color: #fff;
  background: linear-gradient(135deg, #f08d9a, var(--danger));
}

.button.small {
  min-height: 2.35rem;
  padding: 0.55rem 0.85rem;
  font-size: 0.88rem;
}

.button:disabled,
button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.cart-button {
  position: relative;
  padding-right: 2.5rem;
}

.cart-count {
  position: absolute;
  top: 0.35rem;
  right: 0.45rem;
  display: grid;
  place-items: center;
  min-width: 1.3rem;
  height: 1.3rem;
  padding: 0 0.35rem;
  border-radius: 999px;
  background: #d84b5b;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  box-shadow: 0 8px 16px rgba(216, 75, 91, 0.28);
}

.category-rail {
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  padding-bottom: 0.25rem;
}

.category-chip {
  padding: 0.75rem 1rem;
  white-space: nowrap;
  text-decoration: none;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(18, 32, 38, 0.08);
  box-shadow: var(--shadow-sm);
}

.category-chip.active,
.category-chip:hover {
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-strong));
}

.catalog-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
}

.summary-grid,
.product-grid {
  display: grid;
  gap: 1rem;
}

.summary-grid {
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.summary-card {
  padding: 1.25rem;
  border-radius: 1.4rem;
}

.summary-card h3 {
  margin: 1rem 0 0.35rem;
  font-size: 1rem;
}

.summary-card strong {
  display: block;
  margin-top: 0.8rem;
  font-size: clamp(1.8rem, 5vw, 2.7rem);
  line-height: 1;
}

.product-grid {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.product-card {
  overflow: hidden;
  border-radius: 1.6rem;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.product-media {
  position: relative;
  aspect-ratio: 16 / 11;
  background: linear-gradient(135deg, #d8f5ef, #fff7ed);
}

.product-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.deal-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  padding: 0.45rem 0.7rem;
  color: #fff;
  background: linear-gradient(135deg, var(--secondary), #d98d98);
  font-size: 0.78rem;
}

.product-card-body {
  display: grid;
  gap: 0.9rem;
  padding: 1.15rem;
}

.product-card-body h2 {
  margin: 0;
  font-size: 1.15rem;
}

.store-row,
.product-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.store-row {
  color: var(--muted);
  font-size: 0.84rem;
}

.store-dashboard-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 300px);
  gap: 1rem;
  align-items: stretch;
  padding: 1.35rem;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(238, 249, 244, 0.92));
  box-shadow: var(--shadow-sm);
}

.store-compact-header {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #ffffff;
  box-shadow: var(--shadow-sm);
}

.store-compact-header img {
  width: 3.1rem;
  height: 3.1rem;
  object-fit: contain;
  padding: 0.25rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-soft);
}

.store-compact-copy {
  display: grid;
  gap: 0.1rem;
  min-width: 0;
  margin-right: auto;
}

.store-compact-copy strong {
  overflow: hidden;
  color: var(--text);
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.store-compact-copy span {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.82rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.store-status-chip {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  padding: 0.35rem 0.65rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  white-space: nowrap;
}

.store-status-chip.is-open {
  color: #047857;
  background: #d1fae5;
  border-color: #a7f3d0;
}

.store-status-chip.is-closed {
  color: #991b1b;
  background: #fee2e2;
  border-color: #fecaca;
}

.store-dashboard-copy,
.store-status-panel,
.section-heading-row {
  display: grid;
  gap: 0.85rem;
}

.store-dashboard-copy h2 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 3.2rem);
  line-height: 1.05;
}

.store-dashboard-copy p,
.store-status-panel p {
  margin: 0;
  color: var(--muted);
}

.store-meta-row,
.store-dashboard-actions,
.section-heading-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.7rem;
}

.store-meta-row span {
  padding: 0.55rem 0.75rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
}

.store-status-panel {
  align-content: center;
  padding: 1rem;
  border-radius: 1.1rem;
  background: rgba(255, 255, 255, 0.76);
}

.store-status-panel strong {
  font-size: clamp(2rem, 5vw, 2.8rem);
  line-height: 1;
}

.store-dashboard-actions {
  padding: 0.2rem 0;
}

.store-summary-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.6rem;
}

.store-summary-cards .summary-card {
  position: relative;
  display: grid;
  grid-template-columns: 2.25rem minmax(0, 1fr);
  grid-template-areas:
    "icon label"
    "icon value"
    "icon text";
  column-gap: 0.75rem;
  row-gap: 0.15rem;
  align-items: center;
  min-height: 0;
  padding: 0.72rem 0.82rem;
  border-radius: 0.75rem;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.82);
}

.store-summary-cards .summary-card::before {
  content: "";
  grid-area: icon;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.7rem;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.48), transparent),
    var(--metric-color, rgba(141, 198, 160, 0.22));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.55);
}

.store-summary-cards .summary-card::after {
  content: "";
  grid-area: icon;
  justify-self: center;
  align-self: center;
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 999px;
  background: var(--metric-dot, var(--primary));
  box-shadow:
    0 -0.52rem 0 -0.22rem var(--metric-dot, var(--primary)),
    0.52rem 0 0 -0.22rem var(--metric-dot, var(--primary)),
    -0.52rem 0 0 -0.22rem var(--metric-dot, var(--primary));
}

.store-summary-cards .metric-products {
  --metric-color: rgba(141, 198, 160, 0.24);
  --metric-dot: #4f9f73;
}

.store-summary-cards .metric-orders {
  --metric-color: rgba(106, 154, 242, 0.2);
  --metric-dot: #4d73cf;
}

.store-summary-cards .metric-sales {
  --metric-color: rgba(242, 190, 92, 0.24);
  --metric-dot: #c68a21;
}

.store-summary-cards .metric-stock {
  --metric-color: rgba(242, 106, 122, 0.18);
  --metric-dot: #d54c5f;
}

.store-summary-cards .summary-kicker {
  grid-area: label;
  width: fit-content;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 0.68rem;
  letter-spacing: 0;
  text-transform: uppercase;
}

.store-summary-cards .summary-card strong {
  grid-area: value;
  margin: 0;
  font-size: clamp(1.25rem, 2.5vw, 1.65rem);
  letter-spacing: 0;
  white-space: nowrap;
}

.store-summary-cards .summary-card p {
  grid-area: text;
  margin: 0;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.2;
}

.store-dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(260px, 0.65fr);
  gap: 1rem;
}

.section-heading-row {
  justify-content: space-between;
  margin-bottom: 1rem;
}

.section-heading-row h2 {
  margin: 0;
}

.section-heading-row p {
  margin: 0.25rem 0 0;
}

.store-stock-list {
  display: grid;
  gap: 0.7rem;
}

.store-stock-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.75rem;
  padding: 0.8rem 0.9rem;
  border-radius: 0.9rem;
  background: rgba(255, 255, 255, 0.72);
}

.store-stock-item span {
  overflow-wrap: anywhere;
  font-weight: 700;
}

.store-stock-item strong {
  min-width: 2.4rem;
  padding: 0.35rem 0.55rem;
  border-radius: 999px;
  background: rgba(242, 106, 122, 0.12);
  color: var(--danger);
  text-align: center;
}

.compact-empty {
  min-height: 130px;
}

.store-hero-logo,
.catalog-store-logo {
  width: clamp(150px, 24vw, 230px);
  height: clamp(150px, 24vw, 230px);
  object-fit: contain;
  border-radius: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.catalog-inline-logo,
.product-store-logo,
.store-chip img {
  width: 24px;
  height: 24px;
  object-fit: cover;
  border-radius: 0.45rem;
  background: #fff;
  border: 1px solid rgba(18, 32, 38, 0.1);
  vertical-align: middle;
}

.store-chip,
.product-store {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-width: 0;
}

.product-store {
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 700;
}

.store-profile-form {
  align-items: start;
}

.store-identity-panel {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.15rem;
  align-items: start;
}

.store-identity-panel .section-heading-row {
  margin-bottom: 0;
}

.store-identity-panel .section-heading-row h2 {
  max-width: none;
}

.store-profile-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 280px);
  gap: 1rem;
  align-items: start;
}

.store-profile-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
}

.store-profile-fields label,
.store-logo-field label {
  display: grid;
  gap: 0.45rem;
  margin: 0;
  color: var(--text);
  font-weight: 750;
}

.store-profile-form input,
.store-profile-form textarea {
  width: 100%;
  min-height: 2.85rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid #cfd7df;
  border-radius: var(--radius-md);
  color: var(--text);
  background: #ffffff;
  outline: none;
}

.store-profile-form textarea {
  resize: vertical;
}

.store-profile-form input:focus,
.store-profile-form textarea:focus {
  border-color: var(--primary-strong);
  box-shadow: 0 0 0 3px rgba(95, 155, 119, 0.14);
}

.store-profile-form input[type="file"] {
  min-height: auto;
  padding: 0.55rem;
}

.store-profile-address {
  grid-column: 1 / -1;
}

.store-profile-address textarea {
  min-height: 7.5rem;
}

.store-logo-field {
  display: grid;
  gap: 0.75rem;
  padding: 0.9rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #ffffff;
}

.store-logo-field .form-preview {
  width: 100%;
  max-width: 220px;
  aspect-ratio: 1;
  justify-self: center;
  object-fit: contain;
  padding: 0.6rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-soft);
  box-shadow: none;
}

.store-profile-actions {
  grid-column: 1 / -1;
  justify-content: flex-end;
  margin: 0;
}

@media (max-width: 860px) {
  .store-dashboard-hero,
  .store-dashboard-grid,
  .store-profile-form,
  .store-profile-fields {
    grid-template-columns: 1fr;
  }

  .store-summary-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .store-dashboard-actions {
    align-items: stretch;
  }

  .store-dashboard-actions .button {
    flex: 1 1 180px;
  }

  .store-profile-actions {
    justify-content: stretch;
  }

  .store-profile-actions .button {
    width: 100%;
  }

  .store-compact-header {
    flex-wrap: wrap;
  }

  .store-compact-copy {
    flex: 1 1 calc(100% - 4rem);
  }
}

@media (max-width: 520px) {
  .store-summary-cards {
    grid-template-columns: 1fr;
  }
}

.product-footer strong {
  font-size: 1.35rem;
  line-height: 1;
}

.work-panel,
.gps-panel,
.empty-state {
  padding: 1.35rem;
}

.catalog-empty,
.empty-state {
  display: grid;
  place-items: center;
  text-align: center;
  min-height: 220px;
}

.live-location-panel {
  align-items: end;
}

.live-location-panel .action-row {
  justify-content: flex-start;
}

.gps-panel {
  display: grid;
  gap: 1rem;
}

.gps-panel-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
}

.gps-panel-head > :first-child {
  flex: 1 1 320px;
  min-width: 0;
}

.gps-panel-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  flex: 1 1 320px;
  justify-content: flex-end;
  align-items: stretch;
}

.gps-panel-actions .button {
  flex: 1 1 220px;
}

body.location-modal-open {
  overflow: hidden;
}

.gps-grid {
  display: grid;
  gap: 0.9rem;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.gps-field {
  display: grid;
  gap: 0.45rem;
  color: var(--text);
  font-weight: 700;
}

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

.gps-inline-input {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.location-modal {
  position: fixed;
  inset: 0;
  z-index: 320;
  display: grid;
  align-items: start;
  justify-items: center;
  padding: 1.2rem;
  overflow-y: auto;
}

.location-modal[hidden] {
  display: none !important;
}

.location-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(12, 18, 24, 0.62);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}


.location-modal-dialog {
  position: relative;
  width: min(100%, 860px);
  display: grid;
  gap: 1rem;
  margin: auto 0;
  padding: 1.15rem;
  max-height: calc(100vh - 2.4rem);
  border-radius: 1.4rem;
  border: 1px solid rgba(255, 255, 255, 0.7);
  background: rgba(250, 253, 251, 0.98);
  box-shadow: var(--shadow-xl);
  overflow: auto;
}

.location-modal-header {
  display: grid;
  gap: 0.35rem;
}

.location-modal-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
}

.location-modal-header h3 {
  margin: 0;
  font-size: 1.5rem;
}

.location-modal-header p {
  margin-top: 0.45rem;
}

.location-modal-notice {
  display: grid;
  gap: 0.25rem;
  padding: 0.9rem 1rem;
  border-radius: 1rem;
  border: 1px solid rgba(58, 122, 90, 0.12);
  background: linear-gradient(135deg, rgba(141, 198, 160, 0.18), rgba(255, 255, 255, 0.96));
  color: var(--text);
}

.location-modal-notice strong {
  font-size: 0.96rem;
}

.location-modal-notice span {
  color: var(--muted);
  font-size: 0.92rem;
}

.location-modal-close {
  position: relative;
  z-index: 5;
  flex: 0 0 auto;
  width: 2.5rem;
  height: 2.5rem;
  border: 0;
  border-radius: 999px;
  background: rgba(16, 28, 34, 0.12);
  color: var(--text);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(16, 28, 34, 0.08);
  pointer-events: auto;
}

.location-modal-close:hover {
  background: rgba(16, 28, 34, 0.2);
}

.location-map {
  position: relative;
  height: clamp(280px, 52vh, 420px);
  min-height: 280px;
  border-radius: 1.1rem;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(141, 198, 160, 0.18), rgba(36, 124, 168, 0.14));
}

.location-map .leaflet-container {
  width: 100%;
  height: 100%;
}

.location-pin-icon {
  position: relative;
}

.location-pin-icon::before {
  content: '';
  position: absolute;
  inset: 0 auto auto 0;
  width: 30px;
  height: 30px;
  border-radius: 50% 50% 50% 0;
  background: linear-gradient(180deg, #ff725c, #dc2626);
  transform: rotate(-45deg);
  box-shadow: 0 10px 22px rgba(220, 38, 38, 0.32);
}

.location-pin-icon-dot {
  position: absolute;
  top: 8px;
  left: 8px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #ffffff;
  z-index: 1;
}

.location-map-placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 1rem;
  text-align: center;
  color: var(--muted);
  font-weight: 700;
}

.location-modal-footer {
  display: grid;
  gap: 1rem 1.2rem;
  grid-template-columns: minmax(0, 1.1fr) minmax(260px, 0.9fr);
  align-items: end;
  padding-top: 0.2rem;
  border-top: 1px solid rgba(18, 32, 38, 0.08);
}

.location-modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: stretch;
}

.location-modal-actions .button {
  flex: 1 1 220px;
}

.location-modal-coordinates {
  display: grid;
  gap: 0.9rem;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.gps-map-link[hidden] {
  display: none !important;
}

.product-lots-panel {
  display: grid;
  gap: 0.85rem;
  padding: 1rem;
  border: 1px solid rgba(18, 32, 38, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.product-lot-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(140px, 1fr)) auto;
  gap: 0.75rem;
  align-items: end;
}

@media (max-width: 900px) {
  .product-lot-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .location-modal-footer {
    grid-template-columns: 1fr;
  }

  .location-modal-actions .button {
    width: 100%;
  }
}

@media (max-width: 640px) {
  .gps-inline-input {
    grid-template-columns: 1fr;
  }

  .gps-panel-actions {
    width: 100%;
    justify-content: stretch;
  }

  .gps-panel-actions .button {
    width: 100%;
    justify-content: center;
    flex-basis: 100%;
  }

  .location-modal {
    padding: 0.8rem;
  }

  .location-modal-dialog {
    padding: 1rem;
    max-height: calc(100vh - 1.6rem);
  }

  .location-map,
  .location-map-placeholder {
    height: min(46vh, 320px);
    min-height: 240px;
  }

  .location-modal-actions .button {
    width: 100%;
    justify-content: center;
    flex-basis: 100%;
  }
}

.form-card {
    width: 100%;
  max-width: 100%;
  padding: 1.35rem;
}

.form-card.wide {
  width: 100%;
}

.form-card label,
.line-item {
  display: grid;
  gap: 0.55rem;
  margin-bottom: 1rem;
  color: var(--text);
  font-weight: 600;
}

.form-card input,
.form-card select,
.form-card textarea,
.delivery-search input,
.short-input,
.inline-form select {
  width: 100%;
  min-height: 3rem;
  padding: 0.85rem 0.95rem;
  border: 1px solid rgba(18, 32, 38, 0.12);
  border-radius: 1rem;
  outline: none;
  color: var(--text);
  background: rgba(255, 255, 255, 0.92);
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}

.form-card input:focus,
.form-card select:focus,
.form-card textarea:focus,
.delivery-search input:focus,
.short-input:focus,
.inline-form select:focus {
  border-color: rgba(141, 198, 160, 0.45);
  box-shadow: 0 0 0 4px rgba(141, 198, 160, 0.14);
}

.form-preview {
  width: 140px;
  border-radius: 1rem;
  box-shadow: var(--shadow-sm);
}

.table-thumb {
  width: 56px;
  height: 56px;
  border-radius: 8px;
  object-fit: cover;
  box-shadow: var(--shadow-sm);
}

.auth-shell {
  display: grid;
  place-items: center;
  min-height: 55vh;
}

.auth-card {
  width: min(100%, 560px);
}

.auth-card-head {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.login-image {
  width: 4.5rem;
  height: 4.5rem;
  padding: 0.75rem;
  border-radius: 1.4rem;
  background: linear-gradient(135deg, var(--primary-soft), #ffffff);
}

.muted {
  color: var(--muted);
  font-size: 0.92rem;
}

.line-items {
  display: grid;
  gap: 0.9rem;
}

.in-person-sale-form {
  gap: 1.1rem;
}

.sale-form-head {
  display: grid;
  grid-template-columns: minmax(220px, 420px) auto;
  gap: 1rem;
  align-items: end;
}

.sale-client-actions {
  display: grid;
  gap: 1rem;
  justify-items: end;
}

.sale-action-change {
  width: 100%;
  max-width: 280px;
}

.sale-action-change label {
  display: grid;
  gap: 0.5rem;
}

.sale-actions-inline {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.sale-actions-inline .button {
  min-width: 140px;
}

.sale-action-change input {
  width: 100%;
}

@media (max-width: 1024px) {
  .sale-form-head {
    grid-template-columns: 1fr;
  }

  .sale-client-actions {
    justify-items: start;
  }
}

/* Product Search and Table Styles */
.product-search-section {
  margin-bottom: 1.5rem;
}

.product-search-section input {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  font-size: 1rem;
  transition: border-color var(--transition);
}

.product-search-section input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(141, 198, 160, 0.1);
}

.product-list-container {
  max-height: 400px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-strong);
}

.product-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.product-table thead {
  background: var(--surface-soft);
  position: sticky;
  top: 0;
  z-index: 1;
}

.product-table th {
  padding: 0.75rem 1rem;
  text-align: left;
  font-weight: 600;
  color: var(--text);
  border-bottom: 1px solid var(--line);
}

.product-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

.product-table tbody tr:hover {
  background: var(--bg-accent);
}

.product-name {
  font-weight: 500;
  color: var(--text);
}

.product-price {
  font-weight: 600;
  color: var(--primary-strong);
}

.product-stock {
  color: var(--muted);
  font-size: 0.85rem;
}

.product-quantity input {
  width: 80px;
  padding: 0.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  text-align: center;
  font-size: 0.9rem;
  transition: border-color var(--transition);
}

.product-quantity input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(141, 198, 160, 0.1);
}

.product-quantity input:disabled {
  background: var(--surface-soft);
  color: var(--muted);
}

.presencial-sale-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(280px, 0.9fr);
  gap: 1.4rem;
  align-items: start;
}

.presencial-sale-products {
  display: grid;
  gap: 1rem;
}

.presencial-sale-summary {
  position: sticky;
  top: 1rem;
  align-self: start;
}

.sale-payment-summary {
  display: grid;
  gap: 1rem;
  padding: 1.2rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface-strong);
  box-shadow: var(--shadow-sm);
}

.sale-payment-summary label {
  display: grid;
  gap: 0.5rem;
}

.sale-payment-summary input {
  width: 100%;
  padding: 0.85rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  font-size: 1rem;
}

@media (max-width: 1024px) {
  .presencial-sale-grid {
    grid-template-columns: 1fr;
  }

  .presencial-sale-summary {
    position: static;
  }
}

@media (max-width: 768px) {
  .product-table th,
  .product-table td {
    padding: 0.5rem;
    font-size: 0.8rem;
  }

  .product-quantity input {
    width: 60px;
    padding: 0.4rem;
  }

  .modal-large {
    max-width: 95vw;
  }
}

/* Formal redesign final override */
:root {
  --bg: #eef2f6;
  --bg-accent: #e7edf3;
  --surface: #ffffff;
  --surface-strong: #ffffff;
  --surface-soft: #f7f9fb;
  --surface-dark: #182633;
  --text: #17212b;
  --muted: #647282;
  --line: #d9e1ea;
  --primary: #1f6f8b;
  --primary-strong: #164f68;
  --primary-soft: #e7f3f7;
  --secondary: #2c7a5b;
  --danger: #b42335;
  --warning: #b7791f;
  --success: #18794e;
  --shadow-sm: 0 1px 2px rgba(20, 32, 44, 0.06), 0 8px 24px rgba(20, 32, 44, 0.06);
  --shadow-md: 0 2px 6px rgba(20, 32, 44, 0.08), 0 18px 42px rgba(20, 32, 44, 0.10);
  --shadow-lg: 0 8px 20px rgba(20, 32, 44, 0.12), 0 28px 70px rgba(20, 32, 44, 0.16);
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 8px;
  --radius-xl: 8px;
  --max-width: 1440px;
  --transition: 160ms ease;
}

body {
  color: var(--text);
  font: 400 15px/1.55 var(--font-sans);
  letter-spacing: 0;
  background: linear-gradient(180deg, #fbfcfe 0%, #eef2f6 42rem, #e9eef4 100%);
}

.page-chrome {
  padding: 16px;
}

.topbar {
  padding-top: 0;
  margin-bottom: 16px;
}

.topbar-inner {
  min-height: 72px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow-sm);
}

.brand-mark {
  width: 52px;
  height: 52px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  box-shadow: none;
}

.brand-mark img {
  width: 42px;
  height: 42px;
}

.brand-copy strong,
.page-title-copy h1,
.dashboard-hero h2,
.delivery-hero h2,
.catalog-toolbar h2,
.work-panel h2,
.empty-state h2,
.auth-card-head h2,
.product-card-body h2 {
  color: #111c27;
  font-weight: 800;
  letter-spacing: 0;
}

.brand-copy small,
.session-copy span,
.page-title-copy p,
.dashboard-hero p,
.delivery-hero p,
.work-panel p,
.empty-state p,
.catalog-toolbar p,
.gps-panel p,
.product-card-body p,
.store-row,
.product-store {
  color: var(--muted);
  letter-spacing: 0;
}

.main-menu {
  gap: 2px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7f9fb;
}

.main-menu a,
.menu-link,
.tab-item {
  border-radius: 8px;
  letter-spacing: 0;
}

.main-menu a {
  min-height: 42px;
  padding: 10px 12px;
  color: #4c5d6e;
  font-size: 0.9rem;
}

.main-menu a:hover,
.main-menu a.active {
  color: #ffffff;
  background: var(--primary-strong);
  transform: none;
}

.menu-button,
.menu-close,
.close-modal,
.location-modal-close,
.order-detail-modal-close,
.picker-close {
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--primary-strong);
  background: #ffffff;
  box-shadow: none;
}

.menu-button:hover,
.menu-close:hover,
.close-modal:hover,
.location-modal-close:hover,
.order-detail-modal-close:hover,
.picker-close:hover {
  color: #ffffff;
  background: var(--primary-strong);
  transform: none;
}

.side-menu {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow-lg);
}

.menu-header {
  border-bottom: 1px solid var(--line);
}

.menu-link:hover,
.menu-link.active {
  color: var(--primary-strong);
  border-color: #c8d8e4;
  background: var(--primary-soft);
  transform: none;
}

.page-title,
.dashboard-hero,
.work-panel,
.gps-panel,
.form-card,
.summary-card,
.product-card,
.empty-state,
.table-box,
.cart-summary-card,
.checkout-card,
.store-dashboard-hero,
.store-compact-header,
.sale-payment-summary,
.catalog-toolbar,
.delivery-hero,
.auth-card,
.compact-login-card,
.modal-content,
.location-modal-dialog,
.order-detail-modal-dialog {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow-sm);
}

.page-title,
.dashboard-hero,
.work-panel,
.gps-panel,
.form-card,
.table-box,
.cart-summary-card,
.checkout-card,
.store-dashboard-hero,
.catalog-toolbar,
.delivery-hero {
  padding: 18px;
}

.page-title,
.dashboard-hero,
.delivery-hero {
  background: linear-gradient(90deg, #ffffff 0%, #ffffff 58%, #f1f6fa 100%);
}

.page-title-art,
.dashboard-hero::after,
.work-panel::after,
.auth-shell::before,
.auth-card::after,
.summary-card::before,
.form-card::before,
.product-media::after {
  display: none;
}

.dashboard-hero-side,
.delivery-hero-visual,
.store-status-panel,
.line-item,
.login-demo,
.location-modal-notice,
.cart-total-box,
.center-notice-breakdown div {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  box-shadow: none;
}

.summary-card,
.store-summary-cards .summary-card {
  padding: 16px;
}

.summary-card strong,
.dashboard-hero-side strong,
.store-summary-cards .summary-card strong {
  color: #102033;
  font-weight: 850;
  letter-spacing: 0;
}

.eyebrow,
.info-pill,
.category-chip,
.deal-badge,
.product-category,
.summary-kicker,
.store-status-chip {
  border: 1px solid #cfe0ea;
  border-radius: 999px;
  color: var(--primary-strong);
  background: var(--primary-soft);
  font-weight: 800;
  letter-spacing: 0;
}

.button,
.picker-button {
  min-height: 42px;
  padding: 9px 14px;
  border-radius: 8px;
  font-weight: 800;
  letter-spacing: 0;
  box-shadow: none;
}

.button:hover,
.picker-button:hover,
.summary-card:hover,
.product-card:hover,
.data-table tbody tr:hover,
.tab-item:hover {
  transform: none;
}

.button.primary,
.picker-button.primary {
  color: #ffffff;
  border-color: var(--primary-strong);
  background: var(--primary-strong);
}

.button.secondary,
.picker-button.light {
  color: var(--primary-strong);
  border-color: #c8d8e4;
  background: var(--primary-soft);
}

.button.light,
.button.ghost-light {
  color: var(--text);
  border-color: var(--line);
  background: #ffffff;
}

.button.danger,
.logout-tab,
.button.light.session-action,
.button.light[href*="login"],
.button.light[href*="registro"] {
  color: #ffffff;
  border-color: var(--danger);
  background: var(--danger);
}

.form-card label,
.checkout-field label,
.sale-payment-summary label,
.gps-field label {
  color: #344252;
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: 0;
}

.form-card input,
.form-card select,
.form-card textarea,
.delivery-search input,
.short-input,
.inline-form select,
.checkout-field input,
.checkout-field textarea,
.picker-field input,
.sale-payment-summary input,
.product-search-section input,
.product-quantity input {
  min-height: 42px;
  border: 1px solid #cfd8e3;
  border-radius: 8px;
  color: var(--text);
  background: #ffffff;
  box-shadow: none;
}

.form-card input:focus,
.form-card select:focus,
.form-card textarea:focus,
.delivery-search input:focus,
.short-input:focus,
.inline-form select:focus,
.checkout-field input:focus,
.checkout-field textarea:focus,
.picker-field input:focus,
.sale-payment-summary input:focus,
.product-search-section input:focus,
.product-quantity input:focus {
  outline: 0;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(31, 111, 139, 0.15);
}

.table-box {
  overflow: auto;
}

.data-table,
.product-table,
.order-detail-table {
  border-collapse: separate;
  border-spacing: 0;
}

.data-table th,
.data-table td,
.product-table th,
.product-table td,
.order-detail-table th,
.order-detail-table td {
  border-bottom: 1px solid var(--line);
  padding: 11px 12px;
  vertical-align: middle;
}

.data-table thead th,
.product-table thead th,
.order-detail-table th {
  color: #334455;
  background: #f4f7fa;
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

.data-table tbody tr:nth-child(even),
.product-table tbody tr:nth-child(even) {
  background: #fafcff;
}

.data-table tbody tr:hover,
.product-table tbody tr:hover {
  background: #eef6f9;
}

.status-pendiente {
  color: #9a3412;
  background: #ffedd5;
  border-color: #fed7aa;
}

.status-preparado {
  color: #92400e;
  background: #fef3c7;
  border-color: #fde68a;
}

.status-en-camino {
  color: #1d4ed8;
  background: #dbeafe;
  border-color: #bfdbfe;
}

.status-entregado,
.assignment-assigned,
.store-status-chip.is-open {
  color: #047857;
  background: #dff8ea;
  border-color: #a9e8c3;
}

.status-cancelado,
.assignment-unassigned,
.store-status-chip.is-closed {
  color: #6b1f2d;
  background: #fff1f3;
  border-color: #ffd0d7;
}

/* Compact orders table */
body.page-pedidos .table-box {
  padding: 0;
}

body.page-pedidos .data-table {
  min-width: 980px;
  font-size: 0.88rem;
}

body.page-pedidos .data-table thead th {
  padding: 10px 12px;
  font-size: 0.72rem;
}

body.page-pedidos .data-table tbody td {
  padding: 10px 12px;
  line-height: 1.25;
}

body.page-pedidos .data-table tbody tr.order-row td:first-child {
  border-left-width: 4px;
}

body.page-pedidos .order-status-badge,
body.page-pedidos .order-assignment-badge {
  min-height: 24px;
  padding: 4px 9px;
  font-size: 0.72rem;
  font-weight: 800;
}

body.page-pedidos .order-assignment-badge {
  margin-left: 6px;
}

body.page-pedidos .inline-form {
  display: grid;
  grid-template-columns: minmax(128px, 1fr) minmax(128px, 1fr);
  gap: 8px;
  align-items: center;
  min-width: 190px;
}

body.page-pedidos .inline-form input[type="hidden"] {
  display: none;
}

body.page-pedidos .inline-form select,
body.page-pedidos .inline-form .short-input,
body.page-pedidos .inline-form .button {
  width: 100%;
  min-height: 36px;
  padding: 7px 10px;
  font-size: 0.82rem;
}

body.page-pedidos .inline-form .button {
  white-space: nowrap;
}

body.page-pedidos .inline-form .button[type="submit"] {
  grid-column: 1 / -1;
}

body.page-pedidos .inline-form a.button {
  min-height: 34px;
}

body.page-pedidos .inline-form .muted {
  grid-column: 1 / -1;
  margin: 0;
  color: #647282;
  font-size: 0.78rem;
  line-height: 1.2;
}

body.page-pedidos .data-table td:nth-child(1) {
  width: 54px;
}

body.page-pedidos .data-table td:nth-child(2) {
  min-width: 170px;
}

body.page-pedidos .data-table td:nth-child(3),
body.page-pedidos .data-table td:nth-child(4),
body.page-pedidos .data-table td:nth-child(6),
body.page-pedidos .data-table td:nth-child(7) {
  white-space: nowrap;
}

body.page-pedidos .data-table td:last-child {
  width: 230px;
}

body.page-pedidos .data-table tbody tr.order-state-entregado,
body.page-pedidos .data-table tbody tr.order-state-cancelado {
  opacity: 0.92;
}

@media (max-width: 900px) {
  body.page-pedidos .data-table {
    min-width: 900px;
  }

  body.page-pedidos .inline-form {
    min-width: 170px;
  }
}

.orders-board,
.orders-report-panel,
.courier-delivery-card,
.order-history-panel {
  border: 1px solid #d9e1ea;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(20, 32, 44, 0.06), 0 8px 24px rgba(20, 32, 44, 0.06);
}

.orders-board {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.orders-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.orders-tabs a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 7px 11px;
  border: 1px solid #d9e1ea;
  border-radius: 8px;
  color: #405266;
  background: #f8fafc;
  font-size: 0.84rem;
  font-weight: 800;
  text-decoration: none;
}

.orders-tabs a.active,
.orders-tabs a:hover {
  color: #ffffff;
  border-color: #164f68;
  background: #164f68;
}

.orders-tabs span {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
}

.orders-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
}

.orders-kpi {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid #d9e1ea;
  border-radius: 8px;
  background: #f8fafc;
}

.orders-kpi span {
  color: #647282;
  font-size: 0.78rem;
  font-weight: 800;
}

.orders-kpi strong {
  color: #111c27;
  font-size: 1.25rem;
}

.orders-filter {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 170px auto auto;
  gap: 10px;
  align-items: end;
}

.orders-filter label {
  display: grid;
  gap: 5px;
  color: #344252;
  font-size: 0.78rem;
  font-weight: 800;
}

.orders-filter input {
  min-height: 38px;
  border: 1px solid #cfd8e3;
  border-radius: 8px;
  padding: 7px 10px;
}

.courier-delivery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
}

.courier-delivery-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border-left: 5px solid #164f68;
}

.courier-delivery-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.courier-delivery-head span,
.courier-delivery-meta {
  color: #647282;
  font-size: 0.82rem;
}

.courier-delivery-head strong {
  display: block;
  color: #111c27;
  font-size: 1.05rem;
}

.courier-delivery-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
}

.courier-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.courier-actions form,
.courier-actions .button {
  width: 100%;
}

.courier-cancel-form {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.courier-cancel-form input {
  min-height: 40px;
  border: 1px solid #cfd8e3;
  border-radius: 8px;
  padding: 7px 10px;
}

.orders-report-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.orders-report-panel {
  padding: 14px;
}

.orders-report-panel h3 {
  margin: 0 0 10px;
  color: #111c27;
  font-size: 1rem;
}

.orders-report-list,
.order-history-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.orders-report-list li,
.order-history-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px;
  border: 1px solid #d9e1ea;
  border-radius: 8px;
  background: #f8fafc;
}

.orders-report-list small,
.order-history-list span,
.order-history-list p {
  display: block;
  margin: 2px 0 0;
  color: #647282;
  font-size: 0.8rem;
}

.order-history-list li {
  display: block;
}

.empty-state.compact {
  padding: 10px 12px;
  margin: 10px 0;
  text-align: left;
}

@media (max-width: 800px) {
  .orders-filter,
  .orders-report-grid {
    grid-template-columns: 1fr;
  }

  .courier-actions {
    grid-template-columns: 1fr;
  }

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

.category-chip.active,
.category-chip:hover {
  color: #ffffff;
  border-color: var(--primary-strong);
  background: var(--primary-strong);
}

.product-card {
  overflow: hidden;
}

.product-card:hover {
  border-color: #bfd0dc;
  box-shadow: var(--shadow-md);
}

.product-media {
  background: #edf2f7;
}

.product-price,
.product-footer strong {
  color: var(--secondary);
}

.deal-badge {
  color: #ffffff;
  border-color: var(--secondary);
  background: var(--secondary);
}

.compact-login-card::before {
  height: 4px;
  background: linear-gradient(90deg, var(--primary-strong), var(--secondary), #8a5a13);
}

.modal {
  background: rgba(13, 24, 35, 0.58);
}

.modal-header,
.location-modal-header,
.order-detail-modal-header {
  border-bottom: 1px solid var(--line);
  background: #f8fafc;
}

.toast {
  border-radius: 8px;
  background: #1d2935;
  box-shadow: var(--shadow-md);
}

.toast.info {
  background: var(--primary-strong);
}

.toast.warning {
  background: var(--warning);
}

.toast.error,
.toast.danger {
  background: var(--danger);
}

.bottom-nav {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow-md);
}

.tab-item.active {
  color: var(--primary-strong);
  background: var(--primary-soft);
}

@media (min-width: 1100px) {
  .main-menu {
    display: inline-flex;
  }

  .menu-button {
    display: none;
  }

  .session-copy {
    display: flex;
  }
}

@media (max-width: 720px) {
  .page-chrome {
    padding: 10px;
  }

  .page-title,
  .dashboard-hero,
  .work-panel,
  .gps-panel,
  .form-card,
  .table-box,
  .cart-summary-card,
  .checkout-card,
  .store-dashboard-hero,
  .catalog-toolbar,
  .delivery-hero {
    padding: 14px;
  }

  .page-title-copy h1 {
    font-size: 1.65rem;
  }
}

/* Formal redesign layer */
:root {
  --bg: #eef2f6;
  --bg-accent: #e7edf3;
  --surface: #ffffff;
  --surface-strong: #ffffff;
  --surface-soft: #f7f9fb;
  --surface-dark: #182633;
  --text: #17212b;
  --muted: #647282;
  --line: #d9e1ea;
  --primary: #1f6f8b;
  --primary-strong: #164f68;
  --primary-soft: #e7f3f7;
  --secondary: #2c7a5b;
  --danger: #b42335;
  --warning: #b7791f;
  --success: #18794e;
  --shadow-sm: 0 1px 2px rgba(20, 32, 44, 0.06), 0 8px 24px rgba(20, 32, 44, 0.06);
  --shadow-md: 0 2px 6px rgba(20, 32, 44, 0.08), 0 18px 42px rgba(20, 32, 44, 0.10);
  --shadow-lg: 0 8px 20px rgba(20, 32, 44, 0.12), 0 28px 70px rgba(20, 32, 44, 0.16);
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 8px;
  --radius-xl: 8px;
  --max-width: 1440px;
  --topbar-offset: 6rem;
  --transition: 160ms ease;
  --font-sans: "Segoe UI Variable", "Segoe UI", Arial, sans-serif;
}

html {
  background: var(--bg);
}

body {
  color: var(--text);
  font: 400 15px/1.55 var(--font-sans);
  letter-spacing: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(238, 242, 246, 0.96) 34rem),
    var(--bg);
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--primary-strong);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.page-chrome {
  padding: 16px;
}

.topbar {
  padding-top: 0;
  margin-bottom: 16px;
}

.topbar-inner {
  min-height: 72px;
  gap: 14px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow-sm);
}

.brand {
  color: var(--text);
}

.brand-mark {
  width: 52px;
  height: 52px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  box-shadow: none;
}

.brand-mark.small {
  width: 40px;
  height: 40px;
}

.brand-mark img {
  width: 42px;
  height: 42px;
}

.brand-copy strong {
  color: #0f1f2e;
  font-size: 0.98rem;
  font-weight: 800;
  letter-spacing: 0;
}

.brand-copy small,
.session-copy span {
  color: var(--muted);
  letter-spacing: 0;
}

.session-copy strong {
  color: var(--text);
}

.main-menu {
  gap: 2px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7f9fb;
}

.main-menu a {
  position: relative;
  min-height: 42px;
  padding: 10px 12px;
  border-radius: 6px;
  color: #4c5d6e;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0;
}

.main-menu a:hover,
.main-menu a.active {
  color: #ffffff;
  background: var(--primary-strong);
  transform: none;
}

.menu-button,
.menu-close,
.close-modal,
.location-modal-close,
.order-detail-modal-close,
.picker-close {
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--primary-strong);
  background: #ffffff;
  box-shadow: none;
}

.menu-button:hover,
.menu-close:hover,
.close-modal:hover,
.location-modal-close:hover,
.order-detail-modal-close:hover,
.picker-close:hover {
  color: #ffffff;
  background: var(--primary-strong);
  transform: none;
}

.side-menu {
  top: 16px;
  bottom: 16px;
  left: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow-lg);
}

.menu-header {
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.menu-links {
  gap: 6px;
}

.menu-link,
.tab-item {
  border-radius: 8px;
  color: #4c5d6e;
  letter-spacing: 0;
}

.menu-link {
  min-height: 46px;
  padding: 10px 12px;
}

.menu-link:hover,
.menu-link.active {
  color: var(--primary-strong);
  border-color: #c8d8e4;
  background: var(--primary-soft);
  transform: none;
}

.content-layout,
.topbar-inner {
  width: min(100%, var(--max-width));
}

.shell,
#page-content {
  gap: 16px;
}

.page-title,
.dashboard-hero,
.work-panel,
.gps-panel,
.form-card,
.summary-card,
.product-card,
.empty-state,
.table-box,
.cart-summary-card,
.checkout-card,
.store-dashboard-hero,
.store-compact-header,
.sale-payment-summary,
.catalog-toolbar,
.delivery-hero {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow-sm);
  filter: none;
}

.page-title,
.dashboard-hero,
.work-panel,
.gps-panel,
.form-card,
.table-box,
.cart-summary-card,
.checkout-card,
.store-dashboard-hero,
.catalog-toolbar,
.delivery-hero {
  padding: 18px;
}

.page-title {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  background:
    linear-gradient(90deg, #ffffff 0%, #ffffff 58%, #f0f6fa 100%);
}

.page-title-copy h1,
.dashboard-hero h2,
.delivery-hero h2,
.catalog-toolbar h2,
.work-panel h2,
.empty-state h2,
.auth-card-head h2 {
  color: #111c27;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.16;
}

.page-title-copy h1 {
  font-size: clamp(1.75rem, 3vw, 2.65rem);
}

.dashboard-hero h2,
.delivery-hero h2,
.work-panel h2,
.catalog-toolbar h2 {
  font-size: clamp(1.45rem, 2.3vw, 2rem);
}

.page-title-copy p,
.dashboard-hero p,
.delivery-hero p,
.work-panel p,
.empty-state p,
.catalog-toolbar p,
.gps-panel p,
.auth-card-head p {
  color: var(--muted);
  letter-spacing: 0;
}

.breadcrumbs {
  color: var(--muted);
  font-size: 0.82rem;
}

.breadcrumbs a {
  color: var(--primary-strong);
  font-weight: 700;
}

.page-title-art,
.dashboard-hero::after,
.work-panel::after,
.auth-shell::before,
.auth-card::after,
.summary-card::before,
.form-card::before,
.product-media::after {
  display: none;
}

.dashboard-hero,
.delivery-hero {
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.7fr);
  align-items: stretch;
  color: var(--text);
  background:
    linear-gradient(90deg, #ffffff 0%, #ffffff 52%, #f3f7fb 100%);
}

.delivery-hero p,
.delivery-hero .muted {
  color: var(--muted);
}

.dashboard-hero-side,
.delivery-hero-visual,
.store-status-panel,
.line-item,
.login-demo,
.location-modal-notice,
.cart-total-box,
.center-notice-breakdown div {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  box-shadow: none;
}

.dashboard-hero-side strong,
.summary-card strong,
.store-summary-cards .summary-card strong {
  color: #102033;
  font-size: clamp(1.6rem, 3vw, 2.35rem);
  font-weight: 850;
  letter-spacing: 0;
}

.eyebrow,
.info-pill,
.category-chip,
.deal-badge,
.product-category,
.summary-kicker,
.store-status-chip {
  border: 1px solid #cfe0ea;
  border-radius: 999px;
  color: var(--primary-strong);
  background: var(--primary-soft);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0;
}

.summary-grid,
.store-summary-cards {
  gap: 12px;
}

.summary-card,
.store-summary-cards .summary-card {
  padding: 16px;
  border-color: var(--line);
  background: #ffffff;
  box-shadow: var(--shadow-sm);
}

.summary-card:hover,
.product-card:hover,
.button:hover,
.data-table tbody tr:hover,
.tab-item:hover {
  transform: none;
}

.work-panel,
.gps-panel,
.empty-state {
  background: #ffffff;
}

.button,
.picker-button,
button,
input[type="submit"] {
  letter-spacing: 0;
}

.button,
.picker-button {
  min-height: 42px;
  padding: 9px 14px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: 0.92rem;
  font-weight: 800;
  box-shadow: none;
}

.button.primary,
.picker-button.primary {
  color: #ffffff;
  border-color: var(--primary-strong);
  background: var(--primary-strong);
}

.button.primary:hover,
.picker-button.primary:hover {
  background: #0e3f55;
}

.button.secondary,
.picker-button.light {
  color: var(--primary-strong);
  border-color: #c8d8e4;
  background: var(--primary-soft);
}

.button.secondary:hover,
.picker-button.light:hover {
  border-color: #a9c5d5;
  background: #dff0f6;
}

.button.light,
.button.ghost-light {
  color: var(--text);
  border-color: var(--line);
  background: #ffffff;
}

.button.danger,
.logout-tab,
.button.light.session-action {
  color: #ffffff;
  border-color: var(--danger);
  background: var(--danger);
}

.button:disabled,
button:disabled,
select:disabled,
input:disabled {
  opacity: 0.62;
  cursor: not-allowed;
}

.form-card {
  display: grid;
  gap: 14px;
}

.form-card label,
.checkout-field label,
.sale-payment-summary label,
.gps-field label {
  color: #344252;
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: 0;
}

.form-card input,
.form-card select,
.form-card textarea,
.delivery-search input,
.short-input,
.inline-form select,
.checkout-field input,
.checkout-field textarea,
.picker-field input,
.sale-payment-summary input,
.product-search-section input,
.product-quantity input {
  min-height: 42px;
  border: 1px solid #cfd8e3;
  border-radius: 8px;
  color: var(--text);
  background: #ffffff;
  box-shadow: none;
}

.form-card textarea,
.checkout-field textarea {
  min-height: 112px;
}

.form-card input:hover,
.form-card select:hover,
.form-card textarea:hover,
.short-input:hover,
.inline-form select:hover,
.delivery-search input:hover,
.checkout-field input:hover,
.checkout-field textarea:hover {
  border-color: #aebdcc;
}

.form-card input:focus,
.form-card select:focus,
.form-card textarea:focus,
.delivery-search input:focus,
.short-input:focus,
.inline-form select:focus,
.checkout-field input:focus,
.checkout-field textarea:focus,
.picker-field input:focus,
.sale-payment-summary input:focus,
.product-search-section input:focus,
.product-quantity input:focus {
  outline: 0;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(31, 111, 139, 0.15);
}

.inline-form {
  gap: 8px;
}

.table-box {
  overflow: auto;
  background: #ffffff;
}

.data-table,
.product-table,
.order-detail-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.data-table th,
.data-table td,
.product-table th,
.product-table td,
.order-detail-table th,
.order-detail-table td {
  border-bottom: 1px solid var(--line);
  padding: 11px 12px;
  text-align: left;
  vertical-align: middle;
}

.data-table thead th,
.product-table thead th,
.order-detail-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  color: #334455;
  background: #f4f7fa;
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

.data-table tbody tr,
.product-table tbody tr {
  background: #ffffff;
}

.data-table tbody tr:nth-child(even),
.product-table tbody tr:nth-child(even) {
  background: #fafcff;
}

.data-table tbody tr:hover,
.product-table tbody tr:hover {
  background: #eef6f9;
}

.data-table tbody tr.order-row td:first-child {
  border-left: 4px solid currentColor;
}

.data-table tbody tr.order-state-pendiente {
  color: #7a271a;
  background: #fff7ed;
}

.data-table tbody tr.order-state-preparado {
  color: #7a4b00;
  background: #fffbeb;
}

.data-table tbody tr.order-state-en-camino {
  color: #17406f;
  background: #eff6ff;
}

.data-table tbody tr.order-state-entregado {
  color: #0f5132;
  background: #f0fdf4;
}

.data-table tbody tr.order-state-cancelado {
  color: #52606d;
  background: #f5f7fa;
}

.order-status-badge,
.order-assignment-badge,
.cart-count,
.notification-badge {
  border-radius: 999px;
  letter-spacing: 0;
}

.status-pendiente {
  color: #9a3412;
  background: #ffedd5;
  border-color: #fed7aa;
}

.status-preparado {
  color: #92400e;
  background: #fef3c7;
  border-color: #fde68a;
}

.status-en-camino {
  color: #1d4ed8;
  background: #dbeafe;
  border-color: #bfdbfe;
}

.status-entregado,
.assignment-assigned,
.store-status-chip.is-open {
  color: #047857;
  background: #dff8ea;
  border-color: #a9e8c3;
}

.status-cancelado,
.assignment-unassigned,
.store-status-chip.is-closed {
  color: #6b1f2d;
  background: #fff1f3;
  border-color: #ffd0d7;
}

.catalog-toolbar {
  background: #ffffff;
}

.category-rail {
  gap: 8px;
}

.category-chip {
  min-height: 38px;
  padding: 8px 12px;
  box-shadow: none;
}

.category-chip.active,
.category-chip:hover {
  color: #ffffff;
  border-color: var(--primary-strong);
  background: var(--primary-strong);
}

.product-grid {
  gap: 14px;
}

.product-card {
  overflow: hidden;
  border-color: var(--line);
  background: #ffffff;
}

.product-card:hover {
  border-color: #bfd0dc;
  box-shadow: var(--shadow-md);
}

.product-media {
  background: #edf2f7;
}

.product-card-body {
  gap: 10px;
}

.product-card-body h2 {
  color: #111c27;
  font-weight: 850;
  letter-spacing: 0;
}

.product-card-body p,
.product-stock,
.store-row,
.product-store {
  color: var(--muted);
}

.product-price,
.product-footer strong,
.product-price strong {
  color: var(--secondary);
}

.deal-badge {
  color: #ffffff;
  border-color: var(--secondary);
  background: var(--secondary);
}

.store-dashboard-hero,
.store-compact-header,
.store-profile-form,
.store-identity-panel,
.sale-payment-summary,
.cart-summary-card,
.checkout-card {
  border-color: var(--line);
  background: #ffffff;
}

.store-summary-cards .summary-card::before,
.store-summary-cards .summary-card::after {
  display: none;
}

.auth-shell {
  background: transparent;
}

.auth-card,
.compact-login-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow-md);
}

.compact-login-card::before {
  height: 4px;
  background: linear-gradient(90deg, var(--primary-strong), var(--secondary), #8a5a13);
}

.compact-login-card .auth-card-head,
.auth-card-head {
  border-bottom: 1px solid var(--line);
}

.compact-login-card .button.primary {
  background: var(--primary-strong);
  box-shadow: none;
}

.toast {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: #1d2935;
  box-shadow: var(--shadow-md);
}

.toast.info {
  background: var(--primary-strong);
}

.toast.warning {
  background: var(--warning);
}

.toast.error,
.toast.danger {
  background: var(--danger);
}

.modal {
  background: rgba(13, 24, 35, 0.58);
}

.modal-content,
.location-modal-dialog,
.order-detail-modal-dialog {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow-lg);
}

.modal-header,
.location-modal-header,
.order-detail-modal-header {
  border-bottom: 1px solid var(--line);
  background: #f8fafc;
}

.bottom-nav {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow-md);
}

.tab-item.active {
  color: var(--primary-strong);
  background: var(--primary-soft);
}

@media (min-width: 1100px) {
  .main-menu {
    display: inline-flex;
  }

  .menu-button {
    display: none;
  }

  .session-copy {
    display: flex;
  }
}

@media (max-width: 1099px) {
  .page-chrome {
    padding: 10px;
  }

  .topbar-inner {
    min-height: 66px;
  }

  .page-title,
  .dashboard-hero,
  .delivery-hero {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  body {
    font-size: 14px;
  }

  .page-title,
  .dashboard-hero,
  .work-panel,
  .gps-panel,
  .form-card,
  .table-box,
  .cart-summary-card,
  .checkout-card,
  .store-dashboard-hero,
  .catalog-toolbar,
  .delivery-hero {
    padding: 14px;
  }

  .page-title {
    grid-template-columns: 1fr;
  }

  .page-title-copy h1 {
    font-size: 1.65rem;
  }

  .dashboard-hero h2,
  .delivery-hero h2,
  .work-panel h2,
  .catalog-toolbar h2 {
    font-size: 1.35rem;
  }

  .button,
  .picker-button {
    min-height: 42px;
    padding: 9px 12px;
  }
}

/* Final overrides for the in-person sale workspace */
[data-presencial-modal] .modal-large {
  width: min(1180px, 96vw);
  max-height: 92vh;
  overflow: auto;
  border-radius: 8px;
  background: #f7faf9;
  box-shadow: 0 28px 70px rgba(15, 23, 42, 0.28);
}

[data-presencial-modal] .modal-header {
  position: sticky;
  top: 0;
  z-index: 4;
  padding: 1rem 1.1rem;
  border-bottom: 1px solid rgba(18, 32, 38, 0.10);
  background: rgba(255, 255, 255, 0.96);
}

.in-person-sale-form {
  margin: 0;
  padding: 1rem;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.product-search-section {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(260px, 1.1fr);
  gap: 0.85rem;
  align-items: end;
  padding: 0.9rem;
  border: 1px solid rgba(18, 32, 38, 0.10);
  border-radius: 8px;
  background: #ffffff;
}

.product-search-section strong,
.product-search-section span {
  display: block;
}

.product-search-section span {
  margin-top: 0.2rem;
  color: var(--muted);
  font-size: 0.88rem;
}

.product-list-container {
  max-height: min(52vh, 520px);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.product-table thead {
  background: #eef7f2;
}

.product-table tbody tr[data-top-seller="1"] td:first-child {
  border-left: 4px solid #2e9870;
}

.product-name small {
  display: block;
  margin-top: 0.25rem;
  color: #2e7358;
  font-size: 0.76rem;
  font-weight: 700;
}

.presencial-sale-grid {
  grid-template-columns: minmax(0, 1.8fr) minmax(290px, 0.75fr);
  gap: 1rem;
}

.sale-payment-summary {
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.10);
}

.sale-payment-summary input[readonly] {
  color: #174735;
  font-weight: 800;
  background: #f0faf4;
}

@media (max-width: 860px) {
  .product-search-section,
  .presencial-sale-grid {
    grid-template-columns: 1fr;
  }
}

/* Professional in-person sale modal */
[data-presencial-modal] {
  padding: clamp(0.75rem, 2vw, 1.5rem);
}

[data-presencial-modal] .modal-large {
  width: min(1180px, 96vw);
  max-height: 92vh;
  overflow: auto;
  border: 1px solid rgba(18, 32, 38, 0.12);
  border-radius: 8px;
  background: #f7faf9;
  box-shadow: 0 28px 70px rgba(15, 23, 42, 0.28);
}

[data-presencial-modal] .modal-header {
  position: sticky;
  top: 0;
  z-index: 4;
  align-items: center;
  padding: 1rem 1.1rem;
  border-bottom: 1px solid rgba(18, 32, 38, 0.10);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
}

[data-presencial-modal] .modal-header h2 {
  margin: 0.15rem 0 0;
  font-size: 1.35rem;
}

.in-person-sale-form {
  margin: 0;
  padding: 1rem;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.product-search-section {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(260px, 1.1fr);
  gap: 0.85rem;
  align-items: end;
  margin-bottom: 1rem;
  padding: 0.9rem;
  border: 1px solid rgba(18, 32, 38, 0.10);
  border-radius: 8px;
  background: #ffffff;
}

.product-search-section strong {
  display: block;
  color: #17251f;
  font-size: 1rem;
}

.product-search-section span {
  display: block;
  margin-top: 0.2rem;
  color: var(--muted);
  font-size: 0.88rem;
}

.product-search-section label {
  margin: 0;
}

.product-search-section input {
  min-height: 2.8rem;
  border-radius: 8px;
  background: #fbfdfc;
}

.product-list-container {
  max-height: min(52vh, 520px);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.product-table {
  font-size: 0.92rem;
}

.product-table thead {
  background: #eef7f2;
}

.product-table th {
  color: #20362d;
  font-size: 0.78rem;
  letter-spacing: 0;
  text-transform: uppercase;
}

.product-table td {
  background: #ffffff;
}

.product-table tbody tr[data-top-seller="1"] td:first-child {
  border-left: 4px solid #2e9870;
}

.product-name {
  font-weight: 700;
}

.product-name small {
  display: block;
  margin-top: 0.25rem;
  color: #2e7358;
  font-size: 0.76rem;
  font-weight: 700;
}

.product-stock {
  color: #53645c;
  font-weight: 600;
}

.product-quantity input {
  width: 76px;
  border-radius: 8px;
  background: #fbfdfc;
  font-weight: 700;
}

.presencial-sale-grid {
  grid-template-columns: minmax(0, 1.8fr) minmax(290px, 0.75fr);
  gap: 1rem;
}

.sale-payment-summary {
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.10);
}

.sale-payment-summary input[readonly] {
  color: #174735;
  font-weight: 800;
  background: #f0faf4;
}

@media (max-width: 860px) {
  .product-search-section,
  .presencial-sale-grid {
    grid-template-columns: 1fr;
  }
}

.cart-form {
  display: grid;
  gap: 1rem;
}

.cart-checkout-shell {
  display: grid;
  gap: 0.9rem;
}

.cart-summary-card,
.checkout-card {
  display: grid;
  gap: 0.95rem;
  padding: 1rem 1.2rem 1.2rem;
  border: 1px solid #d8dde3;
  border-radius: 0.55rem;
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(24, 34, 39, 0.06);
}

.cart-summary-card {
  border-top: 3px solid #e83e4d;
}

.cart-summary-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.cart-summary-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}

.cart-clear-button {
  min-height: 2.2rem;
  padding: 0.55rem 0.95rem;
  border-radius: 0.35rem;
  font-size: 0.95rem;
}

.cart-summary-card .table-box {
  border: 1px solid #d7dde5;
  border-radius: 0;
  overflow: hidden;
  box-shadow: none;
}

.checkout-cart-table {
  min-width: 0;
}

.checkout-cart-table thead th {
  padding: 0.8rem 0.7rem;
  border-bottom: 1px solid #d7dde5;
  color: #111827;
  font-size: 0.88rem;
  text-align: center;
  background: #ffffff;
}

.checkout-cart-table tbody td {
  padding: 0.7rem 0.7rem;
  border-bottom: 1px solid #e6ebf0;
  text-align: center;
  background: #ffffff;
}

.checkout-cart-table tbody tr:last-child td {
  border-bottom: 0;
}

.checkout-cart-table td:nth-child(2) {
  text-align: left;
}

.checkout-cart-table .short-input {
  min-height: 2.35rem;
  padding: 0.45rem 0.6rem;
  border-radius: 0;
  text-align: left;
  background: #fff;
}

.checkout-cart-table td:last-child .button {
  min-height: 2.2rem;
  padding: 0.45rem 0.75rem;
  border-radius: 0.3rem;
}

.cart-summary-footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
}

.cart-total-box {
  min-width: 10.5rem;
  padding: 0.85rem 1.15rem;
  border: 1px solid #d8dde3;
  background: #ffffff;
  box-shadow: 0 2px 6px rgba(24, 34, 39, 0.08);
  color: #111827;
  font-weight: 700;
}

.cart-total-box.align-right {
  margin-left: auto;
}

.checkout-card {
  gap: 0.9rem;
  padding-top: 0;
}

.checkout-card-header {
  display: grid;
  justify-items: center;
  gap: 0.15rem;
  margin: 0 -1.2rem;
  padding: 0.75rem 1.2rem;
  border-bottom: 1px solid #d8dde3;
  background: #ffffff;
}

.checkout-card-kicker {
  color: #ef3340;
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.checkout-card-header p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
  text-align: center;
}

.checkout-grid {
  display: grid;
  gap: 0.95rem 0.9rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.checkout-field {
  display: grid;
  gap: 0.45rem;
  color: #111827;
  font-weight: 700;
}

.checkout-field input,
.checkout-field textarea {
  width: 100%;
  min-height: 2.7rem;
  padding: 0.62rem 0.78rem;
  border: 1px solid #cfd6de;
  border-radius: 0.2rem;
  outline: none;
  color: #111827;
  background: #eef2f6;
  box-shadow: none;
}

.checkout-field textarea {
  min-height: 5.2rem;
  resize: vertical;
  background: #ffffff;
}

.checkout-field input[readonly] {
  color: rgba(17, 24, 39, 0.88);
}

.checkout-inline {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0;
  align-items: stretch;
}

.checkout-map-button {
  width: 2.9rem;
  min-width: 2.9rem;
  height: 2.7rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0 0.2rem 0.2rem 0;
  border: 0;
  text-decoration: none;
  font-size: 1rem;
  color: #fff;
  background: #2aa8bd;
}

.checkout-field-action {
  align-content: start;
}

.checkout-location-button {
  width: 100%;
  min-height: 2.7rem;
  justify-content: center;
  border-radius: 0.2rem;
  color: #fff;
  background: #1098ad;
  border-color: #1098ad;
  box-shadow: none;
}

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

.cart-form > .action-row {
  justify-content: center;
  gap: 0.9rem;
}

.cart-form > .action-row .button.primary {
  min-width: 8.5rem;
  border-radius: 0.2rem;
  background: #0d6efd;
  box-shadow: none;
}

.cart-form > .action-row .button.secondary {
  border-radius: 0.2rem;
  box-shadow: none;
}

.line-item {
  padding: 0.9rem 1rem;
  border: 1px solid rgba(18, 32, 38, 0.08);
  border-radius: 1.1rem;
  background: rgba(255, 255, 255, 0.72);
}

.table-box {
  overflow: auto;
}

.data-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
}

/* Responsive cart table - ALL DEVICES */
@media (max-width: 1024px) {
  .table-box {
    overflow-x: auto;
  }
  
  .data-table.cart-table {
    min-width: 650px;
  }
}

@media (max-width: 719px) {
  .cart-summary-card,
  .checkout-card {
    padding: 1rem;
  }

  .cart-summary-toolbar,
  .cart-summary-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .cart-total-box.align-right {
    margin-left: 0;
  }

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

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

  .checkout-map-button {
    width: 100%;
    border-radius: 0.2rem;
  }

  .data-table.cart-table {
    min-width: 0;
    border-collapse: separate;
    border-spacing: 0;
  }

  .data-table.cart-table tbody {
    display: grid;
    gap: 1rem;
  }
  
  .data-table.cart-table thead {
    display: none;
  }
  
  .data-table.cart-table tr {
    display: block;
    margin-bottom: 1rem;
    border-radius: 1.2rem;
    box-shadow: var(--shadow-sm);
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.8);
    overflow: hidden;
  }
  
  .data-table.cart-table td {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.85rem 1rem;
    border-bottom: 1px solid rgba(18, 32, 38, 0.08);
    text-align: left;
  }

  .data-table.cart-table td::before {
    content: attr(data-label);
    flex: 0 0 40%;
    max-width: 8rem;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
  }
  
  .data-table.cart-table td:first-child {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
    font-weight: 600;
    background: rgba(141, 198, 160, 0.08);
    border-radius: 1.1rem 1.1rem 0 0;
    border-bottom: none;
  }

  .data-table.cart-table td:first-child::before {
    max-width: none;
  }
  
  .data-table.cart-table td:last-child {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
    align-items: center;
    padding: 1rem;
    border-radius: 0 0 1.1rem 1.1rem;
    border-top: 1px solid rgba(18, 32, 38, 0.12);
    background: rgba(255, 255, 255, 0.95);
  }

  .data-table.cart-table td:last-child::before {
    display: none;
  }
  
  .data-table.cart-table td:nth-child(2) {
    font-weight: 500;
    color: var(--primary-strong);
  }
  
  .data-table.cart-table td:nth-child(3) {
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }

  .data-table.cart-table td:nth-child(3)::before {
    flex: 1 0 auto;
    max-width: none;
  }
  
  .data-table.cart-table .short-input {
    width: 4.5rem;
    min-width: auto;
  }
  
  .data-table.cart-table .cart-total-row {
    margin-top: 0.25rem;
    background: linear-gradient(135deg, var(--primary-soft), rgba(141, 198, 160, 0.12));
  }

  .data-table.cart-table .cart-total-row th {
    display: block;
    padding: 0 1rem;
    border: none;
    text-align: left;
    background: transparent;
  }

  .data-table.cart-table .cart-total-row th:first-child {
    padding-top: 1rem;
    color: var(--muted);
    font-size: 0.82rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
  }

  .data-table.cart-table .cart-total-row th:nth-child(2) {
    padding-top: 0.35rem;
    padding-bottom: 1rem;
    color: var(--primary-strong);
    font-size: 1.2rem;
    font-weight: 800;
  }

  .data-table.cart-table .cart-total-row th:last-child {
    display: none;
  }
  
  .data-table.cart-table tr:hover {
    transform: none;
  }

  .cart-form .gps-panel .button,
  .cart-form .action-row > * {
    width: 100%;
  }
}

.data-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 1rem;
  text-align: left;
  color: var(--muted);
  background: rgba(248, 252, 251, 0.96);
  border-bottom: 1px solid rgba(18, 32, 38, 0.08);
  font-size: 0.84rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.data-table td,
.data-table th {
  padding: 1rem;
}

.data-table tbody tr:not(:last-child) td {
  border-bottom: 1px solid rgba(18, 32, 38, 0.08);
}

.data-table tbody tr:hover {
  background: rgba(141, 198, 160, 0.06);
}

.inline-form {
  display: grid;
  gap: 0.55rem;
}

.gps-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 0.75rem 0;
}

.manual-map-field {
  display: grid;
  gap: 0.55rem;
  margin-top: 0.5rem;
}

.manual-map-help {
  margin: 0.7rem 0 0;
}

.short-input {
  min-width: 5rem;
}

.nowrap {
  white-space: nowrap;
}

.toast-container {
  position: fixed;
  top: calc(var(--topbar-offset) + 0.35rem);
  right: 1rem;
  z-index: 200;
  display: grid;
  gap: 0.7rem;
  width: min(22rem, calc(100vw - 2rem));
}

.toast {
  padding: 0.95rem 1rem;
  border-radius: 1rem;
  color: #fff;
  background: rgba(19, 78, 74, 0.95);
  box-shadow: var(--shadow-md);
  transform: translateY(-8px);
  opacity: 0;
  transition: opacity var(--transition), transform var(--transition);
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.toast.error {
  background: rgba(185, 28, 28, 0.96);
}

.toast.warning {
  background: rgba(180, 83, 9, 0.96);
}

.toast.info {
  background: rgba(30, 64, 175, 0.96);
}

.alert {
  display: none;
}

.center-notice-backdrop {
  position: fixed;
  inset: 0;
  z-index: 250;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: #ffffff;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}


.center-notice {
  width: min(100%, 30rem);
  display: grid;
  gap: 1rem;
  padding: 1.4rem;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 1.5rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 243, 245, 0.94));
  box-shadow: var(--shadow-lg);
  text-align: center;
}

.center-notice h2,
.center-notice p {
  margin: 0;
}

.center-notice-breakdown {
  display: grid;
  gap: 0.7rem;
}

.center-notice-breakdown div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1rem;
  border-radius: 1rem;
  background: rgba(141, 198, 160, 0.08);
}

.center-notice-breakdown div:last-child {
  color: var(--primary-strong);
  font-size: 1.05rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary-soft), rgba(141, 198, 160, 0.12));
}

.loading-skeleton {
  display: none !important;
}


.loading-skeleton.is-hidden {
  opacity: 0;
  visibility: hidden;
}

.skeleton-grid {
  display: grid;
  width: 100%;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.skeleton {
  display: none !important;
}


.bottom-nav {
  position: fixed;
  right: 0.9rem;
  bottom: 0.9rem;
  left: 0.9rem;
  z-index: 100;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
  gap: 0.55rem;
  padding: 0.6rem;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 1.45rem;
  background: #ffffff;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: var(--shadow-md);
}


.tab-item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: 3.35rem;
  padding: 0.55rem;
  border-radius: 1rem;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
}

.tab-item.active {
  color: var(--primary-strong);
  background: rgba(141, 198, 160, 0.1);
}

.session-action {
  white-space: nowrap;
}

/* Red session buttons - Salir/Ingresar */
.button.light.session-action,
.button.light[href*="login"],
.button.light[href*="registro"],
.logout-tab {
  background: linear-gradient(135deg, var(--danger), #e68a96);
  color: #fff;
  border-color: rgba(216, 95, 111, 0.3);
  position: relative;
  overflow: hidden;
}

.button.light.session-action::after,
.button.light[href*="login"]::after,
.button.light[href*="registro"]::after,
.logout-tab::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.18), transparent 35%);
  pointer-events: none;
}

.button.light.session-action:hover,
.button.light[href*="login"]:hover,
.button.light[href*="registro"]:hover,
.logout-tab:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 24px rgba(216, 95, 111, 0.3);
}

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

@keyframes pulse-slide {
  from {
    background-position: 200% 0;
  }
  to {
    background-position: -200% 0;
  }
}

@media (min-width: 720px) {
  .page-title {
    grid-template-columns: 1.9fr auto;
    align-items: end;
  }

  .session-copy {
    display: flex;
  }

  .delivery-search {
    grid-template-columns: 1.2fr 1fr auto;
  }

  .dashboard-hero {
    grid-template-columns: 1.8fr 0.9fr;
    align-items: start;
  }

  .form-card {
    padding: 1.75rem;
  }
}

@media (min-width: 1100px) {
  .page-chrome {
    padding-bottom: 2rem;
  }

  .menu-button,
  .menu-close,
  .bottom-nav,
  .side-menu {
    display: none;
  }

  .main-menu {
    display: inline-flex;
  }

  .content-layout,
  .shell {
    width: 100%;
  }

  .delivery-hero {
    grid-template-columns: 1.4fr 0.8fr;
    align-items: center;
  }

  .product-grid {
    grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  }
}

@media (max-width: 1099px) {
  .page-chrome {
    padding-bottom: 6.5rem;
  }

  .session-box .session-action {
    display: none;
  }
}

@media (max-width: 1099px) {
  body[data-role="administrador"] .page-chrome,
  body[data-role="subadmin"] .page-chrome,
  body[data-role="vendedor"] .page-chrome {
    padding-bottom: 2rem;
  }

  body[data-role="administrador"] .menu-button,
  body[data-role="subadmin"] .menu-button,
  body[data-role="vendedor"] .menu-button {
    margin-left: auto;
    flex: 0 0 auto;
  }

  body[data-role="administrador"] .bottom-nav,
  body[data-role="subadmin"] .bottom-nav,
  body[data-role="vendedor"] .bottom-nav {
    display: none;
  }

  body[data-role="administrador"] .session-box,
  body[data-role="subadmin"] .session-box,
  body[data-role="vendedor"] .session-box {
    margin-left: 0;
  }
}

@media (max-width: 719px) {
  body[data-role="administrador"] .topbar-inner,
  body[data-role="subadmin"] .topbar-inner,
  body[data-role="vendedor"] .topbar-inner {
    gap: 0.65rem;
    justify-content: space-between;
  }

  body[data-role="administrador"] .side-menu,
  body[data-role="subadmin"] .side-menu,
  body[data-role="vendedor"] .side-menu {
    top: 0.8rem;
    bottom: 0.8rem;
    left: 0.8rem;
    width: calc(100vw - 1.6rem);
    border-radius: 1.45rem;
  }

  body[data-role="administrador"] .brand-copy small,
  body[data-role="subadmin"] .brand-copy small,
  body[data-role="vendedor"] .brand-copy small {
    display: none;
  }

  body[data-role="administrador"] .session-copy,
  body[data-role="subadmin"] .session-copy,
  body[data-role="vendedor"] .session-copy {
    display: none;
  }
}

@media (max-width: 719px) {
  :root {
    --topbar-offset: 6.4rem;
  }

  .page-chrome {
    padding-left: 0.9rem;
    padding-right: 0.9rem;
  }

  .topbar {
    padding-top: 0.85rem;
    margin-bottom: 1rem;
  }

  .topbar-inner {
    gap: 0.7rem;
    padding: 0.75rem 0.85rem;
  }

  .brand-copy small,
  .page-title-side,
  .delivery-hero-visual {
    display: none;
  }

  .page-title,
  .delivery-hero,
  .dashboard-hero,
  .work-panel,
  .gps-panel,
  .form-card,
  .empty-state {
    padding: 1.1rem;
  }

  .toast-container {
    left: 0.9rem;
    right: 0.9rem;
    width: auto;
  }
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: auto;
  pointer-events: none;
  z-index: -1;
  border-radius: 999px;
  filter: blur(10px);
  opacity: 0.8;
}

body::before {
  top: 7rem;
  right: -6rem;
  width: 22rem;
  height: 22rem;
  background: radial-gradient(circle, rgba(141, 198, 160, 0.18), transparent 68%);
}

body::after {
  bottom: 2rem;
  left: -7rem;
  width: 24rem;
  height: 24rem;
  background: radial-gradient(circle, rgba(191, 227, 202, 0.2), transparent 70%);
}

#page-content {
  display: grid;
  gap: 1.25rem;
}

.topbar-inner {
  position: relative;
  overflow: hidden;
  border-color: rgba(255, 255, 255, 0.82);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(255, 243, 245, 0.76)),
    rgba(255, 255, 255, 0.78);
}

.topbar-inner::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 9rem;
  background: linear-gradient(90deg, rgba(141, 198, 160, 0.08), transparent);
  pointer-events: none;
}

.brand-mark {
  position: relative;
  overflow: hidden;
}

.brand-mark::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.4), transparent 55%);
  pointer-events: none;
}

.side-menu {
  border-color: rgba(255, 255, 255, 0.82);
  background:
    radial-gradient(circle at top left, rgba(141, 198, 160, 0.12), transparent 12rem),
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(255, 243, 245, 0.9));
}

.menu-links {
  gap: 0.55rem;
}

.menu-link {
  position: relative;
  overflow: hidden;
}

.menu-link::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 0.28rem;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--primary), var(--secondary));
  opacity: 0;
  transition: opacity var(--transition);
}

.menu-link.active::after,
.menu-link:hover::after {
  opacity: 1;
}

.shell {
  gap: 1.4rem;
}

.page-title {
  position: relative;
  overflow: hidden;
  padding: 1.7rem;
  border-color: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow-md);
}

.page-title-art {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.page-title-art span {
  position: absolute;
  display: block;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.8), rgba(141, 198, 160, 0.08) 48%, transparent 72%);
}

.page-title-art span:first-child {
  top: -4rem;
  right: -2rem;
  width: 13rem;
  height: 13rem;
}

.page-title-art span:last-child {
  right: 16rem;
  bottom: -4.5rem;
  width: 11rem;
  height: 11rem;
  background: radial-gradient(circle, rgba(191, 227, 202, 0.2), transparent 68%);
}

.page-title-copy,
.page-title-side {
  position: relative;
  z-index: 1;
}

.page-title-copy {
  max-width: 48rem;
}

.page-title-copy p {
  max-width: 40rem;
  font-size: 1.02rem;
}

.breadcrumbs span:last-child {
  color: var(--text);
  font-weight: 700;
}

.dashboard-hero,
.work-panel {
  position: relative;
  overflow: hidden;
}

.dashboard-hero {
  padding: 1.6rem;
  color: #f5fffd;
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.16), transparent 17rem),
    radial-gradient(circle at bottom right, rgba(191, 227, 202, 0.24), transparent 16rem),
    linear-gradient(135deg, #365448, #8dc6a0 62%, #5f9b77 100%);
  box-shadow: 0 30px 60px rgba(90, 49, 57, 0.28);
}

.dashboard-hero::after,
.work-panel::after,
.auth-card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.12), transparent 34%);
}

.dashboard-hero .eyebrow,
.catalog-toolbar .eyebrow.dark {
  background: rgba(255, 255, 255, 0.14);
  color: #f4fffd;
}

.dashboard-hero p {
  color: rgba(244, 255, 252, 0.78);
  max-width: 38rem;
  font-size: 1.01rem;
}

.dashboard-hero-side {
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px);
}

.dashboard-hero-side .info-pill {
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
}

.dashboard-hero-side p {
  color: rgba(255, 255, 255, 0.72);
}

.summary-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.summary-card {
  position: relative;
  overflow: hidden;
  padding: 1.35rem;
  border-color: rgba(255, 255, 255, 0.84);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 246, 247, 0.9));
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}

.summary-card::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 0.28rem;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
}

.summary-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: rgba(141, 198, 160, 0.16);
}

.summary-card p {
  color: var(--muted);
}

.work-panel {
  padding: 1.5rem;
  background:
    radial-gradient(circle at top right, rgba(141, 198, 160, 0.16), transparent 16rem),
    linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(255, 241, 243, 0.92));
}

.work-panel h2 {
  font-size: clamp(1.55rem, 4vw, 2.3rem);
  max-width: 28rem;
}

.work-panel p {
  max-width: 42rem;
}

.delivery-hero {
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 30px 70px rgba(8, 35, 40, 0.26);
}

.delivery-hero-copy {
  display: grid;
  gap: 0.9rem;
}

.delivery-hero h2 {
  font-size: clamp(2rem, 5vw, 3.4rem);
}

.delivery-search {
  margin-top: 1rem;
}

.delivery-search input {
  border-color: rgba(255, 255, 255, 0.1);
  color: #f7fffd;
  background: rgba(255, 255, 255, 0.08);
}

.delivery-search input::placeholder {
  color: rgba(247, 255, 253, 0.6);
}

.delivery-search input[readonly] {
  color: rgba(247, 255, 253, 0.8);
}

.delivery-search input:focus {
  border-color: rgba(255, 255, 255, 0.28);
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.1);
}

.search-button {
  min-width: 8rem;
}

.category-rail {
  padding: 0.25rem 0 0.35rem;
  scrollbar-width: none;
}

.category-rail::-webkit-scrollbar {
  display: none;
}

.catalog-toolbar {
  padding: 1.2rem 1.25rem;
  border: 0;
  border-radius: 0;
  background: transparent;
  backdrop-filter: none;
  box-shadow: none;
}

.product-card {
  display: grid;
  grid-template-rows: auto 1fr;
  border-color: rgba(255, 255, 255, 0.84);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 245, 246, 0.92));
}

.product-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(9, 27, 34, 0.26));
  pointer-events: none;
}

.product-card-body {
  position: relative;
  align-content: start;
}

.product-card-body p {
  display: -webkit-box;
  overflow: hidden;
  color: var(--muted);
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.store-row span {
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  color: var(--success);
  background: rgba(199, 123, 136, 0.14);
  font-weight: 700;
}

.product-footer {
  align-items: end;
  margin-top: 0.2rem;
}

.product-footer .button {
  min-width: 8.5rem;
}

.catalog-empty,
.empty-state {
  background:
    radial-gradient(circle at top, rgba(141, 198, 160, 0.12), transparent 15rem),
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 243, 245, 0.92));
}

.gps-panel {
  display: grid;
  gap: 0.7rem;
  border-color: rgba(255, 255, 255, 0.82);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(255, 243, 245, 0.92));
}

.form-card {
  position: relative;
  overflow: hidden;
  border-color: rgba(255, 255, 255, 0.84);
  background:
    radial-gradient(circle at top right, rgba(141, 198, 160, 0.08), transparent 14rem),
    linear-gradient(180deg, rgba(255, 255, 255, 0.97), rgba(255, 246, 247, 0.92));
  box-shadow: var(--shadow-md);
}

.form-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 0.38rem;
  background: linear-gradient(180deg, var(--primary), var(--secondary));
}

.auth-shell {
  position: relative;
  min-height: 62vh;
}

.auth-shell::before {
  content: "";
  position: absolute;
  inset: 4% 10% auto auto;
  width: min(24rem, 38vw);
  height: min(24rem, 38vw);
  border-radius: 999px;
  background: radial-gradient(circle, rgba(141, 198, 160, 0.1), transparent 68%);
  pointer-events: none;
}

.auth-card {
  width: min(100%, 620px);
}

.auth-card-head {
  align-items: center;
  margin-bottom: 1.35rem;
}

.auth-card-head h2 {
  margin: 0 0 0.2rem;
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  letter-spacing: -0.03em;
}

.auth-card-head p {
  margin: 0;
  color: var(--muted);
}

.login-image {
  width: 4.85rem;
  height: 4.85rem;
  box-shadow: 0 14px 30px rgba(141, 198, 160, 0.16);
}

.login-demo {
  display: grid;
  gap: 0.15rem;
  padding: 0.9rem 1rem;
  border-radius: 1rem;
  color: var(--muted);
  background: rgba(141, 198, 160, 0.08);
}

.login-demo strong {
  color: var(--primary-strong);
}

.form-card label {
  position: relative;
  z-index: 1;
}

.form-card input,
.form-card select,
.form-card textarea {
  border-color: rgba(18, 32, 38, 0.1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.form-card input:hover,
.form-card select:hover,
.form-card textarea:hover,
.short-input:hover,
.inline-form select:hover {
  border-color: rgba(141, 198, 160, 0.24);
}

.action-row {
  align-items: center;
}

.table-box {
  border-color: rgba(255, 255, 255, 0.84);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 245, 246, 0.92));
  box-shadow: var(--shadow-md);
}

.data-table {
  min-width: 760px;
}

.data-table thead th {
  padding-top: 1.1rem;
  padding-bottom: 1.1rem;
  color: var(--primary-strong);
  background: linear-gradient(180deg, rgba(255, 243, 245, 0.96), rgba(255, 255, 255, 0.94));
}

.data-table tbody td {
  vertical-align: middle;
}

.data-table tbody tr:nth-child(even) {
  background: rgba(255, 247, 248, 0.78);
}

.data-table tbody td:last-child {
  min-width: 10rem;
}

.inline-form {
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  align-items: center;
}

.line-items {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.line-item {
  margin-bottom: 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.button.primary,
.button.secondary,
.button.light,
.button.ghost-light,
.button.danger {
  position: relative;
  overflow: hidden;
}

.button.primary::after,
.button.secondary::after,
.button.light::after,
.button.ghost-light::after,
.button.danger::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.18), transparent 35%);
  pointer-events: none;
}

.toast {
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.bottom-nav {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(243, 251, 250, 0.82));
}

.tab-item {
  transition: transform var(--transition), background var(--transition), color var(--transition);
}

.tab-item:hover {
  transform: translateY(-1px);
  background: rgba(141, 198, 160, 0.08);
}

@media (min-width: 720px) {
  .auth-card {
    padding: 2rem;
  }

  .work-panel {
    display: grid;
    grid-template-columns: 1.5fr auto;
    gap: 1.2rem;
    align-items: end;
  }

  .store-identity-panel {
    display: grid;
    grid-template-columns: 1fr;
    align-items: start;
  }
}

@media (min-width: 1100px) {
  .shell > * {
    animation: rise-in 380ms ease both;
  }

  .page-title {
    padding: 2rem;
  }

  .catalog-toolbar {
    grid-template-columns: 1fr auto;
    display: grid;
    align-items: end;
  }
}

@media (max-width: 719px) {
  .page-title-art span:last-child,
  .auth-shell::before {
    display: none;
  }

  .dashboard-hero,
  .work-panel,
  .page-title,
  .catalog-toolbar,
  .form-card,
  .table-box {
    border-radius: 1.25rem;
  }

  .auth-card-head {
    align-items: start;
  }
}

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

/* Polish Pass */
:root {
  --font-sans: "Bahnschrift", "Segoe UI Variable", "Trebuchet MS", sans-serif;
  --max-width: 1440px;
  --shadow-xl: 0 34px 84px rgba(10, 31, 39, 0.18);
}

html {
  font-size: 16px;
}

body {
  line-height: 1.6;
  letter-spacing: 0.01em;
  background-attachment: fixed;
}

body::before {
  width: 26rem;
  height: 26rem;
  opacity: 0.92;
}

body::after {
  width: 28rem;
  height: 28rem;
  opacity: 0.88;
}

.page-chrome {
  padding-top: 1.35rem;
}

.topbar-inner {
  min-height: 5.35rem;
  padding: 0.95rem 1.2rem;
  border-color: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow-xl);
}

.brand {
  gap: 1rem;
}

.brand-copy strong {
  font-size: 1.08rem;
  letter-spacing: -0.02em;
}

.brand-copy small {
  font-size: 0.78rem;
  letter-spacing: 0.01em;
}

.main-menu {
  padding: 0.4rem;
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.main-menu a {
  position: relative;
  min-height: 2.8rem;
}

.main-menu a.active::after {
  content: "";
  position: absolute;
  right: 0.7rem;
  bottom: 0.45rem;
  left: 0.7rem;
  height: 0.18rem;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
}

.session-box {
  gap: 0.65rem;
}

.session-copy {
  padding-right: 0.2rem;
}

.session-copy strong {
  font-size: 0.95rem;
}

.session-copy span {
  letter-spacing: 0.01em;
}

.page-title {
  padding: 1.85rem;
  border-radius: 1.85rem;
  box-shadow: var(--shadow-xl);
}

.page-title-copy h1 {
  letter-spacing: -0.045em;
}

.page-title-copy p {
  font-size: 1.04rem;
  line-height: 1.7;
}

.page-title-side {
  align-items: flex-start;
}

.dashboard-hero,
.work-panel,
.catalog-toolbar,
.table-box,
.form-card,
.empty-state,
.gps-panel {
  box-shadow: var(--shadow-xl);
}

.dashboard-hero {
  border-radius: 1.85rem;
}

.dashboard-hero-copy h2 {
  font-size: clamp(2.05rem, 5vw, 3.55rem);
}

.dashboard-hero-copy p {
  max-width: 44rem;
}

.dashboard-hero-side {
  min-height: 100%;
  justify-content: start;
}

.summary-grid {
  gap: 1.15rem;
}

.summary-card {
  border-radius: 1.55rem;
}

.summary-card h3 {
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}

.summary-card strong {
  font-size: clamp(2rem, 5vw, 3rem);
}

.work-panel {
  border-radius: 1.85rem;
}

.work-panel h2 {
  letter-spacing: -0.04em;
}

.delivery-hero {
  border-radius: 2rem;
  overflow: hidden;
}

.delivery-hero-copy h2 {
  letter-spacing: -0.045em;
}

.delivery-hero p {
  max-width: 42rem;
}

.delivery-hero-visual {
  min-height: 300px;
  border: 0;
}

.hero-actions,
.action-row {
  gap: 0.85rem;
}

.button {
  min-height: 3rem;
  padding: 0.9rem 1.18rem;
  letter-spacing: 0.01em;
}

.button.small {
  min-height: 2.45rem;
}

.category-rail {
  gap: 0.85rem;
}

.category-chip {
  padding: 0.82rem 1.08rem;
  border-radius: 1.15rem;
}

.catalog-toolbar {
  border-radius: 1.5rem;
}

.catalog-toolbar h2 {
  font-size: clamp(1.5rem, 4vw, 2.35rem);
}

.product-grid {
  gap: 1.15rem;
}

.product-card {
  border-radius: 1.75rem;
}

.product-media {
  aspect-ratio: 16 / 10.5;
}

.deal-badge {
  top: 0.9rem;
  right: 0.9rem;
  box-shadow: 0 10px 22px rgba(234, 88, 12, 0.25);
}

.product-card-body h2 {
  font-size: 1.22rem;
  letter-spacing: -0.02em;
}

.product-card-body p {
  line-height: 1.65;
}

.product-footer strong {
  font-size: 1.5rem;
  letter-spacing: -0.03em;
}

.empty-state,
.catalog-empty {
  border-radius: 1.7rem;
}

.empty-state h2,
.catalog-empty h2 {
  font-size: clamp(1.55rem, 4vw, 2.4rem);
}

.form-card {
  border-radius: 1.75rem;
  padding: 1.55rem;
}

.form-card label,
.line-item {
  gap: 0.6rem;
}

.form-card input,
.form-card select,
.form-card textarea,
.delivery-search input,
.short-input,
.inline-form select {
  min-height: 3.15rem;
  border-radius: 1.1rem;
}

.form-card textarea {
  min-height: 132px;
}

.form-preview {
  width: 156px;
  border-radius: 1.15rem;
}

.auth-shell {
  padding-top: 0.5rem;
}

.auth-card {
  width: min(100%, 640px);
}

.auth-card-head {
  margin-bottom: 1.45rem;
}

.login-image {
  width: 5.1rem;
  height: 5.1rem;
}

.login-demo {
  margin-top: 0.25rem;
  border: 1px solid rgba(141, 198, 160, 0.08);
}

.gps-panel {
  border-radius: 1.55rem;
}

.table-box {
  border-radius: 1.75rem;
}

.data-table {
  min-width: 820px;
}

.data-table thead th {
  font-size: 0.8rem;
  letter-spacing: 0.08em;
}

.data-table td,
.data-table th {
  padding: 1rem 1.05rem;
}

.data-table tbody tr {
  transition: background var(--transition), transform var(--transition);
}

.data-table tbody tr:hover {
  transform: translateY(-1px);
}

.line-items {
  gap: 1rem;
}

.line-item {
  padding: 1rem 1.05rem;
  border-radius: 1.2rem;
}

.toast {
  border-radius: 1.15rem;
}

.bottom-nav {
  border-radius: 1.55rem;
}

.tab-item {
  min-height: 3.5rem;
  border-radius: 1.1rem;
}

@media (min-width: 900px) {
  .summary-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .product-grid {
    grid-template-columns: repeat(auto-fit, minmax(285px, 1fr));
  }

  .form-card.wide {
    padding: 1.8rem;
  }
}

@media (min-width: 1200px) {
  .page-chrome {
    padding-left: 1.35rem;
    padding-right: 1.35rem;
  }

  .catalog-toolbar {
    padding: 1.3rem 1.4rem;
  }
}

@media (max-width: 719px) {
  .topbar-inner {
    min-height: 5rem;
    padding: 0.72rem 0.82rem;
  }

  .brand-mark {
    width: 3.4rem;
    height: 3.4rem;
  }

  .brand-mark img {
    width: 2.75rem;
    height: 2.75rem;
  }

  .brand-copy strong {
    font-size: 0.98rem;
  }

  .page-title,
  .dashboard-hero,
  .delivery-hero,
  .work-panel,
  .catalog-toolbar,
  .form-card,
  .table-box,
  .gps-panel,
  .empty-state {
    border-radius: 1.35rem;
  }

  .button {
    min-height: 2.9rem;
  }

  .product-footer {
    align-items: start;
    flex-direction: column;
  }

  .product-footer .button {
    width: 100%;
  }
}

/* Professional sober redesign */
:root {
  color-scheme: light;
  --bg: #f4f6f8;
  --bg-accent: #e7ebf0;
  --surface: #ffffff;
  --surface-strong: #ffffff;
  --surface-dark: #111827;
  --surface-soft: #f7f9fb;
  --text: #17202a;
  --muted: #64707d;
  --line: #d9e0e7;
  --primary: #1f4f7a;
  --primary-strong: #143a5b;
  --primary-soft: #e7f0f8;
  --secondary: #52616f;
  --danger: #b42333;
  --warning: #a16207;
  --success: #167a55;
  --shadow-sm: 0 1px 2px rgba(17, 24, 39, 0.05), 0 8px 24px rgba(17, 24, 39, 0.06);
  --shadow-md: 0 2px 4px rgba(17, 24, 39, 0.06), 0 14px 32px rgba(17, 24, 39, 0.08);
  --shadow-lg: 0 8px 18px rgba(17, 24, 39, 0.08), 0 24px 56px rgba(17, 24, 39, 0.1);
  --shadow-xl: 0 14px 34px rgba(17, 24, 39, 0.12);
  --radius-sm: 0.35rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 0.9rem;
  --font-sans: "Segoe UI Variable", "Segoe UI", Arial, sans-serif;
  --transition: 160ms ease;
}

html {
  background: var(--bg);
}

body {
  color: var(--text);
  letter-spacing: 0;
  background:
    linear-gradient(180deg, #eef2f6 0, #f6f8fa 280px, var(--bg) 100%);
  background-attachment: fixed;
}

body::before,
body::after,
.auth-shell::before,
.button::after,
.button.primary::after,
.button.secondary::after,
.button.light::after,
.button.ghost-light::after,
.button.danger::after,
.button.light.session-action::after,
.button.light[href*="login"]::after,
.button.light[href*="registro"]::after,
.logout-tab::after {
  display: none !important;
}

.page-chrome {
  padding: 1rem;
}

.topbar {
  padding-top: 0;
  margin-bottom: 1rem;
}

.topbar-inner {
  min-height: 4.35rem;
  padding: 0.75rem 0.95rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-sm);
}

.brand-mark,
.brand-mark.small,
.login-image {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-soft);
  box-shadow: none;
}

.brand-copy strong {
  color: var(--text);
  font-weight: 750;
}

.brand-copy small,
.session-copy span,
.muted,
.store-row,
.page-title-copy p,
.dashboard-hero p,
.delivery-hero p,
.work-panel p,
.empty-state p,
.catalog-toolbar p,
.gps-panel p {
  color: var(--muted);
}

.main-menu {
  gap: 0.15rem;
  padding: 0.25rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-soft);
}

.main-menu a {
  padding: 0.62rem 0.78rem;
  border-radius: calc(var(--radius-md) - 0.12rem);
  color: #4b5563;
  font-size: 0.88rem;
  font-weight: 650;
}

.main-menu a:hover,
.main-menu a.active {
  color: var(--primary-strong);
  background: #ffffff;
  box-shadow: inset 0 0 0 1px var(--line);
  transform: none;
}

.menu-button,
.menu-close,
.location-modal-close,
.picker-close {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  color: var(--text);
  background: #ffffff;
  box-shadow: none;
}

.side-menu,
.location-modal-dialog,
.center-notice {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #ffffff;
  box-shadow: var(--shadow-lg);
}

.menu-link {
  border-radius: var(--radius-md);
  color: #4b5563;
}

.menu-link:hover,
.menu-link.active {
  color: var(--primary-strong);
  background: var(--primary-soft);
  transform: none;
}

.glass-panel,
.dashboard-hero,
.work-panel,
.gps-panel,
.form-card,
.summary-card,
.product-card,
.empty-state,
.table-box,
.cart-summary-card,
.checkout-card {
  border: 1px solid var(--line);
  background: var(--surface);
  backdrop-filter: none;
  box-shadow: var(--shadow-sm);
}

.page-title,
.dashboard-hero,
.work-panel,
.empty-state,
.gps-panel,
.form-card,
.table-box,
.cart-summary-card,
.checkout-card {
  border-radius: var(--radius-lg);
}

.page-title,
.table-box,
.center-notice,
.dashboard-hero-side {
  background: var(--surface);
}

.dashboard-hero,
.delivery-hero {
  padding: 1.35rem;
  color: var(--text);
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.dashboard-hero h2,
.delivery-hero h2,
.page-title-copy h1,
.work-panel h2,
.empty-state h2,
.catalog-toolbar h2 {
  letter-spacing: 0;
  line-height: 1.12;
}

.dashboard-hero-side {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: none;
}

.dashboard-hero-side strong,
.summary-card strong,
.product-footer strong {
  color: var(--primary-strong);
}

.delivery-hero .eyebrow,
.eyebrow {
  padding: 0.35rem 0.62rem;
  color: var(--primary-strong);
  background: var(--primary-soft);
  border: 1px solid #d3e2ef;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
}

.info-pill,
.product-category,
.summary-kicker {
  color: #334155;
  background: #f3f5f7;
  border: 1px solid var(--line);
}

.delivery-hero-visual {
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--text);
}

.delivery-hero-visual img {
  width: min(22rem, 72vw);
  max-height: 22rem;
  object-fit: contain;
  filter: none;
}

.delivery-hero .delivery-hero-visual {
  border: 0;
  background: transparent;
  box-shadow: none;
}

.button,
.picker-button {
  min-height: 2.65rem;
  padding: 0.7rem 0.95rem;
  border-radius: var(--radius-md);
  box-shadow: none;
  letter-spacing: 0;
  font-weight: 700;
}

.button:hover,
.product-card:hover,
.data-table tbody tr:hover,
.tab-item:hover,
.menu-button:hover,
.menu-close:hover {
  transform: none;
}

.button.primary,
.picker-button.primary {
  color: #ffffff;
  border-color: var(--primary-strong);
  background: var(--primary-strong);
  box-shadow: none;
}

.button.primary:hover,
.picker-button.primary:hover {
  background: #0f2d47;
}

.button.secondary,
.picker-button.light {
  color: var(--primary-strong);
  border-color: #c8d6e2;
  background: var(--primary-soft);
}

.button.light,
.button.ghost-light {
  color: var(--primary-strong);
  border-color: var(--line);
  background: #ffffff;
}

.button.danger,
.button.light.session-action,
.button.light[href*="login"],
.button.light[href*="registro"],
.logout-tab {
  color: #ffffff;
  border-color: #9f1d2b;
  background: var(--danger);
}

.button.light.session-action:hover,
.button.light[href*="login"]:hover,
.button.light[href*="registro"]:hover,
.logout-tab:hover {
  box-shadow: none;
}

.cart-count,
.notification-badge {
  background: var(--danger);
  box-shadow: none;
}

.category-rail {
  padding: 0.1rem 0 0.35rem;
}

.category-chip {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  color: #4b5563;
  background: #ffffff;
  box-shadow: none;
}

.category-chip.active,
.category-chip:hover {
  color: #ffffff;
  background: var(--primary-strong);
}

.product-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.product-card:hover {
  box-shadow: var(--shadow-md);
}

.product-media {
  background: #eef2f6;
}

.product-card-body {
  gap: 0.75rem;
}

.deal-badge {
  background: var(--primary-strong);
  box-shadow: none;
}

.form-card input,
.form-card select,
.form-card textarea,
.delivery-search input,
.short-input,
.inline-form select,
.checkout-field input,
.checkout-field textarea,
.picker-field input {
  min-height: 2.8rem;
  border: 1px solid #cfd7df;
  border-radius: var(--radius-md);
  color: var(--text);
  background: #ffffff;
  box-shadow: none;
}

.form-card input:focus,
.form-card select:focus,
.form-card textarea:focus,
.delivery-search input:focus,
.short-input:focus,
.inline-form select:focus,
.checkout-field input:focus,
.checkout-field textarea:focus,
.picker-field input:focus {
  border-color: #7da2c2;
  box-shadow: 0 0 0 3px rgba(31, 79, 122, 0.14);
}

.form-card input:hover,
.form-card select:hover,
.form-card textarea:hover,
.short-input:hover,
.inline-form select:hover {
  border-color: #aebdca;
}

.line-item,
.login-demo,
.location-modal-notice,
.center-notice-breakdown div,
.cart-total-box {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-soft);
  box-shadow: none;
}

.cart-summary-card {
  border-top: 3px solid var(--primary-strong);
}

.store-minimums {
  display: grid;
  gap: 0.75rem;
  margin-top: 1rem;
}

.store-minimum {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.25rem 0.75rem;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-soft);
  padding: 0.8rem 0.95rem;
}

.store-minimum span {
  font-weight: 800;
}

.store-minimum strong {
  color: var(--primary-strong);
}

.store-minimum small {
  grid-column: 1 / -1;
  color: var(--muted);
}

.store-minimum.is-pending {
  border-color: #f0b6bf;
  background: #fff5f6;
}

.checkout-card-kicker,
.data-table thead th {
  color: var(--primary-strong);
}

.checkout-card-header,
.checkout-cart-table thead th,
.checkout-cart-table tbody td,
.data-table thead th {
  background: #f8fafc;
}

.data-table tbody tr:nth-child(even) {
  background: #fbfcfd;
}

.data-table tbody tr:hover {
  background: var(--primary-soft);
}

.data-table tbody tr.order-row {
  border-left: 5px solid transparent;
}

.data-table tbody tr.order-row td:first-child {
  border-left: 5px solid currentColor;
}

.data-table tbody tr.order-state-pendiente {
  background: #fff1f2;
  border-left-color: #dc2626;
  color: #7f1d1d;
}

.data-table tbody tr.order-state-preparado {
  background: #fffbeb;
  border-left-color: #d97706;
  color: #78350f;
}

.data-table tbody tr.order-state-en-camino {
  background: #eff6ff;
  border-left-color: #2563eb;
  color: #1e3a8a;
}

.data-table tbody tr.order-state-entregado {
  background: #ecfdf5;
  border-left-color: #059669;
  color: #064e3b;
}

.data-table tbody tr.order-state-cancelado {
  background: #f1f5f9;
  border-left-color: #64748b;
  color: #64748b;
}

.data-table tbody tr.order-assigned:not(.order-state-entregado):not(.order-state-cancelado) {
  box-shadow: inset 0 0 0 999px rgba(37, 99, 235, 0.025);
}

.data-table tbody tr.order-locked {
  opacity: 0.82;
}

.data-table tbody tr.order-row:hover {
  background: #eef2ff;
}

.order-status-badge,
.order-assignment-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 1.85rem;
  padding: 0.32rem 0.62rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.1;
  white-space: nowrap;
}

.order-assignment-badge {
  margin-left: 0.4rem;
}

.assignment-unassigned {
  color: #9f1239;
  background: #fff1f2;
  border-color: #fecdd3;
}

.assignment-assigned {
  color: #1d4ed8;
  background: #eff6ff;
  border-color: #bfdbfe;
}

.status-pendiente {
  color: #991b1b;
  background: #fee2e2;
  border-color: #fecaca;
}

.status-preparado {
  color: #92400e;
  background: #fef3c7;
  border-color: #fde68a;
}

.status-en-camino {
  color: #1d4ed8;
  background: #dbeafe;
  border-color: #bfdbfe;
}

.status-entregado {
  color: #047857;
  background: #d1fae5;
  border-color: #a7f3d0;
}

.status-cancelado {
  color: #475569;
  background: #e2e8f0;
  border-color: #cbd5e1;
}

.table-box {
  overflow: auto;
}

.toast {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  background: #1f2937;
  box-shadow: var(--shadow-md);
}

.toast.info {
  background: var(--primary-strong);
}

.toast.warning {
  background: var(--warning);
}

.toast.error {
  background: var(--danger);
}

.loading-skeleton,
.skeleton {
  background: transparent;
}


.bottom-nav {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow-md);
}

.tab-item {
  border-radius: var(--radius-md);
  color: #53606d;
}

.tab-item.active,
.tab-item:hover {
  color: var(--primary-strong);
  background: var(--primary-soft);
}

.location-map,
.picker-map {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #eef2f6;
}

.location-pin-icon::before {
  background: var(--danger);
  box-shadow: 0 8px 18px rgba(180, 35, 51, 0.24);
}

.picker-shell {
  background: var(--bg);
}

.picker-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.picker-notice {
  border: 1px solid #d3e2ef;
  border-radius: var(--radius-md);
  background: var(--primary-soft);
}

@media (min-width: 1100px) {
  .shell > * {
    animation: none;
  }
}

@media (max-width: 719px) {
  .store-rail {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 10rem), 1fr));
    gap: 0.7rem;
    overflow: visible;
  }

  .store-rail .category-chip {
    justify-content: center;
    min-width: 0;
    padding: 0.72rem 0.7rem;
    white-space: normal;
    text-align: center;
    line-height: 1.2;
  }

  .store-rail .store-chip {
    justify-content: flex-start;
  }

  .store-rail .store-chip img {
    flex: 0 0 24px;
  }

  .page-chrome {
    padding: 0.7rem;
    padding-bottom: 6.2rem;
  }

  .topbar-inner,
  .page-title,
  .dashboard-hero,
  .delivery-hero,
  .work-panel,
  .catalog-toolbar,
  .form-card,
  .table-box,
  .gps-panel,
  .empty-state,
  .cart-summary-card,
  .checkout-card {
    border-radius: var(--radius-lg);
  }

  .brand-mark {
    width: 3.35rem;
    height: 3.35rem;
  }

  .brand-mark img {
    width: 2.7rem;
    height: 2.7rem;
  }

  .button {
    min-height: 2.7rem;
  }

  .data-table.cart-table tr {
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: #ffffff;
    box-shadow: var(--shadow-sm);
  }

  .data-table.cart-table td:first-child,
  .data-table.cart-table .cart-total-row {
    background: var(--primary-soft);
  }
}

/* Order Detail Modal */
body.order-detail-modal-open {
  overflow: hidden;
}

.order-detail-modal {
  position: fixed;
  inset: 0;
  z-index: 320;
  display: grid;
  align-items: start;
  justify-items: center;
  padding: 1.2rem;
  overflow-y: auto;
}

.order-detail-modal[hidden] {
  display: none !important;
}

.order-detail-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(12, 18, 24, 0.62);
  backdrop-filter: blur(6px);
}

.order-detail-modal-dialog {
  position: relative;
  width: min(100%, 700px);
  display: grid;
  gap: 1rem;
  margin: auto 0;
  padding: 1.15rem;
  max-height: calc(100vh - 2.4rem);
  border-radius: 1.4rem;
  border: 1px solid rgba(255, 255, 255, 0.7);
  background: rgba(250, 253, 251, 0.98);
  box-shadow: var(--shadow-xl);
  overflow: auto;
}

.order-detail-modal-header {
  display: grid;
  gap: 0.35rem;
}

.order-detail-modal-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
}

.order-detail-modal-header h3 {
  margin: 0;
  font-size: 1.5rem;
}

.order-detail-modal-close {
  position: relative;
  z-index: 5;
  flex: 0 0 auto;
  width: 2.5rem;
  height: 2.5rem;
  border: 0;
  border-radius: 999px;
  background: rgba(16, 28, 34, 0.12);
  color: var(--text);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(16, 28, 34, 0.08);
  pointer-events: auto;
}

.order-detail-modal-close:hover {
  background: rgba(16, 28, 34, 0.2);
}

.order-detail-modal-body {
  display: grid;
  gap: 1rem;
}

.order-detail-header {
  padding: 1rem;
  background: var(--primary-soft);
  border-radius: var(--radius-lg);
}

.order-detail-header h4 {
  margin: 0 0 0.5rem 0;
  font-size: 1.2rem;
}

.order-detail-header p {
  margin: 0.25rem 0;
  font-size: 0.9rem;
}

.order-detail-items {
  display: grid;
  gap: 0.5rem;
}

.order-detail-items h5 {
  margin: 0;
  font-size: 1.1rem;
}

.order-detail-table {
  width: 100%;
  border-collapse: collapse;
}

.order-detail-table th,
.order-detail-table td {
  padding: 0.5rem;
  text-align: left;
  border-bottom: 1px solid var(--line);
}

.order-detail-table th {
  background: var(--muted-bg);
  font-weight: 600;
}

.product-thumb {
  width: 50px;
  height: 50px;
  object-fit: cover;
  border-radius: var(--radius);
}

.no-image {
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--muted-bg);
  border-radius: var(--radius);
  font-size: 0.8rem;
  color: var(--muted);
}

.order-detail-summary {
  padding: 1rem;
  background: var(--secondary-soft);
  border-radius: var(--radius-lg);
}

.order-detail-summary p {
  margin: 0.25rem 0;
  font-size: 0.95rem;
}

.order-detail-summary p:last-child {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--primary);
}

/* Toggle Working Status Button */
[data-toggle-working-status] {
  transition: all 0.3s ease;
}

[data-toggle-working-status].working {
  background: var(--success);
  color: white;
}

[data-toggle-working-status]:hover:not(:disabled) {
  transform: scale(1.02);
}

/* Modal Styles */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 0.5rem;
  animation: fadeIn var(--transition);
}

.modal[hidden] {
  display: none;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.modal-content {
  background: var(--surface-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  max-width: calc(100% - 1rem);
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  animation: slideUp var(--transition);
}

.modal-large {
  max-width: calc(100% - 1rem);
}

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

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.85rem 0.85rem 0.7rem;
  border-bottom: 1px solid var(--line);
}

.modal-header h2 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 600;
}

.close-modal {
  background: none;
  border: none;
  font-size: 1.6rem;
  cursor: pointer;
  color: var(--muted);
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color var(--transition);
}

.close-modal:hover {
  color: var(--text);
}

.modal-content .form-card {
  margin: 0;
  box-shadow: none;
  border-radius: 0;
  padding: 0.85rem 0.9rem 0.95rem;
}

.modal-content .form-card .action-row {
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--line);
}

/* Product Search and Table Styles */
.product-search-section {
  margin-bottom: 0.75rem;
}

.product-search-section input {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  font-size: 1rem;
  transition: border-color var(--transition);
}

.product-search-section input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(141, 198, 160, 0.1);
}

.product-list-container {
  max-height: calc(90vh - 280px);
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-strong);
}

.product-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.product-table thead {
  background: var(--surface-soft);
  position: sticky;
  top: 0;
  z-index: 1;
}

.product-table th {
  padding: 0.55rem 0.7rem;
  text-align: left;
  font-weight: 600;
  color: var(--text);
  border-bottom: 1px solid var(--line);
}

.product-table td {
  padding: 0.55rem 0.7rem;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

.product-table tbody tr:hover {
  background: var(--bg-accent);
}

.product-name {
  font-weight: 500;
  color: var(--text);
}

.product-price {
  font-weight: 600;
  color: var(--primary-strong);
}

.product-stock {
  color: var(--muted);
  font-size: 0.85rem;
}

.product-quantity input {
  width: 68px;
  padding: 0.45rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  text-align: center;
  font-size: 0.9rem;
  transition: border-color var(--transition);
}

.product-quantity input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(141, 198, 160, 0.1);
}

.product-quantity input:disabled {
  background: var(--surface-soft);
  color: var(--muted);
}

.presencial-sale-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.75fr) minmax(280px, 0.85fr);
  gap: 0.5rem;
  align-items: start;
}

.presencial-sale-summary {
  position: sticky;
  top: 0.75rem;
  align-self: start;
}

.sale-payment-summary {
  display: grid;
  gap: 0.65rem;
  padding: 0.75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface-strong);
  box-shadow: var(--shadow-sm);
}

.sale-payment-summary label {
  display: grid;
  gap: 0.5rem;
}

.sale-payment-summary input {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  font-size: 1rem;
}

@media (max-width: 1024px) {
  .presencial-sale-grid {
    grid-template-columns: 1fr;
  }

  .presencial-sale-summary {
    position: static;
  }
}

@media (max-width: 768px) {
  .product-table th,
  .product-table td {
    padding: 0.5rem;
    font-size: 0.8rem;
  }

  .product-quantity input {
    width: 60px;
    padding: 0.4rem;
  }

  .modal-large {
    max-width: 95vw;
  }
}

/* Last-mile formal polish */
body {
  background: linear-gradient(180deg, #fbfcfe 0%, #eef2f6 42rem, #e9eef4 100%);
}

.topbar-inner,
.page-title,
.dashboard-hero,
.work-panel,
.gps-panel,
.form-card,
.summary-card,
.product-card,
.empty-state,
.table-box,
.cart-summary-card,
.checkout-card,
.store-dashboard-hero,
.store-compact-header,
.sale-payment-summary,
.catalog-toolbar,
.delivery-hero,
.auth-card,
.compact-login-card,
.modal-content,
.location-modal-dialog,
.order-detail-modal-dialog {
  border: 1px solid #d9e1ea;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(20, 32, 44, 0.06), 0 8px 24px rgba(20, 32, 44, 0.06);
}

.page-title,
.dashboard-hero,
.delivery-hero {
  background: linear-gradient(90deg, #ffffff 0%, #ffffff 58%, #f1f6fa 100%);
}

.brand-copy strong,
.page-title-copy h1,
.dashboard-hero h2,
.delivery-hero h2,
.catalog-toolbar h2,
.work-panel h2,
.empty-state h2,
.auth-card-head h2,
.product-card-body h2 {
  color: #111c27;
  font-weight: 800;
  letter-spacing: 0;
}

.brand-copy small,
.session-copy span,
.page-title-copy p,
.dashboard-hero p,
.delivery-hero p,
.work-panel p,
.empty-state p,
.catalog-toolbar p,
.gps-panel p,
.product-card-body p,
.store-row,
.product-store {
  color: #647282;
  letter-spacing: 0;
}

.main-menu {
  border: 1px solid #d9e1ea;
  border-radius: 8px;
  background: #f7f9fb;
}

.main-menu a:hover,
.main-menu a.active,
.button.primary,
.picker-button.primary {
  color: #ffffff;
  border-color: #164f68;
  background: #164f68;
}

.button,
.picker-button,
.menu-link,
.tab-item,
.menu-button,
.menu-close,
.close-modal,
.location-modal-close,
.order-detail-modal-close,
.picker-close,
.form-card input,
.form-card select,
.form-card textarea,
.delivery-search input,
.short-input,
.inline-form select,
.checkout-field input,
.checkout-field textarea,
.picker-field input,
.sale-payment-summary input,
.product-search-section input,
.product-quantity input {
  border-radius: 8px;
  letter-spacing: 0;
  box-shadow: none;
}

.button.secondary,
.picker-button.light,
.menu-link:hover,
.menu-link.active,
.tab-item.active,
.category-chip {
  color: #164f68;
  border-color: #c8d8e4;
  background: #e7f3f7;
}

.button.danger,
.logout-tab,
.button.light.session-action,
.button.light[href*="login"],
.button.light[href*="registro"] {
  color: #ffffff;
  border-color: #b42335;
  background: #b42335;
}

.form-card input,
.form-card select,
.form-card textarea,
.delivery-search input,
.short-input,
.inline-form select,
.checkout-field input,
.checkout-field textarea,
.picker-field input,
.sale-payment-summary input,
.product-search-section input,
.product-quantity input {
  min-height: 42px;
  border: 1px solid #cfd8e3;
  color: #17212b;
  background: #ffffff;
}

.form-card input:focus,
.form-card select:focus,
.form-card textarea:focus,
.delivery-search input:focus,
.short-input:focus,
.inline-form select:focus,
.checkout-field input:focus,
.checkout-field textarea:focus,
.picker-field input:focus,
.sale-payment-summary input:focus,
.product-search-section input:focus,
.product-quantity input:focus {
  outline: 0;
  border-color: #1f6f8b;
  box-shadow: 0 0 0 3px rgba(31, 111, 139, 0.15);
}

.data-table thead th,
.product-table thead th,
.order-detail-table th {
  color: #334455;
  background: #f4f7fa;
  letter-spacing: 0;
}

.data-table tbody tr:hover,
.product-table tbody tr:hover {
  background: #eef6f9;
}

.product-price,
.product-footer strong {
  color: #2c7a5b;
}

.status-entregado,
.assignment-assigned,
.store-status-chip.is-open {
  color: #047857;
  background: #dff8ea;
  border-color: #a9e8c3;
}

.status-cancelado,
.assignment-unassigned,
.store-status-chip.is-closed {
  color: #6b1f2d;
  background: #fff1f3;
  border-color: #ffd0d7;
}

/* Compact orders table - final placement */
body.page-pedidos .table-box {
  padding: 0;
}

body.page-pedidos .data-table {
  min-width: 980px;
  font-size: 0.88rem;
}

body.page-pedidos .data-table thead th {
  padding: 10px 12px;
  font-size: 0.72rem;
}

body.page-pedidos .data-table tbody td {
  padding: 10px 12px;
  line-height: 1.25;
}

body.page-pedidos .order-status-badge,
body.page-pedidos .order-assignment-badge {
  min-height: 24px;
  padding: 4px 9px;
  font-size: 0.72rem;
}

body.page-pedidos .order-assignment-badge {
  margin-left: 6px;
}

body.page-pedidos .inline-form {
  display: grid;
  grid-template-columns: minmax(128px, 1fr) minmax(128px, 1fr);
  gap: 8px;
  align-items: center;
  min-width: 190px;
}

body.page-pedidos .inline-form input[type="hidden"] {
  display: none;
}

body.page-pedidos .inline-form select,
body.page-pedidos .inline-form .short-input,
body.page-pedidos .inline-form .button {
  width: 100%;
  min-height: 36px;
  padding: 7px 10px;
  font-size: 0.82rem;
}

body.page-pedidos .inline-form .button {
  white-space: nowrap;
}

body.page-pedidos .inline-form .button[type="submit"] {
  grid-column: 1 / -1;
}

body.page-pedidos .inline-form .muted {
  grid-column: 1 / -1;
  margin: 0;
  color: #647282;
  font-size: 0.78rem;
  line-height: 1.2;
}

body.page-pedidos .data-table td:nth-child(1) {
  width: 54px;
}

body.page-pedidos .data-table td:nth-child(2) {
  min-width: 170px;
}

body.page-pedidos .data-table td:nth-child(3),
body.page-pedidos .data-table td:nth-child(4),
body.page-pedidos .data-table td:nth-child(6),
body.page-pedidos .data-table td:nth-child(7) {
  white-space: nowrap;
}

body.page-pedidos .data-table td:last-child {
  width: 230px;
}

body.page-pedidos .data-table tbody tr.order-state-entregado,
body.page-pedidos .data-table tbody tr.order-state-cancelado {
  opacity: 0.92;
}

@media (max-width: 900px) {
  body.page-pedidos .data-table {
    min-width: 900px;
  }

  body.page-pedidos .inline-form {
    min-width: 170px;
  }
}
.status-aceptado {
  color: #1d4ed8;
  background: #dbeafe;
  border-color: #bfdbfe;
}

.status-preparando {
  color: #92400e;
  background: #fef3c7;
  border-color: #fde68a;
}

.status-listo-para-retirar {
  color: #047857;
  background: #d1fae5;
  border-color: #a7f3d0;
}

.status-repartidor-asignado {
  color: #6d28d9;
  background: #ede9fe;
  border-color: #ddd6fe;
}

.status-repartidor-en-tienda {
  color: #0e7490;
  background: #cffafe;
  border-color: #a5f3fc;
}

.status-retirado {
  color: #0f766e;
  background: #ccfbf1;
  border-color: #99f6e4;
}

/* Pedidos: operacion profesional */
body.page-pedidos .orders-board {
  margin-bottom: 18px;
  padding: 16px;
  border: 1px solid #d7dee8;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 10px 26px rgba(16, 24, 40, 0.06);
}

body.page-pedidos .orders-page-heading {
  margin-bottom: 12px;
  padding: 0 2px;
}

body.page-pedidos .orders-page-heading h2 {
  margin: 0;
  color: #17212b;
  font-size: clamp(1.35rem, 2.5vw, 1.85rem);
  line-height: 1.12;
}

body.page-pedidos .orders-page-heading p {
  max-width: 760px;
  margin: 6px 0 0;
  color: #64748b;
  font-size: 0.95rem;
}

body.page-pedidos .orders-tabs {
  gap: 6px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e5eaf0;
}

body.page-pedidos .orders-tabs a {
  min-height: 34px;
  padding: 7px 10px;
  border-color: #d7dee8;
  border-radius: 8px;
  color: #334155;
  background: #f8fafc;
  font-size: 0.78rem;
  font-weight: 800;
}

body.page-pedidos .orders-tabs a.active,
body.page-pedidos .orders-tabs a:hover {
  color: #ffffff;
  border-color: #1f4f6b;
  background: #1f4f6b;
}

body.page-pedidos .orders-tabs span {
  min-width: 22px;
  height: 22px;
  color: inherit;
  background: rgba(15, 23, 42, 0.08);
  font-size: 0.72rem;
}

body.page-pedidos .orders-tabs a.active span,
body.page-pedidos .orders-tabs a:hover span {
  background: rgba(255, 255, 255, 0.22);
}

body.page-pedidos .orders-kpi-grid {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}

body.page-pedidos .orders-kpi {
  min-height: 84px;
  padding: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fbfdff;
  box-shadow: none;
}

body.page-pedidos .orders-kpi span {
  color: #64748b;
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
}

body.page-pedidos .orders-kpi strong {
  color: #17212b;
  font-size: 1.28rem;
  letter-spacing: 0;
}

body.page-pedidos .orders-filter {
  grid-template-columns: minmax(240px, 1fr) 170px auto auto;
  padding-top: 2px;
}

body.page-pedidos .orders-filter label {
  color: #334155;
  font-size: 0.78rem;
}

body.page-pedidos .orders-filter input {
  min-height: 40px;
  border-color: #cbd5e1;
  background: #ffffff;
}

body.page-pedidos .table-box {
  border: 1px solid #d7dee8;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(16, 24, 40, 0.05);
}

body.page-pedidos .data-table {
  min-width: 1120px;
  color: #17212b;
  font-size: 0.86rem;
}

body.page-pedidos .data-table thead th {
  padding: 11px 12px;
  color: #475569;
  background: #f8fafc;
  border-bottom: 1px solid #dbe3ec;
  font-size: 0.72rem;
}

body.page-pedidos .data-table tbody td {
  padding: 11px 12px;
  border-bottom-color: #edf1f5;
}

body.page-pedidos .data-table tbody tr {
  background: #ffffff;
}

body.page-pedidos .data-table tbody tr:hover {
  background: #f8fbfd;
}

body.page-pedidos .data-table tbody tr.order-row td:first-child {
  border-left: 4px solid #94a3b8;
  font-weight: 850;
}

body.page-pedidos .data-table tbody tr.order-state-pendiente td:first-child {
  border-left-color: #d97706;
}

body.page-pedidos .data-table tbody tr.order-state-aceptado td:first-child,
body.page-pedidos .data-table tbody tr.order-state-preparando td:first-child {
  border-left-color: #2563eb;
}

body.page-pedidos .data-table tbody tr.order-state-listo-para-retirar td:first-child {
  border-left-color: #16a34a;
}

body.page-pedidos .data-table tbody tr.order-state-repartidor-asignado td:first-child,
body.page-pedidos .data-table tbody tr.order-state-repartidor-en-tienda td:first-child,
body.page-pedidos .data-table tbody tr.order-state-retirado td:first-child {
  border-left-color: #0e7490;
}

body.page-pedidos .data-table tbody tr.order-state-en-camino td:first-child {
  border-left-color: #7c3aed;
}

body.page-pedidos .data-table tbody tr.order-state-entregado td:first-child {
  border-left-color: #059669;
}

body.page-pedidos .data-table tbody tr.order-state-cancelado td:first-child {
  border-left-color: #64748b;
}

body.page-pedidos .order-status-badge,
body.page-pedidos .order-assignment-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  padding: 5px 9px;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 850;
  line-height: 1;
  white-space: nowrap;
}

body.page-pedidos .status-pendiente {
  color: #9a3412;
  background: #fff7ed;
  border-color: #fdba74;
}

body.page-pedidos .status-aceptado {
  color: #1d4ed8;
  background: #eff6ff;
  border-color: #bfdbfe;
}

body.page-pedidos .status-preparando,
body.page-pedidos .status-preparado {
  color: #92400e;
  background: #fffbeb;
  border-color: #fde68a;
}

body.page-pedidos .status-listo-para-retirar {
  color: #047857;
  background: #ecfdf5;
  border-color: #a7f3d0;
}

body.page-pedidos .status-repartidor-asignado {
  color: #6d28d9;
  background: #f5f3ff;
  border-color: #ddd6fe;
}

body.page-pedidos .status-repartidor-en-tienda {
  color: #0e7490;
  background: #ecfeff;
  border-color: #a5f3fc;
}

body.page-pedidos .status-retirado {
  color: #0f766e;
  background: #f0fdfa;
  border-color: #99f6e4;
}

body.page-pedidos .status-en-camino {
  color: #5b21b6;
  background: #f5f3ff;
  border-color: #c4b5fd;
}

body.page-pedidos .status-entregado {
  color: #047857;
  background: #ecfdf5;
  border-color: #a7f3d0;
}

body.page-pedidos .status-cancelado {
  color: #475569;
  background: #f1f5f9;
  border-color: #cbd5e1;
}

body.page-pedidos .assignment-assigned {
  color: #155e75;
  background: #ecfeff;
  border-color: #a5f3fc;
}

body.page-pedidos .assignment-unassigned {
  color: #854d0e;
  background: #fefce8;
  border-color: #fde68a;
}

body.page-pedidos .inline-form {
  grid-template-columns: minmax(150px, 1fr) minmax(150px, 1fr);
  gap: 7px;
  min-width: 260px;
}

body.page-pedidos .inline-form select,
body.page-pedidos .inline-form .short-input {
  min-height: 38px;
  border-color: #cbd5e1;
  border-radius: 8px;
  background: #ffffff;
}

body.page-pedidos .inline-form .button {
  min-height: 36px;
  border-radius: 8px;
  font-size: 0.78rem;
}

body.page-pedidos .inline-form .button[type="submit"] {
  background: #1f4f6b;
}

body.page-pedidos .inline-form a.button {
  color: #334155;
  border-color: #d7dee8;
  background: #f8fafc;
}

body.page-pedidos .courier-delivery-grid {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 14px;
}

body.page-pedidos .courier-delivery-card {
  gap: 12px;
  padding: 16px;
  border: 1px solid #d7dee8;
  border-left: 5px solid #1f4f6b;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(16, 24, 40, 0.07);
}

body.page-pedidos .courier-delivery-head {
  align-items: flex-start;
}

body.page-pedidos .courier-delivery-head strong {
  color: #17212b;
  font-size: 1.08rem;
}

body.page-pedidos .courier-delivery-head span,
body.page-pedidos .courier-delivery-meta,
body.page-pedidos .courier-delivery-card .muted {
  color: #64748b;
}

body.page-pedidos .courier-delivery-meta {
  padding: 9px 10px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
}

body.page-pedidos .courier-actions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

body.page-pedidos .courier-actions .button,
body.page-pedidos .courier-actions button,
body.page-pedidos .courier-actions input {
  min-height: 38px;
  border-radius: 8px;
}

body.page-pedidos .courier-actions .button.primary,
body.page-pedidos .courier-actions button.button.primary {
  background: #1f4f6b;
}

body.page-pedidos .courier-fee-field {
  display: grid;
  gap: 4px;
  margin: 0;
  color: #475569;
  font-size: 0.72rem;
  font-weight: 850;
}

body.page-pedidos .courier-fee-field input {
  width: 100%;
}

/* Sistema UI v2: diseno global compacto y consistente */
:root {
  --ui-bg: #eef6f1;
  --ui-bg-2: #f8fbf9;
  --ui-surface: #ffffff;
  --ui-surface-soft: #f5faf7;
  --ui-text: #13241b;
  --ui-muted: #627266;
  --ui-line: #d7e3dc;
  --ui-primary: #33966a;
  --ui-primary-dark: #1f6f4f;
  --ui-primary-soft: #e6f5ed;
  --ui-danger: #b42335;
  --ui-warning: #b7791f;
  --ui-radius: 10px;
  --ui-radius-sm: 8px;
  --ui-shadow: 0 10px 24px rgba(17, 36, 27, 0.08);
  --ui-shadow-soft: 0 4px 12px rgba(17, 36, 27, 0.06);
  --topbar-offset: 4.8rem;
}

body {
  color: var(--ui-text) !important;
  background:
    linear-gradient(180deg, rgba(51, 150, 106, 0.10), transparent 260px),
    var(--ui-bg) !important;
  font-size: 15px;
}

.page-chrome {
  background: transparent !important;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--ui-line) !important;
  background: rgba(255, 255, 255, 0.94) !important;
  backdrop-filter: blur(14px);
  box-shadow: var(--ui-shadow-soft) !important;
}

.topbar-inner {
  width: min(100%, 1440px);
  min-height: 60px !important;
  padding: 0 16px !important;
  gap: 12px !important;
}

.brand {
  gap: 10px !important;
  min-width: 210px !important;
}

.brand-mark,
.brand-mark.small,
.login-image {
  width: 40px !important;
  height: 40px !important;
  border: 1px solid var(--ui-line) !important;
  border-radius: var(--ui-radius-sm) !important;
  background: #ffffff !important;
  box-shadow: none !important;
}

.brand-mark img,
.brand-mark.small img {
  width: 28px !important;
  height: 28px !important;
  object-fit: contain;
  filter: none !important;
}

.brand-copy strong {
  color: var(--ui-text) !important;
  font-size: 0.96rem !important;
  font-weight: 900 !important;
  line-height: 1.05;
}

.brand-copy small,
.session-copy span {
  color: var(--ui-muted) !important;
  font-size: 0.74rem !important;
}

.main-menu {
  gap: 4px !important;
  padding: 4px !important;
  border: 1px solid var(--ui-line) !important;
  border-radius: var(--ui-radius) !important;
  background: #ffffff !important;
  box-shadow: none !important;
}

.main-menu a {
  min-height: 34px !important;
  padding: 0 11px !important;
  border: 0 !important;
  border-radius: var(--ui-radius-sm) !important;
  color: #34483d !important;
  background: transparent !important;
  font-size: 0.82rem !important;
  font-weight: 850 !important;
}

.main-menu a:hover,
.main-menu a.active {
  color: #ffffff !important;
  background: var(--ui-primary) !important;
  box-shadow: none !important;
}

.session-box {
  margin-left: auto !important;
  gap: 8px !important;
  padding: 4px !important;
  border: 1px solid var(--ui-line) !important;
  border-radius: var(--ui-radius) !important;
  background: #ffffff !important;
  box-shadow: none !important;
}

.session-copy strong {
  color: var(--ui-text) !important;
  font-size: 0.82rem !important;
}

.content-layout {
  width: min(100%, 1440px) !important;
  padding: 14px 16px 78px !important;
}

.shell,
#page-content {
  display: grid;
  gap: 12px;
}

.dashboard-hero,
.delivery-hero,
.store-dashboard-hero,
.work-panel,
.form-card,
.summary-card,
.product-card,
.cart-summary-card,
.checkout-card,
.catalog-toolbar,
.orders-board,
.orders-report-panel,
.courier-delivery-card,
.order-history-panel,
.sale-payment-summary,
.product-search-section,
.product-list-container,
.presencial-sale-summary,
.modal-content {
  border: 1px solid var(--ui-line) !important;
  border-radius: var(--ui-radius) !important;
  background: var(--ui-surface) !important;
  box-shadow: var(--ui-shadow-soft) !important;
}

.dashboard-hero,
.delivery-hero,
.store-dashboard-hero,
.work-panel,
.form-card,
.cart-summary-card,
.checkout-card,
.catalog-toolbar,
.orders-board,
.orders-report-panel,
.order-history-panel,
.sale-payment-summary,
.product-search-section,
.presencial-sale-summary {
  padding: 14px !important;
}

.dashboard-hero h2,
.delivery-hero h2,
.catalog-toolbar h2,
.work-panel h2,
.section-heading-row h2,
.auth-card-head h2 {
  color: var(--ui-text) !important;
  font-size: clamp(1.2rem, 2.1vw, 1.75rem) !important;
  line-height: 1.15 !important;
  letter-spacing: 0 !important;
}

.dashboard-hero p,
.delivery-hero p,
.work-panel p,
.catalog-toolbar p,
.section-heading-row p,
.muted {
  color: var(--ui-muted) !important;
  font-size: 0.88rem !important;
  line-height: 1.42 !important;
}

.button,
button.button,
a.button {
  min-height: 36px !important;
  padding: 0.5rem 0.78rem !important;
  border-radius: var(--ui-radius-sm) !important;
  font-size: 0.84rem !important;
  font-weight: 850 !important;
  box-shadow: none !important;
}

.button.primary,
button.button.primary,
.product-card .button,
.product-footer .button,
body.page-pedidos .inline-form .button[type="submit"],
body.page-pedidos .courier-actions .button.primary,
body.page-pedidos .courier-actions button.button.primary {
  color: #ffffff !important;
  border-color: var(--ui-primary) !important;
  background: var(--ui-primary) !important;
}

.button.primary:hover,
button.button.primary:hover {
  border-color: var(--ui-primary-dark) !important;
  background: var(--ui-primary-dark) !important;
}

.button.secondary,
.button.light,
button.button.secondary,
button.button.light {
  color: #294839 !important;
  border-color: var(--ui-line) !important;
  background: #ffffff !important;
}

.button.danger,
.logout-tab,
.button.light.session-action,
.button.light[href*="login"],
.button.light[href*="registro"] {
  color: #ffffff !important;
  border-color: var(--ui-danger) !important;
  background: var(--ui-danger) !important;
}

.summary-grid,
.summary-cards,
.store-summary-cards {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)) !important;
  gap: 10px !important;
}

.summary-card,
.store-summary-cards .summary-card {
  min-height: 76px !important;
  padding: 12px !important;
}

.summary-card strong,
.store-summary-cards .summary-card strong {
  font-size: clamp(1.25rem, 2.4vw, 1.8rem) !important;
}

.summary-kicker,
.product-category {
  display: inline-flex !important;
  width: fit-content;
  padding: 3px 8px !important;
  border: 1px solid rgba(51, 150, 106, 0.18) !important;
  border-radius: 999px !important;
  color: var(--ui-primary-dark) !important;
  background: var(--ui-primary-soft) !important;
  font-size: 0.68rem !important;
  font-weight: 900 !important;
}

.delivery-hero {
  grid-template-columns: minmax(0, 1fr) minmax(180px, 260px) !important;
  gap: 14px !important;
  align-items: center !important;
  min-height: auto !important;
}

.delivery-hero-visual img,
.catalog-store-logo {
  max-width: 240px !important;
  max-height: 170px !important;
  object-fit: contain !important;
}

.delivery-search {
  max-width: 760px !important;
  min-height: 40px !important;
  border: 1px solid var(--ui-line) !important;
  border-radius: var(--ui-radius-sm) !important;
  overflow: hidden;
  background: #ffffff !important;
}

.delivery-search input,
.delivery-search button,
.delivery-search .button {
  min-height: 40px !important;
}

.category-rail,
.store-selector {
  gap: 6px !important;
  margin: 0 !important;
  padding: 0 !important;
}

.category-chip {
  min-height: 34px !important;
  padding: 0 11px !important;
  border: 1px solid var(--ui-line) !important;
  border-radius: var(--ui-radius-sm) !important;
  color: #174c38 !important;
  background: #ffffff !important;
  font-size: 0.8rem !important;
  font-weight: 900 !important;
}

.category-chip.active,
.category-chip:hover {
  color: #ffffff !important;
  border-color: var(--ui-primary) !important;
  background: var(--ui-primary) !important;
}

.product-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)) !important;
  gap: 10px !important;
  border: 0 !important;
  background: transparent !important;
}

.product-card {
  display: flex !important;
  min-height: 322px !important;
  overflow: hidden !important;
  flex-direction: column !important;
}

.product-media {
  width: 100% !important;
  height: 132px !important;
  aspect-ratio: auto !important;
  border: 0 !important;
  border-radius: var(--ui-radius) var(--ui-radius) 0 0 !important;
  background: var(--ui-surface-soft) !important;
  overflow: hidden !important;
}

.product-media img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
}

.product-card-body {
  display: flex !important;
  padding: 10px !important;
  flex: 1 !important;
  flex-direction: column !important;
}

.product-card-body h2 {
  min-height: 2.2em !important;
  margin: 5px 0 !important;
  font-size: 0.96rem !important;
  line-height: 1.15 !important;
}

.product-card-body p {
  display: -webkit-box !important;
  overflow: hidden !important;
  min-height: 2.3em !important;
  margin: 0 !important;
  color: var(--ui-muted) !important;
  font-size: 0.8rem !important;
  line-height: 1.28 !important;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.product-footer {
  display: grid !important;
  grid-template-columns: minmax(0, 64px) minmax(86px, 1fr) !important;
  gap: 8px !important;
  align-items: end !important;
  margin-top: auto !important;
}

.product-footer strong {
  color: var(--ui-text) !important;
  font-size: 1.15rem !important;
  line-height: 1 !important;
}

.table-box,
.product-list-container {
  overflow: auto !important;
}

.data-table th,
.data-table td,
.product-table th,
.product-table td,
.order-detail-table th,
.order-detail-table td {
  padding: 8px 10px !important;
  border-bottom: 1px solid var(--ui-line) !important;
}

.data-table thead th,
.product-table thead th,
.order-detail-table th {
  color: #475569 !important;
  background: var(--ui-surface-soft) !important;
  font-size: 0.74rem !important;
}

.form-card input,
.form-card select,
.form-card textarea,
.short-input,
.inline-form select,
.checkout-field input,
.checkout-field textarea,
.picker-field input,
.sale-payment-summary input,
.product-search-section input,
.product-quantity input {
  min-height: 38px !important;
  border-color: var(--ui-line) !important;
  border-radius: var(--ui-radius-sm) !important;
  background: #ffffff !important;
}

.form-card input:focus,
.form-card select:focus,
.form-card textarea:focus,
.short-input:focus,
.inline-form select:focus {
  border-color: var(--ui-primary) !important;
  box-shadow: 0 0 0 3px rgba(51, 150, 106, 0.14) !important;
}

body.page-pedidos .orders-tabs {
  display: flex !important;
  flex-wrap: nowrap !important;
  gap: 6px !important;
  overflow-x: auto !important;
  padding-bottom: 4px !important;
}

body.page-pedidos .orders-tabs a {
  flex: 0 0 auto !important;
  min-height: 32px !important;
  padding: 5px 9px !important;
  border: 1px solid var(--ui-line) !important;
  border-radius: 999px !important;
  color: #334155 !important;
  background: #ffffff !important;
  font-size: 0.74rem !important;
}

body.page-pedidos .orders-tabs a.active,
body.page-pedidos .orders-tabs a:hover {
  color: #ffffff !important;
  background: var(--ui-primary-dark) !important;
}

.bottom-nav {
  border: 1px solid var(--ui-line) !important;
  border-radius: var(--ui-radius) !important;
  background: rgba(255, 255, 255, 0.98) !important;
  box-shadow: var(--ui-shadow) !important;
}

.bottom-nav .tab-item.active {
  color: var(--ui-primary-dark) !important;
  background: var(--ui-primary-soft) !important;
}

@media (max-width: 760px) {
  :root {
    --topbar-offset: 4.1rem;
  }

  body {
    font-size: 14px;
  }

  .topbar-inner {
    min-height: 52px !important;
    padding: 0 8px !important;
  }

  .brand {
    min-width: 0 !important;
  }

  .brand-mark,
  .brand-mark.small {
    width: 34px !important;
    height: 34px !important;
  }

  .brand-mark img,
  .brand-mark.small img {
    width: 24px !important;
    height: 24px !important;
  }

  .brand-copy strong {
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.84rem !important;
  }

  .brand-copy small,
  .main-menu {
    display: none !important;
  }

  body[data-role="visitante"] .session-box {
    display: flex !important;
    margin-left: auto !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  body[data-role="visitante"] .session-copy,
  body[data-role="visitante"] .install-app-action {
    display: none !important;
  }

  body[data-role="visitante"] .session-box .button[href*="login"] {
    display: inline-flex !important;
    min-height: 34px !important;
    padding: 0.42rem 0.7rem !important;
    border-radius: 9px !important;
    font-size: 0.78rem !important;
  }

  body[data-role="cliente"] .session-box,
  body[data-role="administrador"] .session-box,
  body[data-role="subadmin"] .session-box,
  body[data-role="vendedor"] .session-box,
  body[data-role="repartidor"] .session-box {
    display: none !important;
  }

  .content-layout {
    padding: 8px 8px 64px !important;
  }

  .shell,
  #page-content {
    gap: 8px !important;
  }

  .dashboard-hero,
  .delivery-hero,
  .store-dashboard-hero,
  .work-panel,
  .form-card,
  .cart-summary-card,
  .checkout-card,
  .catalog-toolbar,
  .orders-board {
    padding: 9px !important;
    border-radius: var(--ui-radius-sm) !important;
  }

  .delivery-hero {
    grid-template-columns: 1fr !important;
  }

  .delivery-hero-visual {
    display: none !important;
  }

  .dashboard-hero h2,
  .delivery-hero h2,
  .catalog-toolbar h2,
  .work-panel h2,
  .section-heading-row h2 {
    font-size: 1.08rem !important;
  }

  .product-grid {
    grid-template-columns: 1fr !important;
    gap: 8px !important;
  }

  .product-card {
    display: grid !important;
    grid-template-columns: 86px minmax(0, 1fr) !important;
    min-height: auto !important;
    gap: 8px !important;
    padding: 7px !important;
  }

  .product-media {
    width: 86px !important;
    height: 96px !important;
    border-radius: var(--ui-radius-sm) !important;
  }

  .product-card-body {
    padding: 0 !important;
  }

  .product-card-body h2 {
    min-height: auto !important;
    font-size: 0.88rem !important;
  }

  .product-card-body p {
    font-size: 0.74rem !important;
  }

  .product-footer {
    grid-template-columns: minmax(0, 64px) minmax(86px, 1fr) !important;
    gap: 6px !important;
  }

  .bottom-nav {
    left: 8px;
    right: 8px;
    bottom: 8px;
  }
}

body.page-pedidos .courier-cancel-form {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

body.page-pedidos .orders-report-grid {
  margin-top: 18px;
}

body.page-pedidos .orders-report-panel {
  border-color: #d7dee8;
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(16, 24, 40, 0.05);
}

@media (max-width: 760px) {
  body.page-pedidos .orders-filter {
    grid-template-columns: 1fr;
  }

  body.page-pedidos .orders-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.page-pedidos .courier-actions,
  body.page-pedidos .courier-cancel-form {
    grid-template-columns: 1fr;
  }
}

/* Redesign global: marketplace operativo estilo delivery */
:root {
  --bg: #f6f7f8;
  --bg-accent: #ffffff;
  --surface: #ffffff;
  --surface-strong: #ffffff;
  --surface-soft: #f7f8fa;
  --surface-dark: #2b2f36;
  --text: #202124;
  --muted: #6b7280;
  --line: #e5e7eb;
  --primary: #e11931;
  --primary-strong: #c9152a;
  --primary-soft: #fff1f3;
  --secondary: #ffffff;
  --danger: #b42335;
  --warning: #b7791f;
  --success: #0f8f5f;
  --shadow-sm: none;
  --shadow-md: none;
  --shadow-lg: none;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 8px;
  --radius-xl: 8px;
  --topbar-offset: 4.4rem;
}

body {
  color: var(--text);
  background: #f6f7f8;
}

.page-chrome {
  min-height: 100vh;
  background: #f6f7f8;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
  background: #e11931;
  box-shadow: none;
}

.topbar-inner {
  width: min(100%, 1440px);
  min-height: 64px;
  padding: 0 20px;
  gap: 18px;
  background: transparent;
}

.brand {
  min-width: 220px;
  color: #ffffff;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: none;
}

.brand-mark img {
  width: 30px;
  height: 30px;
}

.brand-copy strong {
  color: #ffffff;
  font-size: 1rem;
  font-weight: 900;
}

.brand-copy small {
  color: rgba(255, 255, 255, 0.82);
}

.main-menu {
  gap: 4px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.main-menu a {
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.86);
  background: transparent;
  font-size: 0.86rem;
  font-weight: 800;
}

.main-menu a:hover,
.main-menu a.active {
  color: #e11931;
  border-color: #ffffff;
  background: #ffffff;
  box-shadow: none;
}

.session-box {
  margin-left: auto;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.session-copy strong {
  color: #ffffff;
}

.session-copy span {
  color: rgba(255, 255, 255, 0.78);
}

.menu-button {
  color: #e11931;
  background: #ffffff;
}

.content-layout {
  width: min(100%, 1440px);
  padding: 18px 20px 96px;
}

.shell {
  width: 100%;
  max-width: none;
  padding: 0;
}

.button,
button.button,
a.button {
  border-radius: 8px;
  box-shadow: none;
  font-weight: 850;
}

.button.primary,
button.button.primary {
  border-color: #e11931;
  background: #e11931;
  color: #ffffff;
}

.button.primary:hover,
button.button.primary:hover {
  border-color: #c9152a;
  background: #c9152a;
}

.button.secondary,
button.button.secondary,
.button.light,
button.button.light {
  color: #202124;
  border-color: #d7dbe2;
  background: #ffffff;
}

.button.secondary:hover,
.button.light:hover {
  color: #e11931;
  border-color: #e11931;
  background: #fff7f8;
}

.button.danger,
.logout-tab,
.button.light.session-action,
.button.light[href*="login"],
.button.light[href*="registro"] {
  color: #ffffff;
  border-color: #202124;
  background: #202124;
}

.install-app-action {
  display: none !important;
}

.dashboard-hero,
.delivery-hero,
.store-dashboard-hero,
.work-panel,
.form-card,
.summary-card,
.product-card,
.cart-summary-card,
.checkout-card,
.catalog-toolbar,
.orders-board,
.orders-report-panel,
.courier-delivery-card,
.order-history-panel,
.sale-payment-summary,
.product-search-section,
.product-list-container,
.presencial-sale-summary,
.modal-content {
  border: 0;
  border-radius: 0;
  background: #ffffff;
  box-shadow: none;
}

.dashboard-hero,
.delivery-hero,
.store-dashboard-hero,
.work-panel,
.form-card,
.cart-summary-card,
.checkout-card,
.catalog-toolbar,
.orders-board,
.orders-report-panel,
.order-history-panel,
.sale-payment-summary,
.product-search-section,
.presencial-sale-summary {
  padding: 18px 0;
  border-bottom: 1px solid #e5e7eb;
}

.dashboard-hero::after,
.work-panel::after,
.auth-shell::before,
.auth-card::after,
.summary-card::before,
.form-card::before,
.product-media::after,
.store-summary-cards .summary-card::before,
.store-summary-cards .summary-card::after {
  display: none !important;
}

.dashboard-hero h2,
.delivery-hero h2,
.catalog-toolbar h2,
.work-panel h2,
.auth-card-head h2,
.section-heading-row h2 {
  color: #202124;
  font-size: clamp(1.35rem, 2.1vw, 2rem);
  letter-spacing: 0;
}

.dashboard-hero p,
.delivery-hero p,
.work-panel p,
.catalog-toolbar p,
.section-heading-row p {
  color: #6b7280;
}

.summary-grid,
.summary-cards,
.store-summary-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 0;
  border: 1px solid #e5e7eb;
  background: #ffffff;
}

.summary-card,
.store-summary-cards .summary-card {
  min-height: 92px;
  padding: 16px;
  border-right: 1px solid #e5e7eb;
  border-bottom: 1px solid #e5e7eb;
  border-radius: 0;
  background: #ffffff;
}

.summary-card:hover,
.product-card:hover {
  transform: none;
  box-shadow: none;
}

.summary-kicker,
.product-category {
  color: #6b7280;
  background: transparent;
  border: 0;
  padding: 0;
  text-transform: uppercase;
}

.catalog-toolbar {
  display: grid;
  gap: 12px;
  margin-bottom: 0;
  padding: 12px 0 16px;
}

.delivery-search,
.catalog-toolbar form {
  border: 1px solid #d7dbe2;
  border-radius: 8px;
  background: #ffffff;
}

.delivery-search input,
.catalog-toolbar input,
.catalog-toolbar select {
  border: 0;
  background: #ffffff;
}

.category-rail {
  display: flex;
  gap: 8px;
  padding: 8px 0;
  overflow-x: auto;
}

.category-chip {
  min-height: 36px;
  border: 1px solid #d7dbe2;
  border-radius: 999px;
  background: #ffffff;
  color: #202124;
  box-shadow: none;
}

.category-chip.active,
.category-chip:hover {
  color: #ffffff;
  border-color: #e11931;
  background: #e11931;
}

.product-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  border-top: 1px solid #e5e7eb;
  background: #ffffff;
}

.product-card {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid #e5e7eb;
  border-radius: 0;
  background: #ffffff;
}

.product-media {
  width: 112px;
  height: 112px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #f8fafc;
}

.product-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-card-body {
  min-width: 0;
  padding: 0;
}

.product-card-body h2 {
  color: #202124;
  font-size: 1.02rem;
  line-height: 1.25;
}

.product-card-body p {
  color: #6b7280;
}

.product-footer {
  gap: 12px;
}

.product-price,
.product-footer strong,
.product-price strong {
  color: #202124;
}

.product-footer .button,
.product-card .button {
  min-height: 36px;
  color: #ffffff;
  border-color: #e11931;
  background: #e11931;
}

.table-box,
.product-list-container {
  border: 1px solid #e5e7eb;
  border-radius: 0;
  background: #ffffff;
  box-shadow: none;
}

.data-table,
.product-table,
.order-detail-table {
  border-collapse: collapse;
}

.data-table thead th,
.product-table thead th,
.order-detail-table th {
  color: #4b5563;
  background: #f8fafc;
  border-bottom: 1px solid #e5e7eb;
}

.data-table tbody tr,
.product-table tbody tr {
  background: #ffffff;
}

.data-table tbody tr:nth-child(even),
.product-table tbody tr:nth-child(even) {
  background: #ffffff;
}

.data-table tbody tr:hover,
.product-table tbody tr:hover {
  background: #fff7f8;
}

.form-card label,
.checkout-field label,
.sale-payment-summary label {
  color: #3f4650;
}

.form-card input,
.form-card select,
.form-card textarea,
.short-input,
.inline-form select,
.checkout-field input,
.checkout-field textarea,
.picker-field input,
.sale-payment-summary input,
.product-search-section input,
.product-quantity input {
  border-color: #d7dbe2;
  border-radius: 8px;
  background: #ffffff;
}

.form-card input:focus,
.form-card select:focus,
.form-card textarea:focus,
.short-input:focus,
.inline-form select:focus,
.checkout-field input:focus,
.checkout-field textarea:focus,
.picker-field input:focus,
.sale-payment-summary input:focus,
.product-search-section input:focus,
.product-quantity input:focus {
  border-color: #e11931;
  box-shadow: 0 0 0 3px rgba(225, 25, 49, 0.12);
}

.orders-board {
  padding: 0 0 16px;
}

body.page-pedidos .orders-board,
body.page-pedidos .table-box,
body.page-pedidos .orders-report-panel,
body.page-pedidos .courier-delivery-card {
  border-radius: 0;
  box-shadow: none;
}

body.page-pedidos .orders-tabs {
  gap: 0;
  border: 1px solid #e5e7eb;
  border-radius: 0;
  background: #ffffff;
}

body.page-pedidos .orders-tabs a {
  border: 0;
  border-right: 1px solid #e5e7eb;
  border-radius: 0;
  background: #ffffff;
}

body.page-pedidos .orders-tabs a.active,
body.page-pedidos .orders-tabs a:hover {
  color: #e11931;
  background: #fff7f8;
  box-shadow: inset 0 -3px 0 #e11931;
}

body.page-pedidos .orders-kpi-grid {
  gap: 0;
  border: 1px solid #e5e7eb;
  border-top: 0;
}

body.page-pedidos .orders-kpi {
  border: 0;
  border-right: 1px solid #e5e7eb;
  border-radius: 0;
  background: #ffffff;
}

body.page-pedidos .inline-form .button[type="submit"],
body.page-pedidos .courier-actions .button.primary,
body.page-pedidos .courier-actions button.button.primary {
  border-color: #e11931;
  background: #e11931;
}

body.page-pedidos .courier-delivery-grid {
  grid-template-columns: 1fr;
  border-top: 1px solid #e5e7eb;
  background: #ffffff;
}

body.page-pedidos .courier-delivery-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  padding: 14px 0;
  border: 0;
  border-bottom: 1px solid #e5e7eb;
  background: #ffffff;
}

body.page-pedidos .courier-delivery-meta {
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0;
}

body.page-pedidos .courier-actions {
  width: min(420px, 100%);
}

.bottom-nav {
  border-top: 1px solid #e5e7eb;
  background: #ffffff;
  box-shadow: none;
}

.bottom-nav .tab-item {
  color: #5f6672;
}

.bottom-nav .tab-item.active {
  color: #e11931;
}

.bottom-nav .tab-item.active::before {
  background: #e11931;
}

.side-menu {
  border-right: 1px solid #e5e7eb;
  border-radius: 0;
  background: #ffffff;
}

.menu-link {
  border-radius: 0;
}

.menu-link.active,
.menu-link:hover {
  color: #e11931;
  background: #fff7f8;
}

.alert {
  border-radius: 0;
  box-shadow: none;
}

@media (max-width: 760px) {
  .topbar-inner {
    min-height: 58px;
    padding: 0 12px;
  }

  .brand {
    min-width: 0;
  }

  .brand-copy small,
  .session-box {
    display: none;
  }

  .content-layout {
    padding: 12px 12px 88px;
  }

  .product-card {
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 12px;
  }

  .product-media {
    width: 92px;
    height: 92px;
  }

  body.page-pedidos .courier-delivery-card {
    grid-template-columns: 1fr;
  }

  body.page-pedidos .courier-actions {
    width: 100%;
  }
}

/* Redesign ajuste: delivery limpio, formal y menos agresivo */
:root {
  --bg: #f4f5f7;
  --bg-accent: #f4f5f7;
  --surface: #ffffff;
  --surface-strong: #ffffff;
  --surface-soft: #f8fafc;
  --text: #1f2933;
  --muted: #667085;
  --line: #dfe3e8;
  --primary: #d7192a;
  --primary-strong: #b91424;
  --primary-soft: #fff3f4;
  --danger: #b42335;
  --success: #087443;
  --topbar-offset: 4.6rem;
}

body {
  color: #1f2933;
  background: #f4f5f7;
}

.topbar {
  border-bottom: 1px solid #dfe3e8;
  background: #ffffff;
}

.topbar-inner {
  min-height: 68px;
}

.brand {
  color: #1f2933;
}

.brand-mark {
  background: #d7192a;
}

.brand-mark img {
  filter: brightness(0) invert(1);
}

.brand-copy strong {
  color: #1f2933;
}

.brand-copy small {
  color: #667085;
}

.main-menu {
  align-self: stretch;
  align-items: stretch;
}

.main-menu a {
  min-height: 68px;
  padding: 0 13px;
  border: 0;
  border-radius: 0;
  color: #4b5563;
  background: transparent;
}

.main-menu a:hover,
.main-menu a.active {
  color: #d7192a;
  border: 0;
  background: transparent;
  box-shadow: inset 0 -3px 0 #d7192a;
}

.session-copy strong {
  color: #1f2933;
}

.session-copy span {
  color: #667085;
}

.session-box {
  display: flex;
}

.button.danger,
.logout-tab,
.button.light.session-action,
.button.light[href*="login"],
.button.light[href*="registro"] {
  border-color: #d7192a;
  background: #d7192a;
}

.content-layout {
  padding-top: 20px;
}

.dashboard-hero,
.delivery-hero,
.store-dashboard-hero,
.work-panel,
.form-card,
.cart-summary-card,
.checkout-card,
.catalog-toolbar,
.orders-board,
.orders-report-panel,
.order-history-panel,
.sale-payment-summary,
.product-search-section,
.presencial-sale-summary {
  padding: 20px;
  border: 1px solid #dfe3e8;
  border-radius: 8px;
  background: #ffffff;
}

.summary-grid,
.summary-cards,
.store-summary-cards {
  overflow: hidden;
  border-radius: 8px;
}

.summary-card,
.store-summary-cards .summary-card {
  background: #ffffff;
}

.catalog-toolbar {
  margin-bottom: 12px;
}

.product-grid {
  overflow: hidden;
  border: 1px solid #dfe3e8;
  border-radius: 8px;
}

.product-card {
  padding: 14px;
}

.product-media {
  border-radius: 8px;
}

.table-box,
.product-list-container {
  overflow: auto;
  border: 1px solid #dfe3e8;
  border-radius: 8px;
}

.data-table thead th,
.product-table thead th,
.order-detail-table th {
  background: #f8fafc;
}

body.page-pedidos .orders-board,
body.page-pedidos .table-box,
body.page-pedidos .orders-report-panel,
body.page-pedidos .courier-delivery-card {
  border-radius: 8px;
}

body.page-pedidos .orders-tabs {
  overflow: hidden;
  border-radius: 8px;
}

body.page-pedidos .orders-tabs a.active,
body.page-pedidos .orders-tabs a:hover {
  color: #d7192a;
  background: #fff3f4;
  box-shadow: inset 0 -3px 0 #d7192a;
}

body.page-pedidos .orders-kpi-grid {
  overflow: hidden;
  border-radius: 8px;
}

body.page-pedidos .courier-delivery-grid {
  gap: 10px;
  border: 0;
  background: transparent;
}

body.page-pedidos .courier-delivery-card {
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 14px;
  border: 1px solid #dfe3e8;
  border-left: 4px solid #d7192a;
}

body.page-pedidos .inline-form .button[type="submit"],
body.page-pedidos .courier-actions .button.primary,
body.page-pedidos .courier-actions button.button.primary,
.product-footer .button,
.product-card .button {
  border-color: #d7192a;
  background: #d7192a;
}

.bottom-nav {
  background: #ffffff;
}

.bottom-nav .tab-item.active {
  color: #d7192a;
}

@media (max-width: 760px) {
  .topbar-inner {
    min-height: 60px;
  }

  .main-menu a {
    min-height: 44px;
  }

  .dashboard-hero,
  .delivery-hero,
  .store-dashboard-hero,
  .work-panel,
  .form-card,
  .cart-summary-card,
  .checkout-card,
  .catalog-toolbar,
  .orders-board {
    padding: 14px;
  }
}

/* Restauracion: interfaz original con tarjetas */
:root {
  --bg: #f1fbf4;
  --bg-accent: #ddf3e4;
  --surface: rgba(255, 255, 255, 0.84);
  --surface-strong: #ffffff;
  --surface-dark: #2e4a3d;
  --surface-soft: #edf8f0;
  --text: #203127;
  --muted: #647a6c;
  --line: rgba(32, 49, 39, 0.12);
  --primary: #8dc6a0;
  --primary-strong: #5f9b77;
  --primary-soft: #dff3e6;
  --secondary: #bfe3ca;
  --danger: #d85f6f;
  --warning: #d7b36f;
  --success: #6dac83;
  --shadow-sm: 0 10px 30px rgba(15, 23, 42, 0.08);
  --shadow-md: 0 20px 45px rgba(15, 23, 42, 0.12);
  --shadow-lg: 0 28px 60px rgba(15, 23, 42, 0.16);
  --radius-sm: 0.75rem;
  --radius-md: 1rem;
  --radius-lg: 1.5rem;
  --radius-xl: 2rem;
  --topbar-offset: 7.2rem;
}

body {
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(141, 198, 160, 0.24), transparent 32rem),
    linear-gradient(180deg, var(--bg), #f8fcfa);
}

.page-chrome {
  background: transparent;
}

.topbar {
  border-bottom: 1px solid rgba(32, 49, 39, 0.10);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(18px);
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.08);
}

.topbar-inner {
  min-height: 74px;
  padding: 0 clamp(1rem, 3vw, 2rem);
}

.brand {
  color: var(--text);
}

.brand-mark {
  width: 48px;
  height: 48px;
  border: 1px solid rgba(32, 49, 39, 0.10);
  border-radius: var(--radius-md);
  background: #ffffff;
  box-shadow: var(--shadow-sm);
}

.brand-mark img {
  filter: none;
}

.brand-copy strong {
  color: var(--text);
}

.brand-copy small,
.session-copy span {
  color: var(--muted);
}

.session-copy strong {
  color: var(--text);
}

.main-menu {
  align-self: auto;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem;
  border: 1px solid rgba(32, 49, 39, 0.10);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: var(--shadow-sm);
}

.main-menu a {
  min-height: 40px;
  padding: 0.62rem 0.95rem;
  border: 0;
  border-radius: var(--radius-md);
  color: #365142;
  background: transparent;
}

.main-menu a:hover,
.main-menu a.active {
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary-strong), #2e9870);
  box-shadow: 0 10px 22px rgba(46, 152, 112, 0.18);
}

.session-box {
  display: flex;
  padding: 0.35rem;
  border: 1px solid rgba(32, 49, 39, 0.10);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: var(--shadow-sm);
}

.install-app-action {
  display: inline-flex !important;
}

.content-layout {
  padding: clamp(1rem, 3vw, 2rem) clamp(1rem, 3vw, 2rem) 6rem;
}

.dashboard-hero,
.delivery-hero,
.store-dashboard-hero,
.work-panel,
.form-card,
.summary-card,
.product-card,
.cart-summary-card,
.checkout-card,
.catalog-toolbar,
.orders-board,
.orders-report-panel,
.courier-delivery-card,
.order-history-panel,
.sale-payment-summary,
.product-search-section,
.product-list-container,
.presencial-sale-summary,
.modal-content {
  border: 1px solid rgba(32, 49, 39, 0.10);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-md);
}

.dashboard-hero,
.delivery-hero,
.store-dashboard-hero,
.work-panel,
.form-card,
.cart-summary-card,
.checkout-card,
.catalog-toolbar,
.orders-board,
.orders-report-panel,
.order-history-panel,
.sale-payment-summary,
.product-search-section,
.presencial-sale-summary {
  padding: clamp(1rem, 2.5vw, 1.5rem);
}

.summary-grid,
.summary-cards,
.store-summary-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  border: 0;
  background: transparent;
}

.summary-card,
.store-summary-cards .summary-card {
  min-height: auto;
  padding: 1rem;
  border: 1px solid rgba(32, 49, 39, 0.10);
  border-radius: var(--radius-lg);
}

.summary-card:hover,
.product-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.summary-kicker,
.product-category {
  display: inline-flex;
  width: fit-content;
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
  color: #2f6f51;
  background: var(--primary-soft);
  border: 1px solid rgba(95, 155, 119, 0.20);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  border: 0;
  background: transparent;
}

.product-card {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
  overflow: hidden;
}

.product-media {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  border: 0;
  border-radius: 0;
  background: #f5faf7;
}

.product-card-body {
  padding: 1rem;
}

.table-box,
.product-list-container {
  border: 1px solid rgba(32, 49, 39, 0.10);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-md);
}

.data-table,
.product-table,
.order-detail-table {
  border-collapse: separate;
  border-spacing: 0;
}

.data-table tbody tr:hover,
.product-table tbody tr:hover {
  background: #eef6f9;
}

.button.primary,
button.button.primary,
.product-footer .button,
.product-card .button,
body.page-pedidos .inline-form .button[type="submit"],
body.page-pedidos .courier-actions .button.primary,
body.page-pedidos .courier-actions button.button.primary {
  color: #ffffff;
  border-color: var(--primary-strong);
  background: linear-gradient(135deg, var(--primary-strong), #2e9870);
}

.button.secondary,
button.button.secondary,
.button.light,
button.button.light {
  color: #315443;
  border-color: rgba(32, 49, 39, 0.12);
  background: rgba(255, 255, 255, 0.86);
}

.button.danger,
.logout-tab,
.button.light.session-action,
.button.light[href*="login"],
.button.light[href*="registro"] {
  color: #ffffff;
  border-color: #b42335;
  background: #b42335;
}

body.page-pedidos .orders-board,
body.page-pedidos .table-box,
body.page-pedidos .orders-report-panel,
body.page-pedidos .courier-delivery-card {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

body.page-pedidos .orders-tabs {
  gap: 8px;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
}

body.page-pedidos .orders-tabs a {
  border: 1px solid #d7dee8;
  border-radius: 8px;
  background: #ffffff;
}

body.page-pedidos .orders-tabs a.active,
body.page-pedidos .orders-tabs a:hover {
  color: #ffffff;
  border-color: #164f68;
  background: #164f68;
  box-shadow: none;
}

body.page-pedidos .orders-kpi-grid {
  gap: 10px;
  border: 0;
  background: transparent;
}

body.page-pedidos .orders-kpi {
  border: 1px solid #d9e1ea;
  border-radius: 8px;
  background: #f8fafc;
}

body.page-pedidos .courier-delivery-grid {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
  border: 0;
  background: transparent;
}

body.page-pedidos .courier-delivery-card {
  display: grid;
  grid-template-columns: 1fr;
  padding: 16px;
  border: 1px solid #d7dee8;
  border-left: 5px solid #1f4f6b;
}

.bottom-nav {
  border-top: 1px solid rgba(32, 49, 39, 0.10);
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 -12px 30px rgba(15, 23, 42, 0.08);
}

.bottom-nav .tab-item.active {
  color: var(--primary-strong);
}

@media (max-width: 760px) {
  :root {
    --topbar-offset: 6.4rem;
  }

  .topbar-inner {
    min-height: 64px;
  }

  .content-layout {
    padding: 0.85rem 0.85rem 5.8rem;
  }

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

  .product-card {
    display: flex;
  }

  .product-media {
    aspect-ratio: 16 / 10;
  }
}

/* Compactacion general: tarjetas mas densas */
:root {
  --topbar-offset: 5.7rem;
}

.topbar-inner {
  min-height: 62px;
}

.brand-mark {
  width: 40px;
  height: 40px;
}

.brand-mark img {
  width: 28px;
  height: 28px;
}

.brand-copy strong {
  font-size: 0.96rem;
}

.brand-copy small {
  font-size: 0.74rem;
}

.main-menu {
  padding: 0.22rem;
  border-radius: 12px;
}

.main-menu a {
  min-height: 34px;
  padding: 0.48rem 0.72rem;
  border-radius: 8px;
  font-size: 0.82rem;
}

.session-box {
  padding: 0.22rem;
  border-radius: 12px;
}

.session-copy strong {
  font-size: 0.82rem;
}

.session-copy span {
  font-size: 0.72rem;
}

.content-layout {
  padding: 1rem clamp(0.9rem, 2vw, 1.25rem) 5rem;
}

.dashboard-hero,
.delivery-hero,
.store-dashboard-hero,
.work-panel,
.form-card,
.cart-summary-card,
.checkout-card,
.catalog-toolbar,
.orders-board,
.orders-report-panel,
.order-history-panel,
.sale-payment-summary,
.product-search-section,
.presencial-sale-summary {
  padding: 0.95rem;
  border-radius: 12px;
}

.dashboard-hero,
.delivery-hero,
.store-dashboard-hero {
  min-height: auto;
}

.dashboard-hero h2,
.delivery-hero h2,
.catalog-toolbar h2,
.work-panel h2,
.auth-card-head h2,
.section-heading-row h2 {
  font-size: clamp(1.15rem, 1.9vw, 1.55rem);
}

.dashboard-hero p,
.delivery-hero p,
.work-panel p,
.catalog-toolbar p,
.section-heading-row p {
  font-size: 0.88rem;
  line-height: 1.42;
}

.summary-grid,
.summary-cards,
.store-summary-cards {
  gap: 0.65rem;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.summary-card,
.store-summary-cards .summary-card {
  min-height: 78px;
  padding: 0.78rem;
  border-radius: 12px;
}

.summary-card strong,
.store-summary-cards .summary-card strong {
  font-size: clamp(1.25rem, 2.5vw, 1.8rem);
}

.summary-kicker,
.product-category {
  padding: 0.2rem 0.45rem;
  font-size: 0.68rem;
}

.product-grid {
  gap: 0.7rem;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

.product-card {
  border-radius: 12px;
}

.product-media {
  aspect-ratio: 4 / 2.55;
}

.product-card-body {
  padding: 0.75rem;
}

.product-card-body h2 {
  margin: 0.25rem 0 0.35rem;
  font-size: 0.98rem;
  line-height: 1.22;
}

.product-card-body p {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.35;
}

.product-footer {
  margin-top: 0.65rem;
}

.button,
button.button,
a.button {
  min-height: 36px;
  padding: 0.52rem 0.78rem;
  font-size: 0.84rem;
}

.button.small,
a.button.small,
button.button.small {
  min-height: 30px;
  padding: 0.38rem 0.58rem;
  font-size: 0.76rem;
}

.form-card label,
.checkout-field label,
.sale-payment-summary label {
  gap: 0.35rem;
  margin-bottom: 0.7rem;
  font-size: 0.86rem;
}

.form-card input,
.form-card select,
.form-card textarea,
.short-input,
.inline-form select,
.checkout-field input,
.checkout-field textarea,
.picker-field input,
.sale-payment-summary input,
.product-search-section input,
.product-quantity input {
  min-height: 38px;
  padding: 0.55rem 0.7rem;
  font-size: 0.9rem;
}

.table-box,
.product-list-container {
  border-radius: 12px;
}

.data-table th,
.data-table td,
.product-table th,
.product-table td,
.order-detail-table th,
.order-detail-table td {
  padding: 8px 10px;
}

body.page-pedidos .orders-board,
body.page-pedidos .orders-report-panel,
body.page-pedidos .courier-delivery-card {
  border-radius: 12px;
}

body.page-pedidos .orders-tabs {
  gap: 6px;
}

body.page-pedidos .orders-tabs a {
  min-height: 32px;
  padding: 6px 9px;
  font-size: 0.76rem;
}

body.page-pedidos .orders-kpi-grid {
  gap: 8px;
}

body.page-pedidos .orders-kpi {
  min-height: 68px;
  padding: 9px 10px;
}

body.page-pedidos .orders-kpi strong {
  font-size: 1.1rem;
}

body.page-pedidos .data-table {
  font-size: 0.82rem;
}

body.page-pedidos .data-table thead th,
body.page-pedidos .data-table tbody td {
  padding: 8px 9px;
}

body.page-pedidos .inline-form {
  gap: 6px;
  min-width: 220px;
}

body.page-pedidos .inline-form select,
body.page-pedidos .inline-form .short-input,
body.page-pedidos .inline-form .button {
  min-height: 32px;
  padding: 5px 8px;
  font-size: 0.76rem;
}

body.page-pedidos .courier-delivery-grid {
  gap: 8px;
}

body.page-pedidos .courier-delivery-card {
  padding: 11px;
}

body.page-pedidos .courier-delivery-head strong {
  font-size: 0.98rem;
}

body.page-pedidos .courier-actions .button,
body.page-pedidos .courier-actions button,
body.page-pedidos .courier-actions input {
  min-height: 34px;
}

@media (max-width: 760px) {
  :root {
    --topbar-offset: 5.3rem;
  }

  .content-layout {
    padding: 0.65rem 0.65rem 5rem;
  }

  .dashboard-hero,
  .delivery-hero,
  .store-dashboard-hero,
  .work-panel,
  .form-card,
  .cart-summary-card,
  .checkout-card,
  .catalog-toolbar,
  .orders-board {
    padding: 0.75rem;
  }

  .product-grid {
    gap: 0.6rem;
  }
}

/* Compactacion responsive fuerte */
@media (max-width: 760px) {
  :root {
    --topbar-offset: 4.35rem;
  }

  html {
    font-size: 14px;
  }

  .topbar-inner {
    min-height: 52px;
    padding: 0 0.55rem;
    gap: 0.45rem;
  }

  .brand {
    gap: 0.45rem;
  }

  .brand-mark {
    width: 34px;
    height: 34px;
    border-radius: 9px;
  }

  .brand-mark img {
    width: 23px;
    height: 23px;
  }

  .brand-copy strong {
    max-width: 150px;
    overflow: hidden;
    font-size: 0.84rem;
    line-height: 1.05;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .brand-copy small,
  .session-box {
    display: none !important;
  }

  .menu-button {
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: 9px;
  }

  .content-layout {
    padding: 0.45rem 0.45rem 4.35rem;
  }

  .shell {
    gap: 0.55rem;
  }

  #page-content {
    display: grid;
    gap: 0.55rem;
  }

  .alert {
    padding: 0.55rem 0.65rem;
    font-size: 0.82rem;
  }

  .dashboard-hero,
  .delivery-hero,
  .store-dashboard-hero,
  .work-panel,
  .form-card,
  .cart-summary-card,
  .checkout-card,
  .catalog-toolbar,
  .orders-board,
  .orders-report-panel,
  .order-history-panel,
  .sale-payment-summary,
  .product-search-section,
  .presencial-sale-summary {
    padding: 0.55rem;
    border-radius: 10px;
  }

  .dashboard-hero h2,
  .delivery-hero h2,
  .catalog-toolbar h2,
  .work-panel h2,
  .auth-card-head h2,
  .section-heading-row h2 {
    font-size: 1rem;
    line-height: 1.15;
  }

  .dashboard-hero p,
  .delivery-hero p,
  .work-panel p,
  .catalog-toolbar p,
  .section-heading-row p,
  .muted {
    font-size: 0.78rem;
    line-height: 1.3;
  }

  .action-row,
  .hero-actions,
  .store-dashboard-actions {
    gap: 0.4rem;
  }

  .summary-grid,
  .summary-cards,
  .store-summary-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.45rem;
  }

  .summary-card,
  .store-summary-cards .summary-card {
    min-height: 62px;
    padding: 0.55rem;
    border-radius: 10px;
  }

  .summary-card strong,
  .store-summary-cards .summary-card strong {
    font-size: 1.12rem;
  }

  .summary-card p {
    margin: 0.2rem 0 0;
    font-size: 0.74rem;
    line-height: 1.25;
  }

  .summary-kicker,
  .product-category {
    padding: 0.14rem 0.35rem;
    font-size: 0.6rem;
  }

  .catalog-toolbar {
    gap: 0.45rem;
    margin-bottom: 0;
  }

  .delivery-search,
  .catalog-toolbar form {
    gap: 0.35rem;
  }

  .category-rail {
    gap: 0.35rem;
    padding: 0.25rem 0;
  }

  .category-chip {
    min-height: 30px;
    padding: 0.35rem 0.55rem;
    font-size: 0.74rem;
  }

  .product-grid {
    grid-template-columns: 1fr;
    gap: 0.45rem;
  }

  .product-card {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 0.45rem;
    align-items: stretch;
    padding: 0.45rem;
    border-radius: 10px;
  }

  .product-media {
    width: 92px;
    height: 104px;
    aspect-ratio: auto;
    border-radius: 8px;
    overflow: hidden;
    align-self: stretch;
  }

  .product-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .product-card-body {
    display: flex;
    min-width: 0;
    padding: 0;
    flex-direction: column;
    justify-content: center;
  }

  .product-card-body h2 {
    margin: 0.12rem 0 0.2rem;
    font-size: 0.86rem;
    line-height: 1.14;
  }

  .product-card-body p {
    display: -webkit-box;
    overflow: hidden;
    font-size: 0.72rem;
    line-height: 1.22;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }

  .product-store,
  .product-stock {
    font-size: 0.68rem;
  }

  .product-footer {
    align-items: center;
    gap: 0.35rem;
    margin-top: 0.35rem;
  }

  .product-footer strong {
    font-size: 0.86rem;
  }

  .button,
  button.button,
  a.button {
    min-height: 31px;
    padding: 0.38rem 0.55rem;
    border-radius: 8px;
    font-size: 0.76rem;
  }

  .button.small,
  a.button.small,
  button.button.small {
    min-height: 28px;
    padding: 0.3rem 0.45rem;
    font-size: 0.7rem;
  }

  .form-card label,
  .checkout-field label,
  .sale-payment-summary label {
    gap: 0.25rem;
    margin-bottom: 0.48rem;
    font-size: 0.78rem;
  }

  .form-card input,
  .form-card select,
  .form-card textarea,
  .short-input,
  .inline-form select,
  .checkout-field input,
  .checkout-field textarea,
  .picker-field input,
  .sale-payment-summary input,
  .product-search-section input,
  .product-quantity input {
    min-height: 32px;
    padding: 0.38rem 0.5rem;
    border-radius: 8px;
    font-size: 0.82rem;
  }

  .form-card textarea {
    min-height: 76px;
  }

  .table-box,
  .product-list-container {
    border-radius: 10px;
  }

  .data-table th,
  .data-table td,
  .product-table th,
  .product-table td,
  .order-detail-table th,
  .order-detail-table td {
    padding: 6px 7px;
    font-size: 0.76rem;
  }

  body.page-pedidos .orders-page-heading {
    margin-bottom: 0.35rem;
  }

  body.page-pedidos .orders-tabs {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.25rem;
    overflow-x: auto;
    padding: 0.1rem 0 0.25rem;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  body.page-pedidos .orders-tabs::-webkit-scrollbar {
    display: none;
  }

  body.page-pedidos .orders-tabs a {
    flex: 0 0 auto;
    min-height: 28px;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 0.66rem;
    white-space: nowrap;
  }

  body.page-pedidos .orders-tabs span {
    min-width: 17px;
    height: 17px;
    padding: 0 4px;
    font-size: 0.58rem;
  }

  body.page-pedidos .orders-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.4rem;
  }

  body.page-pedidos .orders-kpi {
    min-height: 54px;
    padding: 0.48rem;
  }

  body.page-pedidos .orders-kpi span {
    font-size: 0.62rem;
  }

  body.page-pedidos .orders-kpi strong {
    font-size: 0.98rem;
  }

  body.page-pedidos .orders-filter {
    gap: 0.4rem;
  }

  body.page-pedidos .courier-delivery-card {
    padding: 0.55rem;
    border-radius: 10px;
  }

  body.page-pedidos .courier-delivery-head strong {
    font-size: 0.88rem;
  }

  body.page-pedidos .courier-delivery-head span,
  body.page-pedidos .courier-delivery-meta {
    font-size: 0.72rem;
  }

  body.page-pedidos .courier-actions {
    gap: 0.35rem;
  }

  body.page-pedidos .courier-actions .button,
  body.page-pedidos .courier-actions button,
  body.page-pedidos .courier-actions input {
    min-height: 31px;
  }

  .bottom-nav {
    min-height: 52px;
  }

  .bottom-nav .tab-item {
    gap: 0.12rem;
    min-height: 48px;
    padding: 0.28rem 0.2rem;
    font-size: 0.64rem;
  }

  .bottom-nav .icon {
    width: 18px;
    height: 18px;
  }
}

@media (max-width: 420px) {
  .summary-grid,
  .summary-cards,
  .store-summary-cards {
    grid-template-columns: 1fr 1fr;
  }

  .product-card {
    grid-template-columns: 84px minmax(0, 1fr);
  }

  .product-media {
    width: 84px;
    height: 96px;
  }

  .brand-copy strong {
    max-width: 120px;
  }
}

@media (max-width: 760px) {
  body[data-role="cliente"] .bottom-nav a[href*="page=inicio"] {
    display: none !important;
  }

  .bottom-nav .tab-item:not(.active):not(.logout-tab),
  .bottom-nav .tab-item:not(.active):not(.logout-tab):hover,
  .bottom-nav .tab-item:not(.active):not(.logout-tab):focus,
  .bottom-nav .tab-item:not(.active):not(.logout-tab):focus-visible {
    color: #53606d !important;
    border-color: transparent !important;
    background: transparent !important;
    box-shadow: none !important;
    outline: 0 !important;
  }

  .bottom-nav .tab-item.active {
    color: var(--primary-strong) !important;
    border-color: rgba(95, 155, 119, 0.18) !important;
    background: var(--primary-soft) !important;
  }
}

/* Catalogo desktop mas compacto */
@media (min-width: 900px) {
  .product-grid {
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 0.75rem;
  }

  .product-card {
    border-radius: 12px;
  }

  .product-media {
    height: 150px;
    aspect-ratio: auto;
  }

  .product-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .product-card-body {
    padding: 0.75rem;
  }

  .product-card-body h2 {
    margin: 0.25rem 0;
    font-size: 0.98rem;
    line-height: 1.18;
  }

  .product-card-body p {
    display: -webkit-box;
    overflow: hidden;
    min-height: 2.1em;
    font-size: 0.82rem;
    line-height: 1.28;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }

  .product-footer {
    margin-top: 0.65rem;
  }
}

@media (min-width: 1200px) {
  .product-grid {
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  }

  .product-media {
    height: 132px;
  }
}

/* Alineacion de compra en tarjetas de catalogo */
@media (min-width: 761px) {
  .product-card {
    min-height: 356px;
  }

  .product-card-body {
    display: flex;
    min-height: 0;
    flex-direction: column;
  }

  .product-card-body h2 {
    min-height: 2.35em;
  }

  .product-card-body p {
    min-height: 2.55em;
  }

  .product-footer {
    display: grid;
    grid-template-columns: minmax(0, 72px) minmax(96px, 1fr);
    gap: 0.55rem;
    align-items: end;
    margin-top: auto;
  }

  .product-footer strong {
    display: block;
    min-width: 0;
    font-size: 1.32rem;
    line-height: 1.02;
    word-break: break-word;
  }

  .product-footer .button {
    width: 100%;
    min-height: 40px;
    align-self: end;
    justify-content: center;
  }
}

@media (min-width: 1200px) {
  .product-card {
    min-height: 334px;
  }

  .product-footer {
    grid-template-columns: minmax(0, 64px) minmax(90px, 1fr);
  }

  .product-footer strong {
    font-size: 1.2rem;
  }
}

@media (max-width: 760px) {
  .product-footer {
    display: grid;
    grid-template-columns: minmax(0, 64px) minmax(92px, 1fr);
    align-items: end;
  }

  .product-footer .button {
    width: 100%;
    justify-content: center;
  }
}

/* Catalogo: encabezado mas compacto */
.delivery-hero,
.catalog-toolbar {
  margin-bottom: 0.75rem;
}

.delivery-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 250px;
  gap: 0.75rem;
  align-items: center;
  min-height: 0;
  padding: 0.55rem 1rem;
}

.delivery-hero h2 {
  margin: 0 0 0.28rem;
  font-size: clamp(1.2rem, 2vw, 1.65rem);
}

.delivery-hero p {
  max-width: 680px;
  margin: 0 0 0.45rem;
  font-size: 0.88rem;
}

.delivery-hero-visual {
  display: flex;
  justify-content: center;
  max-height: 150px;
}

.delivery-hero-visual img,
.catalog-store-logo {
  max-width: 220px;
  max-height: 140px;
  object-fit: contain;
}

.delivery-search {
  max-width: 780px;
  min-height: 42px;
}

.delivery-search input {
  min-height: 42px;
}

.delivery-search .button,
.delivery-search button {
  min-height: 42px;
}

.store-selector,
.category-rail {
  margin-top: 0.08rem !important;
  margin-bottom: 0.08rem !important;
}

.category-rail {
  padding: 0.05rem 0 !important;
}

.store-selector {
  padding: 0.05rem 0 !important;
}

.store-selector + .category-rail,
.category-rail + .product-grid {
  margin-top: 0.18cm !important;
}

.catalog-toolbar + .store-selector,
.catalog-toolbar + .category-rail,
.delivery-hero + .store-selector,
.delivery-hero + .category-rail {
  margin-top: 0.18cm !important;
}

.store-selector .category-chip,
.category-rail .category-chip {
  min-height: 38px;
}

@media (min-width: 900px) {
  .delivery-hero {
    grid-template-columns: minmax(0, 1fr) 280px;
    padding: 0.55rem 1.05rem;
  }

  .delivery-hero-visual img,
  .catalog-store-logo {
    max-width: 250px;
    max-height: 145px;
  }
}

@media (max-width: 760px) {
  .delivery-hero {
    grid-template-columns: 1fr;
    gap: 0.6rem;
    padding: 0.7rem;
  }

  .delivery-hero-visual {
    display: none;
  }

  .delivery-hero h2 {
    font-size: 1.05rem;
  }

  .delivery-hero p {
    margin-bottom: 0.55rem;
  }

  .delivery-search,
  .delivery-search input,
  .delivery-search .button,
  .delivery-search button {
    min-height: 34px;
  }

  .store-selector,
  .category-rail {
    margin-top: 0.18rem;
    margin-bottom: 0.18rem;
  }

  .store-selector .category-chip,
  .category-rail .category-chip {
    min-height: 30px;
  }
}

/* Catalogo estilo portada con navegacion compacta */
body.page-catalogo {
  background: #f3f6f9;
}

body.page-catalogo .topbar {
  margin: 0 16px;
  border: 1px solid #d8e0ea;
  border-top: 0;
  border-radius: 0 0 8px 8px;
  background: #ffffff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
}

body.page-catalogo .topbar-inner {
  min-height: 68px;
  padding: 0 14px;
  display: grid;
  grid-template-columns: minmax(250px, 1fr) auto minmax(250px, 1fr);
  gap: 18px;
}

body.page-catalogo .brand {
  min-width: 0;
  justify-self: start;
}

body.page-catalogo .brand-mark {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  border: 1px solid #d8e0ea;
  background: #ffffff;
  box-shadow: none;
}

body.page-catalogo .brand-mark img {
  width: 34px;
  height: 34px;
  filter: none;
}

body.page-catalogo .brand-copy strong {
  color: #111827;
  font-size: 1.05rem;
  line-height: 1;
  letter-spacing: 0;
}

body.page-catalogo .brand-copy small {
  color: #64748b;
  font-size: 0.78rem;
}

body.page-catalogo .main-menu {
  justify-self: center;
  padding: 0;
  border: 1px solid #d8e0ea;
  border-radius: 8px;
  background: #f8fafc;
  box-shadow: none;
  overflow: hidden;
}

body.page-catalogo .main-menu a {
  min-height: 46px;
  padding: 0 15px;
  border-radius: 0;
  color: #475569;
  font-weight: 850;
  background: transparent;
}

body.page-catalogo .main-menu a:hover,
body.page-catalogo .main-menu a.active {
  color: #ffffff;
  background: #4f9f78;
  box-shadow: none;
}

body.page-catalogo .session-box {
  justify-self: end;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

body.page-catalogo .session-copy strong {
  color: #111827;
  font-size: 0.9rem;
  text-align: right;
}

body.page-catalogo .session-copy span {
  color: #64748b;
  font-size: 0.78rem;
}

body.page-catalogo .button.light[href*="login"],
body.page-catalogo .button.light[href*="registro"],
body.page-catalogo .session-action {
  min-height: 48px;
  padding: 0 18px;
  border-radius: 8px;
  border-color: #4f9f78;
  background: #4f9f78;
  color: #ffffff;
}

body.page-catalogo .content-layout {
  width: 100%;
  padding: 0 16px 5rem;
}

body.page-catalogo .shell {
  width: 100%;
}

body.page-catalogo .delivery-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 420px);
  gap: 28px;
  align-items: center;
  min-height: 386px !important;
  margin: 0 0 22px !important;
  padding: 30px 22px !important;
  border: 1px solid #d8e0ea;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: none;
}

body.page-catalogo .delivery-hero-copy {
  display: grid;
  align-content: center;
}

body.page-catalogo .delivery-hero h2 {
  max-width: 720px;
  margin: 0 0 18px !important;
  color: #111827;
  font-size: clamp(3rem, 5vw, 4.35rem);
  line-height: 1.05;
  font-weight: 950;
  letter-spacing: 0;
}

body.page-catalogo .delivery-hero p {
  max-width: 720px;
  margin: 0 0 30px !important;
  color: #475569;
  font-size: 0.98rem;
  line-height: 1.55;
}

body.page-catalogo .delivery-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 44%);
  max-width: 790px;
  min-height: 54px !important;
  border: 1px solid #cfd8e3;
  border-radius: 8px;
  background: #ffffff;
  overflow: hidden;
}

body.page-catalogo .delivery-search input {
  min-height: 54px !important;
  padding: 0 20px !important;
  border: 0;
  background: #ffffff;
}

body.page-catalogo .delivery-search button,
body.page-catalogo .delivery-search .button {
  min-height: 54px !important;
  border: 0;
  border-left: 1px solid #e5e7eb;
  border-radius: 0;
  background: #eeeeef;
  color: #111827;
  font-weight: 900;
}

body.page-catalogo .delivery-hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
  max-height: none !important;
}

body.page-catalogo .delivery-hero-visual img,
body.page-catalogo .catalog-store-logo {
  width: min(100%, 380px) !important;
  max-width: 380px !important;
  max-height: 320px !important;
  object-fit: contain;
}

body.page-catalogo .store-selector,
body.page-catalogo .category-rail {
  margin: 1mm 0 !important;
  padding: 0 !important;
  gap: 1mm !important;
}

body.page-catalogo .store-selector {
  margin-bottom: 1mm !important;
}

body.page-catalogo .store-selector + .category-rail {
  margin-top: 1mm !important;
}

/* Unificar catalogo con la interfaz general del sistema */
body.page-catalogo .topbar {
  margin: 0 !important;
  border: 0 !important;
  border-bottom: 1px solid rgba(32, 49, 39, 0.10) !important;
  border-radius: 0 !important;
  background: rgba(255, 255, 255, 0.9) !important;
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.08) !important;
}

body.page-catalogo .topbar-inner {
  display: flex !important;
  grid-template-columns: none !important;
  min-height: 62px !important;
  padding: 0 clamp(0.9rem, 2vw, 1.25rem) !important;
  gap: 0.75rem !important;
}

body.page-catalogo .brand {
  min-width: 0 !important;
  justify-self: auto !important;
}

body.page-catalogo .brand-mark {
  width: 40px !important;
  height: 40px !important;
  border-radius: 12px !important;
  border: 1px solid rgba(32, 49, 39, 0.10) !important;
  background: #ffffff !important;
  box-shadow: var(--shadow-sm) !important;
}

body.page-catalogo .brand-mark img {
  width: 28px !important;
  height: 28px !important;
  filter: none !important;
}

body.page-catalogo .brand-copy strong {
  color: var(--text) !important;
  font-size: 0.96rem !important;
}

body.page-catalogo .brand-copy small {
  color: var(--muted) !important;
  font-size: 0.74rem !important;
}

body.page-catalogo .main-menu {
  justify-self: auto !important;
  align-self: auto !important;
  align-items: center !important;
  gap: 0.35rem !important;
  padding: 0.22rem !important;
  border: 1px solid rgba(32, 49, 39, 0.10) !important;
  border-radius: 12px !important;
  background: rgba(255, 255, 255, 0.72) !important;
  box-shadow: var(--shadow-sm) !important;
  overflow: visible !important;
}

body.page-catalogo .main-menu a {
  min-height: 34px !important;
  padding: 0.48rem 0.72rem !important;
  border-radius: 8px !important;
  color: #365142 !important;
  background: transparent !important;
}

body.page-catalogo .main-menu a:hover,
body.page-catalogo .main-menu a.active {
  color: #ffffff !important;
  background: linear-gradient(135deg, var(--primary-strong), #2e9870) !important;
  box-shadow: 0 10px 22px rgba(46, 152, 112, 0.18) !important;
}

body.page-catalogo .session-box {
  display: flex !important;
  justify-self: auto !important;
  margin-left: auto !important;
  padding: 0.22rem !important;
  border: 1px solid rgba(32, 49, 39, 0.10) !important;
  border-radius: 12px !important;
  background: rgba(255, 255, 255, 0.72) !important;
  box-shadow: var(--shadow-sm) !important;
}

body.page-catalogo .session-copy strong {
  color: var(--text) !important;
  font-size: 0.82rem !important;
}

body.page-catalogo .session-copy span {
  color: var(--muted) !important;
  font-size: 0.72rem !important;
}

body.page-catalogo .button.light[href*="login"],
body.page-catalogo .button.light[href*="registro"],
body.page-catalogo .session-action {
  min-height: 36px !important;
  padding: 0.52rem 0.78rem !important;
  border-color: #b42335 !important;
  border-radius: 8px !important;
  background: #b42335 !important;
  color: #ffffff !important;
}

body.page-catalogo .content-layout {
  width: min(100%, 1440px) !important;
  padding: 1rem clamp(0.9rem, 2vw, 1.25rem) 5rem !important;
}

body.page-catalogo .delivery-hero {
  min-height: auto !important;
  margin: 0 0 1mm !important;
  padding: 0.95rem !important;
  border: 1px solid rgba(32, 49, 39, 0.10) !important;
  border-radius: 12px !important;
  background: rgba(255, 255, 255, 0.9) !important;
  box-shadow: var(--shadow-md) !important;
}

@media (max-width: 900px) {
  body.page-catalogo .main-menu,
  body.page-catalogo .session-box {
    display: none !important;
  }
}

body.page-catalogo .category-chip {
  min-height: 40px;
  padding: 0 13px;
  border-radius: 8px;
  border-color: #c9d7e3;
  background: #edf8fb;
  color: #0f4a60;
  font-weight: 900;
}

body.page-catalogo .category-chip.active,
body.page-catalogo .category-chip:hover {
  color: #ffffff;
  border-color: #4f9f78;
  background: #4f9f78;
}

body.page-catalogo .product-grid {
  margin-top: 1mm !important;
  gap: 1mm !important;
}

body.page-catalogo .delivery-hero {
  margin-bottom: 1mm !important;
}

body.page-catalogo .catalog-toolbar {
  margin-bottom: 1mm !important;
  padding-top: 1mm !important;
  padding-bottom: 1mm !important;
}

body.page-catalogo .category-chip {
  margin: 0 !important;
}

@media (max-width: 900px) {
  body.page-catalogo .topbar {
    margin: 0;
    border-radius: 0;
  }

  body.page-catalogo .topbar-inner {
    display: flex;
    min-height: 58px;
  }

  body.page-catalogo .main-menu,
  body.page-catalogo .session-box {
    display: none;
  }

  body.page-catalogo .content-layout {
    padding: 0 10px 4.5rem;
  }

  body.page-catalogo .delivery-hero {
    grid-template-columns: 1fr;
    min-height: 0 !important;
    margin-bottom: 12px !important;
    padding: 16px !important;
  }

  body.page-catalogo .delivery-hero h2 {
    font-size: clamp(1.65rem, 8vw, 2.45rem);
    margin-bottom: 10px !important;
  }

  body.page-catalogo .delivery-hero p {
    margin-bottom: 14px !important;
    font-size: 0.86rem;
  }

  body.page-catalogo .delivery-search {
    grid-template-columns: 1fr 105px;
    min-height: 40px !important;
  }

  body.page-catalogo .delivery-search input,
  body.page-catalogo .delivery-search button,
  body.page-catalogo .delivery-search .button {
    min-height: 40px !important;
  }

  body.page-catalogo .delivery-hero-visual {
    display: none;
  }

  body.page-catalogo .store-selector {
    margin-bottom: 1mm !important;
  }
}

/* Mostrar ingresar en responsive para visitantes */
@media (max-width: 900px) {
  body[data-role="visitante"] .topbar-inner {
    display: flex !important;
    align-items: center !important;
  }

  body[data-role="visitante"] .session-box {
    display: flex !important;
    margin-left: auto !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  body[data-role="visitante"] .session-copy,
  body[data-role="visitante"] .session-box .install-app-action {
    display: none !important;
  }

  body[data-role="visitante"] .session-box a[href*="login"] {
    display: inline-flex !important;
    min-height: 34px !important;
    padding: 0.42rem 0.72rem !important;
    border-radius: 9px !important;
    color: #ffffff !important;
    border-color: var(--ui-primary) !important;
    background: var(--ui-primary) !important;
    font-size: 0.78rem !important;
    font-weight: 900 !important;
  }

  body.page-login .session-box {
    display: none !important;
  }
}

/* Mejora visual del buscador del catalogo */
body.page-catalogo .delivery-hero {
  border-color: rgba(17, 24, 39, 0.08) !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 0.94)),
    #ffffff !important;
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.10) !important;
}

body.page-catalogo .delivery-hero h2 {
  color: #0f172a !important;
  text-wrap: balance;
}

body.page-catalogo .delivery-hero p {
  color: #475569 !important;
}

body.page-catalogo .delivery-search {
  grid-template-columns: minmax(0, 1fr) auto !important;
  align-items: stretch;
  max-width: 620px !important;
  min-height: 46px !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 8px !important;
  background: #ffffff !important;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.06) !important;
}

body.page-catalogo .delivery-search:focus-within {
  border-color: #2e9870 !important;
  box-shadow: 0 0 0 3px rgba(46, 152, 112, 0.14), 0 10px 22px rgba(15, 23, 42, 0.08) !important;
}

body.page-catalogo .delivery-search input {
  min-width: 0;
  min-height: 46px !important;
  padding: 0 14px 0 16px !important;
  color: #0f172a !important;
  background: #ffffff !important;
  font-size: 0.95rem;
  font-weight: 650;
}

body.page-catalogo .delivery-search input::placeholder {
  color: #94a3b8 !important;
  opacity: 1;
  font-weight: 600;
}

body.page-catalogo .delivery-search button,
body.page-catalogo .delivery-search .button {
  min-width: 96px;
  min-height: 46px !important;
  padding: 0 18px !important;
  border: 0 !important;
  border-left: 1px solid rgba(255, 255, 255, 0.18) !important;
  border-radius: 0 !important;
  color: #ffffff !important;
  background: #2e9870 !important;
  font-size: 0.9rem;
  font-weight: 850;
}

body.page-catalogo .delivery-search button:hover,
body.page-catalogo .delivery-search .button:hover {
  background: #217756 !important;
}

@media (max-width: 760px) {
  body.page-catalogo .delivery-hero {
    padding: 16px !important;
    border-radius: 8px !important;
  }

  body.page-catalogo .delivery-hero h2 {
    margin-bottom: 12px !important;
    font-size: clamp(1.2rem, 5vw, 1.55rem) !important;
    line-height: 1.18 !important;
  }

  body.page-catalogo .delivery-hero p {
    margin-bottom: 18px !important;
    font-size: 0.9rem !important;
    line-height: 1.45 !important;
  }

  body.page-catalogo .delivery-search {
    grid-template-columns: minmax(0, 1fr) 88px !important;
    max-width: none !important;
    min-height: 42px !important;
  }

  body.page-catalogo .delivery-search input,
  body.page-catalogo .delivery-search button,
  body.page-catalogo .delivery-search .button {
    min-height: 42px !important;
  }

  body.page-catalogo .delivery-search input {
    padding-inline: 12px !important;
    font-size: 0.86rem;
  }

  body.page-catalogo .delivery-search button,
  body.page-catalogo .delivery-search .button {
    min-width: 88px;
    padding-inline: 10px !important;
    font-size: 0.82rem;
  }
}

/* Identidad de color segun logo: azul y naranja */
:root {
  --ui-bg: #f3f7fb;
  --ui-bg-2: #f8fbff;
  --ui-surface: #ffffff;
  --ui-surface-soft: #f4f8fc;
  --ui-text: #112033;
  --ui-muted: #607086;
  --ui-line: #d7e1ec;
  --ui-primary: #0f4c81;
  --ui-primary-dark: #0a3156;
  --ui-primary-soft: #e8f2fb;
  --ui-accent: #f97316;
  --ui-accent-dark: #d85f08;
  --ui-accent-soft: #fff3e8;
  --primary: #0f4c81;
  --primary-strong: #0a3156;
  --primary-soft: #e8f2fb;
  --secondary: #f97316;
  --success: #0f4c81;
  --warning: #f97316;
}

body {
  background:
    radial-gradient(circle at 12% 10%, rgba(249, 115, 22, 0.12), transparent 24rem),
    linear-gradient(180deg, rgba(15, 76, 129, 0.10), transparent 260px),
    var(--ui-bg) !important;
}

.main-menu a:hover,
.main-menu a.active,
body.page-catalogo .main-menu a:hover,
body.page-catalogo .main-menu a.active,
.category-chip.active,
.category-chip:hover,
body.page-catalogo .category-chip.active,
body.page-catalogo .category-chip:hover,
body.page-pedidos .orders-tabs a.active,
body.page-pedidos .orders-tabs a:hover {
  color: #ffffff !important;
  border-color: var(--ui-primary) !important;
  background: var(--ui-primary) !important;
}

.button.primary,
button.button.primary,
.product-card .button,
.product-footer .button,
body.page-pedidos .inline-form .button[type="submit"],
body.page-pedidos .courier-actions .button.primary,
body.page-pedidos .courier-actions button.button.primary,
body[data-role="visitante"] .session-box a[href*="login"] {
  color: #ffffff !important;
  border-color: var(--ui-accent) !important;
  background: var(--ui-accent) !important;
}

.button.primary:hover,
button.button.primary:hover,
.product-card .button:hover,
.product-footer .button:hover {
  border-color: var(--ui-accent-dark) !important;
  background: var(--ui-accent-dark) !important;
}

.button.secondary,
.button.light,
button.button.secondary,
button.button.light {
  color: var(--ui-primary-dark) !important;
  border-color: var(--ui-line) !important;
  background: #ffffff !important;
}

.summary-kicker,
.product-category {
  color: var(--ui-primary-dark) !important;
  border-color: rgba(15, 76, 129, 0.18) !important;
  background: var(--ui-primary-soft) !important;
}

.brand-mark,
.brand-mark.small,
.login-image {
  border-color: rgba(15, 76, 129, 0.20) !important;
}

.form-card input:focus,
.form-card select:focus,
.form-card textarea:focus,
.short-input:focus,
.inline-form select:focus {
  border-color: var(--ui-primary) !important;
  box-shadow: 0 0 0 3px rgba(15, 76, 129, 0.14) !important;
}

.bottom-nav .tab-item.active {
  color: var(--ui-primary) !important;
  background: var(--ui-primary-soft) !important;
}

.status-pendiente {
  color: #b45309 !important;
  background: #fff7ed !important;
  border-color: #fed7aa !important;
}

.status-preparando,
.status-listo-para-retirar {
  color: var(--ui-primary-dark) !important;
  background: var(--ui-primary-soft) !important;
  border-color: #bfd5ea !important;
}

.status-en-camino {
  color: #c2410c !important;
  background: var(--ui-accent-soft) !important;
  border-color: #fed7aa !important;
}

.cancel-meta {
  display: block;
  margin-top: 0.35rem;
  color: var(--ui-muted);
  font-size: 0.74rem;
  line-height: 1.25;
}

.cancel-meta.warning {
  color: #b45309;
  font-weight: 900;
}

.cancel-reason-input {
  min-width: 170px;
  min-height: 34px;
  padding: 0.42rem 0.65rem;
  border: 1px solid var(--ui-line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ui-text);
  font: inherit;
  font-size: 0.78rem;
}

.return-products-check {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 34px;
  padding: 0.36rem 0.55rem;
  border: 1px solid var(--ui-line);
  border-radius: 8px;
  background: var(--ui-surface-soft);
  color: var(--ui-primary-dark);
  font-size: 0.76rem;
  font-weight: 800;
}

.return-products-check input {
  width: 0.95rem;
  height: 0.95rem;
  accent-color: var(--ui-primary);
}

.crud-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.crud-toolbar-actions,
.crud-search {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
}

.crud-search {
  margin-left: auto;
}

.crud-search input {
  width: min(42vw, 320px);
  min-height: 38px;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--ui-line);
  border-radius: 9px;
  background: #ffffff;
  color: var(--ui-text);
  font: inherit;
  font-size: 0.88rem;
}

.product-expired-row td {
  background: #fff1f2 !important;
}

.product-low-stock-row td {
  background: #fff7ed !important;
}

.product-expired-row.product-low-stock-row td {
  background: linear-gradient(90deg, #fff1f2, #fff7ed) !important;
}

.inventory-chip {
  display: inline-flex;
  align-items: center;
  min-height: 1.45rem;
  margin-left: 0.35rem;
  padding: 0.18rem 0.45rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 950;
  line-height: 1;
  white-space: nowrap;
}

.inventory-chip.expired {
  color: #9f1239;
  border-color: #fecdd3;
  background: #ffe4e6;
}

.inventory-chip.stock-low {
  color: #9a3412;
  border-color: #fed7aa;
  background: #ffedd5;
}

.promo-badge {
  position: absolute;
  top: 0.65rem;
  left: 0.65rem;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  min-height: 1.65rem;
  padding: 0.22rem 0.58rem;
  border-radius: 999px;
  color: #ffffff;
  background: var(--ui-accent);
  box-shadow: 0 10px 22px rgba(249, 115, 22, 0.26);
  font-size: 0.72rem;
  font-weight: 950;
}

.product-media {
  position: relative;
}

.promo-chip {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  margin-top: 0.35rem;
  padding: 0.22rem 0.52rem;
  border: 1px solid #fed7aa;
  border-radius: 999px;
  color: #9a3412;
  background: #fff7ed;
  font-size: 0.72rem;
  font-weight: 900;
}

.promo-price-wrap {
  display: grid;
  gap: 0.1rem;
  line-height: 1;
}

.promo-price-wrap del {
  color: var(--ui-muted);
  font-size: 0.78rem;
  font-weight: 800;
}

@media (max-width: 760px) {
  .crud-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .crud-search,
  .crud-toolbar-actions {
    width: 100%;
  }

  .crud-search {
    margin-left: 0;
  }

  .crud-search input {
    flex: 1 1 170px;
    width: auto;
  }
}

/* Panel de pedidos recientes en Mi Tienda */
.store-dashboard-grid--single {
  grid-template-columns: minmax(0, 1fr) !important;
}

.store-recent-orders-panel {
  display: grid !important;
  grid-template-columns: minmax(150px, 190px) minmax(0, 1fr);
  gap: 0 !important;
  align-items: stretch;
  padding: 0 !important;
  overflow: hidden;
  border: 1px solid var(--ui-line) !important;
  border-radius: 12px !important;
  background: #ffffff !important;
  box-shadow: 0 14px 34px rgba(15, 76, 129, 0.08) !important;
}

.store-recent-orders-head {
  display: flex !important;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 0.85rem !important;
  margin: 0 !important;
  padding: 1rem 1rem 1rem 1.1rem;
  border-right: 1px solid var(--ui-line);
  background: linear-gradient(180deg, #ffffff, var(--ui-surface-soft));
}

.store-recent-orders-head h2 {
  max-width: 8rem;
  margin: 0 !important;
  color: var(--ui-text);
  font-size: 1.55rem !important;
  line-height: 1.05;
  letter-spacing: 0 !important;
}

.store-recent-orders-head p {
  max-width: 8rem;
  margin: 0 !important;
  color: var(--ui-muted);
  font-size: 0.86rem;
  line-height: 1.35;
}

.store-recent-orders-head .button {
  min-height: 34px !important;
  padding: 0.42rem 0.72rem !important;
  border-color: var(--ui-line) !important;
  color: var(--ui-primary-dark) !important;
  background: #ffffff !important;
}

.store-recent-orders-panel .table-box {
  min-width: 0;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  overflow-x: auto;
}

.store-recent-orders-table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
}

.store-recent-orders-table th,
.store-recent-orders-table td {
  padding: 0.82rem 0.9rem !important;
  white-space: nowrap;
}

.store-recent-orders-table thead th {
  color: #31445d !important;
  background: #f4f8fc !important;
  font-size: 0.75rem !important;
}

.store-recent-orders-table tbody td {
  color: #08324f;
  font-size: 0.88rem;
}

.store-recent-orders-table tbody tr.order-state-entregado td:first-child {
  border-left-color: var(--ui-primary) !important;
}

@media (max-width: 760px) {
  .store-recent-orders-panel {
    grid-template-columns: 1fr;
  }

  .store-recent-orders-head {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem;
    border-right: 0;
    border-bottom: 1px solid var(--ui-line);
  }

  .store-recent-orders-head h2,
  .store-recent-orders-head p {
    max-width: none;
  }

  .store-recent-orders-head h2 {
    font-size: 1.15rem !important;
  }

  .store-recent-orders-head p {
    display: none;
  }

  .store-recent-orders-table {
    min-width: 520px;
  }
}

/* Modales mas contenidos en escritorio */
@media (min-width: 761px) {
  .modal {
    padding: clamp(1.25rem, 3vw, 2.5rem) !important;
  }

  .modal-content,
  .modal-large {
    width: min(100%, 960px) !important;
    max-width: calc(100vw - clamp(2.5rem, 6vw, 5rem)) !important;
    max-height: calc(100vh - clamp(2.5rem, 6vw, 5rem)) !important;
    border-radius: 12px !important;
    overflow: hidden !important;
  }

  .modal-header {
    padding: 0.95rem 1.15rem 0.8rem !important;
  }

  .modal-content .form-card {
    max-height: calc(100vh - clamp(7rem, 12vw, 9rem)) !important;
    overflow-y: auto !important;
    padding: 1rem 1.15rem 1.1rem !important;
  }
}

@media (min-width: 1200px) {
  .modal-content,
  .modal-large {
    width: min(76vw, 1040px) !important;
  }
}
