/* ============================================================
 * MKT Cotizador POS – CSS Unificado
 * Colores vibrantes, diseño elegante y profesional
 * ============================================================ */

:root {
  --mktpos-brand: #0b6e66;
  --mktpos-brand-rgb: 21 26 48;
  --mktpos-brand-weak: rgba(11, 110, 102,.14);
  --mktpos-brand-soft: rgba(11, 110, 102,.08);
  --mktpos-brand-border: rgba(11, 110, 102,.18);
  --mktpos-brand-bright: #0b6e66;

  --mktpos-bg: #f7efe2;
  --mktpos-card: #ffffff;
  --mktpos-text: #1a1a2e;
  --mktpos-text-secondary: #555;
  --mktpos-text-muted: #888;
  --mktpos-border: #e7ddd1;
  --mktpos-radius: 18px;
  --mktpos-radius-sm: 8px;
  --mktpos-shadow: 0 12px 30px rgba(44, 28, 18, .08);
  --mktpos-shadow-lg: 0 18px 46px rgba(44, 28, 18, .12);

  /* Vibrant colors */
  --mktpos-success: #16925c;
  --mktpos-success-bg: #ddf8e9;
  --mktpos-danger: #cf4343;
  --mktpos-danger-bg: #fde8e7;
  --mktpos-warning: #c2410c;
  --mktpos-warning-bg: #fff0e6;
  --mktpos-info: #0b6e66;
  --mktpos-info-bg: #f1f2f7;
  --mktpos-purple: #8b43c5;
  --mktpos-purple-bg: #f3e8ff;
  --mktpos-emerald: #1cb38a;
  --mktpos-emerald-bg: #e4fbf4;

  /* Collapsible sidebar dimensions */
  --sb-w:   222px;  /* expanded width — ancho para que los labels no se corten */
  --sb-w-c:  62px;  /* collapsed width */
}

/* ============================================================
 * Reset & Base
 * ============================================================ */
/* A-CSS-1: solo aplicar fondo del plugin en las páginas del POS para no pisar el tema. */
body.mktpos-active,
body:has(.mktpos-wrap) {
  margin: 0;
  padding: 0;
  background:
    radial-gradient(circle at top left, rgba(11, 110, 102,.14), transparent 26%),
    radial-gradient(circle at top right, rgba(11, 110, 102,.14), transparent 28%),
    linear-gradient(180deg, #fbf2e6 0%, var(--mktpos-bg) 100%);
}

.mktpos-wrap {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color: var(--mktpos-text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  background: transparent;
}
.mktpos-wrap *, .mktpos-wrap *::before, .mktpos-wrap *::after {
  box-sizing: border-box;
}
.mktpos-wrap h1, .mktpos-wrap h2, .mktpos-wrap h3, .mktpos-wrap h4 {
  margin: 0;
  font-weight: 700;
}
.mktpos-wrap p { margin: 0; }
.mktpos-wrap a { color: var(--mktpos-brand); text-decoration: none; }
.mktpos-wrap a:hover { text-decoration: underline; }
.mktpos-hidden { display: none !important; }

/* Sidebar-aware layout: pad content when sidebar is present */
.mktpos-wrap:has(.mktpos-sidebar) {
  padding-left: var(--sb-w);
  transition: padding-left .22s ease;
}
body.mktpos-sb-collapsed .mktpos-wrap:has(.mktpos-sidebar) {
  padding-left: var(--sb-w-c);
}
@media (max-width: 768px) {
  .mktpos-wrap:has(.mktpos-sidebar) {
    padding-left: 0 !important;
  }
  /* Space for fixed hamburger button on mobile */
  .mktpos-wrap:has(.mktpos-sidebar) .mktpos-content {
    padding-top: 56px;
  }
}

/* ============================================================
 * NAVBAR — redesigned (UX/UI v2)
 * ============================================================ */
.mktpos-navbar {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 0 20px;
  height: 58px;
  background: #111827;            /* deep navy-black */
  border-bottom: 1px solid rgba(255,255,255,.07);
  border-radius: var(--mktpos-radius) var(--mktpos-radius) 0 0;
  margin-bottom: 0;
  box-shadow: 0 2px 12px rgba(0,0,0,.25);
  position: sticky;
  top: 0;
  z-index: 200;
}

/* ① Brand */
.mktpos-navbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  margin-right: 8px;
}
.mktpos-nav-logo {
  height: 32px;
  width: auto;
  border-radius: 5px;
  object-fit: contain;
}
.mktpos-nav-title {
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .3px;
  white-space: nowrap;
}

/* Thin separator between brand and links */
.mktpos-navbar-brand::after {
  content: '';
  display: block;
  width: 1px;
  height: 22px;
  background: rgba(255,255,255,.12);
  margin-left: 14px;
}

/* ② Nav links */
.mktpos-navbar-links {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1;
  min-width: 0;
}
.mktpos-nav-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 13px;
  border-radius: 7px;
  color: rgba(255,255,255,.6) !important;
  font-size: 13.5px;
  font-weight: 500;
  text-decoration: none !important;
  transition: background .15s, color .15s;
  white-space: nowrap;
}
.mktpos-nav-link:hover {
  color: #fff !important;
  background: rgba(255,255,255,.09);
  text-decoration: none !important;
}
.mktpos-nav-active {
  color: #fff !important;
  background: rgba(255,255,255,.13) !important;
  font-weight: 600;
}
.mktpos-nav-icon {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  opacity: .85;
}
.mktpos-nav-active .mktpos-nav-icon {
  opacity: 1;
}

/* ③ Right actions area */
.mktpos-navbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  margin-left: auto;
  padding-left: 12px;
}

/* CTA pill — Nueva cotización */
.mktpos-nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 15px;
  background: linear-gradient(135deg, #0b6e66 0%, #ea580c 100%);
  color: #fff !important;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none !important;
  transition: filter .15s, transform .15s;
  white-space: nowrap;
}
.mktpos-nav-cta:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
  text-decoration: none !important;
}
.mktpos-nav-cta-active {
  filter: brightness(1.15);
  box-shadow: 0 0 0 2px rgba(247,159,100,.5);
}

/* User avatar button */
.mktpos-nav-user {
  position: relative;
}
.mktpos-nav-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0b8076, #0b8076);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  border: 2px solid rgba(255,255,255,.2);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color .2s, transform .15s;
  letter-spacing: .5px;
}
.mktpos-nav-avatar:hover {
  border-color: rgba(255,255,255,.55);
  transform: scale(1.06);
}
.mktpos-nav-avatar[aria-expanded="true"] {
  border-color: #8fd9cf;
}

/* Dropdown panel */
.mktpos-nav-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 240px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,.18), 0 1px 4px rgba(0,0,0,.08);
  border: 1px solid rgba(0,0,0,.07);
  z-index: 400;
  overflow: hidden;
  opacity: 0;
  transform: translateY(-6px) scale(.97);
  transition: opacity .18s, transform .18s;
  pointer-events: none;
}
.mktpos-nav-dropdown.mktpos-dropdown-open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
.mktpos-dropdown-header {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 14px 16px;
  background: linear-gradient(135deg, #f8f9ff, #ede9ff);
}
.mktpos-dropdown-avatar-lg {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0b8076, #0b8076);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  letter-spacing: .5px;
}
.mktpos-dropdown-info {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}
.mktpos-dropdown-info strong {
  font-size: 13.5px;
  font-weight: 700;
  color: #111827;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mktpos-dropdown-role {
  font-size: 11px;
  color: #0b8076;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .4px;
}
.mktpos-dropdown-email {
  font-size: 11px;
  color: #6b7280;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mktpos-dropdown-divider {
  height: 1px;
  background: #f3f4f6;
}
.mktpos-dropdown-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 11px 16px;
  font-size: 13.5px;
  color: #374151 !important;
  text-decoration: none !important;
  transition: background .12s;
}
.mktpos-dropdown-item:hover {
  background: #f9fafb;
  text-decoration: none !important;
}
.mktpos-dropdown-logout {
  color: #dc2626 !important;
}
.mktpos-dropdown-logout:hover {
  background: #fef2f2 !important;
}

/* Hamburger button (hidden on desktop) */
.mktpos-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 34px;
  height: 34px;
  background: rgba(255,255,255,.08);
  border: none;
  border-radius: 7px;
  cursor: pointer;
  padding: 0;
  transition: background .15s;
}
.mktpos-hamburger:hover { background: rgba(255,255,255,.14); }
.mktpos-hamburger span {
  display: block;
  width: 18px;
  height: 2px;
  background: rgba(255,255,255,.85);
  border-radius: 2px;
  transition: transform .22s, opacity .22s;
  transform-origin: center;
}
/* Animated X when open */
.mktpos-hamburger.mktpos-nav-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.mktpos-hamburger.mktpos-nav-open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.mktpos-hamburger.mktpos-nav-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============================================================
 * COLLAPSIBLE SIDEBAR
 * ============================================================ */
.mktpos-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--sb-w);
  background:
    linear-gradient(180deg, rgba(11, 28, 40, 0.99), rgba(15, 34, 48, 0.95)),
    linear-gradient(180deg, rgba(11, 110, 102,.14), transparent 34%);
  display: flex;
  flex-direction: column;
  z-index: 300;
  /* overflow: hidden intentionally omitted so dropdown menus can escape the sidebar */
  transition: width .22s ease;
  box-shadow: 10px 0 30px rgba(16, 23, 34, .16);
}
.mktpos-sidebar.mktpos-sb-collapsed {
  width: var(--sb-w-c);
}

/* ── Brand section ── */
.mktpos-sb-brand {
  padding: 18px 14px 14px;
  border-bottom: 1px solid rgba(255,255,255,.07);
  flex-shrink: 0;
  min-height: 62px;
  display: flex;
  align-items: center;
}
.mktpos-sb-brand-static,
.mktpos-sb-brand-picker {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  width: 100%;
}
.mktpos-sb-logo {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  object-fit: contain;
  flex-shrink: 0;
}
.mktpos-sb-logo-placeholder {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--mktpos-warning, #c2410c), #ffb56d);
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.mktpos-sb-brand-name {
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  flex: 1;
  transition: opacity .18s, max-width .22s;
  max-width: 160px;
}
.mktpos-sidebar.mktpos-sb-collapsed .mktpos-sb-brand-name {
  opacity: 0;
  max-width: 0;
}

/* Brand picker button */
.mktpos-sb-brand-picker { position: relative; }
.mktpos-sb-brand-btn {
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0;
  min-width: 0;
  flex: 1;
}
.mktpos-sb-brand-caret {
  flex-shrink: 0;
  opacity: .6;
  transition: transform .2s, opacity .18s;
}
.mktpos-sidebar.mktpos-sb-collapsed .mktpos-sb-brand-caret { opacity: 0; }
.mktpos-sb-brand-btn[aria-expanded="true"] .mktpos-sb-brand-caret { transform: rotate(180deg); }

/* Brand picker dropdown — opens to the right */
.mktpos-sb-brand-picker .mktpos-brand-picker-dropdown {
  position: absolute;
  top: 0;
  left: calc(100% + 10px);
  min-width: 200px;
}
.mktpos-sidebar.mktpos-sb-collapsed .mktpos-sb-brand-picker .mktpos-brand-picker-dropdown {
  left: calc(var(--sb-w-c) - 12px + 10px);
}

/* ── Navigation links ── */
.mktpos-sb-nav {
  flex: 1;
  padding: 12px 10px;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
}
.mktpos-sb-nav::-webkit-scrollbar { display: none; }

.mktpos-sb-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border-radius: 14px;
  color: rgba(255,255,255,.6) !important;
  text-decoration: none !important;
  font-size: 12.5px;
  font-weight: 500;
  white-space: nowrap;
  transition: background .15s, color .15s, transform .15s, border-color .15s;
  margin-bottom: 4px;
  border: 1px solid transparent;
}
.mktpos-sb-link:hover {
  background: rgba(255,255,255,.07);
  color: #fff !important;
  text-decoration: none !important;
  transform: translateX(2px);
}
.mktpos-sb-active {
  background: linear-gradient(135deg, rgba(11, 110, 102,.24), rgba(11, 110, 102,.18)) !important;
  color: #fff !important;
  font-weight: 600;
  border-color: rgba(255,255,255,.08);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06);
}
.mktpos-sb-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 22px;
  opacity: .8;
}
.mktpos-sb-active .mktpos-sb-icon,
.mktpos-sb-link:hover .mktpos-sb-icon { opacity: 1; }

.mktpos-sb-label {
  overflow: hidden;
  white-space: nowrap;
  transition: opacity .18s, max-width .22s;
  max-width: 200px;
}
.mktpos-sidebar.mktpos-sb-collapsed .mktpos-sb-label {
  opacity: 0;
  max-width: 0;
}

/* ── Nueva cotización CTA ── */
.mktpos-sb-cta-wrap {
  padding: 8px 10px 10px;
  border-top: 1px solid rgba(255,255,255,.07);
  flex-shrink: 0;
}
.mktpos-sb-cta {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  background: linear-gradient(135deg, #0b6e66 0%, #0d8f84 100%);
  color: #fff !important;
  border-radius: 14px;
  font-size: 12.5px;
  font-weight: 600;
  text-decoration: none !important;
  transition: filter .15s, transform .15s, box-shadow .15s;
  overflow: hidden;
  box-shadow: 0 12px 24px rgba(11, 110, 102,.24);
}
.mktpos-sb-cta:hover { filter: brightness(1.05); transform: translateY(-1px); text-decoration: none !important; }

/* ── Footer: user + toggle ── */
.mktpos-sb-footer {
  padding: 8px 8px;
  border-top: 1px solid rgba(255,255,255,.07);
  flex-shrink: 0;
}

/* User section */
.mktpos-sb-user { position: relative; margin-bottom: 4px; }
.mktpos-sb-avatar-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 9px 10px;
  border-radius: 14px;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 9px;
  transition: background .15s;
  text-align: left;
}
.mktpos-sb-avatar-btn:hover { background: rgba(255,255,255,.08); }
.mktpos-sb-avatar {
  width: 30px;
  height: 30px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--mktpos-brand-bright), var(--mktpos-brand));
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  letter-spacing: .5px;
}
.mktpos-sb-user-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  transition: opacity .18s, max-width .22s;
  max-width: 160px;
}
.mktpos-sidebar.mktpos-sb-collapsed .mktpos-sb-user-info {
  opacity: 0;
  max-width: 0;
}
.mktpos-sb-user-name {
  color: #fff;
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mktpos-sb-user-role {
  color: rgba(255,255,255,.45);
  font-size: 10.5px;
  white-space: nowrap;
}

/* User dropdown — opens to the right */
.mktpos-sb-user-dropdown {
  position: absolute;
  bottom: 0;
  left: calc(100% + 8px);
  width: 240px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,.18), 0 1px 4px rgba(0,0,0,.08);
  border: 1px solid rgba(0,0,0,.07);
  z-index: 500;
  overflow: hidden;
  opacity: 0;
  transform: translateX(-6px) scale(.97);
  transition: opacity .18s, transform .18s;
  pointer-events: none;
}
.mktpos-sb-user-dropdown.mktpos-dropdown-open {
  opacity: 1;
  transform: translateX(0) scale(1);
  pointer-events: auto;
}
.mktpos-sidebar.mktpos-sb-collapsed .mktpos-sb-user-dropdown {
  left: calc(var(--sb-w-c) - 8px + 8px);
}

/* Collapse toggle button */
.mktpos-sb-toggle {
  width: 100%;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  color: rgba(255,255,255,.3);
  transition: background .15s, color .15s;
  margin-top: 2px;
}
.mktpos-sb-toggle:hover {
  background: rgba(255,255,255,.07);
  color: rgba(255,255,255,.65);
}
.mktpos-sb-toggle-icon { transition: transform .22s ease; }
.mktpos-sidebar.mktpos-sb-collapsed .mktpos-sb-toggle-icon {
  transform: rotate(180deg);
}
.mktpos-sidebar.mktpos-sb-collapsed .mktpos-sb-toggle {
  justify-content: center;
}

/* ── Mobile overlay ── */
.mktpos-sb-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 290;
}
.mktpos-sb-overlay.mktpos-sb-open { display: block; }

/* ── Mobile hamburger ── */
.mktpos-sb-hamburger {
  display: none;
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 350;
  width: 38px;
  height: 38px;
  background: #111827;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  box-shadow: 0 2px 10px rgba(0,0,0,.3);
  padding: 0;
}
.mktpos-sb-hamburger span {
  display: block;
  width: 18px;
  height: 2px;
  background: rgba(255,255,255,.85);
  border-radius: 2px;
  transition: transform .22s, opacity .22s;
  transform-origin: center;
}
.mktpos-sb-hamburger.mktpos-sb-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.mktpos-sb-hamburger.mktpos-sb-open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.mktpos-sb-hamburger.mktpos-sb-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Mobile responsive ── */
@media (max-width: 768px) {
  .mktpos-sb-hamburger { display: flex; }
  .mktpos-sb-toggle    { display: none; }

  .mktpos-sidebar {
    width: var(--sb-w) !important;
    transform: translateX(-100%);
    transition: transform .25s ease;
  }
  .mktpos-sidebar.mktpos-sb-mobile-open {
    transform: translateX(0);
  }
}

/* ============================================================
 * APP FOOTER
 * ============================================================ */
.mktpos-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 24px;
  margin-top: 32px;
  border-top: 1px solid var(--mktpos-border);
  font-size: 12px;
  color: #9ca3af;
}
.mktpos-footer-brand {
  font-weight: 600;
  color: #6b7280;
}
.mktpos-footer-sep {
  color: #d1d5db;
}

/* Content area */
.mktpos-content {
  padding: 32px 40px 48px;
  max-width: 1400px;
  margin: 0 auto;
}
/* Pantallas medianas: menos aire lateral para no comer ancho útil. */
@media (max-width: 1200px) {
  .mktpos-content {
    padding: 24px 24px 36px;
  }
}

/* ============================================================
 * BUTTONS
 * ============================================================ */
.mktpos-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 20px;
  border: none;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s;
  text-decoration: none !important;
  white-space: nowrap;
  line-height: 1.4;
}
.mktpos-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,0,0,.15); }
.mktpos-btn:active { transform: translateY(0); }
.mktpos-btn:disabled { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }

.mktpos-btn-primary { background: linear-gradient(135deg, #0b6e66 0%, #ea580c 100%); color: #fff !important; border: none; }
.mktpos-btn-primary { background: linear-gradient(135deg, #0b6e66 0%, #0d8f84 100%); color: #fff !important; border: none; box-shadow: 0 12px 24px rgba(11, 110, 102,.18); }
.mktpos-btn-primary:hover { background: linear-gradient(135deg, #df5719 0%, #ffb156 100%); color: #fff !important; }

.mktpos-btn-success { background: var(--mktpos-success); color: #fff !important; }
.mktpos-btn-success:hover { background: #1b4332; color: #fff !important; }

.mktpos-btn-danger { background: var(--mktpos-danger); color: #fff !important; }
.mktpos-btn-danger:hover { background: #c1121f; color: #fff !important; }

.mktpos-btn-warning { background: var(--mktpos-warning); color: #fff !important; }
.mktpos-btn-warning:hover { background: #0b6e66; color: #fff !important; }

.mktpos-btn-ghost {
  background: transparent;
  color: var(--mktpos-text) !important;
  border: 1.5px solid rgba(31,41,55,.10);
}
.mktpos-btn-ghost:hover { background: rgba(255,255,255,.85); }

.mktpos-btn-full { width: 100%; }

.mktpos-btn-sm {
  padding: 6px 12px;
  font-size: 12px;
  border-radius: 6px;
}

/* ============================================================
 * INPUTS
 * ============================================================ */
.mktpos-input {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--mktpos-border);
  border-radius: var(--mktpos-radius-sm);
  font-size: 14px;
  color: var(--mktpos-text);
  background: #fff;
  transition: border-color .2s, box-shadow .2s;
  outline: none;
  font-family: inherit;
}
.mktpos-input:focus {
  border-color: var(--mktpos-brand);
  box-shadow: 0 0 0 3px var(--mktpos-brand-weak);
}
select.mktpos-input { cursor: pointer; }
textarea.mktpos-input { resize: vertical; }

/* ============================================================
 * CARDS
 * ============================================================ */
.mktpos-card {
  background: linear-gradient(180deg, rgba(255,255,255,.94), rgba(255,250,245,.90));
  border-radius: var(--mktpos-radius);
  border: 1px solid rgba(255,255,255,.72);
  box-shadow: var(--mktpos-shadow);
  overflow: hidden;
  margin-bottom: 20px;
  backdrop-filter: blur(12px);
}
/* Cards "sueltas": las que no traen header/footer estructural ni una tabla
   full-bleed como hijo directo. Antes su contenido quedaba pegado al borde.
   Las cards con .mktpos-card-header conservan su layout original. */
.mktpos-card:not(:has(> .mktpos-card-header)):not(:has(> .mktpos-card-footer)):not(:has(> table)):not(:has(> .mktpos-table)):not(:has(> .mktpos-table-wrap)) {
  padding: 24px 26px;
}
.mktpos-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid rgba(31,41,55,.08);
  flex-wrap: wrap;
  gap: 12px;
}
.mktpos-card-header h3 {
  font-size: 17px;
  color: var(--mktpos-text);
  letter-spacing: -.02em;
}
.mktpos-card-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--mktpos-border);
}
.mktpos-card-action {
  border-left: 4px solid var(--mktpos-brand);
}
.mktpos-card-sticky {
  position: sticky;
  top: 20px;
}

/* ============================================================
 * BADGES
 * ============================================================ */
.mktpos-badge {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
.mktpos-badge-brand {
  background: var(--mktpos-brand);
  color: #fff;
}
.mktpos-badge-seller {
  background: var(--mktpos-info-bg);
  color: var(--mktpos-info);
}
.mktpos-badge-draft { background: #6c757d; color: #fff; }
.mktpos-badge-advance { background: #ea580c; color: #fff; }
.mktpos-badge-processing { background: #0b6e66; color: #fff; }
.mktpos-badge-completed { background: #2d6a4f; color: #fff; }
.mktpos-badge-cancelled { background: #e63946; color: #fff; }
.mktpos-badge-pending { background: #6c757d20; color: #6c757d; border: 1px solid #6c757d40; }
.mktpos-badge-partial { background: #f4a26120; color: #0b6e66; border: 1px solid #f4a26140; }
.mktpos-badge-fulfilled { background: #2d6a4f20; color: #2d6a4f; border: 1px solid #2d6a4f40; }
.mktpos-badge-backorder { background: #e6394620; color: #e63946; border: 1px solid #e6394640; }

/* ============================================================
 * PAGE LAYOUT
 * ============================================================ */
.mktpos-page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 16px;
}
.mktpos-page-header h1 {
  font-size: 34px;
  color: var(--mktpos-text);
  letter-spacing: -.05em;
  line-height: 1.02;
}
.mktpos-subtitle {
  color: var(--mktpos-text-secondary);
  margin-top: 8px;
  font-size: 14px;
}
.mktpos-hero-kicker {
  display: inline-block;
  padding: 8px 12px;
  margin-bottom: 10px;
  border-radius: 999px;
  background: rgba(11, 110, 102,.10);
  border: 1px solid rgba(11, 110, 102,.14);
  color: var(--mktpos-brand);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

/* ============================================================
 * LOGIN PAGE
 * ============================================================ */
.mktpos-page-login {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(16px, 5vw, 48px);
  box-sizing: border-box;
  background:
    radial-gradient(120% 120% at 12% 8%, rgba(11, 110, 102,.22), transparent 42%),
    radial-gradient(120% 120% at 88% 18%, rgba(11, 110, 102,.20), transparent 46%),
    radial-gradient(100% 100% at 50% 120%, rgba(139,67,197,.16), transparent 55%),
    linear-gradient(160deg, #131629 0%, #171d3a 48%, #0e2748 100%);
}
.mktpos-login-container {
  width: 100%;
  max-width: 420px;
  background: #fff;
  border-radius: 26px;
  border: 1px solid rgba(255,255,255,.10);
  box-shadow:
    0 1px 0 rgba(255,255,255,.65) inset,
    0 30px 70px -20px rgba(9, 14, 34, .55),
    0 12px 28px -12px rgba(9, 14, 34, .40);
  overflow: hidden;
  animation: mktpos-login-in .55s cubic-bezier(.16,.84,.44,1) both;
}
@keyframes mktpos-login-in {
  from { opacity: 0; transform: translateY(18px) scale(.985); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .mktpos-login-container { animation: none; }
}
.mktpos-login-header {
  position: relative;
  /* Extremo claro oscurecido (#ea580c → #e0722e) para que el texto blanco cumpla
     contraste AA en todo el degradado. */
  background: linear-gradient(140deg, #d92d3b 0%, #e05a2b 52%, #e0722e 100%);
  padding: clamp(34px, 8vw, 46px) clamp(24px, 6vw, 36px) clamp(30px, 6vw, 38px);
  text-align: center;
  overflow: hidden;
}
/* Brillo sutil sobre el encabezado */
.mktpos-login-header::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(85% 120% at 50% -20%, rgba(255,255,255,.32), transparent 60%);
  pointer-events: none;
}
.mktpos-login-header > * { position: relative; }
.mktpos-login-icon {
  width: 76px;
  height: 76px;
  background: rgba(255,255,255,.18);
  border: 1px solid rgba(255,255,255,.35);
  border-radius: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 18px;
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 24px -8px rgba(120, 30, 10, .45), 0 1px 0 rgba(255,255,255,.4) inset;
}
.mktpos-login-icon svg { width: 42px; height: 42px; }
.mktpos-login-header h1 {
  color: #fff;
  font-size: clamp(21px, 5.5vw, 26px);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 6px;
  text-shadow: 0 1px 12px rgba(120, 30, 10, .28);
}
.mktpos-login-header p {
  color: #fff;
  font-size: 14px;
  margin: 0;
  text-shadow: 0 1px 6px rgba(120, 30, 10, .35);
}
.mktpos-login-form {
  padding: 32px;
}
.mktpos-field {
  margin-bottom: 20px;
}
.mktpos-field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--mktpos-text);
  margin-bottom: 6px;
}
.mktpos-input-icon {
  position: relative;
}
.mktpos-input-icon svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--mktpos-text-muted);
}
.mktpos-input-icon input {
  padding-left: 42px;
}
.mktpos-field-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}
.mktpos-checkbox {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--mktpos-text-secondary);
  cursor: pointer;
}
.mktpos-link {
  font-size: 13px;
  color: var(--mktpos-danger) !important;
  font-weight: 500;
}
.mktpos-recover-header {
  margin-bottom: 20px;
}
.mktpos-recover-header h3 {
  font-size: 18px;
  margin-bottom: 8px;
}
.mktpos-recover-header p {
  font-size: 14px;
  color: var(--mktpos-text-secondary);
}
.mktpos-login-footer {
  text-align: center;
  padding: 16px;
  background: #fafbfc;
  border-top: 1px solid #eef0f3;
}
.mktpos-login-footer p {
  font-size: 12px;
  letter-spacing: .02em;
  color: var(--mktpos-text-muted);
  margin: 0;
}

/* ------------------------------------------------------------
 * LOGIN — refinamiento visual de los campos (v2.16.13)
 * Aditivo y acotado a .mktpos-page-login. Los inputs del login
 * son <input> "pelados" (sin .mktpos-input); aquí les damos un
 * acabado profesional sin afectar el resto del POS.
 * ------------------------------------------------------------ */
.mktpos-page-login .mktpos-login-form {
  padding: 34px 34px 36px;
}
.mktpos-page-login .mktpos-field {
  margin-bottom: 18px;
}
.mktpos-page-login .mktpos-field label {
  font-size: 13px;
  font-weight: 600;
  color: var(--mktpos-text);
  letter-spacing: -0.01em;
  margin-bottom: 8px;
}
/* Campo con icono */
.mktpos-page-login .mktpos-input-icon {
  position: relative;
  display: block;
}
.mktpos-page-login .mktpos-input-icon svg {
  left: 15px;
  color: #9aa3b2;
  pointer-events: none;
  transition: color .18s ease;
}
.mktpos-page-login .mktpos-input-icon input {
  width: 100%;
  height: 50px;
  padding: 0 16px 0 46px;
  font-size: 15px;
  line-height: 50px;
  color: var(--mktpos-text);
  background: #f7f8fa;
  border: 1.5px solid #e4e7ec;
  border-radius: 12px;
  box-shadow: inset 0 1px 2px rgba(16, 24, 40, .04);
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
  outline: none;
  box-sizing: border-box;
  font-family: inherit;
}
.mktpos-page-login .mktpos-input-icon input::placeholder {
  color: #aab0bc;
}
.mktpos-page-login .mktpos-input-icon input:hover {
  border-color: #d3d8e0;
}
.mktpos-page-login .mktpos-input-icon input:focus {
  background: #fff;
  border-color: #c2410c;
  box-shadow: 0 0 0 4px rgba(11, 110, 102, .14), inset 0 1px 2px rgba(16, 24, 40, .03);
}
/* El icono toma el color de acento cuando el campo está enfocado */
.mktpos-page-login .mktpos-input-icon:focus-within svg {
  color: #c2410c;
}
/* Evitar el fondo amarillo del autocompletado del navegador */
.mktpos-page-login .mktpos-input-icon input:-webkit-autofill,
.mktpos-page-login .mktpos-input-icon input:-webkit-autofill:hover,
.mktpos-page-login .mktpos-input-icon input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--mktpos-text);
  -webkit-box-shadow: 0 0 0 40px #f7f8fa inset;
  transition: background-color 5000s ease-in-out 0s;
}

/* Fila de "Recordarme" / "¿Olvidaste tu contraseña?" */
.mktpos-page-login .mktpos-field-row {
  margin-top: 4px;
  margin-bottom: 26px;
}
.mktpos-page-login .mktpos-checkbox {
  font-size: 13px;
  color: var(--mktpos-text-secondary);
  gap: 8px;
}
.mktpos-page-login .mktpos-checkbox input[type="checkbox"] {
  width: 17px;
  height: 17px;
  accent-color: #c2410c;
  cursor: pointer;
}
.mktpos-page-login .mktpos-link {
  font-weight: 600;
  transition: opacity .15s ease;
}
.mktpos-page-login .mktpos-link:hover {
  opacity: .78;
}

/* Botón principal del login — un poco más de presencia */
.mktpos-page-login .mktpos-btn-full {
  height: 50px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .01em;
  box-shadow: 0 8px 20px rgba(11, 110, 102, .28);
}

/* Botón mostrar/ocultar contraseña */
.mktpos-page-login .mktpos-input-icon--pwd input {
  padding-right: 46px; /* espacio para el ojo */
}
.mktpos-page-login .mktpos-pwd-toggle {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 0;
  border-radius: 9px;
  color: #9aa3b2;
  cursor: pointer;
  transition: color .15s ease, background .15s ease;
}
.mktpos-page-login .mktpos-pwd-toggle:hover {
  color: #c2410c;
  background: rgba(11, 110, 102, .08);
}
.mktpos-page-login .mktpos-pwd-toggle:focus-visible {
  outline: 2px solid #c2410c;
  outline-offset: 1px;
}

/* Estado de carga del botón (evita doble envío + feedback) */
.mktpos-page-login .mktpos-btn.is-loading {
  opacity: .82;
  cursor: progress;
  pointer-events: none;
}
.mktpos-page-login .mktpos-btn.is-loading::after {
  content: "";
  display: inline-block;
  width: 15px;
  height: 15px;
  margin-left: 9px;
  vertical-align: -2px;
  border: 2px solid rgba(255,255,255,.55);
  border-top-color: #fff;
  border-radius: 50%;
  animation: mktpos-spin .6s linear infinite;
}
@keyframes mktpos-spin { to { transform: rotate(360deg); } }

/* Alerts */
.mktpos-alert {
  padding: 12px 20px;
  margin: 0 32px;
  border-radius: var(--mktpos-radius-sm);
  font-size: 14px;
  font-weight: 500;
}
.mktpos-alert-error {
  background: var(--mktpos-danger-bg);
  color: var(--mktpos-danger);
  border: 1px solid #e6394630;
}
.mktpos-alert-success {
  background: var(--mktpos-success-bg);
  color: var(--mktpos-success);
  border: 1px solid #2d6a4f30;
}

/* ============================================================
 * PANEL (Products Grid)
 * ============================================================ */
.mktpos-search-bar {
  display: flex;
  gap: 8px;
}
.mktpos-search-bar .mktpos-input {
  width: 260px;
}
.mktpos-products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
}
.mktpos-product-card {
  background: var(--mktpos-card);
  border-radius: var(--mktpos-radius);
  box-shadow: var(--mktpos-shadow);
  overflow: hidden;
  transition: transform .2s, box-shadow .2s;
}
.mktpos-product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--mktpos-shadow-lg);
}
.mktpos-product-img {
  width: 100%;
  height: 200px;
  overflow: hidden;
  background: #f8f9fa;
}
.mktpos-product-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.mktpos-no-img {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--mktpos-text-muted);
  font-size: 14px;
}
.mktpos-product-info {
  padding: 16px;
}
.mktpos-product-info h3 {
  font-size: 15px;
  margin-bottom: 8px;
  line-height: 1.3;
}
.mktpos-product-price {
  margin-bottom: 8px;
}
.mktpos-price {
  font-size: 18px;
  font-weight: 700;
  color: var(--mktpos-success);
}
.mktpos-price-old {
  font-size: 14px;
  color: var(--mktpos-text-muted);
  text-decoration: line-through;
  margin-right: 8px;
}
.mktpos-price-sale {
  font-size: 18px;
  font-weight: 700;
  color: var(--mktpos-danger);
}
.mktpos-stock {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  margin-right: 6px;
}
.mktpos-in-stock { background: var(--mktpos-success-bg); color: var(--mktpos-success); }
.mktpos-no-stock { background: var(--mktpos-danger-bg); color: var(--mktpos-danger); }
.mktpos-sku {
  display: block;
  font-size: 12px;
  color: var(--mktpos-text-muted);
  margin-top: 4px;
}

/* Pagination */
.mktpos-pagination {
  display: flex;
  gap: 6px;
  justify-content: center;
  margin-top: 24px;
  flex-wrap: wrap;
  max-width: 100%;
}
.mktpos-page-ellipsis { padding: 8px 4px; color: #94a3b8; user-select: none; }
.mktpos-page-btn {
  padding: 8px 14px;
  border: 1.5px solid var(--mktpos-border);
  border-radius: 8px;
  background: #fff;
  color: var(--mktpos-text);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all .2s;
  text-decoration: none !important;
}
.mktpos-page-btn:hover { background: var(--mktpos-bg); }
.mktpos-page-active {
  background: var(--mktpos-brand) !important;
  color: #fff !important;
  border-color: var(--mktpos-brand) !important;
}

/* Empty state */
.mktpos-empty-state {
  text-align: center;
  padding: 60px 20px;
}
.mktpos-empty-state h3 {
  margin-top: 16px;
  color: var(--mktpos-text-secondary);
}
.mktpos-empty-state p {
  color: var(--mktpos-text-muted);
  margin-top: 8px;
}

/* ============================================================
 * BUILDER
 * ============================================================ */
.mktpos-builder-grid {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 24px;
  align-items: start;
}
.mktpos-form-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  padding: 20px;
}
.mktpos-field-full { width: 100%; }
.mktpos-field-half { width: calc(50% - 8px); }
.mktpos-field-third { width: calc(33.33% - 11px); }
.mktpos-field-twothirds { width: calc(66.66% - 5px); }
.mktpos-form-grid label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--mktpos-text);
  margin-bottom: 4px;
}
.mktpos-req { color: var(--mktpos-danger); }

/* Mode switch */
.mktpos-mode-switch {
  display: flex;
  gap: 8px;
}
.mktpos-radio-pill {
  cursor: pointer;
}
.mktpos-radio-pill input { display: none; }
.mktpos-radio-pill span {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  background: var(--mktpos-bg);
  color: var(--mktpos-text-secondary);
  transition: all .2s;
  border: 1.5px solid transparent;
}
.mktpos-radio-pill input:checked + span {
  background: var(--mktpos-brand);
  color: #fff;
  border-color: var(--mktpos-brand);
}

/* Inline search */
.mktpos-inline-search {
  display: flex;
  gap: 8px;
}
.mktpos-inline-search .mktpos-input {
  width: 260px;
}

/* Search results */
.mktpos-products-results {
  padding: 16px 20px;
  max-height: 500px;
  overflow-y: auto;
}
.mktpos-search-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}
.mktpos-search-item {
  display: flex;
  flex-direction: column;
  background: var(--mktpos-bg);
  border-radius: var(--mktpos-radius-sm);
  overflow: hidden;
  cursor: pointer;
  transition: all .2s;
  border: 2px solid transparent;
}
.mktpos-search-item:hover {
  border-color: var(--mktpos-brand);
  box-shadow: 0 4px 16px rgba(0,0,0,.1);
}
.mktpos-in-cart {
  border-color: var(--mktpos-success) !important;
  background: var(--mktpos-success-bg) !important;
}
.mktpos-search-img {
  width: 100%;
  height: 120px;
  overflow: hidden;
  background: #f0f0f5;
}
.mktpos-search-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.mktpos-search-info {
  padding: 10px 12px;
  flex: 1;
}
.mktpos-search-info h4 {
  font-size: 13px;
  margin-bottom: 4px;
  line-height: 1.3;
}
.mktpos-search-price {
  margin-bottom: 4px;
}
.mktpos-search-price .mktpos-price { font-size: 15px; }
.mktpos-search-price .mktpos-price-sale { font-size: 15px; }
.mktpos-search-price .mktpos-price-old { font-size: 12px; }
.mktpos-prod-stock {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
}
.mktpos-sku-label {
  display: block;
  font-size: 11px;
  color: var(--mktpos-text-muted);
  margin-top: 2px;
}
.mktpos-search-action {
  padding: 8px 12px;
  text-align: center;
}
.mktpos-added-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--mktpos-success);
}
.mktpos-add-btn {
  width: 100%;
}
.mktpos-tip {
  padding: 12px 20px;
  background: var(--mktpos-warning-bg);
  border-left: 4px solid var(--mktpos-warning);
  font-size: 13px;
  color: var(--mktpos-text-secondary);
}
.mktpos-empty-hint {
  text-align: center;
  padding: 32px 16px;
  color: var(--mktpos-text-muted);
}
.mktpos-empty-hint svg { margin-bottom: 8px; }

/* Cart lines */
.mktpos-total-display {
  display: flex;
  align-items: center;
  gap: 8px;
}
.mktpos-total-display span {
  font-size: 14px;
  color: var(--mktpos-text-secondary);
}
.mktpos-total-display strong {
  font-size: 22px;
  color: var(--mktpos-danger);
}
.mktpos-lines {
  padding: 12px 20px;
  max-height: 400px;
  overflow-y: auto;
}
.mktpos-line-item {
  padding: 12px 0;
  border-bottom: 1px solid var(--mktpos-border);
}
.mktpos-line-item:last-child { border-bottom: none; }
.mktpos-line-info {
  margin-bottom: 8px;
}
.mktpos-line-info strong {
  font-size: 14px;
}
.mktpos-line-info small {
  color: var(--mktpos-text-muted);
}
.mktpos-line-controls {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}
.mktpos-line-field {
  flex: 1;
  min-width: 60px;
}
.mktpos-line-field label {
  display: block;
  font-size: 11px;
  color: var(--mktpos-text-muted);
  margin-bottom: 2px;
}
.mktpos-line-field .mktpos-input {
  padding: 6px 8px;
  font-size: 13px;
}
.mktpos-line-sub {
  min-width: 80px;
  text-align: right;
}
.mktpos-line-sub label {
  display: block;
  font-size: 11px;
  color: var(--mktpos-text-muted);
  margin-bottom: 2px;
}
.mktpos-line-sub span {
  font-size: 15px;
  font-weight: 700;
  color: var(--mktpos-success);
}
.mktpos-line-remove {
  background: var(--mktpos-danger);
  color: #fff;
  border: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s;
  flex-shrink: 0;
  margin-bottom: 2px;
}
.mktpos-line-remove:hover { background: #c1121f; }

.mktpos-summary-stats {
  display: flex;
  gap: 16px;
  padding: 12px 20px;
  background: var(--mktpos-bg);
  border-top: 1px solid var(--mktpos-border);
}
.mktpos-stat-item {
  display: flex;
  gap: 4px;
  font-size: 13px;
}
.mktpos-stat-item span { color: var(--mktpos-text-muted); }
.mktpos-stat-item strong { color: var(--mktpos-text); }

.mktpos-save-msg {
  display: block;
  margin-top: 8px;
  font-size: 13px;
  text-align: center;
}

/* ============================================================
 * QUOTE VIEW
 * ============================================================ */
.mktpos-quote-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 16px;
}
.mktpos-quote-header h1 {
  font-size: 28px;
}
.mktpos-quote-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  flex-wrap: wrap;
}
.mktpos-meta-text {
  font-size: 13px;
  color: var(--mktpos-text-muted);
}
.mktpos-quote-header-right {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.mktpos-quote-grid {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 24px;
  align-items: start;
}

/* Info cards */
.mktpos-info-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}
.mktpos-info-card {
  background: var(--mktpos-card);
  border-radius: var(--mktpos-radius);
  padding: 20px;
  box-shadow: var(--mktpos-shadow);
}
.mktpos-info-card h4 {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--mktpos-text-muted);
  margin-bottom: 8px;
}
.mktpos-info-main {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 4px !important;
}
.mktpos-info-card p {
  font-size: 13px;
  color: var(--mktpos-text-secondary);
}
.mktpos-info-total {
  background: linear-gradient(135deg, #1a1a2e, #16213e);
  color: #fff;
}
.mktpos-info-total h4 { color: rgba(255,255,255,.6); }
.mktpos-info-total p { color: rgba(255,255,255,.8); }
.mktpos-info-big {
  font-size: 28px !important;
  font-weight: 800 !important;
  color: #fff !important;
}
.mktpos-info-sub {
  font-size: 12px !important;
  margin-top: 8px !important;
}

/* Progress bar */
.mktpos-progress-bar {
  width: 100%;
  height: 8px;
  background: rgba(255,255,255,.2);
  border-radius: 4px;
  margin: 12px 0 4px;
  overflow: hidden;
}
.mktpos-progress-fill {
  height: 100%;
  border-radius: 4px;
  transition: width .4s ease;
}

/* Items table */
.mktpos-items-table {
  padding: 0;
  overflow-x: auto;
}
.mktpos-items-table table {
  width: 100%;
  border-collapse: collapse;
}
.mktpos-items-table th {
  padding: 12px 16px;
  text-align: left;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--mktpos-text-muted);
  background: var(--mktpos-bg);
  border-bottom: 2px solid var(--mktpos-border);
}
.mktpos-items-table td {
  padding: 12px 16px;
  font-size: 14px;
  border-bottom: 1px solid var(--mktpos-border);
  vertical-align: middle;
}
.mktpos-items-table tfoot td {
  border-bottom: none;
  padding-top: 16px;
}
.mktpos-notes-block {
  padding: 16px 20px;
  background: var(--mktpos-warning-bg);
  border-top: 1px solid var(--mktpos-border);
  font-size: 14px;
}

/* Payments */
.mktpos-payments-list {
  padding: 12px 20px;
  max-height: 300px;
  overflow-y: auto;
}
.mktpos-payment-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--mktpos-border);
}
.mktpos-payment-item:last-child { border-bottom: none; }
.mktpos-payment-info strong {
  display: block;
  font-size: 14px;
}
.mktpos-payment-info span {
  font-size: 12px;
  color: var(--mktpos-text-muted);
}
.mktpos-payment-info small {
  display: block;
  font-size: 11px;
  color: var(--mktpos-text-muted);
}
.mktpos-payment-amount {
  font-size: 16px;
  font-weight: 700;
}
.mktpos-amount-positive { color: var(--mktpos-success); }
.mktpos-amount-negative { color: var(--mktpos-danger); }
.mktpos-payment-refund {
  background: var(--mktpos-danger-bg);
  padding: 10px 12px !important;
  border-radius: 8px;
  margin: 4px 0;
}

/* Notes */
.mktpos-notes-list {
  padding: 12px 20px;
  max-height: 250px;
  overflow-y: auto;
}
.mktpos-note-item {
  padding: 10px 0;
  border-bottom: 1px solid var(--mktpos-border);
}
.mktpos-note-item:last-child { border-bottom: none; }
.mktpos-note-meta {
  font-size: 12px;
  color: var(--mktpos-text-muted);
  margin-bottom: 4px;
}
.mktpos-note-text {
  font-size: 14px;
}
.mktpos-note-form {
  padding: 12px 20px;
  border-top: 1px solid var(--mktpos-border);
  display: flex;
  gap: 8px;
  align-items: flex-end;
}
.mktpos-note-form textarea {
  flex: 1;
}
.mktpos-empty-text {
  text-align: center;
  color: var(--mktpos-text-muted);
  font-size: 14px;
  padding: 16px 0;
}

/* Action buttons */
.mktpos-action-buttons {
  padding: 16px 20px;
}

/* ============================================================
 * KPI CARDS (Dashboard)
 * ============================================================ */
.mktpos-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}
.mktpos-kpi-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 24px;
  border-radius: 24px;
  box-shadow: 0 16px 30px rgba(44, 28, 18, .10);
  transition: transform .2s, box-shadow .2s;
  border: 1px solid rgba(255,255,255,.18);
}
.mktpos-kpi-card:hover { transform: translateY(-3px); box-shadow: 0 22px 36px rgba(44, 28, 18, .13); }
.mktpos-kpi-icon {
  width: 58px;
  height: 58px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.mktpos-kpi-data {
  min-width: 0;
  flex: 1;
}
.mktpos-kpi-value {
  display: block;
  font-size: clamp(16px, 1.2vw, 20px);
  font-weight: 800;
  letter-spacing: -.04em;
  line-height: 1.05;
  white-space: nowrap;
}
.mktpos-kpi-label {
  display: block;
  font-size: 12px;
  margin-top: 4px;
  letter-spacing: .04em;
  text-transform: uppercase;
  line-height: 1.25;
}

/* KPI Colors - VIBRANT */
.mktpos-kpi-blue {
  background: linear-gradient(135deg, #0b6e66 0%, #0b6e66 100%);
  color: #fff;
}
.mktpos-kpi-blue .mktpos-kpi-icon { background: rgba(255,255,255,.2); }
.mktpos-kpi-blue .mktpos-kpi-label { color: rgba(255,255,255,.8); }

.mktpos-kpi-green {
  background: linear-gradient(135deg, #16925c 0%, #58d39d 100%);
  color: #fff;
}
.mktpos-kpi-green .mktpos-kpi-icon { background: rgba(255,255,255,.2); }
.mktpos-kpi-green .mktpos-kpi-label { color: rgba(255,255,255,.8); }

.mktpos-kpi-orange {
  background: linear-gradient(135deg, #c2410c 0%, #0d8f84 100%);
  color: #fff;
}
.mktpos-kpi-orange .mktpos-kpi-icon { background: rgba(255,255,255,.2); }
.mktpos-kpi-orange .mktpos-kpi-label { color: rgba(255,255,255,.8); }

.mktpos-kpi-emerald {
  background: linear-gradient(135deg, #1cb38a 0%, #71e5c3 100%);
  color: #fff;
}
.mktpos-kpi-emerald .mktpos-kpi-icon { background: rgba(255,255,255,.2); }
.mktpos-kpi-emerald .mktpos-kpi-label { color: rgba(255,255,255,.8); }

.mktpos-kpi-purple {
  background: linear-gradient(135deg, #8b43c5 0%, #ca6ce2 100%);
  color: #fff;
}
.mktpos-kpi-purple .mktpos-kpi-icon { background: rgba(255,255,255,.2); }
.mktpos-kpi-purple .mktpos-kpi-label { color: rgba(255,255,255,.8); }

.mktpos-kpi-red {
  background: linear-gradient(135deg, #cf4343 0%, #f58d83 100%);
  color: #fff;
}
.mktpos-kpi-red .mktpos-kpi-icon { background: rgba(255,255,255,.2); }
.mktpos-kpi-red .mktpos-kpi-label { color: rgba(255,255,255,.8); }

/* ============================================================
 * Seller Performance Panel (Super Admin Dashboard)
 * ============================================================ */
.mktpos-seller-panel { margin-bottom: 24px; }
.mktpos-seller-panel .mktpos-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 24px;
  border-bottom: 1px solid rgba(31,41,55,.08);
}
.mktpos-seller-panel .mktpos-card-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: var(--mktpos-text);
}
.mktpos-seller-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
  padding: 20px 24px 24px;
}
.mktpos-seller-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  padding: 20px;
  background: linear-gradient(180deg, rgba(255,255,255,.96) 0%, rgba(248,242,234,.92) 100%);
  border-radius: 20px;
  border: 1px solid rgba(31,41,55,.08);
  border-left: 4px solid var(--mktpos-brand, #0b6e66);
  transition: transform .15s, box-shadow .15s;
}
.mktpos-seller-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0,0,0,.08);
}
.mktpos-seller-avatar {
  flex-shrink: 0;
}
.mktpos-seller-avatar img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--mktpos-brand, #0b6e66);
}
.mktpos-seller-info {
  flex: 1;
  min-width: 120px;
}
.mktpos-seller-info h4 {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--mktpos-text);
}
.mktpos-seller-info small {
  color: var(--mktpos-text-muted);
  font-size: 12px;
}
.mktpos-seller-stats {
  display: flex;
  gap: 16px;
  width: 100%;
  margin-top: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--mktpos-border);
}
.mktpos-seller-stat {
  text-align: center;
  flex: 1;
}
.mktpos-seller-stat-value {
  display: block;
  font-size: 15px;
  font-weight: 800;
  color: var(--mktpos-text);
}
.mktpos-seller-stat-label {
  display: block;
  font-size: 11px;
  color: var(--mktpos-text-muted);
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-top: 2px;
}
.mktpos-text-green { color: #16925c !important; }
.mktpos-text-emerald { color: #1cb38a !important; }
.mktpos-text-orange { color: #c2410c !important; }
.mktpos-text-danger { color: #cf4343 !important; }
.mktpos-text-blue { color: #0b6e66 !important; }
.mktpos-text-purple { color: #8b43c5 !important; }

.mktpos-badge-brand {
  background: linear-gradient(135deg, var(--mktpos-brand, #0b6e66), var(--mktpos-brand-bright, #0b6e66)) !important;
  color: #fff !important;
  font-size: 12px;
  padding: 4px 12px;
  border-radius: 20px;
  font-weight: 600;
}

/* ============================================================
 * DASHBOARD TABLE
 * ============================================================ */
.mktpos-dash-filters {
  flex-wrap: wrap;
}
.mktpos-page-dashboard .mktpos-content {
  max-width: 1620px;
}
.mktpos-dashboard-hero {
  margin-bottom: 24px;
  padding: 24px 24px 20px;
  border-radius: 28px;
  background:
    radial-gradient(circle at top right, rgba(255,191,110,.24), transparent 26%),
    radial-gradient(circle at left bottom, rgba(11, 110, 102,.12), transparent 32%),
    linear-gradient(135deg, rgba(255,255,255,.88), rgba(255,248,240,.82));
  border: 1px solid rgba(255,255,255,.72);
  box-shadow: var(--mktpos-shadow-lg);
  backdrop-filter: blur(14px);
}
.mktpos-dashboard-overline {
  margin: 0 0 8px;
  color: var(--mktpos-brand);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .03em;
}
.mktpos-dashboard-header {
  margin-bottom: 10px;
}
.mktpos-dashboard-header-main {
  margin-bottom: 18px;
}
.mktpos-dashboard-hero-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.mktpos-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.mktpos-filter-select {
  width: 180px;
}
.mktpos-dash-table-wrap {
  overflow-x: hidden;
  padding: 0 10px 18px;
}
.mktpos-table-scroll {
  overflow-x: auto;
}
.mktpos-dash-table {
  width: 100%;
  border-collapse: collapse;
  background: rgba(255,255,255,.82);
  border-radius: 18px;
  overflow: hidden;
}
.mktpos-dash-table th {
  padding: 14px 14px;
  text-align: left;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--mktpos-text-muted);
  background: #fbf1e7;
  border-bottom: 1px solid rgba(31,41,55,.10);
  white-space: nowrap;
}
.mktpos-dash-table td {
  padding: 14px 14px;
  font-size: 14px;
  border-bottom: 1px solid rgba(31,41,55,.08);
  vertical-align: middle;
}
.mktpos-dash-table tr:hover td {
  background: rgba(11, 110, 102,.06);
}
.mktpos-dash-actions {
  white-space: nowrap;
}
.mktpos-dash-actions .mktpos-btn {
  margin-right: 4px;
}
/* ── Dashboard footer: per-page selector left, pagination right ── */
.mktpos-dash-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding: 14px 18px 18px;
  border-top: 1px solid rgba(31,41,55,.08);
  background: transparent;
}
.mktpos-per-page-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}
.mktpos-per-page-label {
  font-size: 12px;
  color: var(--mktpos-text-muted, #888);
  white-space: nowrap;
}
.mktpos-per-page-sel {
  height: 30px;
  padding: 0 8px;
  border: 1.5px solid var(--mktpos-border);
  border-radius: 7px;
  font-size: 12px;
  background: var(--mktpos-card);
  color: var(--mktpos-text);
  cursor: pointer;
  outline: none;
}
.mktpos-per-page-sel:focus { border-color: var(--mktpos-brand); }
.mktpos-dash-count {
  font-size: 12px;
  color: var(--mktpos-text-muted, #888);
  white-space: nowrap;
}
.mktpos-dash-pagination {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}
.mktpos-page-ellipsis {
  font-size: 13px;
  color: var(--mktpos-text-muted, #aaa);
  padding: 0 2px;
}
.mktpos-loading {
  text-align: center;
  padding: 40px;
  color: var(--mktpos-text-muted);
  font-size: 15px;
}

/* ============================================================
 * REPORTS
 * ============================================================ */
.mktpos-date-range {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.mktpos-date-range label {
  font-size: 13px;
  font-weight: 600;
  color: var(--mktpos-text-secondary);
}
.mktpos-date-range .mktpos-input {
  width: 160px;
}
.mktpos-report-section {
  margin-bottom: 32px;
}
.mktpos-section-title {
  font-size: 20px;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 3px solid var(--mktpos-brand);
  display: inline-block;
}
.mktpos-report-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}
.mktpos-report-card {
  background: var(--mktpos-card);
  border-radius: var(--mktpos-radius);
  padding: 20px;
  box-shadow: var(--mktpos-shadow);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.mktpos-report-method {
  font-size: 14px;
  font-weight: 600;
}
.mktpos-report-amount {
  font-size: 22px;
  font-weight: 800;
  color: var(--mktpos-text);
}
.mktpos-report-total {
  background: linear-gradient(135deg, #1a1a2e, #16213e);
  color: #fff;
}
.mktpos-report-total .mktpos-report-method { color: rgba(255,255,255,.7); }
.mktpos-report-total .mktpos-report-amount { color: #fff; }

.mktpos-report-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--mktpos-card);
  border-radius: var(--mktpos-radius);
  overflow: hidden;
  box-shadow: var(--mktpos-shadow);
}
.mktpos-report-table th {
  padding: 12px 16px;
  text-align: left;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--mktpos-text-muted);
  background: var(--mktpos-bg);
  border-bottom: 2px solid var(--mktpos-border);
}
.mktpos-report-table td {
  padding: 10px 16px;
  font-size: 14px;
  border-bottom: 1px solid var(--mktpos-border);
}
.mktpos-report-table tr:hover td {
  background: var(--mktpos-brand-soft);
}
.mktpos-report-table a {
  font-weight: 600;
}

.mktpos-analytics-shell {
  background: #ffffff;
  border: 1px solid var(--mktpos-border);
  border-radius: 20px;
  padding: 0;
  box-shadow: 0 10px 30px rgba(0,0,0,.06);
  overflow: hidden;
}
.mktpos-analytics-hero {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-start;
  margin-bottom: 24px;
}
.mktpos-analytics-copy {
  margin-top: 10px;
  max-width: 760px;
  color: var(--mktpos-text-secondary);
  line-height: 1.6;
}
.mktpos-analytics-filters {
  display: grid;
  grid-template-columns: repeat(2, minmax(120px, 1fr));
  gap: 8px 12px;
  min-width: 280px;
  padding: 16px;
  border-radius: 16px;
  background: rgba(255,255,255,.92);
  border: 1px solid var(--mktpos-border);
}
.mktpos-analytics-filters label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--mktpos-text-muted);
}
.mktpos-analytics-filters .mktpos-btn {
  grid-column: 1 / -1;
}
.mktpos-analytics-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.mktpos-analytics-kpi {
  background: linear-gradient(145deg, #0f172a, #1e293b);
  color: #fff;
  border-radius: 18px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, .18);
}
.mktpos-analytics-kpi:nth-child(2) {
  background: linear-gradient(145deg, #184e77, #3b4262);
}
.mktpos-analytics-kpi:nth-child(3) {
  background: linear-gradient(145deg, #9a3412, #c2410c);
}
.mktpos-analytics-kpi:nth-child(4) {
  background: linear-gradient(145deg, #6b21a8, #9333ea);
}
.mktpos-analytics-kpi-label {
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(255,255,255,.72);
  font-weight: 700;
}
.mktpos-analytics-kpi-value {
  font-size: 32px;
  line-height: 1.05;
}
.mktpos-analytics-kpi small {
  color: rgba(255,255,255,.8);
}
.mktpos-analytics-grid {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(340px, 1.25fr);
  gap: 20px;
  margin-bottom: 20px;
}
.mktpos-analytics-panel {
  background: #fff;
  border: 1px solid var(--mktpos-border);
  border-radius: 18px;
  padding: 20px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, .06);
  margin-bottom: 20px;
}
.mktpos-analytics-panel h3 {
  margin: 0 0 16px;
  font-size: 18px;
}
.mktpos-analytics-payments {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}
.mktpos-analytics-payment-item {
  border-radius: 14px;
  padding: 14px 16px;
  background: #f8fafc;
  border-left: 4px solid var(--mktpos-brand);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.mktpos-analytics-payment-item span {
  color: var(--mktpos-text-muted);
  font-size: 13px;
}
.mktpos-analytics-payment-item strong {
  font-size: 22px;
}
.mktpos-analytics-bars {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.mktpos-analytics-bar-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.mktpos-analytics-bar-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  font-size: 13px;
  color: var(--mktpos-text-secondary);
}
.mktpos-analytics-bar-track {
  width: 100%;
  height: 12px;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
}
.mktpos-analytics-bar-track-secondary {
  height: 8px;
  background: #f1f5f9;
}
.mktpos-analytics-bar {
  height: 100%;
  border-radius: inherit;
}
.mktpos-analytics-bar-sale {
  background: linear-gradient(90deg, #fb923c, #f97316);
}
.mktpos-analytics-bar-paid {
  background: linear-gradient(90deg, #0a6fa3, #2563eb);
}
.mktpos-analytics-table td:last-child {
  min-width: 240px;
}

/* ============================================================
 * REPORT REDESIGN — compact header + horizontal filter bar
 * ============================================================ */

/* Compact orange header */
.mktpos-rpt-header {
  background: linear-gradient(135deg, #0b6e66 0%, #0d8f84 100%);
  color: #fff;
  padding: 18px 28px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.mktpos-rpt-title {
  font-size: 20px;
  font-weight: 800;
  margin: 0;
  white-space: nowrap;
}
.mktpos-rpt-subtitle {
  font-size: 13px;
  opacity: .85;
  white-space: nowrap;
}

/* Horizontal inline filter bar */
.mktpos-filter-bar {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  padding: 12px 28px;
  background: #f8f8f8;
  border-bottom: 1px solid #eaeaea;
  flex-wrap: wrap;
}
.mktpos-fb-field {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.mktpos-fb-field label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #999;
}
.mktpos-fb-input {
  height: 34px;
  padding: 0 8px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 13px;
  background: #fff;
  color: #333;
  min-width: 0;
  width: auto;
}
.mktpos-fb-input:focus {
  outline: none;
  border-color: #0b6e66;
  box-shadow: 0 0 0 2px rgba(11, 110, 102,.15);
}
select.mktpos-fb-input {
  width: 110px;
  cursor: pointer;
}
.mktpos-fb-date {
  width: 142px;
}
.mktpos-fb-btn {
  height: 34px;
  padding: 0 18px;
  background: #0b6e66;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s;
}
.mktpos-fb-btn:hover {
  background: #e85d2c;
}

/* Filter bar separator */
.mktpos-fb-sep {
  width: 1px;
  height: 28px;
  background: #ddd;
  align-self: flex-end;
  margin-bottom: 3px;
}

/* Section navigation bar */
.mktpos-section-nav {
  display: flex;
  gap: 4px;
  padding: 0 0 16px;
  margin-bottom: 20px;
  border-bottom: 2px solid #eaeaea;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 10;
}
.mktpos-snav-link {
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  color: #888 !important;
  text-decoration: none !important;
  border-radius: 8px 8px 0 0;
  white-space: nowrap;
  transition: color .15s, border-color .15s;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
}
.mktpos-snav-link:hover {
  color: #333 !important;
  text-decoration: none !important;
  background: #f5f5f5;
}
.mktpos-snav-link.mktpos-snav-active {
  color: #0b6e66 !important;
  border-bottom-color: #0b6e66;
}

/* Tab panel system */
.mktpos-tab-panel {
  display: none;
}
.mktpos-tab-panel.mktpos-tab-active {
  display: block;
  animation: mktposFadeIn .2s ease;
}
@keyframes mktposFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Detail cards inside tab */
.mktpos-detail-cards {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  margin-bottom: 20px;
}

/* Ver más button */
.mktpos-btn-ver-mas {
  background: none;
  border: 1px solid #ddd;
  color: #0b6e66;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 24px;
  border-radius: 8px;
  cursor: pointer;
  transition: all .15s;
}
.mktpos-btn-ver-mas:hover {
  background: #fff5f0;
  border-color: #0b6e66;
}

/* Panel header with inline search */
.mktpos-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.mktpos-panel-header h3 {
  margin: 0;
}

/* Legend for comparativo mensual */
.mktpos-analytics-legend {
  display: flex;
  gap: 16px;
  margin-bottom: 12px;
  font-size: 12px;
  color: #666;
}
.mktpos-analytics-legend span {
  display: flex;
  align-items: center;
  gap: 5px;
}
.mktpos-legend-dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 3px;
}
.mktpos-legend-dot-sale {
  background: linear-gradient(90deg, #fb923c, #f97316);
}
.mktpos-legend-dot-paid {
  background: linear-gradient(90deg, #0a6fa3, #2563eb);
}

/* Table scroll wrapper */
.mktpos-table-scroll {
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  margin: 0 -4px;
  padding: 0 4px;
}

.mktpos-analytics-content {
  padding: 24px 28px 28px;
}

/* KPI summary cards — orange accent */
.mktpos-analytics-summary-cards {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  margin-bottom: 24px;
}
.mktpos-analytics-summary-cards .mktpos-report-card {
  border-left: 5px solid #0b6e66;
  background: #fff;
  box-shadow: 0 4px 15px rgba(0,0,0,.06);
  transition: transform .2s, box-shadow .2s;
}
.mktpos-analytics-summary-cards .mktpos-report-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(11, 110, 102,.15);
}
.mktpos-analytics-summary-cards .mktpos-report-method {
  color: #888;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.mktpos-analytics-summary-cards .mktpos-report-amount {
  color: #0b6e66;
  font-size: 28px;
}
.mktpos-analytics-summary-cards .mktpos-report-card small {
  color: #999;
  font-size: 12px;
}

/* Analytics panels — clean white with orange h3 */
.mktpos-analytics-panel h3 {
  color: #0b6e66;
  border-bottom: 2px solid #0b6e66;
  padding-bottom: 10px;
  font-size: 18px;
}

/* Payment items — orange left border */
.mktpos-analytics-payment-item {
  background: #fafafa;
  border-left-color: #0b6e66;
  border-radius: 8px;
}
.mktpos-analytics-payment-item strong {
  color: #0b6e66;
}

/* Bar chart — orange bars */
.mktpos-analytics-bar-sale {
  background: linear-gradient(90deg, #0b6e66, #0d8f84);
}
.mktpos-analytics-bar-paid {
  background: linear-gradient(90deg, #2563eb, #0a6fa3);
}

/* Weekly table — styled header */
.mktpos-analytics-table thead {
  background: #fafafa;
  border-bottom: 3px solid #0b6e66;
}
.mktpos-analytics-table th {
  color: #0b6e66;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 1px;
  padding: 14px 16px;
}
.mktpos-analytics-table td {
  border-bottom-color: #eaeaea;
}
.mktpos-analytics-table tr:hover td {
  background: #fff5f0;
}
.mktpos-analytics-table tr.mktpos-month-total {
  background: #fafafa;
  font-weight: 700;
}
.mktpos-analytics-table tr.mktpos-month-total td {
  color: #0b6e66;
  border-top: 2px solid #0b6e66;
}
.mktpos-analytics-table tr.mktpos-grand-total {
  background: linear-gradient(90deg, #0b6e66, #0d8f84);
  color: #fff;
  font-weight: 700;
}
.mktpos-analytics-table tr.mktpos-grand-total td {
  color: #fff;
  border-bottom-color: transparent;
}

/* Empty state */
.mktpos-analytics-shell .mktpos-empty-state {
  padding: 60px 28px;
  text-align: center;
}
.mktpos-analytics-shell .mktpos-empty-state h3 {
  color: #333;
  border: none;
  font-size: 22px;
}

/* Legend dots for chart */
.mktpos-legend-dot-sale {
  background: linear-gradient(90deg, #0b6e66, #0d8f84) !important;
}

/* Section titles — orange */
.mktpos-page-reports .mktpos-section-title {
  border-bottom-color: #0b6e66;
  color: #333;
}

/* ============================================================
 * RESPONSIVE
 * ============================================================ */
@media (max-width: 1024px) {
  .mktpos-builder-grid {
    grid-template-columns: 1fr;
  }
  .mktpos-quote-grid {
    grid-template-columns: 1fr;
  }
  .mktpos-kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .mktpos-info-row {
    grid-template-columns: 1fr;
  }
  .mktpos-card-sticky {
    position: static;
  }
  .mktpos-analytics-grid {
    grid-template-columns: 1fr;
  }
  .mktpos-analytics-hero {
    flex-direction: column;
  }
  .mktpos-dashboard-hero-actions {
    width: 100%;
  }
}

@media (max-width: 768px) {
  /* Navbar: stack brand + links, show hamburger */
  .mktpos-navbar {
    height: auto;
    flex-wrap: wrap;
    padding: 10px 14px;
    gap: 8px;
    border-radius: var(--mktpos-radius) var(--mktpos-radius) 0 0;
  }
  .mktpos-navbar-brand {
    flex: 1;
  }
  .mktpos-navbar-brand::after {
    display: none;
  }
  /* Nav links collapse by default on mobile */
  .mktpos-navbar-links {
    display: none;
    order: 4;
    width: 100%;
    flex-direction: column;
    gap: 2px;
    padding: 6px 0 4px;
    border-top: 1px solid rgba(255,255,255,.08);
  }
  .mktpos-navbar-links.mktpos-nav-open {
    display: flex;
  }
  .mktpos-nav-link {
    font-size: 14px;
    padding: 10px 12px;
    border-radius: 6px;
    width: 100%;
  }
  /* CTA label hidden on mobile to save space */
  .mktpos-nav-cta-label {
    display: none;
  }
  .mktpos-nav-cta {
    padding: 7px 11px;
    border-radius: 50%;
  }
  /* Hamburger visible */
  .mktpos-hamburger {
    display: flex;
  }
  .mktpos-navbar-actions {
    gap: 6px;
  }
  .mktpos-content {
    padding: 18px 16px 32px;
  }
  .mktpos-dashboard-hero {
    padding: 18px 16px 16px;
    border-radius: 22px;
  }
  .mktpos-dashboard-header,
  .mktpos-dashboard-header-main {
    margin-bottom: 12px;
  }
  .mktpos-dashboard-hero-actions {
    width: 100%;
  }
  .mktpos-dashboard-hero-actions .mktpos-btn {
    flex: 1 1 100%;
  }
  .mktpos-page-header h1 {
    font-size: 28px;
  }
  .mktpos-kpi-grid {
    grid-template-columns: 1fr;
  }
  .mktpos-field-half, .mktpos-field-third, .mktpos-field-twothirds {
    width: 100%;
  }
  .mktpos-search-bar .mktpos-input,
  .mktpos-inline-search .mktpos-input {
    width: 100%;
  }
  .mktpos-search-bar, .mktpos-inline-search {
    width: 100%;
  }
  .mktpos-date-range {
    width: 100%;
  }
  .mktpos-date-range .mktpos-input {
    width: 100%;
    flex: 1;
  }
  .mktpos-products-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  }
  .mktpos-search-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  }
  .mktpos-report-cards {
    grid-template-columns: 1fr 1fr;
  }
  .mktpos-analytics-shell {
    padding: 18px;
  }
  .mktpos-analytics-filters {
    width: 100%;
    min-width: 0;
  }
  .mktpos-filter-bar {
    padding: 10px 16px;
    gap: 8px;
  }
  .mktpos-fb-field {
    flex: 1;
    min-width: 80px;
  }
  select.mktpos-fb-input,
  .mktpos-fb-date {
    width: 100%;
  }
  .mktpos-rpt-header {
    padding: 14px 16px;
    flex-wrap: wrap;
  }
  .mktpos-fb-sep {
    display: none;
  }
  .mktpos-section-nav {
    gap: 2px;
  }
  .mktpos-snav-link {
    padding: 6px 10px;
    font-size: 12px;
  }
  .mktpos-analytics-content {
    padding: 16px 16px 20px;
  }
  .mktpos-panel-header {
    flex-direction: column;
    align-items: flex-start;
  }
  .mktpos-panel-header .mktpos-table-search {
    max-width: 100% !important;
    width: 100%;
  }
  .mktpos-filters {
    width: 100%;
  }
  .mktpos-filter-select {
    width: 100%;
  }
  .mktpos-line-controls {
    flex-direction: column;
  }
  .mktpos-line-field {
    width: 100%;
  }
  .mktpos-note-form {
    flex-direction: column;
  }
  .mktpos-dash-table-wrap {
    padding: 0 12px 14px;
  }
  .mktpos-dash-table th,
  .mktpos-dash-table td {
    padding: 12px 12px;
  }
}

@media (max-width: 480px) {
  .mktpos-page-login {
    padding: 14px;
    align-items: flex-start;
  }
  .mktpos-login-container {
    border-radius: 20px;
    max-width: 100%;
  }
  .mktpos-page-login .mktpos-login-form {
    padding: 26px 20px 28px;
  }
  .mktpos-page-login .mktpos-input-icon input {
    height: 48px;
    line-height: 48px;
    font-size: 16px; /* evita el zoom automático de iOS al enfocar */
  }
  .mktpos-page-login .mktpos-field-row {
    flex-wrap: wrap;
    gap: 10px 16px;
  }
  .mktpos-report-cards {
    grid-template-columns: 1fr;
  }
  .mktpos-analytics-kpis {
    grid-template-columns: 1fr;
  }
  .mktpos-analytics-payments {
    grid-template-columns: 1fr;
  }
  .mktpos-fb-btn {
    width: 100%;
  }
}

/* ============================================================
 * STATE FILTER BUTTONS (Dashboard)
 * ============================================================ */
.mktpos-state-filters {
  display: flex;
  width: 100%;
  background: var(--mktpos-bg);
  border-radius: var(--mktpos-radius);
  overflow: hidden;
  border: 2px solid var(--mktpos-border);
  margin-bottom: 16px;
}
.mktpos-state-btn {
  flex: 1;
  padding: 12px 8px;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  background: transparent;
  color: var(--mktpos-text-secondary);
  transition: all .25s ease;
  white-space: nowrap;
  position: relative;
}
.mktpos-state-btn:not(:last-child) {
  border-right: 1px solid var(--mktpos-border);
}
.mktpos-state-btn:hover {
  background: rgba(0,0,0,.04);
}
.mktpos-state-btn.active {
  color: #fff;
  font-weight: 700;
}
.mktpos-state-btn[data-state=""].active {
  background: linear-gradient(135deg, #1a1a2e, #16213e);
}
.mktpos-state-btn[data-state="draft"].active {
  background: linear-gradient(135deg, #6c757d, #868e96);
}
.mktpos-state-btn[data-state="advance"].active {
  background: linear-gradient(135deg, #0b6e66, #ea580c);
}
.mktpos-state-btn[data-state="processing"].active {
  background: linear-gradient(135deg, #0b6e66, #0b6e66);
}
.mktpos-state-btn[data-state="completed"].active {
  background: linear-gradient(135deg, #2d6a4f, #52b788);
}
.mktpos-state-btn[data-state="cancelled"].active {
  background: linear-gradient(135deg, #e63946, #ff6b6b);
}
.mktpos-state-count {
  display: inline-block;
  background: rgba(255,255,255,.25);
  padding: 1px 8px;
  border-radius: 10px;
  font-size: 11px;
  margin-left: 4px;
}
.mktpos-state-btn:not(.active) .mktpos-state-count {
  background: rgba(0,0,0,.08);
}

/* ============================================================
 * DISCOUNT / SHIPPING FIELDS (Builder)
 * ============================================================ */
.mktpos-extra-fields {
  display: flex;
  gap: 16px;
  padding: 12px 20px;
  background: var(--mktpos-bg);
  border-top: 1px solid var(--mktpos-border);
  flex-wrap: wrap;
}
.mktpos-extra-field {
  flex: 1;
  min-width: 140px;
}
.mktpos-extra-field label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--mktpos-text-secondary);
  margin-bottom: 4px;
}
.mktpos-extra-field .mktpos-input {
  width: 100%;
  font-size: 14px;
}
.mktpos-summary-breakdown {
  padding: 12px 20px;
  background: var(--mktpos-bg);
  border-top: 1px solid var(--mktpos-border);
}
.mktpos-summary-line {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
  font-size: 14px;
}
.mktpos-summary-line.total {
  font-size: 18px;
  font-weight: 800;
  color: var(--mktpos-danger);
  padding-top: 8px;
  margin-top: 4px;
  border-top: 2px solid var(--mktpos-border);
}
.mktpos-summary-line span:first-child {
  color: var(--mktpos-text-secondary);
}
.mktpos-summary-line span:last-child {
  font-weight: 700;
}

/* Responsive state buttons */
@media (max-width: 768px) {
  .mktpos-state-filters {
    flex-wrap: wrap;
  }
  .mktpos-state-btn {
    flex: 1 1 33.33%;
    font-size: 12px;
    padding: 10px 6px;
  }
  .mktpos-state-btn:not(:last-child) {
    border-right: 1px solid var(--mktpos-border);
  }
  .mktpos-extra-fields {
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .mktpos-state-btn {
    flex: 1 1 50%;
  }
}

/* ============================================================
 * AJAX AUTOCOMPLETE SEARCH
 * ============================================================ */
.mktpos-search-wrapper {
  position: relative;
}
.mktpos-ajax-search-container {
  position: relative;
  flex: 1;
}
.mktpos-ajax-results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  border: 1.5px solid var(--mktpos-brand);
  border-top: none;
  border-radius: 0 0 var(--mktpos-radius-sm) var(--mktpos-radius-sm);
  box-shadow: var(--mktpos-shadow-lg);
  max-height: 350px;
  overflow-y: auto;
  z-index: 1000;
}
.mktpos-ajax-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  cursor: pointer;
  transition: background .15s;
  border-bottom: 1px solid var(--mktpos-border);
}
.mktpos-ajax-item:last-child { border-bottom: none; }
.mktpos-ajax-item:hover {
  background: var(--mktpos-brand-soft);
}
.mktpos-ajax-in-cart {
  background: var(--mktpos-success-bg) !important;
}
.mktpos-ajax-thumb {
  width: 40px;
  height: 40px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
}
.mktpos-ajax-no-img {
  background: #f0f0f5;
}
.mktpos-ajax-info {
  flex: 1;
  min-width: 0;
}
.mktpos-ajax-info strong {
  display: block;
  font-size: 13px;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mktpos-ajax-price {
  display: block;
  font-size: 12px;
  color: var(--mktpos-success);
  font-weight: 600;
}
.mktpos-ajax-info small {
  display: block;
  font-size: 11px;
  color: var(--mktpos-text-muted);
}
.mktpos-ajax-add {
  font-size: 12px;
  font-weight: 600;
  color: var(--mktpos-success);
  white-space: nowrap;
  padding: 4px 10px;
  border-radius: 6px;
  background: var(--mktpos-success-bg);
  transition: all .15s;
}
.mktpos-ajax-add:hover {
  background: var(--mktpos-success);
  color: #fff;
}
.mktpos-ajax-added {
  font-size: 12px;
  font-weight: 600;
  color: var(--mktpos-text-muted);
  white-space: nowrap;
}
.mktpos-ajax-loading, .mktpos-ajax-empty {
  padding: 16px;
  text-align: center;
  color: var(--mktpos-text-muted);
  font-size: 13px;
}

/* ============================================================
 * DISCOUNT TYPE SELECTOR ($ / %)
 * ============================================================ */
.mktpos-discount-input-group {
  display: flex;
  gap: 4px;
  align-items: center;
}
.mktpos-discount-type-select {
  width: 52px !important;
  min-width: 52px;
  padding: 8px 4px !important;
  text-align: center;
  font-weight: 700;
  font-size: 14px !important;
  flex-shrink: 0;
}
.mktpos-discount-input-group .mktpos-input-sm {
  flex: 1;
}

/* Line-level discount type */
.mktpos-line-disc-group {
  display: flex;
  gap: 4px;
  align-items: center;
}
.mktpos-line-disc-group select.mktpos-input {
  width: 42px !important;
  min-width: 42px;
  padding: 6px 2px !important;
  text-align: center;
  font-weight: 700;
  font-size: 12px !important;
}
.mktpos-line-disc-group input.mktpos-input {
  flex: 1;
  min-width: 50px;
}
.mktpos-line-field-disc {
  min-width: 110px !important;
}

/* ============================================================
 * SHIPMENT TRACKING TABLE
 * ============================================================ */
.mktpos-shipment-items {
  padding: 0;
}
.mktpos-shipment-table {
  width: 100%;
  border-collapse: collapse;
}
.mktpos-shipment-table th {
  padding: 10px 14px;
  text-align: left;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--mktpos-text-muted);
  background: var(--mktpos-bg);
  border-bottom: 2px solid var(--mktpos-border);
}
.mktpos-shipment-table td {
  padding: 10px 14px;
  font-size: 13px;
  border-bottom: 1px solid var(--mktpos-border);
  vertical-align: middle;
}
.mktpos-shipment-table tr:hover td {
  background: var(--mktpos-brand-soft);
}
.mktpos-shipment-actions {
  display: flex;
  gap: 8px;
  padding: 16px 20px;
  border-top: 1px solid var(--mktpos-border);
  flex-wrap: wrap;
}
.mktpos-input-xs {
  padding: 4px 6px !important;
  font-size: 12px !important;
  text-align: center;
}

/* ============================================================
 * SHIPPING EVIDENCE
 * ============================================================ */
.mktpos-evidence-section {
  padding: 16px 20px;
  border-top: 1px solid var(--mktpos-border);
}
.mktpos-evidence-section h4 {
  font-size: 14px;
  margin-bottom: 12px;
  color: var(--mktpos-text);
}
.mktpos-evidence-list {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.mktpos-evidence-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.mktpos-evidence-thumb {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 8px;
  border: 2px solid var(--mktpos-border);
  transition: transform .2s;
}
.mktpos-evidence-thumb:hover {
  transform: scale(1.1);
  border-color: var(--mktpos-brand);
}
.mktpos-evidence-item small {
  font-size: 10px;
  color: var(--mktpos-text-muted);
  text-align: center;
  max-width: 80px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mktpos-evidence-upload {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.mktpos-evidence-upload input[type="file"] {
  flex: 1;
  min-width: 200px;
}

/* ============================================================
 * ALERTS
 * ============================================================ */
.mktpos-alert {
  padding: 12px 16px;
  border-radius: var(--mktpos-radius-sm);
  font-size: 14px;
  font-weight: 500;
}
.mktpos-alert-error {
  background: var(--mktpos-danger-bg);
  color: var(--mktpos-danger);
  border: 1px solid rgba(230,57,70,.2);
}
.mktpos-alert-success {
  background: var(--mktpos-success-bg);
  color: var(--mktpos-success);
  border: 1px solid rgba(45,106,79,.2);
}
.mktpos-alert-warning {
  background: var(--mktpos-warning-bg);
  color: #0b6e66;
  border: 1px solid rgba(244,162,97,.2);
}

/* ============================================================
 * EXTRA FIELDS REFINEMENT
 * ============================================================ */
.mktpos-extra-row {
  width: 100%;
  margin-bottom: 8px;
}
.mktpos-extra-row label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--mktpos-text-secondary);
  margin-bottom: 4px;
}
.mktpos-input-sm {
  padding: 8px 10px !important;
  font-size: 13px !important;
}

/* Instalación field – clases -01 para integración con PDF */
.mktpos-extra-row-01 {
  width: 100%;
  margin-bottom: 8px;
}
.mktpos-extra-row-01 label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--mktpos-text-secondary);
  margin-bottom: 4px;
}
.mktpos-input-01 {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--mktpos-border);
  border-radius: var(--mktpos-radius-sm);
  font-size: 14px;
  color: var(--mktpos-text);
  background: #fff;
  transition: border-color .2s, box-shadow .2s;
}
.mktpos-input-01:focus {
  outline: none;
  border-color: var(--mktpos-brand);
  box-shadow: 0 0 0 3px var(--mktpos-brand-weak);
}
.mktpos-input-sm-01 {
  padding: 8px 10px !important;
  font-size: 13px !important;
}

.mktpos-summary-final {
  padding-top: 12px;
  margin-top: 8px;
  border-top: 1px dashed var(--mktpos-border);
}
.mktpos-final-total {
  font-size: 16px !important;
  padding-top: 8px;
  margin-top: 4px;
  border-top: 2px solid var(--mktpos-border);
}
.mktpos-final-total strong {
  color: var(--mktpos-danger) !important;
  font-size: 18px;
}

/* ============================================================
 * DASHBOARD DATE FILTERS
 * ============================================================ */
.mktpos-filters #mktpos_filter_date_from,
.mktpos-filters #mktpos_filter_date_to {
  width: 150px;
}
.mktpos-filters #mktpos_filter_search {
  width: 200px;
}

/* ============================================================
 * COMPLETE NOTE
 * ============================================================ */
.mktpos-complete-note {
  font-size: 12px;
  color: var(--mktpos-text-muted);
  margin: 4px 0 0;
  text-align: center;
}

/* ============================================================
 * FULFILLMENT BADGE ADDITIONS
 * ============================================================ */
.mktpos-badge-shipped { background: #0077b620; color: #0b6e66; border: 1px solid #0077b640; }
.mktpos-badge-delivered { background: #2d6a4f20; color: #2d6a4f; border: 1px solid #2d6a4f40; }

/* ============================================================
 * RESPONSIVE ADDITIONS
 * ============================================================ */
@media (max-width: 768px) {
  .mktpos-ajax-results {
    max-height: 250px;
  }
  .mktpos-shipment-table {
    font-size: 12px;
  }
  .mktpos-shipment-table th,
  .mktpos-shipment-table td {
    padding: 8px 8px;
  }
  .mktpos-evidence-list {
    justify-content: center;
  }
  .mktpos-filters #mktpos_filter_date_from,
  .mktpos-filters #mktpos_filter_date_to,
  .mktpos-filters #mktpos_filter_search {
    width: 100%;
  }
  .mktpos-discount-input-group {
    flex-wrap: nowrap;
  }
}


/* ============================================================
 * STOCK VALIDATION STYLES
 * ============================================================ */
.mktpos-stock-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  margin-left: 4px;
  vertical-align: middle;
}
.mktpos-stock-badge.mktpos-stock-out {
  background: var(--mktpos-danger-bg);
  color: var(--mktpos-danger);
}
.mktpos-stock-badge.mktpos-stock-ok {
  background: var(--mktpos-success-bg);
  color: var(--mktpos-success);
}

/* Ajax dropdown: out of stock items */
.mktpos-ajax-item.mktpos-ajax-no-stock {
  opacity: 0.6;
  cursor: not-allowed;
  background: #fde8ea;
}
.mktpos-ajax-item.mktpos-ajax-no-stock:hover {
  background: #fde8ea;
}
.mktpos-ajax-nostock-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--mktpos-danger);
  white-space: nowrap;
  padding: 4px 8px;
  background: var(--mktpos-danger-bg);
  border-radius: 6px;
}

/* Catalog grid: out of stock items */
.mktpos-search-item.mktpos-no-stock-item {
  opacity: 0.55;
  cursor: not-allowed;
  position: relative;
}
.mktpos-search-item.mktpos-no-stock-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.3);
  border-radius: var(--mktpos-radius);
  pointer-events: none;
}
.mktpos-nostock-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--mktpos-danger);
  text-align: center;
  display: block;
  padding: 4px 8px;
  background: var(--mktpos-danger-bg);
  border-radius: 6px;
}

/* Cart line items: stock warnings */
.mktpos-line-stock-warn {
  font-size: 11px;
  font-weight: 600;
  margin-top: 2px;
  padding: 2px 6px;
  border-radius: 4px;
  display: inline-block;
}
.mktpos-line-stock-error {
  color: var(--mktpos-danger);
  background: var(--mktpos-danger-bg);
}
.mktpos-line-stock-ok {
  color: var(--mktpos-success);
  background: var(--mktpos-success-bg);
}
.mktpos-line-item.mktpos-line-no-stock {
  border-left: 3px solid var(--mktpos-danger);
  background: #fde8ea;
}
.mktpos-line-item.mktpos-line-stock-exceeded {
  border-left: 3px solid var(--mktpos-warning);
  background: #fff3e0;
}

/* ============================================================
 * EVIDENCE UPLOAD IMPROVEMENTS
 * ============================================================ */
.mktpos-evidence-new {
  animation: mktpos-fadeIn 0.5s ease-in-out;
}
@keyframes mktpos-fadeIn {
  from { opacity: 0; transform: scale(0.8); }
  to { opacity: 1; transform: scale(1); }
}
.mktpos-evidence-upload {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--mktpos-border);
}

/* ============================================================
 * TOAST NOTIFICATION (added via JS)
 * ============================================================ */
#mktpos_toast {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}


/* ============================================================
 * CUSTOMER SEARCH DROPDOWN
 * ============================================================ */
.mktpos-customer-search-wrap {
  position: relative;
}
.mktpos-customer-results {
  z-index: 1000;
}
.mktpos-customer-item {
  cursor: pointer;
}
.mktpos-customer-item:hover {
  background: var(--mktpos-brand-soft);
}

/* ============================================================
 * EMAIL STATUS INDICATOR
 * ============================================================ */
.mktpos-email-status {
  display: block;
  margin-top: 4px;
  min-height: 18px;
}
.mktpos-email-exists-link {
  cursor: pointer;
  transition: opacity .2s;
}
.mktpos-email-exists-link:hover {
  opacity: .8;
  text-decoration: underline;
}

/* ============================================================
 * TOGGLE EXTRA FIELDS BUTTON
 * ============================================================ */
.mktpos-toggle-extra-fields {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--mktpos-brand);
  border: 1px dashed var(--mktpos-brand-border);
  background: var(--mktpos-brand-soft);
  padding: 8px 16px;
  border-radius: var(--mktpos-radius-sm);
  cursor: pointer;
  transition: all .2s;
  width: 100%;
  justify-content: center;
}
.mktpos-toggle-extra-fields:hover {
  background: var(--mktpos-brand-weak);
  border-color: var(--mktpos-brand);
}
.mktpos-toggle-icon {
  font-size: 10px;
  transition: transform .2s;
}
.mktpos-extra-address-fields {
  border: 1px solid var(--mktpos-border);
  border-radius: var(--mktpos-radius-sm);
  padding: 16px;
  background: var(--mktpos-brand-soft);
  margin-top: 8px;
}

/* ============================================================
 * Dashboard: columnas ocultas (Marca y Total)
 * Para mostrarlas de nuevo, comenta o elimina estas reglas
 * ============================================================ */
.mktpos-col-marca,
.mktpos-col-total {
  display: none;
}

/* ============================================================
 * ODOO-STYLE INLINE TABLE BUILDER (v2)
 * ============================================================ */

/* Client card — compact collapsible */
.mktpos-qb-client-card { margin-bottom: 12px; }
.mktpos-qb-client-header {
  display: flex; align-items: center; gap: 12px; padding: 12px 16px; cursor: pointer; user-select: none;
}
.mktpos-qb-client-preview { flex: 1; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mktpos-btn-icon {
  background: none; border: none; font-size: 12px; color: #888; cursor: pointer; padding: 4px 8px; line-height: 1;
  transition: transform .2s ease;
}
.mktpos-qb-client-body { padding: 0 16px 16px; }

/* Products card */
.mktpos-qb-products-card { margin-bottom: 12px; }
.mktpos-qb-products-header {
  display: flex; align-items: center; justify-content: space-between; padding: 12px 16px;
  border-bottom: 1px solid #eee;
}
.mktpos-qb-shortcut-hint { font-size: 11px; color: #999; }
.mktpos-qb-shortcut-hint kbd {
  background: #f0f0f5; border: 1px solid #ddd; border-radius: 3px; padding: 1px 5px;
  font-size: 10px; font-family: inherit; color: #555;
}

/* Table */
.mktpos-qb-table-wrap { overflow-x: auto; overflow-y: visible; }
.mktpos-qb-table {
  width: 100%; border-collapse: collapse; font-size: 13px;
}
.mktpos-qb-table thead th {
  background: #f8f9fa; padding: 8px 10px; text-align: left; font-weight: 600;
  font-size: 11px; text-transform: uppercase; color: #666; letter-spacing: .3px;
  border-bottom: 2px solid #eee; white-space: nowrap;
}
.mktpos-qb-table tbody tr { border-bottom: 1px solid #f0f0f0; }
.mktpos-qb-table tbody tr:hover { background: #fafbfc; }
.mktpos-qb-table tbody td { padding: 6px 10px; vertical-align: middle; }

/* Column widths */
.mktpos-qb-col-num { width: 36px; text-align: center; color: #aaa; font-size: 12px; }
.mktpos-qb-col-product { min-width: 180px; }
.mktpos-qb-col-sku { width: 90px; color: #888; font-size: 12px; }
.mktpos-qb-col-stock { width: 70px; font-size: 12px; }
.mktpos-qb-col-qty { width: 72px; }
.mktpos-qb-col-price { width: 100px; text-align: right; }
.mktpos-qb-col-disc { width: 140px; }
.mktpos-qb-col-subtotal { width: 100px; text-align: right; font-weight: 600; }
.mktpos-qb-col-note { min-width: 130px; }
.mktpos-qb-col-actions { width: 40px; text-align: center; }

/* Discount group inside table cell */
.mktpos-qb-disc-group { display: flex; gap: 4px; align-items: center; }
.mktpos-qb-disc-group .mktpos-qb-disc-type { width: 44px !important; padding: 4px 2px !important; font-size: 12px !important; flex-shrink: 0; }
.mktpos-qb-disc-group .mktpos-qb-disc-val  { width: 72px !important; padding: 4px 6px !important; font-size: 12px !important; }

/* Note input inside table */
.mktpos-qb-note-input { width: 100% !important; padding: 4px 6px !important; font-size: 12px !important; }

/* Merge preview box */
.mktpos-merge-preview-box { background: #f0f4ff; border: 1px solid #c0cfe8; border-radius: 8px; padding: 12px 16px; font-size: 13px; line-height: 1.6; }

/* Inputs inside table */
.mktpos-qb-product-input {
  width: 100%; padding: 6px 10px !important; font-size: 13px !important;
  border: 1px solid #e0e0e0 !important; border-radius: 6px !important;
}
.mktpos-qb-product-input:focus {
  border-color: #0b6e66 !important; box-shadow: 0 0 0 2px rgba(11, 110, 102,.15) !important;
  outline: none;
}
.mktpos-qb-qty-input {
  width: 64px; padding: 5px 8px !important; text-align: center; font-size: 13px !important;
  border: 1px solid #e0e0e0 !important; border-radius: 6px !important;
}
.mktpos-qb-qty-input:focus {
  border-color: #0b6e66 !important; box-shadow: 0 0 0 2px rgba(11, 110, 102,.15) !important;
  outline: none;
}
.mktpos-qb-qty-input:disabled { background: #f5f5f5; color: #ccc; cursor: not-allowed; }

/* Product name in filled row */
.mktpos-qb-prod-name {
  display: block; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  max-width: 280px;
}

/* Stock badges */
.mktpos-qb-stock-bad { color: #e63946; font-weight: 600; }

/* Remove button */
.mktpos-qb-remove {
  background: none; border: none; color: #ccc; font-size: 18px; cursor: pointer; padding: 2px 6px;
  line-height: 1; border-radius: 4px; transition: all .15s ease;
}
.mktpos-qb-remove:hover { color: #e63946; background: #fef2f2; }

/* Add row */
.mktpos-qb-add-row { padding: 8px 16px; border-top: 1px solid #f0f0f0; }

/* ---- Dropdown (autocomplete) ---- */
/* ============================================================
 * PRODUCT SEARCH — Floating panel (fixed viewport, never clipped)
 * ============================================================ */
.mktpos-qb-search-cell { position: relative; }
.mktpos-qb-product-input {
  width: 100%; padding: 7px 10px !important; font-size: 13px !important;
  border: 1.5px solid #e0e0e8 !important; border-radius: 6px !important;
  background: #fafafa !important; transition: border-color .15s, background .15s;
}
.mktpos-qb-product-input:focus {
  border-color: #0b6e66 !important; background: #fff !important;
  outline: none !important; box-shadow: 0 0 0 3px rgba(11, 110, 102,.1) !important;
}

/* Floating panel — uses JS to set top/left via getBoundingClientRect */
.mktpos-qb-dropdown {
  position: fixed;
  z-index: 99999;
  background: #fff;
  border: 1px solid #e0e0e8;
  border-radius: 10px;
  box-shadow: 0 12px 40px rgba(0,0,0,.18), 0 2px 8px rgba(0,0,0,.08);
  width: 400px;
  max-height: 380px;
  overflow-y: auto;
  overflow-x: hidden;
}

/* Loading / empty states */
.mktpos-qb-dd-loading {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 20px 14px; color: #888; font-size: 13px;
}
.mktpos-qb-dd-loading::before {
  content: ''; width: 14px; height: 14px; border: 2px solid #ddd;
  border-top-color: #0b6e66; border-radius: 50%; animation: mktpos-spin .7s linear infinite;
}
@keyframes mktpos-spin { to { transform: rotate(360deg); } }
.mktpos-qb-dd-empty { padding: 20px 14px; color: #bbb; font-size: 13px; text-align: center; }

/* Product result item */
.mktpos-qb-dd-item {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  cursor: pointer;
  border-bottom: 1px solid #f3f3f7;
  transition: background .1s;
}
.mktpos-qb-dd-item:last-child { border-bottom: none; }
.mktpos-qb-dd-item:hover,
.mktpos-qb-dd-highlight { background: #f4f5fa; }
.mktpos-qb-dd-item.mktpos-qb-dd-in-cart { background: #f9fafb; opacity: .7; cursor: default; }
.mktpos-qb-dd-item.mktpos-qb-dd-no-stock { opacity: .45; cursor: not-allowed; }

/* Thumbnail */
.mktpos-qb-dd-thumb {
  width: 44px; height: 44px; object-fit: cover;
  border-radius: 6px; border: 1px solid #eee; flex-shrink: 0;
}
.mktpos-qb-dd-thumb-placeholder {
  width: 44px; height: 44px; border-radius: 6px; background: #f0f0f5;
  border: 1px solid #eee; flex-shrink: 0; display: flex; align-items: center;
  justify-content: center; font-size: 18px; color: #ccc;
}

/* Name + meta */
.mktpos-qb-dd-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.mktpos-qb-dd-name {
  font-weight: 600; font-size: 13px; color: #1a1a2e;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.mktpos-qb-dd-sku { font-size: 11px; color: #aaa; }
.mktpos-qb-dd-stock-ok  { font-size: 11px; color: #2d6a4f; font-weight: 500; }
.mktpos-qb-dd-stock-low { font-size: 11px; color: #ea580c; font-weight: 500; }
.mktpos-qb-dd-stock-out { font-size: 11px; color: #e63946; font-weight: 500; }

/* Price + badge (right side) */
.mktpos-qb-dd-right { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; flex-shrink: 0; }
.mktpos-qb-dd-price { font-size: 14px; font-weight: 700; color: #0b6e66; white-space: nowrap; }
.mktpos-qb-dd-tag {
  font-size: 10px; background: #dcfce7; color: #166534;
  padding: 2px 7px; border-radius: 20px; white-space: nowrap; font-weight: 600;
}
.mktpos-qb-dd-tag-cart {
  font-size: 10px; background: #d3f1ec; color: #0b6e66;
  padding: 2px 7px; border-radius: 20px; white-space: nowrap;
}

/* Header inside dropdown (result count) */
.mktpos-qb-dd-header {
  padding: 8px 14px 6px;
  font-size: 11px; color: #aaa; font-weight: 600; letter-spacing: .04em;
  text-transform: uppercase; border-bottom: 1px solid #f3f3f7;
  position: sticky; top: 0; background: #fff; z-index: 1;
}

/* ---- Totals card ---- */
.mktpos-qb-totals-card { position: sticky; bottom: 0; z-index: 50; border-top: 2px solid #0b6e66; }
.mktpos-qb-totals-grid {
  display: grid; grid-template-columns: 1fr 1fr auto; gap: 16px; padding: 16px; align-items: start;
}
.mktpos-qb-totals-left { display: flex; flex-direction: column; gap: 8px; }
.mktpos-qb-totals-row { display: flex; align-items: center; gap: 8px; }
.mktpos-qb-totals-row label { font-size: 12px; color: #666; min-width: 110px; }
.mktpos-qb-totals-right { display: flex; flex-direction: column; gap: 4px; text-align: right; }
.mktpos-qb-summary-line { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; }
.mktpos-qb-summary-line span { color: #666; }
.mktpos-qb-summary-line strong { min-width: 90px; text-align: right; }
.mktpos-qb-final-total { font-size: 16px; border-top: 2px solid #333; padding-top: 6px; margin-top: 4px; }
.mktpos-qb-final-total span, .mktpos-qb-final-total strong { color: #111; }
.mktpos-qb-totals-action { display: flex; flex-direction: column; align-items: stretch; gap: 6px; min-width: 180px; }

/* Mobile responsive */
@media (max-width: 768px) {
  .mktpos-qb-totals-grid { grid-template-columns: 1fr; }
  .mktpos-qb-col-sku, .mktpos-qb-col-stock, .mktpos-qb-col-note { display: none; }
  .mktpos-qb-products-header { flex-direction: column; gap: 6px; }
  .mktpos-qb-shortcut-hint { display: none; }
  .mktpos-qb-prod-name { max-width: 160px; }
}

/* ============================================================
 * ODOO-STYLE LAYOUT (New builder)
 * ============================================================ */

/* Page wrapper */
.mktpos-odoo-layout .mktpos-odoo-content {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px 88px;
}

/* ---- Header ---- */
.mktpos-odoo-header {
  background: #fff;
  border-bottom: 1px solid #e8e8ed;
  padding: 28px 24px 22px;
  margin-bottom: 0;
}

.mktpos-odoo-title-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}

.mktpos-odoo-title {
  font-size: 28px;
  font-weight: 700;
  color: #1a1a2e;
  margin: 0;
  line-height: 1;
}

.mktpos-odoo-badges { display: flex; gap: 6px; flex-wrap: wrap; }

/* Top fields: two-column row */
.mktpos-odoo-fields-top {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 24px;
  margin-bottom: 12px;
}

.mktpos-odoo-field-group { display: flex; flex-direction: column; gap: 4px; }
.mktpos-odoo-field-wide  { grid-column: span 2; }

.mktpos-odoo-label {
  font-size: 13px;
  font-weight: 600;
  color: #444;
  min-width: 80px;
}

.mktpos-odoo-input {
  border: 1px solid #d0d7de !important;
  border-radius: 6px !important;
  padding: 8px 12px !important;
  font-size: 14px !important;
  background: #fff !important;
  transition: border-color .15s;
}
.mktpos-odoo-input:focus { border-color: #0b6e66 !important; outline: none !important; box-shadow: 0 0 0 3px rgba(11, 110, 102,.1) !important; }

.mktpos-odoo-input-sm {
  border: 1px solid #d0d7de !important;
  border-radius: 6px !important;
  padding: 6px 10px !important;
  font-size: 13px !important;
  background: #fff !important;
}
.mktpos-odoo-input-sm:focus { border-color: #0b6e66 !important; outline: none !important; }

/* Right column rows */
.mktpos-odoo-field-right { gap: 8px; }
.mktpos-odoo-right-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.mktpos-odoo-right-row .mktpos-odoo-label { min-width: 70px; }
.mktpos-odoo-right-row .mktpos-odoo-input-sm { flex: 1; }

/* Optional fields toggle */
.mktpos-odoo-optional-toggle { margin: 8px 0 4px; }
.mktpos-odoo-toggle-btn {
  background: none;
  border: none;
  color: #0b6e66;
  font-size: 13px;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 5px;
}
.mktpos-odoo-toggle-btn:hover { text-decoration: underline; }

/* Extra fields grid */
.mktpos-odoo-extra-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  padding: 14px 0 6px;
}

/* Mode row */
.mktpos-odoo-mode-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid #f0f0f5;
}

/* ---- Table section ---- */
.mktpos-odoo-table-section {
  background: #fff;
  border: 1px solid #e8e8ed;
  border-radius: 10px;
  margin-top: 16px;
  overflow: visible; /* Allow dropdown to show above table rows */
}

.mktpos-odoo-tabs {
  display: flex;
  align-items: center;
  gap: 0;
  border-bottom: 1px solid #e8e8ed;
  padding: 0 24px;
  justify-content: space-between;
}

.mktpos-odoo-tab {
  font-size: 13px;
  font-weight: 600;
  color: #444;
  padding: 12px 0;
  border-bottom: 2px solid transparent;
  cursor: default;
}
.mktpos-odoo-tab-active {
  color: #0b6e66;
  border-bottom-color: #0b6e66;
}

.mktpos-odoo-tab-hint {
  font-size: 11px;
  color: #aaa;
}
.mktpos-odoo-tab-hint kbd {
  background: #f0f0f5;
  border: 1px solid #d0d7de;
  border-radius: 3px;
  padding: 1px 4px;
  font-size: 10px;
  color: #555;
}

/* Odoo-style table */
.mktpos-odoo-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.mktpos-odoo-table thead th {
  background: #f8f9fb;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: #888;
  padding: 8px 10px;
  border-bottom: 1px solid #e8e8ed;
  white-space: nowrap;
}
.mktpos-odoo-table tbody tr { border-bottom: 1px solid #f0f0f5; }
.mktpos-odoo-table tbody tr:last-child { border-bottom: none; }
.mktpos-odoo-table tbody td { padding: 6px 10px; vertical-align: middle; }
.mktpos-odoo-table .mktpos-input { padding: 4px 8px !important; font-size: 13px !important; border-radius: 5px !important; }
/* Align the table's outer edges with the card frame (24px) */
.mktpos-odoo-table thead th:first-child,
.mktpos-odoo-table tbody td:first-child { padding-left: 24px; }
.mktpos-odoo-table thead th:last-child,
.mktpos-odoo-table tbody td:last-child { padding-right: 24px; }

/* Odoo layout column widths */
.mktpos-odoo-layout .mktpos-qb-col-product  { min-width: 200px; }
.mktpos-odoo-layout .mktpos-qb-col-note     { min-width: 160px; }
.mktpos-odoo-layout .mktpos-qb-col-qty      { width: 80px; text-align: right; }
.mktpos-odoo-layout .mktpos-qb-col-price    { width: 110px; text-align: right; }
.mktpos-odoo-layout .mktpos-qb-col-disc     { width: 130px; }
.mktpos-odoo-layout .mktpos-qb-col-subtotal { width: 110px; text-align: right; font-weight: 600; }
.mktpos-odoo-layout .mktpos-qb-col-actions  { width: 36px; text-align: center; }

/* SKU tag in product cell */
.mktpos-sku-tag { color: #888; font-size: 11px; margin-right: 4px; }

/* Admin brand selector in builder */
.mktpos-odoo-brand-select {
  font-size: 13px !important;
  font-weight: 600 !important;
  padding: 4px 10px !important;
  border-radius: 20px !important;
  border: 2px solid #0b6e66 !important;
  background: #f4f5fa !important;
  color: #0b6e66 !important;
  cursor: pointer;
  min-width: 140px;
}
.mktpos-odoo-brand-select:focus { outline: none !important; box-shadow: 0 0 0 3px rgba(11, 110, 102,.15) !important; }

/* Editable product name */
.mktpos-qb-prod-cell { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.mktpos-qb-prod-editable {
  cursor: pointer;
  border-bottom: 1px dashed transparent;
  transition: border-color .15s, color .15s;
  display: inline-block;
  padding: 1px 0;
}
.mktpos-qb-prod-editable:hover {
  color: #0b6e66;
  border-bottom-color: #0b6e66;
}
.mktpos-qb-prod-editable:hover::after {
  content: ' ✎';
  font-size: 11px;
  color: #0b6e66;
  opacity: .7;
}
.mktpos-qb-inline-search { position: relative; }
.mktpos-qb-replace-input { width: 100% !important; font-size: 13px !important; }

/* Stock warning inline badge */
.mktpos-qb-stock-inline { color: #f0a500; font-size: 13px; margin-right: 2px; cursor: help; }

/* Note row (free-text) */
.mktpos-qb-row-note td { background: #fffdf0; }
.mktpos-qb-note-free-input { font-style: italic; color: #555 !important; background: transparent !important; border: 1px dashed #ddd !important; }

/* Odoo add links */
.mktpos-odoo-add-links {
  display: flex;
  gap: 20px;
  padding: 12px 24px;
  border-top: 1px solid #f0f0f5;
}
.mktpos-odoo-add-link {
  background: none;
  border: none;
  color: #0b6e66;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  padding: 0;
  text-decoration: none;
}
.mktpos-odoo-add-link:hover { text-decoration: underline; }

/* Terms input */
.mktpos-odoo-terms {
  padding: 14px 24px;
  border-top: 1px solid #f0f0f5;
}
.mktpos-odoo-terms-input {
  width: 100%;
  border: none !important;
  background: transparent !important;
  color: #888;
  font-size: 13px !important;
  resize: none;
  padding: 4px 0 !important;
}
.mktpos-odoo-terms-input:focus { outline: none !important; box-shadow: none !important; border-bottom: 1px solid #d0d7de !important; }

/* Totals block (right-aligned) */
.mktpos-odoo-totals {
  display: flex;
  justify-content: flex-end;
  padding: 18px 24px;
  border-top: 1px solid #e8e8ed;
}
.mktpos-odoo-totals-inner {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 320px;
}
.mktpos-odoo-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: #333;
}
.mktpos-odoo-discount-row { color: #555; }
.mktpos-odoo-grand-total {
  font-size: 16px;
  font-weight: 700;
  border-top: 2px solid #e8e8ed;
  padding-top: 8px;
  margin-top: 4px;
  color: #1a1a2e;
}
.mktpos-odoo-disc-type-sel {
  width: 44px !important;
  padding: 2px 4px !important;
  font-size: 12px !important;
  margin-left: 8px;
}
.mktpos-odoo-disc-input {
  width: 80px !important;
  padding: 3px 6px !important;
  font-size: 12px !important;
  text-align: right;
}

/* Save bar */
.mktpos-odoo-save-bar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: #fff;
  border-top: 1px solid #e8e8ed;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 1000;
  box-shadow: 0 -4px 16px rgba(0,0,0,.06);
}
.mktpos-odoo-save-meta { font-size: 13px; color: #888; display: flex; align-items: center; gap: 16px; }
.mktpos-odoo-save-actions { display: flex; align-items: center; gap: 12px; }
.mktpos-odoo-cancel-link {
  font-size: 13px;
  color: #888;
  text-decoration: none;
  border-bottom: 1px dashed #bbb;
  transition: color .15s;
}
.mktpos-odoo-cancel-link:hover { color: #e63946; border-bottom-color: #e63946; }

/* Odoo mobile responsive */
@media (max-width: 768px) {
  .mktpos-odoo-fields-top { grid-template-columns: 1fr; }
  .mktpos-odoo-extra-grid { grid-template-columns: 1fr 1fr; }
  .mktpos-odoo-layout .mktpos-qb-col-note { display: none; }
  .mktpos-odoo-totals-inner { min-width: unset; width: 100%; }
  .mktpos-odoo-totals { padding: 12px; }
}

/* ============================================================
 * OVERPAY MODAL OPTIONS
 * ============================================================ */
.mktpos-overpay-options { display: flex; flex-direction: column; gap: 8px; }
.mktpos-overpay-opt {
  display: block; width: 100%; text-align: left;
  padding: 12px 16px; border-radius: 8px; cursor: pointer;
  font-size: 14px; font-weight: 500; color: #1a1a2e;
  background: #f8f9fb; border: 1.5px solid #e8e8ed;
  transition: background .15s, border-color .15s, color .15s;
}
.mktpos-overpay-opt:hover { background: #f4f5fa; border-color: #0b6e66; color: #0b6e66; }
.mktpos-overpay-force { background: #f0fdf4 !important; border-color: #86efac !important; color: #166534 !important; }
.mktpos-overpay-force:hover { background: #dcfce7 !important; color: #14532d !important; }

/* ============================================================
 * INVENTORY SECTION — [mktpos_inventory]
 * ============================================================ */

/* ── Wrap ── */
.mktpos-inventory-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 16px 80px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ── Header ── */
.mktpos-inv-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}
.mktpos-inv-header-left { display: flex; align-items: center; gap: 12px; }
.mktpos-inv-title {
  font-size: 22px;
  font-weight: 700;
  color: #1a1a2e;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.mktpos-inv-icon { font-size: 22px; }
.mktpos-inv-alert-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #fff4e5;
  color: #b45309;
  border: 1.5px solid #fcd34d;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
}
.mktpos-inv-brand-badge {
  display: inline-block;
  background: #e8f4fb;
  color: #0b6e66;
  border: 1.5px solid #d8dbe8;
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
}

/* ── Toolbar ── */
.mktpos-inv-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}
.mktpos-inv-search {
  flex: 1 1 220px;
  max-width: 320px;
  padding: 8px 14px;
  border: 1.5px solid #dde;
  border-radius: 8px;
  font-size: 14px;
  outline: none;
  transition: border-color .15s;
}
.mktpos-inv-search:focus { border-color: #0b6e66; }
.mktpos-inv-check-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: #555;
  cursor: pointer;
  user-select: none;
}

/* ── Table ── */
.mktpos-inv-table-wrap {
  overflow-x: auto;
  border-radius: 10px;
  border: 1.5px solid #e8e8ed;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,.05);
}
.mktpos-inv-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.mktpos-inv-table thead th {
  background: #f7f8fc;
  padding: 11px 14px;
  text-align: left;
  font-weight: 600;
  color: #444;
  border-bottom: 1.5px solid #e8e8ed;
  white-space: nowrap;
}
.mktpos-inv-table th.mktpos-inv-num,
.mktpos-inv-table td.mktpos-inv-num { text-align: right; }
.mktpos-inv-table th.mktpos-inv-status,
.mktpos-inv-table td.mktpos-inv-status { text-align: center; }
.mktpos-inv-table th.mktpos-inv-actions,
.mktpos-inv-table td.mktpos-inv-actions { text-align: center; }
.mktpos-inv-table th.mktpos-inv-moves,
.mktpos-inv-table td.mktpos-inv-moves { text-align: center; }

.mktpos-inv-row { border-bottom: 1px solid #f2f2f5; transition: background .1s; }
.mktpos-inv-row:last-child { border-bottom: none; }
.mktpos-inv-row:hover { background: #f8fafc; }
.mktpos-inv-table td { padding: 10px 14px; color: #1a1a2e; vertical-align: middle; }

.mktpos-inv-sku { font-family: monospace; font-size: 13px; color: #666; }
.mktpos-inv-name { font-weight: 500; }
.mktpos-inv-loading { text-align: center; padding: 32px; color: #888; }

/* ── Stock badges ── */
.mktpos-inv-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.mktpos-inv-badge-ok  { background: #dcfce7; color: #166534; border: 1px solid #86efac; }
.mktpos-inv-badge-low { background: #fff4e5; color: #b45309; border: 1px solid #fcd34d; }
.mktpos-inv-badge-out { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }

/* ── Pagination ── */
.mktpos-inv-pagination {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
  flex-wrap: wrap;
}
.mktpos-inv-pginfo { font-size: 13px; color: #888; }

/* ── Movements slide panel ── */
.mktpos-inv-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.35);
  z-index: 1200;
}
.mktpos-inv-moves-panel {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: 680px;
  max-width: 96vw;
  background: #fff;
  z-index: 1300;
  display: flex;
  flex-direction: column;
  box-shadow: -4px 0 24px rgba(0,0,0,.12);
}
.mktpos-inv-moves-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1.5px solid #eee;
  font-size: 16px;
  font-weight: 700;
  color: #1a1a2e;
  background: #f7f8fc;
}
.mktpos-inv-moves-close {
  background: none; border: none; font-size: 20px;
  cursor: pointer; color: #888; padding: 4px 8px;
  border-radius: 6px; transition: background .15s;
}
.mktpos-inv-moves-close:hover { background: #f2f2f5; color: #333; }
.mktpos-inv-moves-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
}
.mktpos-inv-moves-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.mktpos-inv-moves-table thead th {
  background: #f7f8fc;
  padding: 8px 10px;
  text-align: left;
  font-weight: 600;
  color: #555;
  border-bottom: 1.5px solid #e8e8ed;
  white-space: nowrap;
}
.mktpos-inv-moves-table td {
  padding: 8px 10px;
  border-bottom: 1px solid #f2f2f5;
  color: #1a1a2e;
  vertical-align: middle;
}
.mktpos-inv-moves-date { white-space: nowrap; color: #888; font-size: 12px; }
.mktpos-inv-move-type { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; }
.mktpos-inv-pos { color: #166534; font-weight: 700; }
.mktpos-inv-neg { color: #991b1b; font-weight: 700; }

/* ── Adjust modal ── */
#mktpos-inv-adj-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.40);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
}
#mktpos-inv-adj-modal {
  background: #fff;
  border-radius: 14px;
  width: 440px;
  max-width: 94vw;
  box-shadow: 0 8px 40px rgba(0,0,0,.18);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* ── select pill (brand filter dropdown) ── */
.mktpos-select-pill {
  padding: 6px 14px;
  border: 1.5px solid #d8dbe8;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  color: #0b6e66;
  background: #e8f4fb;
  outline: none;
  cursor: pointer;
  transition: border-color .15s;
}
.mktpos-select-pill:focus { border-color: #0b6e66; }

/* ── responsive ── */
@media (max-width: 600px) {
  .mktpos-inv-moves-panel { width: 100%; }
  .mktpos-inv-table th.mktpos-inv-num,
  .mktpos-inv-table td.mktpos-inv-num { display: none; }
}

/* ============================================================
 * NEW UX/UI IMPROVEMENTS — 2026
 * ============================================================ */

/* ── Dashboard: Period Tabs ── */
.mktpos-period-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 0;
  padding: 4px;
  background: rgba(255,255,255,.74);
  border: 1px solid rgba(31,41,55,.08);
  border-radius: 16px;
  width: fit-content;
  box-shadow: 0 10px 24px rgba(44,28,18,.06);
}
.mktpos-period-tab {
  padding: 9px 18px;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  background: transparent;
  color: #6b7280;
  transition: background .15s, color .15s;
}
.mktpos-period-tab.active,
.mktpos-period-tab:hover {
  background: #fff;
  color: #111827;
  box-shadow: 0 8px 18px rgba(44,28,18,.08);
}
.mktpos-kpi-loading-spinner { display: flex; align-items: center; margin-left: 8px; opacity: .6; }
.mktpos-spin { animation: mktpos-spin .7s linear infinite; }
@keyframes mktpos-spin { to { transform: rotate(360deg); } }

/* ── Dashboard: Alert Panel ── */
.mktpos-alert-panel {
  background: #fff;
  border: 1px solid #fde3c0;
  border-radius: 16px;
  margin-bottom: 20px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(217,119,6,.07);
}
.mktpos-alert-panel-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 18px;
  background: linear-gradient(180deg, #fff7ed, #fff1e0);
  border-bottom: 1px solid #fde3c0;
}
.mktpos-alert-panel-icon {
  color: #ea580c;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: #ffedd5;
  border-radius: 9px;
  flex-shrink: 0;
}
.mktpos-alert-panel-title {
  font-weight: 700;
  font-size: 13px;
  color: #9a3412;
  flex: 1;
  letter-spacing: .01em;
}
.mktpos-alert-panel-count {
  background: #ea580c;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  min-width: 22px;
  text-align: center;
  padding: 2px 8px;
  border-radius: 20px;
  box-shadow: 0 2px 6px rgba(234,88,12,.28);
}

/* ── Carrusel horizontal de tarjetas (compacto, auto-deslizante) ── */
.mktpos-alert-list {
  display: flex;
  flex-wrap: nowrap;
  gap: 10px;
  padding: 14px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: #fcd9b6 transparent;
  cursor: grab;  /* manita: indica que se puede arrastrar de izquierda a derecha */
}
.mktpos-alert-list.mktpos-grabbing { cursor: grabbing; scroll-snap-type: none; }
.mktpos-alert-list.mktpos-grabbing .mktpos-alert-card { cursor: grabbing; }
.mktpos-alert-list::-webkit-scrollbar { height: 6px; }
.mktpos-alert-list::-webkit-scrollbar-track { background: transparent; }
.mktpos-alert-list::-webkit-scrollbar-thumb { background: #fcd9b6; border-radius: 10px; }

.mktpos-alert-card {
  flex: 0 0 auto;
  width: 250px;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 13px 14px 12px 18px;
  border: 1px solid #fde2bf;
  border-radius: 14px;
  background: linear-gradient(158deg, #fffaf3, #fff2e0);
  position: relative;
  overflow: hidden;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.mktpos-alert-card::before {  /* acento lateral */
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, #fb923c, #ea580c);
}
.mktpos-alert-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(234,88,12,.16);
  border-color: #fb923c;
}
.mktpos-alert-name {
  font-weight: 700;
  color: #1a1a2e;
  font-size: 13.5px;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mktpos-alert-name small { color: #b08968 !important; font-weight: 500; }
.mktpos-alert-reason {
  font-size: 11px;
  color: #c2620c;
  line-height: 1.3;
  min-height: 28px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.mktpos-alert-balance-row {
  margin-top: 4px;
  padding-top: 9px;
  border-top: 1px dashed #fcdcbb;
}
.mktpos-alert-balance {
  font-weight: 800;
  color: #ea580c;
  font-size: 15px;
  white-space: nowrap;
}

/* Acciones: dos botones tipo píldora (icono + texto), mini y responsive. */
.mktpos-alert-actions { display: flex; align-items: stretch; gap: 7px; margin-top: 9px; }
.mktpos-alert-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 6px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: transform .12s ease, filter .12s ease, box-shadow .12s ease, background .12s ease, border-color .12s ease;
}
.mktpos-alert-btn svg { width: 14px; height: 14px; flex-shrink: 0; }
.mktpos-alert-btn-view {
  background: #fff;
  color: #ea580c;
  border: 1.5px solid #fcd3a8;
}
.mktpos-alert-btn-view:hover { border-color: #ea580c; background: #fff7ed; transform: translateY(-1px); }
.mktpos-alert-btn-wa {
  background: #25D366;
  color: #fff;
  border: 1.5px solid #1da851;
  box-shadow: 0 3px 8px rgba(37,211,102,.3);
}
.mktpos-alert-btn-wa:hover { filter: brightness(1.05); transform: translateY(-1px); }

/* Móvil: la tarjeta ocupa casi todo el ancho (1 visible, se desliza con el dedo). */
@media (max-width: 600px) {
  .mktpos-alert-card { width: 80vw; max-width: 320px; }
  .mktpos-alert-list { padding: 12px; }
}

/* ── Catalog: Layout ── */
.mktpos-catalog-layout {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}
.mktpos-cat-sidebar {
  width: 200px;
  flex-shrink: 0;
  background: #fff;
  border: 1px solid var(--mktpos-border, #e8e8ed);
  border-radius: 10px;
  padding: 12px 0;
  position: sticky;
  top: 80px;
}
.mktpos-cat-sidebar-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #9ca3af;
  padding: 0 14px 8px;
  border-bottom: 1px solid #f0f0f5;
  margin-bottom: 4px;
}
.mktpos-cat-list { list-style: none; margin: 0; padding: 4px 0; }
.mktpos-cat-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 7px 14px;
  font-size: 13px;
  color: #374151;
  text-decoration: none;
  border-radius: 0;
  transition: background .12s, color .12s;
  cursor: pointer;
}
.mktpos-cat-item:hover { background: #f3f4f6; color: var(--mktpos-primary, #0b6e66); }
.mktpos-cat-item.active { background: var(--mktpos-primary, #0b6e66); color: #fff; font-weight: 600; }
.mktpos-cat-item.active .mktpos-cat-count { color: rgba(255,255,255,.8); }
.mktpos-cat-count { font-size: 11px; color: #9ca3af; font-weight: 600; }
.mktpos-catalog-main { flex: 1; min-width: 0; }

/* ── Catalog: Stock chips ── */
.mktpos-product-card { position: relative; }
.mktpos-stock-chip {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 20px;
  letter-spacing: .03em;
  pointer-events: none;
}
.mktpos-chip-in  { background: #d1fae5; color: #065f46; }
.mktpos-chip-low { background: #fef3c7; color: #92400e; }
.mktpos-chip-out { background: #fee2e2; color: #991b1b; }

/* ── Quote View: Stepper ── */
.mktpos-stepper {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 16px 20px;
  background: #fff;
  border: 1px solid var(--mktpos-border, #e8e8ed);
  border-radius: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 0;
  position: relative;
}
.mktpos-stepper-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex: 1;
  min-width: 70px;
}
.mktpos-stepper-dot {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  border: 2.5px solid #e5e7eb;
  background: #fff;
  color: #9ca3af;
  transition: all .2s;
}
.mktpos-stepper-label {
  font-size: 11px;
  font-weight: 600;
  color: #9ca3af;
  text-align: center;
  white-space: nowrap;
}
.mktpos-stepper-line {
  flex: 1;
  height: 2px;
  background: #e5e7eb;
  margin-bottom: 14px;
  transition: background .2s;
}
.mktpos-stepper-line.done { background: var(--mktpos-primary, #0b6e66); }
.mktpos-stepper-step.done .mktpos-stepper-dot {
  background: var(--mktpos-primary, #0b6e66);
  border-color: var(--mktpos-primary, #0b6e66);
  color: #fff;
}
.mktpos-stepper-step.done .mktpos-stepper-label { color: var(--mktpos-primary, #0b6e66); }
.mktpos-stepper-step.active .mktpos-stepper-dot {
  background: #fff;
  border-color: var(--mktpos-primary, #0b6e66);
  color: var(--mktpos-primary, #0b6e66);
  box-shadow: 0 0 0 4px rgba(11, 110, 102,.12);
}
.mktpos-stepper-step.active .mktpos-stepper-label { color: var(--mktpos-primary, #0b6e66); font-weight: 700; }
.mktpos-stepper-cancelled .mktpos-stepper-dot { border-color: #e5e7eb; background: #f3f4f6; color: #9ca3af; }
.mktpos-stepper-cancelled-badge {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  background: #fef2f2;
  color: #dc2626;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  border: 1px solid #fecaca;
}

/* ── Quote View: More actions dropdown ── */
.mktpos-more-actions { position: relative; }
.mktpos-more-btn { display: flex; align-items: center; gap: 5px; }
.mktpos-more-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 210px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
  opacity: 0;
  transform: translateY(-6px) scale(.97);
  transition: opacity .15s, transform .15s;
  pointer-events: none;
  z-index: 300;
  padding: 4px 0;
}
.mktpos-more-dropdown.open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
.mktpos-more-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 14px;
  font-size: 13px;
  color: #374151;
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
  width: 100%;
  text-align: left;
  transition: background .1s;
}
.mktpos-more-item:hover { background: #f3f4f6; color: #111; }
.mktpos-more-divider { height: 1px; background: #f0f0f5; margin: 4px 0; }
.mktpos-btn-secondary {
  background: #f0f9ff;
  color: #0369a1;
  border: 1.5px solid #bae6fd;
  font-weight: 600;
}
.mktpos-btn-secondary:hover { background: #e0f2fe; }

/* ── Client cards ── */
.mktpos-cl-toolbar {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}
.mktpos-cl-search-form {
  display: flex;
  gap: 10px;
  align-items: center;
}
.mktpos-cl-search-input { flex: 1; max-width: 420px; }
.mktpos-filter-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}
.mktpos-filter-chip {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 14px;
  border: 1.5px solid #e5e7eb;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  background: #fff;
  color: #6b7280;
  cursor: pointer;
  transition: all .15s;
}
.mktpos-filter-chip:hover { border-color: var(--mktpos-primary, #0b6e66); color: var(--mktpos-primary, #0b6e66); }
.mktpos-filter-chip.active {
  background: var(--mktpos-primary, #0b6e66);
  border-color: var(--mktpos-primary, #0b6e66);
  color: #fff;
}
.mktpos-filter-chip.active .mktpos-chip-badge { background: rgba(255,255,255,.3); }
.mktpos-chip-badge {
  background: #e5e7eb;
  color: #374151;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 10px;
}
.mktpos-cl-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}
.mktpos-cl-card {
  background: #fff;
  border: 1px solid var(--mktpos-border, #e8e8ed);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: box-shadow .15s, transform .15s;
}
.mktpos-cl-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,.08); transform: translateY(-1px); }
.mktpos-cl-card[style*="display:none"] { display: none !important; }
.mktpos-cl-card-top { display: flex; gap: 12px; align-items: flex-start; }
.mktpos-cl-avatar {
  width: 44px; height: 44px; border-radius: 50%;
  background: linear-gradient(135deg, #0b8076, #0b8076);
  color: #fff; font-size: 15px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.mktpos-cl-card-info { flex: 1; min-width: 0; }
.mktpos-cl-name { font-size: 14px; font-weight: 700; color: #111; margin-bottom: 3px; display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.mktpos-cl-brand { font-size: 11px; font-weight: 600; color: var(--mktpos-brand, #0b8076); letter-spacing: .3px; text-transform: uppercase; margin-bottom: 1px; }
.mktpos-cl-email { font-size: 12px; color: #6b7280; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mktpos-cl-phone { font-size: 11px; color: #9ca3af; }
.mktpos-cl-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 10px;
}
.mktpos-cl-badge-vip { background: #fef3c7; color: #92400e; }
.mktpos-cl-badge-balance { background: #fee2e2; color: #991b1b; }
.mktpos-cl-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.mktpos-cl-metric {
  background: #f9fafb;
  border-radius: 8px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.mktpos-cl-metric-warn { background: #fff7ed; }
.mktpos-cl-metric-val { font-size: 13px; font-weight: 700; color: #111; }
.mktpos-cl-metric-warn .mktpos-cl-metric-val { color: #d97706; }
.mktpos-cl-metric-lbl { font-size: 10px; color: #9ca3af; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.mktpos-cl-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.mktpos-btn-whatsapp { background: #25d366; color: #fff; border-color: #25d366; }
.mktpos-btn-whatsapp:hover { background: #1ebe5d; }
.mktpos-cl-details { border-top: 1px solid #f3f4f6; padding-top: 8px; margin-top: 0; }
.mktpos-cl-details-toggle {
  font-size: 12px;
  color: var(--mktpos-primary, #0b6e66);
  cursor: pointer;
  font-weight: 600;
  list-style: none;
  padding: 4px 0;
}
.mktpos-cl-details-toggle::-webkit-details-marker { display: none; }
.mktpos-cl-quotes-list { display: flex; flex-direction: column; gap: 4px; padding-top: 8px; }
.mktpos-cl-quote-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 6px;
  background: #f9fafb;
  font-size: 12px;
  text-decoration: none;
  color: #374151;
  transition: background .1s;
}
.mktpos-cl-quote-row:hover { background: #f0f9ff; color: var(--mktpos-primary, #0b6e66); }
.mktpos-cl-quote-id { font-weight: 700; color: var(--mktpos-primary, #0b6e66); min-width: 36px; }

/* ── Inventory: Tabs ── */
.mktpos-inv-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 12px 20px 0;
  border-bottom: 2px solid #f0f0f5;
  background: #fff;
}
.mktpos-inv-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border: none;
  border-radius: 8px 8px 0 0;
  font-size: 13px;
  font-weight: 600;
  color: #6b7280;
  background: transparent;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: color .15s, border-color .15s;
}
.mktpos-inv-tab:hover { color: #111; }
.mktpos-inv-tab.active { color: var(--mktpos-primary, #0b6e66); border-bottom-color: var(--mktpos-primary, #0b6e66); background: transparent; }
.mktpos-inv-tab-badge {
  background: #ef4444;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 10px;
}

/* ── Cortes: Date preset bar ── */
.mktpos-date-preset-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  background: #f9fafb;
  border-bottom: 1px solid #e5e7eb;
  flex-wrap: wrap;
}
.mktpos-date-preset-label { font-size: 12px; font-weight: 700; color: #9ca3af; margin-right: 4px; }
.mktpos-date-preset {
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  color: #374151;
  background: #fff;
  border: 1.5px solid #e5e7eb;
  text-decoration: none;
  transition: all .15s;
}
.mktpos-date-preset:hover { border-color: var(--mktpos-primary, #0b6e66); color: var(--mktpos-primary, #0b6e66); }
.mktpos-date-preset.active {
  background: var(--mktpos-primary, #0b6e66);
  border-color: var(--mktpos-primary, #0b6e66);
  color: #fff;
}
.mktpos-date-preset-current {
  margin-left: auto;
  font-size: 12px;
  color: #6b7280;
  font-weight: 600;
}
.mktpos-rpt-export-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; max-width: 100%; }
.mktpos-rpt-header { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 12px; }

/* ── Quote builder: Sticky footer ── */
.mktpos-sticky-footer {
  position: sticky;
  bottom: 0;
  left: 0; right: 0;
  background: #fff;
  border-top: 2px solid var(--mktpos-border, #e8e8ed);
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: 0 -4px 20px rgba(0,0,0,.07);
  z-index: 150;
  border-radius: 0 0 var(--mktpos-radius, 14px) var(--mktpos-radius, 14px);
  flex-wrap: wrap;
}
.mktpos-sticky-footer-meta { font-size: 13px; color: #6b7280; flex: 1; }
.mktpos-sticky-footer-total { display: flex; align-items: center; gap: 8px; }
.mktpos-sticky-total-label { font-size: 13px; color: #6b7280; font-weight: 600; }
.mktpos-sticky-total-val { font-size: 22px; font-weight: 800; color: #111; letter-spacing: -.02em; }
.mktpos-sticky-footer-actions { display: flex; gap: 8px; align-items: center; margin-left: auto; }

/* ── Responsive ── */
@media (max-width: 768px) {
  .mktpos-catalog-layout { flex-direction: column; }
  .mktpos-cat-sidebar { width: 100%; position: static; }
  .mktpos-cl-grid { grid-template-columns: 1fr; }
  .mktpos-stepper { gap: 4px; }
  .mktpos-stepper-label { font-size: 9px; }
  .mktpos-date-preset-bar { padding: 8px 12px; }
  .mktpos-date-preset-current { display: none; }
  .mktpos-sticky-footer { flex-direction: column; align-items: stretch; }
  .mktpos-sticky-footer-actions { justify-content: flex-end; }
  .mktpos-rpt-header { flex-direction: column; }
}

/* ── Brand context picker (navbar) ── */
.mktpos-brand-picker-wrap { position: relative; }
.mktpos-brand-picker-btn {
  display: flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 8px;
  color: #fff;
  padding: 5px 10px 5px 12px;
  cursor: pointer;
  font-size: 13px; font-weight: 600;
  transition: background .15s;
  white-space: nowrap;
}
.mktpos-brand-picker-btn:hover { background: rgba(255,255,255,.22); }
.mktpos-brand-picker-caret { opacity: .7; flex-shrink: 0; transition: transform .2s; }
.mktpos-brand-picker-btn[aria-expanded="true"] .mktpos-brand-picker-caret { transform: rotate(180deg); }
.mktpos-brand-picker-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 180px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 8px 32px rgba(0,0,0,.18);
  border: 1px solid #e8e8ed;
  z-index: 1200;
  overflow: hidden;
  opacity: 0; pointer-events: none;
  transform: translateY(-6px);
  transition: opacity .18s, transform .18s;
}
.mktpos-brand-picker-dropdown.open {
  opacity: 1; pointer-events: auto; transform: translateY(0);
}
.mktpos-brand-picker-option {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 14px;
  font-size: 13px; color: #1a1a2e; cursor: pointer;
  transition: background .1s;
}
.mktpos-brand-picker-option:hover { background: #f5f5fa; }
.mktpos-brand-picker-option.active { font-weight: 600; background: #f0f7ff; color: var(--mktpos-primary, #0b6e66); }
.mktpos-brand-picker-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #d0d0d8; flex-shrink: 0;
}
.mktpos-brand-picker-option.active .mktpos-brand-picker-dot { background: var(--mktpos-primary, #0b6e66); }

/* ============================================================
 * COMISIONES
 * ============================================================ */
.mktpos-page-commissions .mktpos-comm-content { max-width: 900px; margin: 0 auto; padding: 24px 16px; }

/* Header */
.mktpos-comm-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 24px; }
.mktpos-comm-title  { display: flex; align-items: center; gap: 10px; font-size: 22px; font-weight: 700; margin: 0 0 4px; }
.mktpos-comm-subtitle { color: var(--mktpos-text-muted, #6b7280); font-size: 14px; margin: 0; }

/* Tabs */
.mktpos-comm-tabs { display: flex; gap: 4px; border-bottom: 2px solid #e5e7eb; margin-bottom: 24px; }
.mktpos-comm-tab  {
  background: none; border: none; padding: 10px 20px; font-size: 14px; font-weight: 500;
  color: var(--mktpos-text-muted, #6b7280); cursor: pointer; border-bottom: 2px solid transparent;
  margin-bottom: -2px; transition: color .15s, border-color .15s; border-radius: 6px 6px 0 0;
}
.mktpos-comm-tab:hover  { color: var(--mktpos-primary, #0b6e66); background: #fafafa; }
.mktpos-comm-tab.active { color: var(--mktpos-primary, #0b6e66); border-bottom-color: var(--mktpos-primary, #0b6e66); font-weight: 600; }

/* Seller list */
.mktpos-comm-seller-list { display: flex; flex-direction: column; gap: 12px; }
.mktpos-comm-seller-card {
  background: #fff; border: 1px solid #e5e7eb; border-radius: 12px;
  overflow: hidden; transition: box-shadow .15s;
}
.mktpos-comm-seller-card:hover { box-shadow: 0 2px 12px rgba(0,0,0,.06); }

.mktpos-comm-seller-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; cursor: pointer; user-select: none;
}
.mktpos-comm-seller-head:hover { background: #fafafa; }
.mktpos-comm-seller-info { display: flex; align-items: center; gap: 12px; }
.mktpos-comm-seller-avatar {
  width: 38px; height: 38px; border-radius: 50%; background: var(--mktpos-primary, #0b6e66);
  color: #fff; font-weight: 700; font-size: 15px; display: flex; align-items: center; justify-content: center;
}
.mktpos-comm-rule-badge {
  display: inline-block; padding: 2px 10px; border-radius: 20px; font-size: 12px; font-weight: 500; margin-left: 8px;
}
.mktpos-comm-rule-badge.configured { background: #dcfce7; color: #16a34a; }
.mktpos-comm-rule-badge.empty      { background: #f3f4f6; color: #9ca3af; }
.mktpos-comm-chevron { transition: transform .2s; flex-shrink: 0; color: #9ca3af; }
.mktpos-comm-chevron.open { transform: rotate(180deg); }

/* Rule editor */
.mktpos-comm-rule-editor { padding: 0 20px 20px; border-top: 1px solid #f0f0f5; }
.mktpos-comm-section { margin-top: 18px; }
.mktpos-comm-label  { display: block; font-size: 13px; font-weight: 600; color: #374151; margin-bottom: 8px; }
.mktpos-comm-caption { font-size: 12px; color: #6b7280; white-space: nowrap; }

/* Mode toggle */
.mktpos-comm-mode-toggle { display: flex; gap: 0; border: 1px solid #d1d5db; border-radius: 8px; overflow: hidden; width: fit-content; }
.mktpos-comm-mode-opt    { display: flex; }
.mktpos-comm-mode-opt input { display: none; }
.mktpos-comm-mode-opt span  {
  display: block; padding: 8px 20px; font-size: 13px; font-weight: 500;
  cursor: pointer; color: #6b7280; background: #fff; transition: background .15s, color .15s;
}
.mktpos-comm-mode-opt input:checked + span { background: var(--mktpos-primary, #0b6e66); color: #fff; }

/* Input + select */
.mktpos-comm-input  {
  height: 36px; padding: 0 10px; border: 1px solid #d1d5db; border-radius: 7px;
  font-size: 13px; background: #fff; outline: none; transition: border-color .15s;
}
.mktpos-comm-input:focus { border-color: var(--mktpos-primary, #0b6e66); }
.mktpos-comm-select {
  height: 36px; padding: 0 10px; border: 1px solid #d1d5db; border-radius: 7px;
  font-size: 13px; background: #fff; cursor: pointer; outline: none;
}
.mktpos-comm-input-row { display: flex; align-items: center; gap: 8px; }
.mktpos-comm-unit { font-size: 13px; font-weight: 600; color: #6b7280; }

/* Tiers */
.mktpos-comm-tier-head {
  display: grid; grid-template-columns: 1fr 1fr 1fr 32px;
  gap: 8px; padding: 0 0 6px; font-size: 11px; font-weight: 600;
  color: #9ca3af; text-transform: uppercase; letter-spacing: .04em;
}
.comm-tier-row  { display: grid; grid-template-columns: 1fr 1fr 1fr 32px; gap: 8px; margin-bottom: 6px; }
.comm-brand-row { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; flex-wrap: wrap; }
.comm-goal-row  { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; flex-wrap: wrap; }
.comm-goal-row .goal-label  { flex: 1; min-width: 130px; }
.comm-goal-row .goal-target { width: 100px; }
.comm-goal-row .goal-value  { width: 80px; }
.comm-brand-row .brand-rule-pct { width: 80px; }

.mktpos-comm-add-btn {
  margin-top: 8px; padding: 6px 14px; font-size: 12px; font-weight: 600;
  color: var(--mktpos-primary, #0b6e66); background: #fff8f5; border: 1px dashed var(--mktpos-primary, #0b6e66);
  border-radius: 7px; cursor: pointer; transition: background .15s;
}
.mktpos-comm-add-btn:hover { background: #f1f2f7; }
.mktpos-comm-remove-btn {
  width: 28px; height: 28px; border: none; background: #fee2e2; color: #ef4444;
  border-radius: 6px; cursor: pointer; font-size: 12px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; transition: background .15s;
}
.mktpos-comm-remove-btn:hover { background: #fca5a5; }

/* Actions row */
.mktpos-comm-actions { display: flex; align-items: center; gap: 12px; margin-top: 20px; padding-top: 16px; border-top: 1px solid #f0f0f5; }
.comm-save-status    { font-size: 13px; font-weight: 500; }
/* A-CSS-5: scope al contexto de comisiones para no conflictuar con la definición global. */
.mktpos-comm-actions .mktpos-btn-danger {
  background: #fee2e2; color: #dc2626 !important; border: 1px solid #fca5a5;
  padding: 8px 16px; border-radius: 8px; font-size: 13px; font-weight: 500; cursor: pointer;
}
.mktpos-btn-danger:hover { background: #fca5a5; }

/* ── Calculator ── */
.mktpos-comm-calc-bar {
  display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap;
  background: #fff; border: 1px solid #e5e7eb; border-radius: 12px;
  padding: 16px 20px; margin-bottom: 24px;
}
.mktpos-comm-filter-group { display: flex; flex-direction: column; gap: 4px; }
.mktpos-comm-date-row     { display: flex; align-items: center; gap: 6px; }
.mktpos-comm-presets      { display: flex; gap: 4px; align-items: flex-end; flex-wrap: wrap; }

/* KPI summary strip */
.mktpos-comm-kpis {
  display: flex; gap: 16px; align-items: center; flex-wrap: wrap;
  background: #fff; border: 1px solid #e5e7eb; border-radius: 12px;
  padding: 14px 20px; margin-bottom: 20px;
}
.mktpos-comm-kpi        { display: flex; flex-direction: column; gap: 2px; }
.mktpos-comm-kpi-label  { font-size: 11px; font-weight: 600; color: #9ca3af; text-transform: uppercase; letter-spacing: .05em; }
.mktpos-comm-kpi-value  { font-size: 20px; font-weight: 700; color: #111; }
.mktpos-comm-kpi-value.highlight { color: var(--mktpos-primary, #0b6e66); }
.mktpos-comm-export-btn { margin-left: auto; display: flex; align-items: center; gap: 6px; }

/* Result cards */
.mktpos-comm-results     { display: flex; flex-direction: column; gap: 14px; }
.mktpos-comm-result-card {
  background: #fff; border: 1px solid #e5e7eb; border-radius: 12px;
  overflow: hidden; transition: box-shadow .15s;
}
.mktpos-comm-result-card:hover  { box-shadow: 0 2px 14px rgba(0,0,0,.07); }
.mktpos-comm-result-card.no-rules { border-color: #fde68a; background: #fffbeb; }

.mktpos-comm-result-head {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 20px; border-bottom: 1px solid #f0f0f5;
}
.mktpos-comm-result-meta { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.mktpos-comm-warn        { font-size: 12px; color: #b45309; font-weight: 500; }
.mktpos-comm-result-total { text-align: right; }
.mktpos-comm-result-total-label { display: block; font-size: 11px; color: #9ca3af; text-transform: uppercase; letter-spacing: .04em; font-weight: 600; }
.mktpos-comm-result-total-value { font-size: 22px; font-weight: 800; color: var(--mktpos-primary, #0b6e66); }

.mktpos-comm-result-body { display: grid; grid-template-columns: 1fr 80px; gap: 0; }
.mktpos-comm-result-breakdown { padding: 14px 20px; }

.mktpos-comm-breakdown-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 6px 0; font-size: 13px; color: #374151; border-bottom: 1px solid #f9f9fb;
}
.mktpos-comm-breakdown-row.sub { padding-left: 14px; color: #6b7280; font-size: 12px; }
.mktpos-comm-breakdown-row.total-row { font-weight: 700; font-size: 14px; border-top: 2px solid #e5e7eb; border-bottom: none; margin-top: 4px; padding-top: 10px; }
.mktpos-comm-breakdown-row.bonus-reached { color: #16a34a; }
.mktpos-comm-breakdown-row.bonus-pending { color: #9ca3af; font-style: italic; }
.mktpos-comm-breakdown-amt { font-weight: 600; white-space: nowrap; margin-left: 12px; }
.mktpos-comm-breakdown-amt.muted { color: #d1d5db; }

/* Gauge */
.mktpos-comm-result-gauge {
  display: flex; flex-direction: column; align-items: center; justify-content: flex-end;
  padding: 14px 10px; background: #fafafa; border-left: 1px solid #f0f0f5; gap: 4px;
}
.mktpos-comm-gauge-label   { font-size: 16px; font-weight: 800; color: var(--mktpos-primary, #0b6e66); }
.mktpos-comm-gauge-caption { font-size: 10px; color: #9ca3af; text-transform: uppercase; letter-spacing: .04em; text-align: center; }
.mktpos-comm-gauge-bar {
  width: 18px; height: 80px; background: #e5e7eb; border-radius: 9px;
  display: flex; flex-direction: column; justify-content: flex-end; overflow: hidden;
}
.mktpos-comm-gauge-fill {
  width: 100%; background: var(--mktpos-primary, #0b6e66); border-radius: 9px;
  transition: height .5s ease; min-height: 4px;
}

/* Empty state */
.mktpos-comm-empty {
  text-align: center; padding: 48px 24px; color: #9ca3af;
  font-size: 14px; background: #fafafa; border-radius: 12px; border: 1px dashed #e5e7eb;
}

/* ── Compact KPI cards ── */
.mktpos-kpi-grid {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}
.mktpos-kpi-card {
  padding: 18px 18px;
}
.mktpos-kpi-icon svg {
  width: 24px;
  height: 24px;
}
.mktpos-kpi-value {
  font-size: clamp(15px, 1.1vw, 18px);
}

/* ── Seller stats collapse ── */
#mktpos_seller_panel {
  transition: none;
}

/* ── Seller toggle button ── */
.mktpos-seller-toggle-btn {
  background: none;
  border: 1px solid var(--mktpos-border);
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 12px;
  cursor: pointer;
  color: var(--mktpos-text-muted);
  transition: background .15s;
  margin-left: auto;
}
.mktpos-seller-toggle-btn:hover { background: var(--mktpos-bg); }

/* ── Table header: sticky to the page top (whole page scrolls, no max-height container) ── */
.mktpos-dash-table thead {
  position: sticky;
  top: 0;
  z-index: 5;
  box-shadow: 0 2px 6px rgba(0,0,0,.08);
}
.mktpos-col-header-row th {
  background: #1a1a2e;
  color: #fff;
  padding: 10px 12px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  white-space: nowrap;
  text-align: left;
}
/* ── Column header filter button ── */
.mktpos-cf-hdr-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 5px;
  padding: 2px 3px;
  background: transparent;
  border: none;
  border-radius: 3px;
  color: rgba(255,255,255,.45);
  cursor: pointer;
  vertical-align: middle;
  transition: color .15s, background .15s;
  line-height: 1;
}
.mktpos-cf-hdr-btn:hover {
  color: #fff;
  background: rgba(255,255,255,.15);
}
.mktpos-cf-hdr-btn.active {
  color: #ea580c;
}

/* ── Column filter popup ── */
.mktpos-cf-popup {
  background: #fff;
  border: 1px solid var(--mktpos-border);
  border-radius: 10px;
  box-shadow: 0 8px 28px rgba(0,0,0,.16);
  z-index: 99999;
  overflow: hidden;
  font-size: 13px;
}
.mktpos-cf-popup-title {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--mktpos-text-muted, #888);
  border-bottom: 1px solid var(--mktpos-border);
}
.mktpos-cf-popup-inp {
  display: block;
  width: 100%;
  padding: 10px 14px;
  border: none;
  border-bottom: 1px solid var(--mktpos-border);
  font-size: 13px;
  color: var(--mktpos-text);
  outline: none;
  box-sizing: border-box;
}
.mktpos-cf-popup-inp:focus {
  background: #f8f9ff;
}
.mktpos-cf-popup-opts {
  max-height: 180px;
  overflow-y: auto;
  padding: 6px 0;
  border-bottom: 1px solid var(--mktpos-border);
}
.mktpos-cf-popup-opt {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  cursor: pointer;
  font-size: 13px;
  color: var(--mktpos-text);
  transition: background .12s;
}
.mktpos-cf-popup-opt:hover { background: var(--mktpos-bg); }
.mktpos-cf-popup-opt input[type="radio"] { margin: 0; accent-color: var(--mktpos-brand); }
.mktpos-cf-popup-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 8px 12px;
}
.mktpos-cf-popup-clear {
  padding: 5px 12px;
  background: transparent;
  border: 1px solid var(--mktpos-border);
  border-radius: 6px;
  font-size: 12px;
  color: var(--mktpos-text-muted, #888);
  cursor: pointer;
  transition: background .12s;
}
.mktpos-cf-popup-clear:hover { background: var(--mktpos-bg); }
.mktpos-cf-popup-apply {
  padding: 5px 14px;
  background: var(--mktpos-brand);
  border: 1px solid var(--mktpos-brand);
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  cursor: pointer;
  transition: opacity .12s;
}
.mktpos-cf-popup-apply:hover { opacity: .85; }

/* ── Column filter — checkbox multiselect ── */
.mktpos-cf-popup-opt input[type="checkbox"] { margin: 0; accent-color: var(--mktpos-brand); cursor: pointer; }

/* ── Column filter — date dropdowns ── */
.mktpos-cf-date-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-bottom: 1px solid var(--mktpos-border);
}
.mktpos-cf-date-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--mktpos-text-muted, #888);
  width: 32px;
  flex-shrink: 0;
}
.mktpos-cf-date-sel {
  flex: 1;
  padding: 5px 8px;
  border: 1.5px solid var(--mktpos-border);
  border-radius: 6px;
  font-size: 12.5px;
  color: var(--mktpos-text);
  background: #fff;
  outline: none;
  cursor: pointer;
}
.mktpos-cf-date-sel:focus { border-color: var(--mktpos-brand); }

/* ── Column filter — sort buttons ── */
.mktpos-cf-sort-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--mktpos-border);
}
.mktpos-cf-sort-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  background: var(--mktpos-bg, #f5f5f5);
  border: 1.5px solid var(--mktpos-border);
  border-radius: 7px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--mktpos-text);
  cursor: pointer;
  transition: background .12s, border-color .12s, color .12s;
  text-align: left;
}
.mktpos-cf-sort-btn:hover {
  border-color: var(--mktpos-brand);
  color: var(--mktpos-brand);
}
.mktpos-cf-sort-btn.active {
  background: var(--mktpos-brand);
  border-color: var(--mktpos-brand);
  color: #fff;
}

/* ── Column picker ── */
.mktpos-col-picker {
  position: relative;
  margin-left: 10px;
  display: inline-flex;
  align-items: center;
}
.mktpos-col-picker-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  background: #fff;
  border: 1.5px solid var(--mktpos-border);
  border-radius: 7px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  color: var(--mktpos-text);
  transition: background .15s, border-color .15s;
  white-space: nowrap;
}
.mktpos-col-picker-btn:hover {
  background: var(--mktpos-bg);
  border-color: var(--mktpos-brand);
}
.mktpos-col-picker-dd {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 180px;
  background: #fff;
  border: 1px solid var(--mktpos-border);
  border-radius: 10px;
  box-shadow: 0 6px 24px rgba(0,0,0,.12);
  z-index: 600;
  padding: 8px 0;
}
.mktpos-col-picker-dd.open { display: block; }
.mktpos-col-picker-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  font-size: 13px;
  cursor: pointer;
  transition: background .1s;
  color: var(--mktpos-text);
}
.mktpos-col-picker-item:hover { background: var(--mktpos-bg); }
.mktpos-col-picker-item input[type="checkbox"] {
  width: 14px;
  height: 14px;
  cursor: pointer;
  accent-color: var(--mktpos-brand);
}

/* ── Table scroll container — no scroll, table expands naturally ── */
.mktpos-table-scroll {
  overflow-x: auto;  /* permite desplazar para ver la columna Acciones si no cabe */
  overflow-y: visible;
  border-radius: 0 0 var(--mktpos-radius) var(--mktpos-radius);
}

/* ── Dashboard table: fill width, no fixed layout so browser auto-sizes ── */
.mktpos-dash-table {
  table-layout: auto !important;
  width: 100% !important;
}

/* Truncate overflowing text in data cells */
.mktpos-dash-table td {
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* Client column can be slightly wider */
.mktpos-dash-table td[data-col="cliente"] {
  max-width: 180px;
}
/* Numeric columns: tighter */
.mktpos-dash-table td[data-col="total"],
.mktpos-dash-table td[data-col="pagado"],
.mktpos-dash-table td[data-col="saldo"] {
  max-width: 100px;
}
/* Actions: never clip */
.mktpos-dash-table td[data-col="acciones"] {
  white-space: nowrap;
  overflow: visible;
  max-width: none;
}

/* ── Fila de cotización clickeable ── */
.mktpos-dash-table tbody tr.mktpos-dash-row { cursor: pointer; }

/* ── Celda de fecha: muestra solo el día; la hora completa aparece al instante.
   El tooltip se ancla al <body> por JS (un ::after se recortaría por el
   overflow:hidden de la tabla). ── */
.mktpos-date-cell { white-space: nowrap; cursor: help; }
.mktpos-date-tip {
  position: fixed;
  z-index: 2147483600;
  background: #1a1a2e;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .02em;
  padding: 5px 10px;
  border-radius: 7px;
  white-space: nowrap;
  box-shadow: 0 6px 18px rgba(0,0,0,.3);
  pointer-events: none;
  opacity: 0;
  transform: translateY(-2px);
  transition: opacity .1s ease, transform .1s ease;
}
.mktpos-date-tip.mktpos-date-tip-in { opacity: 1; transform: translateY(0); }

/* ── Columna "Acciones" fija a la derecha ──
   Queda SIEMPRE visible aunque el resto de columnas necesite scroll horizontal,
   para que los botones (Ver/Editar/PDF/WhatsApp) se vean en cualquier pantalla. */
.mktpos-dash-table th[data-col="acciones"],
.mktpos-dash-table td[data-col="acciones"] {
  position: sticky;
  right: 0;
}
.mktpos-dash-table td[data-col="acciones"] {
  background: #fff;
  z-index: 3;
  box-shadow: -10px 0 12px -10px rgba(0,0,0,.22);
}
.mktpos-dash-table tbody tr:hover td[data-col="acciones"] { background: #f8f9fc; }
.mktpos-dash-table th[data-col="acciones"] {
  background: #1a1a2e;
  z-index: 6;
  box-shadow: -10px 0 12px -10px rgba(0,0,0,.3);
}

/* ── Overlay de carga al navegar a una cotización ──
   Centrado, con fondo desenfocado. Cubre la pantalla para evitar el doble clic. */
.mktpos-navload {
  position: fixed; inset: 0;
  z-index: 2147483600;
  display: flex; align-items: center; justify-content: center;
  background: rgba(26,26,46,.30);
  -webkit-backdrop-filter: blur(7px) saturate(120%);
  backdrop-filter: blur(7px) saturate(120%);
  opacity: 0;
  transition: opacity .22s ease;
}
.mktpos-navload.mktpos-navload-in { opacity: 1; }
.mktpos-navload-card {
  display: flex; flex-direction: column; align-items: center;
  gap: 14px;
  padding: 30px 40px 26px;
  background: rgba(255,255,255,.94);
  border: 1px solid rgba(255,255,255,.7);
  border-radius: 20px;
  box-shadow: 0 24px 60px rgba(0,0,0,.28);
  transform: translateY(10px) scale(.97);
  transition: transform .24s cubic-bezier(.2,.7,.3,1);
}
.mktpos-navload.mktpos-navload-in .mktpos-navload-card { transform: translateY(0) scale(1); }
.mktpos-navload-ring {
  width: 46px; height: 46px; border-radius: 50%;
  border: 3px solid rgba(11, 110, 102,.16);
  border-top-color: #0b6e66;
  animation: mktpos-navload-spin .7s linear infinite;
}
.mktpos-navload-label { font-size: 15px; font-weight: 600; color: #1a1a2e; text-align: center; }
.mktpos-navload-label strong { color: #0b6e66; font-weight: 700; }
.mktpos-navload-sub { font-size: 12px; color: #9a9aa6; margin-top: -4px; letter-spacing: .02em; }
@keyframes mktpos-navload-spin { to { transform: rotate(360deg); } }

/* ── Adaptive density based on visible column count ── */

/* Compact: 7–9 columns */
.mktpos-dash-table.mktpos-dt-compact .mktpos-col-header-row th {
  padding: 8px 8px;
  font-size: 10px;
}
.mktpos-dash-table.mktpos-dt-compact td {
  padding: 8px 8px;
  font-size: 12px;
}
.mktpos-dash-table.mktpos-dt-compact .mktpos-btn-sm {
  padding: 2px 6px;
  font-size: 10px;
}
.mktpos-dash-table.mktpos-dt-compact .mktpos-badge {
  font-size: 10px;
  padding: 2px 6px;
}

/* Ultra-compact: 10+ columns */
.mktpos-dash-table.mktpos-dt-ultracompact .mktpos-col-header-row th {
  padding: 6px 5px;
  font-size: 9px;
  letter-spacing: 0;
}
.mktpos-dash-table.mktpos-dt-ultracompact td {
  padding: 6px 5px;
  font-size: 11px;
}
.mktpos-dash-table.mktpos-dt-ultracompact .mktpos-btn-sm {
  padding: 2px 5px;
  font-size: 10px;
}
.mktpos-dash-table.mktpos-dt-ultracompact .mktpos-badge {
  font-size: 9px;
  padding: 2px 5px;
}

/* ============================================================
 * MARKETING MODULE
 * ============================================================ */

/* Page header with date filter */
.mkt-page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding-right: 76px; /* deja libre la campana de notificaciones (fixed top-right) */
}
@media (max-width: 900px) { .mkt-page-header { padding-right: 52px; } }
.mkt-date-filter {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* Tabs */
.mkt-tabs {
  display: flex;
  gap: 4px;
  margin: 20px 0 0;
  border-bottom: 2px solid var(--mktpos-border);
  padding-bottom: 0;
}
.mkt-tab {
  padding: 9px 20px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--mktpos-text-muted, #888);
  cursor: pointer;
  transition: color .15s, border-color .15s;
  border-radius: 6px 6px 0 0;
}
.mkt-tab:hover { color: var(--mktpos-brand); }
.mkt-tab.mkt-tab-active {
  color: var(--mktpos-brand);
  border-bottom-color: var(--mktpos-brand);
  background: rgba(var(--mktpos-brand-rgb, 26,26,46), .04);
}

/* Tab panes */
.mkt-tab-pane { display: none; padding-top: 24px; }
.mkt-tab-pane.mkt-tab-pane-active { display: block; }

/* KPI grid */
.mkt-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 14px;
  margin-bottom: 8px;
}
.mkt-kpi-card {
  background: #fff;
  border: 1.5px solid var(--mktpos-border);
  border-radius: 12px;
  padding: 18px 16px 14px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0,0,0,.05);
  transition: box-shadow .2s;
}
.mkt-kpi-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,.10); }
.mkt-kpi-ic { font-size: 22px; margin-bottom: 6px; }
.mkt-kpi-val { font-size: 22px; font-weight: 800; line-height: 1.1; margin-bottom: 4px; }
.mkt-kpi-lbl { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--mktpos-text-muted, #888); }

/* Section bar (title + button row) */
.mkt-section-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 10px;
}
.mkt-section-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--mktpos-text);
  margin: 0;
}
.mkt-subsection-title {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--mktpos-text-muted, #888);
  margin: 0 0 10px;
}

/* Form card */
.mkt-form-card {
  background: #fff;
  border: 1.5px solid var(--mktpos-border);
  border-radius: 12px;
  padding: 20px 24px 16px;
  margin-bottom: 20px;
  box-shadow: 0 2px 10px rgba(0,0,0,.06);
}
.mkt-form-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--mktpos-text);
  margin: 0 0 16px;
}
.mkt-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}
.mkt-field { display: flex; flex-direction: column; gap: 5px; }
.mkt-field-wide { grid-column: span 2; }
.mkt-label { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--mktpos-text-muted, #888); }
.mkt-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 4px;
  border-top: 1px solid var(--mktpos-border);
  margin-top: 4px;
}

/* Table helpers */
.mkt-table { width: 100%; }
.mkt-table thead th { font-size: 10.5px; white-space: nowrap; }
.mkt-table tbody td { font-size: 13px; }
.ta-r { text-align: right !important; }
.mkt-num { color: var(--mktpos-text-muted, #888); font-size: 12px; }

/* Platform chips */
.mkt-chip {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  background: var(--mktpos-bg);
  color: var(--mktpos-text);
  border: 1px solid var(--mktpos-border);
}
.mkt-chip-metaa  { background: #e7f0fd; color: #1a1aff; border-color: #b3c9fb; }
.mkt-chip-googl  { background: #fef3e2; color: #e37400; border-color: #fbd399; }
.mkt-chip-tikto  { background: #ffe8f5; color: #c0006a; border-color: #f5b8db; }
.mkt-chip-youtu  { background: #ffe9e9; color: #cc0000; border-color: #ffbcbc; }
.mkt-chip-linke  { background: #e8f4fb; color: #0a66c2; border-color: #b3d9f5; }

/* A-CSS-5: variante outline, scope a la sección de marketing para no romper el botón global. */
.mktpos-marketing .mktpos-btn-danger--outline,
.mktpos-marketing-section .mktpos-btn-danger--outline {
  background: transparent;
  border: 1.5px solid #e63946;
  color: #e63946 !important;
  font-weight: 700;
  font-size: 13px;
}
.mktpos-marketing .mktpos-btn-danger--outline:hover,
.mktpos-marketing-section .mktpos-btn-danger--outline:hover { background: #e63946; color: #fff !important; }

/* Responsive */
@media (max-width: 768px) {
  .mkt-page-header { flex-direction: column; }
  .mkt-date-filter { flex-direction: column; align-items: flex-start; }
  .mkt-kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .mkt-form-grid { grid-template-columns: 1fr 1fr; }
  .mkt-field-wide { grid-column: span 2; }
  .mkt-tabs { overflow-x: auto; }
  .mkt-tab { white-space: nowrap; }
}
@media (max-width: 480px) {
  .mkt-kpi-grid { grid-template-columns: 1fr 1fr; }
  .mkt-form-grid { grid-template-columns: 1fr; }
  .mkt-field-wide { grid-column: span 1; }
}

/* ============================================================
 * MARKETING — UPGRADE PREMIUM (aditivo, no cambia estructura)
 * Acento = color de la marca activa (var --mktpos-brand del wrap_style).
 * ============================================================ */
.mktpos-page-marketing { --mkt-acc: var(--mktpos-brand, #0e5aa7); }
.mktpos-page-marketing .mktpos-page-title { font-size: 30px; font-weight: 800; letter-spacing: -.5px; }
.mktpos-page-marketing .mktpos-page-sub { color: var(--mktpos-text-muted,#8a94a6); }

/* Tabs refinadas */
.mktpos-page-marketing .mkt-tabs { gap: 6px; border-bottom: 1px solid var(--mktpos-border); flex-wrap: wrap; margin-top: 22px; }
.mktpos-page-marketing .mkt-tab { position: relative; border: none; border-radius: 11px 11px 0 0; padding: 12px 20px; font-size: 14px; font-weight: 600; margin-bottom: -1px; background: transparent; }
.mktpos-page-marketing .mkt-tab:hover { background: color-mix(in srgb, var(--mkt-acc) 7%, transparent); color: var(--mkt-acc); }
.mktpos-page-marketing .mkt-tab.mkt-tab-active { color: var(--mkt-acc); background: color-mix(in srgb, var(--mkt-acc) 9%, transparent); border-bottom: none; }
.mktpos-page-marketing .mkt-tab.mkt-tab-active::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: -1px; height: 3px; border-radius: 3px 3px 0 0; background: var(--mkt-acc); }

/* KPI cards premium */
.mktpos-page-marketing .mkt-kpi-grid { gap: 16px; }
.mktpos-page-marketing .mkt-kpi-card { position: relative; border: 1px solid var(--mktpos-border); border-radius: 16px; padding: 24px 18px 18px; background: linear-gradient(180deg,#ffffff,#fbfdff); box-shadow: 0 6px 20px rgba(15,39,64,.06); overflow: hidden; transition: transform .18s ease, box-shadow .18s ease; }
.mktpos-page-marketing .mkt-kpi-card::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px; background: linear-gradient(90deg, var(--mkt-acc), color-mix(in srgb, var(--mkt-acc) 25%, transparent)); }
.mktpos-page-marketing .mkt-kpi-card:hover { transform: translateY(-3px); box-shadow: 0 16px 36px rgba(15,39,64,.13); }
.mktpos-page-marketing .mkt-kpi-ic { display: inline-flex; align-items: center; justify-content: center; width: 46px; height: 46px; border-radius: 13px; background: color-mix(in srgb, var(--mkt-acc) 12%, #f4f7fb); font-size: 22px; margin-bottom: 12px; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--mkt-acc) 16%, transparent); }
.mktpos-page-marketing .mkt-kpi-val { font-size: 27px; font-weight: 800; letter-spacing: -.5px; }
.mktpos-page-marketing .mkt-kpi-lbl { font-size: 10.5px; letter-spacing: .07em; }

/* Section headers con barra de acento */
.mktpos-page-marketing .mkt-section-title { position: relative; font-size: 18px; font-weight: 800; padding-left: 15px; }
.mktpos-page-marketing .mkt-section-title::before { content: ""; position: absolute; left: 0; top: 3px; bottom: 3px; width: 5px; border-radius: 3px; background: var(--mkt-acc); }

/* Form cards premium */
.mktpos-page-marketing .mkt-form-card { border-radius: 16px; box-shadow: 0 6px 22px rgba(15,39,64,.06); padding: 24px 28px 20px; border-color: var(--mktpos-border); }
.mktpos-page-marketing .mkt-form-title { display: flex; align-items: center; gap: 9px; font-size: 15px; font-weight: 800; }
.mktpos-page-marketing .mkt-form-title::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--mkt-acc); box-shadow: 0 0 0 4px color-mix(in srgb, var(--mkt-acc) 16%, transparent); }
.mktpos-page-marketing .mkt-form-grid { gap: 16px; }

/* Inputs / date filter más redondeados y con foco de marca */
.mktpos-page-marketing .mktpos-input { border-radius: 10px; transition: border-color .15s, box-shadow .15s; }
.mktpos-page-marketing .mktpos-input:focus { border-color: var(--mkt-acc); box-shadow: 0 0 0 3px color-mix(in srgb, var(--mkt-acc) 16%, transparent); outline: none; }
.mktpos-page-marketing .mkt-date-filter .mktpos-btn { border-radius: 10px; }

/* Tablas del dashboard */
.mktpos-page-marketing .mktpos-dash-table { border-radius: 12px; overflow: hidden; }
.mktpos-page-marketing .mktpos-dash-table th { background: color-mix(in srgb, var(--mkt-acc) 8%, #f6f8fb); font-size: 11px; letter-spacing: .04em; text-transform: uppercase; }

/* Responsive extra */
@media (max-width: 900px) {
  .mktpos-page-marketing .mktpos-page-title { font-size: 25px; }
  .mktpos-page-marketing .mkt-tabs { overflow-x: auto; flex-wrap: nowrap; -webkit-overflow-scrolling: touch; }
  .mktpos-page-marketing .mkt-tab { white-space: nowrap; padding: 11px 14px; font-size: 13.5px; }
}
@media (max-width: 640px) {
  .mktpos-page-marketing .mkt-kpi-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .mktpos-page-marketing .mkt-kpi-card { padding: 18px 14px 14px; }
  .mktpos-page-marketing .mkt-kpi-val { font-size: 22px; }
  .mktpos-page-marketing .mkt-form-card { padding: 18px 16px 14px; }
}

/* ============================================================
 * Modal overlay (compartido por chat, tasks, DMs, grupos, etc.)
 * Sin estas reglas los .mktpos-modal-backdrop renderizan inline
 * en lugar de flotar como overlay.
 * ============================================================ */
.mktpos-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 20px;
  animation: mktpos-modal-fade-in .15s ease;
}

@keyframes mktpos-modal-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.mktpos-modal {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .25);
  max-width: 500px;
  width: 100%;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: mktpos-modal-scale-in .18s cubic-bezier(.2, .8, .2, 1);
}

@keyframes mktpos-modal-scale-in {
  from { transform: scale(.94); opacity: 0; }
  to   { transform: scale(1);   opacity: 1; }
}

.mktpos-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid #eef0f3;
}

.mktpos-modal-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: #111;
}

.mktpos-modal-close {
  background: none;
  border: none;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  color: #6b7280;
  padding: 0 4px;
  border-radius: 6px;
  transition: background .12s, color .12s;
}

.mktpos-modal-close:hover {
  color: #111;
  background: #f3f4f6;
}

.mktpos-modal-body {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
}

@media (max-width: 480px) {
  .mktpos-modal {
    border-radius: 12px;
    max-height: 95vh;
  }
  .mktpos-modal-backdrop { padding: 10px; }
}

/* ============================================================
 * A-CSS-7: focus-visible por defecto para todos los elementos
 * interactivos dentro del wrap del plugin. Restaura indicador
 * de foco para usuarios de teclado (WCAG 2.4.7).
 * ============================================================ */
.mktpos-wrap a:focus-visible,
.mktpos-wrap button:focus-visible,
.mktpos-wrap input:focus-visible,
.mktpos-wrap textarea:focus-visible,
.mktpos-wrap select:focus-visible,
.mktpos-wrap [role="button"]:focus-visible,
.mktpos-wrap [tabindex]:focus-visible {
  outline: 2px solid var(--mktpos-brand, #0b6e66);
  outline-offset: 2px;
  box-shadow: 0 0 0 3px rgba(11, 110, 102, .25);
}

/* ============================================================
 * Accesibilidad: respetar preferencia de "reduce motion"
 * ============================================================ */
@media (prefers-reduced-motion: reduce) {
  .mktpos-wrap *,
  .mktpos-wrap *::before,
  .mktpos-wrap *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ============================================================
 * Estilos de impresión: cotizaciones, recibos, etiquetas
 * deben imprimir limpios sin sidebar/navbar/botones.
 * ============================================================ */
@media print {
  .mktpos-navbar,
  .mktpos-sidebar,
  .mktpos-sticky-footer,
  .mktpos-toast,
  .mktpos-fab,
  .mktpos-modal,
  .mktpos-modal-backdrop,
  .mktpos-no-print,
  .no-print,
  .mktpos-btn,
  .mktpos-btn-primary,
  .mktpos-btn-secondary {
    display: none !important;
  }

  body,
  .mktpos-wrap {
    background: #fff !important;
    color: #000 !important;
    min-height: 0 !important;
  }

  .mktpos-content,
  .mktpos-content-inner,
  .mktpos-card {
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: none !important;
    border: none !important;
    background: transparent !important;
  }

  a {
    color: #000 !important;
    text-decoration: none !important;
  }

  /* Forzar legibilidad y romper líneas en impresión */
  * { box-shadow: none !important; }
  table { page-break-inside: auto; }
  tr    { page-break-inside: avoid; page-break-after: auto; }

  /* Ocultar burbuja de chat al imprimir. */
  #mktpos-chat-bubble-root { display: none !important; }
}

/* ============================================================
 * Floating Chat Bubble (Intercom-style)
 * ============================================================ */
#mktpos-chat-bubble-root {
  --mkb-color: #1d4ed8;
  --mkb-bg: #fff;
  --mkb-border: #e5e7eb;
  --mkb-text: #111827;
  --mkb-muted: #6b7280;
  --mkb-shadow: 0 12px 40px rgba(0, 0, 0, .18), 0 2px 10px rgba(0, 0, 0, .08);
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1500;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--mkb-text);
}

#mktpos-chat-bubble-btn {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--mkb-color);
  color: #fff;
  border: none;
  cursor: pointer;
  box-shadow: var(--mkb-shadow);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: transform .15s, box-shadow .15s;
  padding: 0;
}
#mktpos-chat-bubble-btn:hover { transform: scale(1.05); }
#mktpos-chat-bubble-btn:active { transform: scale(.96); }
#mktpos-chat-bubble-btn[aria-expanded="true"] { transform: scale(.92); }

#mktpos-chat-bubble-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  min-width: 20px;
  height: 20px;
  border-radius: 10px;
  background: #ef4444;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 0 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #fff;
  line-height: 1;
}
#mktpos-chat-bubble-badge[hidden] { display: none !important; }

#mktpos-chat-bubble-panel {
  position: absolute;
  bottom: 72px;
  right: 0;
  width: 380px;
  max-width: calc(100vw - 32px);
  height: 600px;
  max-height: calc(100vh - 120px);
  background: var(--mkb-bg);
  border-radius: 16px;
  box-shadow: var(--mkb-shadow);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: mkb-pop .18s cubic-bezier(.2, .8, .2, 1);
  transform-origin: bottom right;
}
#mktpos-chat-bubble-panel[hidden] { display: none !important; }

@keyframes mkb-pop {
  from { opacity: 0; transform: scale(.92) translateY(8px); }
  to   { opacity: 1; transform: scale(1)   translateY(0); }
}

/* Header */
.mkb-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 14px 12px;
  background: var(--mkb-color);
  color: #fff;
  flex-shrink: 0;
}
.mkb-header .mkb-back {
  background: none;
  border: none;
  cursor: pointer;
  color: #fff;
  padding: 4px;
  border-radius: 6px;
  display: flex;
  align-items: center;
}
.mkb-header .mkb-back[hidden] { display: none !important; }
.mkb-header .mkb-back:hover { background: rgba(255,255,255,.15); }
.mkb-title {
  font-weight: 700;
  font-size: 15px;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mkb-header-actions {
  display: flex;
  gap: 4px;
  align-items: center;
}
.mkb-header-actions .mkb-expand,
.mkb-header-actions .mkb-close {
  background: none;
  border: none;
  cursor: pointer;
  color: #fff;
  padding: 4px 6px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  line-height: 1;
}
.mkb-header-actions .mkb-expand:hover,
.mkb-header-actions .mkb-close:hover { background: rgba(255,255,255,.15); }
.mkb-close { font-size: 22px; font-weight: 400; }

/* Views */
.mkb-view {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.mkb-view[hidden] { display: none !important; }

.mkb-view-list {
  overflow-y: auto;
  padding: 6px 0;
}

.mkb-channel-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  width: 100%;
  background: transparent;
  border: none;
  text-align: left;
  cursor: pointer;
  position: relative;
  font: inherit;
  color: inherit;
}
.mkb-channel-item:hover { background: #f9fafb; }
.mkb-channel-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #f3f4f6;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  flex-shrink: 0;
}
.mkb-channel-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.mkb-channel-name {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--mkb-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mkb-channel-preview {
  font-size: 12px;
  color: var(--mkb-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mkb-has-unread .mkb-channel-name { font-weight: 700; }
.mkb-has-unread .mkb-channel-preview { color: var(--mkb-text); font-weight: 500; }
.mkb-channel-badge {
  min-width: 20px;
  height: 20px;
  border-radius: 10px;
  background: var(--mkb-color);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 0 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mkb-list-section { padding: 8px 0; }
.mkb-empty-title {
  padding: 24px 18px 4px;
  font-size: 15px;
  font-weight: 700;
  text-align: center;
}
.mkb-empty-sub {
  padding: 0 18px 12px;
  font-size: 12.5px;
  color: var(--mkb-muted);
  text-align: center;
}
.mkb-user-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0 0 8px;
}
.mkb-user-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: transparent;
  border: none;
  cursor: pointer;
  text-align: left;
  width: 100%;
  font: inherit;
  color: inherit;
}
.mkb-user-item:hover { background: #f9fafb; }
.mkb-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--mkb-color);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  flex-shrink: 0;
}
.mkb-user-name {
  font-size: 13.5px;
  font-weight: 500;
}

/* Chat view */
.mkb-view-chat { flex: 1; }
.mkb-messages {
  flex: 1;
  overflow-y: auto;
  padding: 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.mkb-loading,
.mkb-empty-chat {
  text-align: center;
  color: var(--mkb-muted);
  font-size: 13px;
  margin-top: 30px;
}
.mkb-msg {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  max-width: 80%;
}
.mkb-msg-mine { align-self: flex-end; align-items: flex-end; }
.mkb-msg-from {
  font-size: 10.5px;
  color: var(--mkb-muted);
  margin-bottom: 2px;
  padding: 0 6px;
}
.mkb-msg-bubble {
  background: #f3f4f6;
  color: var(--mkb-text);
  padding: 8px 12px;
  border-radius: 14px;
  font-size: 13.5px;
  line-height: 1.4;
  word-wrap: break-word;
  overflow-wrap: anywhere;
}
.mkb-msg-mine .mkb-msg-bubble {
  background: var(--mkb-color);
  color: #fff;
}
.mkb-msg-time {
  font-size: 10px;
  color: var(--mkb-muted);
  margin-top: 2px;
  padding: 0 6px;
}

.mkb-input-bar {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 10px 12px;
  border-top: 1px solid var(--mkb-border);
  background: #fff;
  flex-shrink: 0;
}
.mkb-input-bar textarea {
  flex: 1;
  border: 1px solid var(--mkb-border);
  border-radius: 18px;
  padding: 8px 14px;
  font: inherit;
  font-size: 13.5px;
  resize: none;
  outline: none;
  max-height: 100px;
  font-family: inherit;
  line-height: 1.4;
}
.mkb-input-bar textarea:focus {
  border-color: var(--mkb-color);
  box-shadow: 0 0 0 3px rgba(0, 0, 0, .04);
}
.mkb-send {
  background: var(--mkb-color);
  color: #fff;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: opacity .12s;
}
.mkb-send:disabled { opacity: .5; cursor: not-allowed; }
.mkb-send svg { transform: translateX(-1px); }

/* Móvil: ocupa más pantalla */
@media (max-width: 480px) {
  #mktpos-chat-bubble-root {
    bottom: 16px;
    right: 16px;
  }
  #mktpos-chat-bubble-panel {
    width: calc(100vw - 32px);
    height: calc(100vh - 100px);
    bottom: 72px;
  }
}

/* ============================================================
 * Status dots (presencia: active / busy / offline)
 * ============================================================ */
.mkb-status-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #9ca3af;
  border: 2px solid #fff;
  box-sizing: border-box;
  vertical-align: middle;
}
.mkb-status-dot.mkb-status-active  { background: #22c55e; }
.mkb-status-dot.mkb-status-busy    { background: #f59e0b; }
.mkb-status-dot.mkb-status-offline { background: #9ca3af; }

/* Dot en el botón de la burbuja (esquina inferior derecha del círculo) */
#mktpos-chat-bubble-btn .mkb-status-dot {
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 14px;
  height: 14px;
  border-width: 2.5px;
}

/* Avatar wrapper con dot overlay */
.mkb-avatar-wrap {
  position: relative;
  flex-shrink: 0;
}
.mkb-avatar-wrap .mkb-status-dot {
  position: absolute;
  bottom: -2px;
  right: -2px;
}
.mkb-channel-icon-wrap {
  position: relative;
  flex-shrink: 0;
}
.mkb-channel-icon-wrap .mkb-dot-overlay {
  position: absolute;
  bottom: -2px;
  right: -2px;
}

/* Subtítulo del header (last seen en DMs) */
.mkb-title-wrap {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
  overflow: hidden;
}
.mkb-title-sub {
  font-size: 11.5px;
  opacity: .85;
  font-weight: 400;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mkb-title-sub[hidden] { display: none !important; }

/* Status selector en header */
.mkb-status-btn {
  background: rgba(255,255,255,.15);
  border: none;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.mkb-status-btn:hover { background: rgba(255,255,255,.25); }
.mkb-status-btn .mkb-status-dot {
  width: 12px;
  height: 12px;
  border-color: #fff;
}

.mkb-status-menu {
  position: absolute;
  top: 54px;
  right: 64px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,.18);
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  z-index: 10;
  min-width: 160px;
}
.mkb-status-menu[hidden] { display: none !important; }
.mkb-status-opt {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: transparent;
  border: none;
  cursor: pointer;
  border-radius: 6px;
  font-size: 13px;
  text-align: left;
  color: #111;
  font-family: inherit;
}
.mkb-status-opt:hover { background: #f3f4f6; }

/* Presencia en lista de usuarios */
.mkb-user-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.mkb-user-presence {
  font-size: 11.5px;
  color: var(--mkb-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ============================================================
 * Read receipts (palomitas ✓ / ✓✓)
 * ============================================================ */
.mkb-msg-meta {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 2px;
  padding: 0 6px;
  font-size: 10px;
  color: var(--mkb-muted);
}
.mkb-msg-mine .mkb-msg-meta { justify-content: flex-end; }
.mkb-msg-receipt {
  font-size: 11px;
  line-height: 1;
  font-weight: 600;
}
.mkb-receipt-sent { color: #9ca3af; }    /* ✓ enviado, gris */
.mkb-receipt-read { color: var(--mkb-color); }  /* ✓✓ leído, color marca */

/* ============================================================
 * AUTOSAVE — indicador discreto de borrador
 * Se inyecta antes del botón "Guardar cotización" / "Guardar cambios"
 * ============================================================ */
.mktpos-autosave-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  line-height: 1;
  color: #64748b;
  padding: 6px 10px;
  margin-right: 10px;
  border-radius: 999px;
  background: #f1f5f9;
  border: 1px solid transparent;
  transition: background .25s ease, color .25s ease, border-color .25s ease, opacity .25s ease;
  user-select: none;
  vertical-align: middle;
  min-height: 24px;
}
.mktpos-autosave-indicator:empty {
  opacity: 0;
  padding: 0;
  margin: 0;
  border: 0;
  background: transparent;
}
/* Estado: pendiente (debounce activo) */
.mktpos-autosave-indicator[data-state="pending"] {
  background: #fff7ed;
  color: #9a3412;
  border-color: #fed7aa;
}
.mktpos-autosave-indicator .mkta-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: currentColor;
  display: inline-block;
  animation: mktaPulse 1.2s ease-in-out infinite;
}
@keyframes mktaPulse {
  0%, 100% { opacity: .4; transform: scale(.85); }
  50%      { opacity: 1;  transform: scale(1.1); }
}
/* Estado: guardado correctamente */
.mktpos-autosave-indicator[data-state="saved"] {
  background: #ecfdf5;
  color: #047857;
  border-color: #a7f3d0;
}
/* Estado: borrador restaurado al cargar */
.mktpos-autosave-indicator[data-state="restored"] {
  background: #eff6ff;
  color: #1d4ed8;
  border-color: #bfdbfe;
}
/* Estado: error (storage lleno, etc.) */
.mktpos-autosave-indicator[data-state="error"] {
  background: #fef2f2;
  color: #b91c1c;
  border-color: #fecaca;
}
.mktpos-autosave-indicator .mkta-check,
.mktpos-autosave-indicator .mkta-x {
  font-size: 13px;
  line-height: 1;
}
@media (max-width: 640px) {
  .mktpos-autosave-indicator {
    display: flex;
    margin: 8px 0 6px 0;
    width: fit-content;
  }
}

/* ============================================================
 * FASE 4 — Módulo Gastos
 * ============================================================ */
.mktpos-expenses-wrap { max-width: 1280px; margin: 0 auto; padding: 12px 0; }

.mke-header-top {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap;
}

.mke-filters { padding: 16px 18px; }
.mke-filters-grid {
  display: grid;
  grid-template-columns: 1.5fr 1.2fr 1fr 1fr 1.5fr auto;
  gap: 12px;
  align-items: end;
}
.mke-filters-grid label {
  display: block; font-size: 11px; font-weight: 600;
  color: #475569; text-transform: uppercase; letter-spacing: .3px;
  margin-bottom: 4px;
}
.mke-filters-grid select,
.mke-filters-grid input[type="text"],
.mke-filters-grid input[type="date"] {
  width: 100%; padding: 8px 10px; border: 1px solid #cbd5e1; border-radius: 6px;
  font-size: 13px; background: #fff;
}
.mke-filters-grid select:focus,
.mke-filters-grid input:focus {
  outline: none; border-color: #0b6e66; box-shadow: 0 0 0 3px rgba(11, 110, 102,.15);
}
@media (max-width: 900px) {
  .mke-filters-grid { grid-template-columns: 1fr 1fr; }
}

/* Resumen */
.mke-summary {
  display: grid; grid-template-columns: 1fr; gap: 12px;
  margin: 14px 0;
}
.mke-summary-card {
  background: linear-gradient(135deg, #0b6e66 0%, #023e8a 100%);
  color: #fff; padding: 18px 22px; border-radius: 12px;
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px;
  box-shadow: 0 4px 12px rgba(11, 110, 102,.15);
}
.mke-sc-label { font-size: 12px; opacity: .85; text-transform: uppercase; letter-spacing: .5px; font-weight: 600; }
.mke-sc-value { font-size: 28px; font-weight: 700; line-height: 1; }
.mke-sc-sub   { font-size: 12px; opacity: .8; }

/* Tabla */
.mke-table-wrap { overflow-x: auto; padding: 0; }
.mke-table { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 800px; }
.mke-table thead th {
  background: #f8fafc; color: #475569; text-transform: uppercase;
  font-size: 11px; font-weight: 700; letter-spacing: .3px;
  padding: 10px 12px; text-align: left; border-bottom: 2px solid #e2e8f0;
}
.mke-table thead th.num { text-align: right; }
.mke-table tbody td { padding: 12px; border-bottom: 1px solid #f1f5f9; vertical-align: top; }
.mke-table tbody tr:hover { background: #f8fafc; }
.mke-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.mke-td-amount  { font-weight: 600; color: #0f172a; white-space: nowrap; }
.mke-td-desc    { max-width: 280px; }
.mke-td-vendor  { color: #475569; }
.mke-td-ref     { font-size: 11px; color: #94a3b8; }
.mke-td-att     { text-align: center; }
.mke-att-link   { text-decoration: none; font-size: 16px; }
.mke-td-actions { white-space: nowrap; text-align: right; }

.mke-badge {
  display: inline-block; padding: 3px 9px; border-radius: 999px;
  font-size: 11px; font-weight: 600;
}
.mke-badge-brand  { background: #dbeafe; color: #1e40af; }
.mke-badge-global { background: #f1f5f9; color: #475569; border: 1px dashed #cbd5e1; }

.mke-btn-icon {
  background: transparent; border: 1px solid transparent; border-radius: 6px;
  padding: 4px 8px; cursor: pointer; font-size: 14px; line-height: 1;
  transition: all .15s ease; color: #64748b;
}
.mke-btn-icon:hover { background: #f1f5f9; border-color: #e2e8f0; color: #0f172a; }
.mke-del:hover { background: #fef2f2; color: #b91c1c; border-color: #fecaca; }

/* Modal del formulario */
.mke-form-modal {
  background: #fff; border-radius: 12px; max-width: 720px; width: 92%;
  max-height: 92vh; overflow-y: auto; box-shadow: 0 20px 60px rgba(0,0,0,.3);
}
.mke-modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 22px; border-bottom: 1px solid #e2e8f0;
}
.mke-modal-head h3 { margin: 0; color: #0b6e66; font-size: 18px; }
.mke-modal-close {
  background: transparent; border: none; font-size: 24px; cursor: pointer;
  color: #64748b; padding: 4px 10px; border-radius: 6px;
}
.mke-modal-close:hover { background: #f1f5f9; color: #0f172a; }

.mke-form { padding: 18px 22px 22px; }
.mke-form-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px;
}
.mke-field-full { grid-column: 1 / -1; }
.mke-field label {
  display: block; font-size: 12px; font-weight: 600;
  color: #475569; margin-bottom: 5px;
}
.mke-field input[type="text"],
.mke-field input[type="number"],
.mke-field input[type="date"],
.mke-field input[type="file"],
.mke-field select,
.mke-field textarea {
  width: 100%; padding: 9px 11px; border: 1px solid #cbd5e1; border-radius: 6px;
  font-size: 13px; background: #fff; font-family: inherit;
  box-sizing: border-box;
}
.mke-field textarea { resize: vertical; min-height: 60px; }
.mke-field input:focus,
.mke-field select:focus,
.mke-field textarea:focus {
  outline: none; border-color: #0b6e66; box-shadow: 0 0 0 3px rgba(11, 110, 102,.15);
}
.mke-link-btn {
  background: none; border: none; color: #0b6e66; cursor: pointer;
  font-size: 12px; padding: 4px 0; margin-top: 4px; text-decoration: underline;
}
.mke-link-btn:hover { color: #023e8a; }

.mke-file-current {
  margin-top: 6px; font-size: 12px; color: #475569;
  background: #f8fafc; padding: 6px 10px; border-radius: 6px; border: 1px solid #e2e8f0;
}

.mke-form-msg {
  min-height: 18px; margin: 12px 0 0; font-size: 13px; padding: 8px 12px; border-radius: 6px;
}
.mke-form-msg.err { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.mke-form-msg.ok  { background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; }
.mke-form-msg:empty { display: none; }

.mke-form-actions {
  display: flex; gap: 10px; justify-content: flex-end;
  margin-top: 16px; padding-top: 16px; border-top: 1px solid #f1f5f9;
}

@media (max-width: 640px) {
  .mke-form-grid { grid-template-columns: 1fr; }
  .mke-header-top h2 { font-size: 18px; }
  .mke-sc-value { font-size: 22px; }
}

/* Tabs de asignación (Marca/Centro/Global) */
.mke-assign-tabs {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
}
.mke-assign-tab {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 12px; border: 1px solid #cbd5e1; border-radius: 8px;
  background: #fff; cursor: pointer; font-size: 13px; font-weight: 500;
  color: #475569; transition: all .15s ease; text-align: center;
}
.mke-assign-tab:hover { border-color: #0b6e66; }
.mke-assign-tab input[type="radio"] { margin: 0; cursor: pointer; }
.mke-assign-tab input[type="radio"]:checked + span {
  color: #0b6e66; font-weight: 700;
}
.mke-assign-tab:has(input:checked) {
  background: #eff6ff; border-color: #0b6e66;
  box-shadow: 0 0 0 3px rgba(11, 110, 102,.1);
}
@media (max-width: 640px) {
  .mke-assign-tabs { grid-template-columns: 1fr; }
}

.mke-helper-text {
  font-size: 11px; color: #64748b; margin-top: 4px; line-height: 1.4;
}
.mke-helper-text a { color: #0b6e66; }

.mke-badge-cc {
  background: #f4f5fa; color: #3b4262; border: 1px solid #d8dbe8;
}

/* ============================================================
 * Centros de costos — Lista + Modal
 * ============================================================ */
.mkcc-list { display: grid; gap: 12px; }
.mkcc-card {
  display: flex; flex-direction: column; gap: 12px;
  padding: 18px 20px;
}
.mkcc-card-head {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 12px; flex-wrap: wrap;
}
.mkcc-name { margin: 0 0 4px; font-size: 16px; color: #0f172a; font-weight: 700; }
.mkcc-desc { margin: 0 0 6px; font-size: 13px; color: #64748b; }
.mkcc-meta {
  display: flex; gap: 12px; flex-wrap: wrap;
  font-size: 12px; color: #475569;
}
.mkcc-wh {
  background: #fef3c7; color: #92400e; padding: 2px 8px; border-radius: 999px;
  font-weight: 600; font-size: 11px;
}
.mkcc-card-actions { display: flex; gap: 6px; }

.mktpos-btn-sm { padding: 6px 12px; font-size: 12px; }

.mkcc-member-chips {
  display: flex; flex-wrap: wrap; gap: 6px;
  padding: 12px; background: #f8fafc; border-radius: 8px;
  border: 1px solid #e2e8f0;
}
.mkcc-chip {
  background: #fff; padding: 6px 12px; border-radius: 999px;
  font-size: 12px; color: #475569; border: 1px solid #cbd5e1;
}
.mkcc-chip strong { color: #0f172a; }
.mkcc-no-members {
  text-align: center; color: #94a3b8; font-style: italic;
  padding: 12px; background: #f8fafc; border-radius: 8px;
}

/* Modal del centro */
.mkcc-modal-inner {
  background: #fff; border-radius: 12px; max-width: 720px; width: 92%;
  max-height: 92vh; overflow-y: auto; box-shadow: 0 20px 60px rgba(0,0,0,.3);
}
.mkcc-members-table {
  width: 100%; border-collapse: collapse; margin-top: 6px;
  font-size: 13px;
}
.mkcc-members-table thead th {
  background: #f8fafc; color: #475569; text-transform: uppercase;
  font-size: 10px; font-weight: 700; letter-spacing: .3px;
  padding: 8px 10px; text-align: left; border-bottom: 1px solid #e2e8f0;
}
.mkcc-members-table tbody td {
  padding: 6px 10px; border-bottom: 1px solid #f1f5f9; vertical-align: middle;
}
.mkcc-members-table select,
.mkcc-members-table input {
  width: 100%; padding: 7px 9px; border: 1px solid #cbd5e1; border-radius: 6px;
  font-size: 13px; background: #fff;
}
.mkcc-pct-disabled { background: #f1f5f9 !important; color: #94a3b8; }
.mkcc-members-footer {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 10px; flex-wrap: wrap; gap: 8px;
}
.mkcc-shares-sum {
  font-size: 13px; font-weight: 600; padding: 6px 12px; border-radius: 999px;
  background: #f1f5f9; color: #475569;
}
.mkcc-shares-sum[data-state="ok"]      { background: #ecfdf5; color: #047857; }
.mkcc-shares-sum[data-state="warn"]    { background: #fef2f2; color: #b91c1c; }
.mkcc-shares-sum[data-state="ignored"] { background: #f1f5f9; color: #94a3b8; font-style: italic; }

/* ============================================================
 * FASE 4 · Sprint 2 — P&L
 * ============================================================ */
.mktpos-pnl-wrap { max-width: 1280px; margin: 0 auto; padding: 12px 0; }

.mkpl-filters { padding: 16px 18px; display: flex; flex-direction: column; gap: 14px; }
.mkpl-presets { display: flex; gap: 8px; flex-wrap: wrap; }
.mkpl-preset {
  background: #fff; border: 1px solid #cbd5e1; border-radius: 999px;
  padding: 7px 14px; font-size: 13px; color: #475569; cursor: pointer;
  font-weight: 500; transition: all .15s ease;
}
.mkpl-preset:hover { border-color: #0b6e66; color: #0b6e66; }
.mkpl-preset[data-active="1"] {
  background: #0b6e66; border-color: #0b6e66; color: #fff; font-weight: 600;
}
.mkpl-custom {
  display: grid; grid-template-columns: 1fr 1fr 1.5fr auto; gap: 12px; align-items: end;
}
.mkpl-field label {
  display: block; font-size: 11px; font-weight: 600;
  color: #475569; text-transform: uppercase; letter-spacing: .3px; margin-bottom: 4px;
}
.mkpl-field input, .mkpl-field select {
  width: 100%; padding: 8px 10px; border: 1px solid #cbd5e1; border-radius: 6px;
  font-size: 13px; background: #fff; box-sizing: border-box;
}
.mkpl-field input:focus, .mkpl-field select:focus {
  outline: none; border-color: #0b6e66; box-shadow: 0 0 0 3px rgba(11, 110, 102,.15);
}
@media (max-width: 900px) {
  .mkpl-custom { grid-template-columns: 1fr 1fr; }
}

/* Summary cards */
.mkpl-summary {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 14px 0;
}
.mkpl-card {
  background: #fff; border-radius: 12px; padding: 18px;
  border: 1px solid #e2e8f0; position: relative; overflow: hidden;
}
.mkpl-card-revenue  { background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%); border-color: #a7f3d0; }
.mkpl-card-expenses { background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%); border-color: #fecaca; }
.mkpl-card-profit   { background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%); border-color: #bfdbfe; }
.mkpl-card-margin   { background: linear-gradient(135deg, #faf5ff 0%, #f3e8ff 100%); border-color: #e9d5ff; }
.mkpl-card-margin.mkpl-margin-bad {
  background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%); border-color: #fecaca;
}
.mkpl-card-label {
  font-size: 11px; font-weight: 700; color: #475569; text-transform: uppercase;
  letter-spacing: .5px; margin-bottom: 8px;
}
.mkpl-card-value { font-size: 26px; font-weight: 800; color: #0f172a; line-height: 1.1; }
.mkpl-card-cmp   { margin-top: 8px; }
.mkpl-card-sub   { font-size: 11px; color: #64748b; margin-top: 8px; line-height: 1.4; }
.mkpl-cmp-label  { font-style: italic; }

.mkpl-delta {
  display: inline-block; padding: 3px 9px; border-radius: 999px;
  font-size: 12px; font-weight: 600;
}
.mkpl-delta-good { background: #d1fae5; color: #047857; }
.mkpl-delta-bad  { background: #fee2e2; color: #b91c1c; }
.mkpl-delta-flat { background: #f1f5f9; color: #64748b; }

@media (max-width: 900px) { .mkpl-summary { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 540px) { .mkpl-summary { grid-template-columns: 1fr; } }

/* Sections */
.mkpl-card-section { padding: 18px 20px; margin-bottom: 12px; }
.mkpl-section-title {
  margin: 0 0 14px; font-size: 15px; color: #0f172a;
  font-weight: 700; padding-bottom: 10px; border-bottom: 1px solid #e2e8f0;
}

.mkpl-table-wrap { overflow-x: auto; }
.mkpl-table {
  width: 100%; border-collapse: collapse; font-size: 13px; min-width: 720px;
}
.mkpl-table thead th {
  background: #f8fafc; color: #475569; text-transform: uppercase;
  font-size: 11px; font-weight: 700; letter-spacing: .3px;
  padding: 10px 12px; text-align: left; border-bottom: 2px solid #e2e8f0;
}
.mkpl-table thead th.num { text-align: right; }
.mkpl-table tbody td { padding: 12px; border-bottom: 1px solid #f1f5f9; vertical-align: top; }
.mkpl-table tbody tr:hover { background: #f8fafc; }
.mkpl-table .num {
  text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap;
}
.mkpl-pos { color: #047857; }
.mkpl-neg { color: #b91c1c; }

.mkpl-brand-cell { display: flex; flex-direction: column; gap: 4px; min-width: 180px; }
.mkpl-brand-bar, .mkpl-cat-bar {
  height: 4px; background: #f1f5f9; border-radius: 999px; overflow: hidden;
}
.mkpl-brand-bar span { display: block; height: 100%; background: #0b6e66; }
.mkpl-cat-bar span { display: block; height: 100%; background: #b45309; }

.mkpl-margin-badge {
  display: inline-block; padding: 3px 9px; border-radius: 999px;
  font-size: 11px; font-weight: 600;
}
.mkpl-margin-good { background: #d1fae5; color: #047857; }
.mkpl-margin-bad  { background: #fee2e2; color: #b91c1c; }

.mkpl-overhead-note {
  margin-top: 14px; padding: 10px 14px; background: #fffbeb;
  border-left: 3px solid #f59e0b; border-radius: 0 8px 8px 0;
  font-size: 12px; color: #92400e; line-height: 1.5;
}

/* ============================================================
 * Sidebar — Grupos colapsables (favoritos planos arriba +
 * Operación / Finanzas / Crecimiento abajo)
 * ============================================================ */
.mktpos-sb-group {
  display: flex; flex-direction: column;
  position: relative;
}
.mktpos-sb-group + .mktpos-sb-group { margin-top: 2px; }

.mktpos-sb-group-toggle {
  display: flex; align-items: center; gap: 10px;
  width: 100%; background: transparent; border: none;
  padding: 11px 12px; cursor: pointer; text-align: left;
  color: rgba(255,255,255,.85);  /* contraste alto, igual que sublink hover */
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .6px;
  text-transform: uppercase;
  border-radius: 14px;
  transition: background .15s ease, color .15s ease;
  margin-bottom: 4px;
  border: 1px solid transparent;
}
.mktpos-sb-group-toggle:hover,
.mktpos-sb-group:hover > .mktpos-sb-group-toggle {
  background: rgba(255,255,255,.07);
  color: #fff;
}
.mktpos-sb-group-toggle.mktpos-sb-group-has-active {
  color: #fff;
  background: rgba(255,255,255,.05);
}
.mktpos-sb-group-toggle .mktpos-sb-label {
  flex: 1;
  font-size: 12px;
  letter-spacing: .6px;
}
.mktpos-sb-group-caret {
  transition: transform .2s ease;
  opacity: .7;
  margin-left: auto;
}
.mktpos-sb-group.is-open > .mktpos-sb-group-toggle .mktpos-sb-group-caret,
.mktpos-sb-group:hover > .mktpos-sb-group-toggle .mktpos-sb-group-caret {
  transform: rotate(180deg);
  opacity: 1;
}

/* Submenu: oculto por default, abre con .is-open (click pin) o :hover (sin pin) */
.mktpos-sb-group-items {
  display: none;
  flex-direction: column;
  padding-left: 10px;
  border-left: 2px solid rgba(255,255,255,.08);
  margin: 0 0 4px 15px;
}
.mktpos-sb-group.is-open > .mktpos-sb-group-items,
.mktpos-sb-group:hover > .mktpos-sb-group-items {
  display: flex;
}

.mktpos-sb-sublink {
  font-size: 12.5px;
  padding: 8px 10px;
  color: rgba(255,255,255,.75) !important;
}
.mktpos-sb-sublink:hover { color: #fff !important; }
.mktpos-sb-sublink.mktpos-sb-active { color: #fff !important; font-weight: 600; }

/* En sidebar colapsado (modo iconos), ocultar los grupos para evitar caos
   — los iconos sueltos sin contexto del grupo no aportan */
.mktpos-sb-collapsed .mktpos-sb-group-toggle .mktpos-sb-label,
.mktpos-sb-collapsed .mktpos-sb-group-toggle .mktpos-sb-group-caret { display: none; }
.mktpos-sb-collapsed .mktpos-sb-group-items {
  padding-left: 0; margin-left: 0; border-left: 0;
}
.mktpos-sb-collapsed .mktpos-sb-sublink { padding-left: 14px; }

/* Separador visual entre favoritos y primer grupo */
.mktpos-sb-nav .mktpos-sb-group:first-of-type {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,.08);
}

/* ============================================================
 * Multi-tenant Fase B — Org picker en sidebar
 * Vive ARRIBA del brand picker. Solo se renderiza si el user tiene 2+ orgs.
 * ============================================================ */
.mktpos-sb-org {
  position: relative;
  padding: 12px 14px 8px;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.mktpos-sb-org-btn {
  display: flex; align-items: center; gap: 8px;
  width: 100%; padding: 8px 10px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 10px;
  color: rgba(255,255,255,.9);
  font-family: inherit; font-size: 12px; font-weight: 600;
  cursor: pointer; text-align: left;
  transition: background .15s ease, border-color .15s ease;
}
.mktpos-sb-org-btn:hover {
  background: rgba(255,255,255,.08);
  border-color: rgba(255,255,255,.15);
}
.mktpos-sb-org-icon { font-size: 14px; line-height: 1; }
.mktpos-sb-org-name {
  flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.mktpos-sb-org-caret { opacity: .6; flex-shrink: 0; }
.mktpos-sb-org-btn[aria-expanded="true"] .mktpos-sb-org-caret {
  transform: rotate(180deg);
  opacity: 1;
}

.mktpos-sb-org-dropdown {
  position: absolute; top: 100%; left: 14px; right: 14px;
  margin-top: 4px;
  background: #1f2937;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0,0,0,.4);
  z-index: 1000;
  max-height: 320px; overflow-y: auto;
  display: none;
  padding: 6px 4px;
}
.mktpos-sb-org-dropdown.open { display: block; }
.mktpos-sb-org-dropdown-label {
  font-size: 10px; text-transform: uppercase; letter-spacing: .6px;
  color: rgba(255,255,255,.4); font-weight: 700;
  padding: 6px 10px 4px;
}
.mktpos-sb-org-option {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px; border-radius: 6px;
  cursor: pointer;
  color: rgba(255,255,255,.85);
  font-size: 13px;
  transition: background .12s ease;
}
.mktpos-sb-org-option:hover {
  background: rgba(255,255,255,.08);
  color: #fff;
}
.mktpos-sb-org-option.active {
  background: linear-gradient(135deg, rgba(11, 110, 102,.24), rgba(11, 110, 102,.18));
  color: #fff; font-weight: 600;
}
.mktpos-sb-org-option-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: rgba(255,255,255,.3);
  flex-shrink: 0;
}
.mktpos-sb-org-option.active .mktpos-sb-org-option-dot {
  background: #c2410c;
  box-shadow: 0 0 0 3px rgba(11, 110, 102,.2);
}
.mktpos-sb-org-option-name {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* En sidebar colapsado (iconos), ocultar texto del org picker */
.mktpos-sb-collapsed .mktpos-sb-org-name,
.mktpos-sb-collapsed .mktpos-sb-org-caret { display: none; }
.mktpos-sb-collapsed .mktpos-sb-org-btn { justify-content: center; padding: 8px; }
.mktpos-sb-collapsed .mktpos-sb-org-dropdown { left: 100%; top: 0; margin-left: 8px; width: 220px; }

/* ============================================================
 * MULTI-TENANT FASE C — Página /organizaciones
 * ============================================================ */
.mktpos-orgs-wrap { max-width: 1280px; margin: 0 auto; padding: 12px 0; }

.mkorg-list { display: grid; gap: 12px; }
.mkorg-card { padding: 18px 20px; }
.mkorg-card-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
}
.mkorg-name { margin: 0 0 4px; font-size: 17px; color: #0f172a; font-weight: 700; }
.mkorg-desc { margin: 0 0 8px; font-size: 13px; color: #64748b; }
.mkorg-meta {
  display: flex; gap: 14px; flex-wrap: wrap;
  font-size: 12px; color: #475569;
}
.mkorg-card-actions { display: flex; gap: 6px; }

/* Modal */
.mkorg-modal-inner {
  background: #fff; border-radius: 12px; max-width: 860px; width: 95%;
  max-height: 92vh; overflow-y: auto; box-shadow: 0 20px 60px rgba(0,0,0,.3);
}

/* Tabs */
.mkorg-tabs {
  display: flex; gap: 4px; padding: 0 22px;
  border-bottom: 1px solid #e2e8f0; background: #f8fafc;
}
.mkorg-tab {
  background: transparent; border: none; padding: 12px 16px;
  font-size: 13px; font-weight: 600; color: #64748b; cursor: pointer;
  border-bottom: 3px solid transparent;
  transition: color .15s, border-color .15s;
}
.mkorg-tab:hover { color: #0b6e66; }
.mkorg-tab.is-active { color: #0b6e66; border-bottom-color: #0b6e66; }

.mkorg-tab-content { padding: 22px; }
.mkorg-tab-pane[hidden] { display: none; }
.mkorg-tab-help {
  font-size: 13px; color: #64748b; margin: 0 0 16px;
  padding: 10px 14px; background: #f8fafc; border-radius: 8px;
  border-left: 3px solid #0b6e66;
}

.mkorg-section { margin-bottom: 22px; }
.mkorg-section-title {
  margin: 0 0 10px; font-size: 13px; color: #475569;
  font-weight: 700; text-transform: uppercase; letter-spacing: .3px;
}

/* Chips de marcas / bodegas */
.mkorg-chip-list {
  display: flex; flex-wrap: wrap; gap: 6px;
  min-height: 36px;
  padding: 8px; background: #f8fafc; border-radius: 8px;
  border: 1px solid #e2e8f0;
}
.mkorg-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 999px;
  font-size: 13px; cursor: default;
  border: 1px solid transparent;
  background: #fff; color: #0f172a;
}
.mkorg-chip-active {
  background: #dbeafe; color: #1e40af; border-color: #93c5fd;
}
.mkorg-chip-available {
  background: #fff; color: #475569; cursor: pointer;
  border-color: #cbd5e1;
  font-weight: 500;
}
.mkorg-chip-available:hover {
  background: #ecfdf5; color: #047857; border-color: #6ee7b7;
}
.mkorg-chip-x {
  background: transparent; border: none; color: inherit; cursor: pointer;
  font-size: 16px; line-height: 1; padding: 0 0 0 4px; opacity: .7;
}
.mkorg-chip-x:hover { opacity: 1; color: #dc2626; }

.mkorg-available-list .mkorg-chip { font-size: 12.5px; }

/* Tabla usuarios */
.mkorg-table {
  width: 100%; border-collapse: collapse; font-size: 13px;
}
.mkorg-table thead th {
  background: #f8fafc; color: #475569; text-transform: uppercase;
  font-size: 10px; font-weight: 700; letter-spacing: .3px;
  padding: 8px 10px; text-align: left; border-bottom: 1px solid #e2e8f0;
}
.mkorg-table tbody td { padding: 8px 10px; border-bottom: 1px solid #f1f5f9; vertical-align: middle; }
.mkorg-table select { padding: 6px 8px; border: 1px solid #cbd5e1; border-radius: 6px; font-size: 13px; }
.mkorg-pill {
  display: inline-block; padding: 2px 8px; border-radius: 999px;
  background: #ecfdf5; color: #047857; font-size: 10px; font-weight: 700; margin-left: 6px;
}

.mkorg-add-row {
  display: flex; gap: 8px; align-items: stretch;
  padding: 10px; background: #f8fafc; border-radius: 8px;
}
.mkorg-add-row select {
  padding: 8px 10px; border: 1px solid #cbd5e1; border-radius: 6px;
  font-size: 13px; background: #fff;
}

/* Features */
.mkorg-feat-group { margin-bottom: 24px; }
.mkorg-feat-row {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 10px 12px; border-radius: 8px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background .15s, border-color .15s;
}
.mkorg-feat-row:hover { background: #f8fafc; border-color: #e2e8f0; }
.mkorg-feat-toggle { width: 18px; height: 18px; cursor: pointer; flex-shrink: 0; margin-top: 2px; }
.mkorg-feat-info { display: flex; flex-direction: column; gap: 2px; }
.mkorg-feat-info strong { font-size: 13px; color: #0f172a; font-weight: 600; }
.mkorg-feat-desc { font-size: 12px; color: #64748b; }

/* ============================================================
 * PREMIUM POLISH GLOBAL — aditivo, solo estética (no cambia layout ni funcionalidad)
 * v2.16.63
 * ============================================================ */
:root { --mktpos-elev-1: 0 3px 10px rgba(15,39,64,.06); --mktpos-elev-2: 0 14px 34px rgba(15,39,64,.12); }

/* Botones: transición suave, press y sombra elegante */
.mktpos-btn { transition: transform .12s ease, box-shadow .18s ease, filter .15s ease; }
.mktpos-btn:active { transform: translateY(1px); }
.mktpos-btn-primary, .mktpos-btn-success, .mktpos-btn-danger { box-shadow: 0 4px 12px rgba(15,39,64,.14); }
.mktpos-btn-primary:hover, .mktpos-btn-success:hover, .mktpos-btn-danger:hover { filter: brightness(1.05); box-shadow: 0 9px 22px rgba(15,39,64,.20); transform: translateY(-1px); }
.mktpos-btn:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--mktpos-brand-weak); }

/* Cards: radio y sombra más suave */
.mktpos-card { border-radius: 16px; box-shadow: var(--mktpos-elev-1); }

/* Inputs / selects / textarea: foco de marca elegante */
.mktpos-input, .mktpos-wrap input[type=text], .mktpos-wrap input[type=number], .mktpos-wrap input[type=email], .mktpos-wrap input[type=date], .mktpos-wrap select, .mktpos-wrap textarea { transition: border-color .15s ease, box-shadow .15s ease; }
.mktpos-input:focus, .mktpos-wrap input:focus, .mktpos-wrap select:focus, .mktpos-wrap textarea:focus { border-color: var(--mktpos-brand); box-shadow: 0 0 0 3px var(--mktpos-brand-soft); outline: none; }

/* Tablas del dashboard: contenedor redondeado + hover de fila */
.mktpos-dash-table { border-radius: 12px; overflow: hidden; }
.mktpos-dash-table tbody tr { transition: background .12s ease; }
.mktpos-dash-table tbody tr:hover td { background: var(--mktpos-brand-soft); }

/* Scrollbars finas y elegantes (webkit) */
.mktpos-wrap ::-webkit-scrollbar { width: 10px; height: 10px; }
.mktpos-wrap ::-webkit-scrollbar-thumb { background: rgba(15,39,64,.18); border-radius: 8px; border: 2px solid transparent; background-clip: padding-box; }
.mktpos-wrap ::-webkit-scrollbar-thumb:hover { background: rgba(15,39,64,.32); background-clip: padding-box; }

/* Modales conocidos: sombra profunda para más presencia */
#miv-modal > div, #mkb-guided > div, .mktpos-modal-box { box-shadow: 0 30px 80px rgba(6,16,32,.38); }

/* Toolbar del Reporte semanal: botones con más presencia */
.mktpos-page-marketing #mkt_rep_brand { font-weight: 600; }
.mktpos-page-marketing #mkt_rep_view { box-shadow: 0 6px 16px rgba(16,120,80,.28); }

/* ═══════════════════════════════════════════════════════════════════════════
   Modales: nunca más altos que la pantalla
   ---------------------------------------------------------------------------
   Un modal es una capa fija a pantalla completa. Si su tarjeta interior crece
   más que la ventana, los botones del pie se salen y quedan fuera de alcance;
   pasó de verdad en «Enviar nota al contador» y el usuario ve la pantalla
   trabada. Esta regla es defensiva y ADITIVA: solo pone tope de alto y scroll
   propio, sin tocar maquetación ni comportamiento.
   Va en ESTA hoja (no en mktpos-design.css) porque hay pantallas —como
   /registro-salidas/— que se dibujan con una plantilla que no carga aquella.
   Se excluye #mkb-send-modal: ya trae su propio encabezado/cuerpo/pie.
   ═══════════════════════════════════════════════════════════════════════════ */
#mktpos_money_refund_modal   > div,
#mktpos_track_label_modal    > div,
#mktpos_pdf_preview_modal    > div,
#mktpos_edit_cust_modal      > div,
#mktpos_unlock_modal         > div,
#mktpos_dash_pdf_modal       > div,
#mktpos_kpi_customize_modal  > div,
#rs_label_modal              > div,
#cut_detail_modal            > div,
#cut_open_modal              > div,
#cut_close_modal             > div,
#pkg-modal                   > div,
#mkb-recips-modal            > div,
#mktpos-shortcuts-overlay    > div {
  max-height: 90vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* ============================================================
 * Modal guiado «Antes de enviar al contador» (mkbg-*)
 * Se llena dentro del modal, así que necesita respirar: tipografía
 * grande, controles cómodos y, en celular, una sola columna.
 * Estructura fija: encabezado · cuerpo con scroll · pie. El pie NUNCA
 * se sale de la pantalla (ver clases-de-error §1).
 * ============================================================ */
.mkbg-overlay{
  position:fixed; inset:0; z-index:100001;
  background:rgba(15,23,42,.58); backdrop-filter:blur(2px);
  display:flex; align-items:center; justify-content:center;
  padding:24px; box-sizing:border-box;
}
.mkbg-card{
  background:#fff; border-radius:18px; width:min(680px,100%);
  max-height:min(90vh,940px); display:flex; flex-direction:column;
  box-shadow:0 24px 70px rgba(15,23,42,.28); overflow:hidden;
}
.mkbg-head{ padding:26px 30px 16px; border-bottom:1px solid #f1f5f9; flex:none }
.mkbg-title{ margin:0 0 6px; font-size:21px; line-height:1.25; font-weight:800; color:#0f172a }
.mkbg-sub{ margin:0; font-size:14.5px; line-height:1.5; color:#64748b }
.mkbg-body{
  padding:18px 30px; overflow-y:auto; -webkit-overflow-scrolling:touch;
  flex:1 1 auto; display:flex; flex-direction:column; gap:14px;
}
.mkbg-sec{ border:1px solid #e2e8f0; border-radius:14px; padding:16px 18px; background:#fff }
.mkbg-sec--warn{ background:#fffbeb; border-color:#fde68a }
.mkbg-sec--req{ background:#fff; border-color:#fecaca }
.mkbg-sec-title{
  margin:0 0 12px; font-size:13.5px; font-weight:800; color:#334155;
  display:flex; align-items:center; gap:8px; line-height:1.35;
}
.mkbg-sec-title::before{ content:''; width:4px; height:16px; border-radius:2px; background:#cbd5e1; flex:none }
.mkbg-sec--warn .mkbg-sec-title{ color:#92400e } .mkbg-sec--warn .mkbg-sec-title::before{ background:#f59e0b }
.mkbg-sec--req  .mkbg-sec-title{ color:#991b1b } .mkbg-sec--req  .mkbg-sec-title::before{ background:#ef4444 }
.mkbg-sec-note{ margin:-6px 0 12px; font-size:12.5px; line-height:1.5; color:#94a3b8 }

.mkbg-row{
  display:grid; grid-template-columns:minmax(120px,190px) 1fr;
  align-items:center; gap:8px 16px; padding:10px 0;
}
.mkbg-row + .mkbg-row{ border-top:1px solid #f1f5f9 }
.mkbg-label{ font-size:14px; font-weight:600; color:#334155; line-height:1.4 }
.mkbg-label small{ display:block; font-size:12px; font-weight:500; color:#94a3b8; margin-top:2px }
.mkbg-ctrl{ display:flex; align-items:center; gap:10px; min-width:0 }

.mkbg-select{
  flex:1 1 auto; min-width:0; height:46px; padding:10px 40px 10px 14px;
  font-size:15px; font-family:inherit; color:#0f172a;
  border:1.5px solid #cbd5e1; border-radius:10px; background-color:#fff; cursor:pointer;
  -webkit-appearance:none; appearance:none;
  background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat:no-repeat; background-position:right 13px center; background-size:17px;
  transition:border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}
.mkbg-select:hover{ border-color:#94a3b8 }
.mkbg-select:focus{ outline:none; border-color:#0b8076; box-shadow:0 0 0 3px rgba(79,70,229,.16) }
.mkbg-select.is-ok{ border-color:#10b981; background-color:#f0fdf4 }
.mkbg-select.is-err{ border-color:#dc2626; background-color:#fef2f2 }
.mkbg-ok{ font-size:12.5px; font-weight:700; white-space:nowrap; color:#047857; min-width:0 }
.mkbg-ok:empty{ display:none }

.mkbg-check{
  display:flex; align-items:center; gap:12px; cursor:pointer;
  font-size:15px; font-weight:600; color:#1f2937; line-height:1.4; padding:6px 0;
}
.mkbg-check input[type=checkbox]{ width:20px; height:20px; flex:none; cursor:pointer; accent-color:#d97706; margin:0 }
.mkbg-check--alt{
  background:#e3f8f5; border:1px solid #a7e3da; border-radius:10px;
  padding:11px 14px; color:#0b6e66; font-size:14px; margin-top:8px;
}
.mkbg-check--alt input[type=checkbox]{ accent-color:#0b8076 }
.mkbg-hint{ font-size:12.5px; line-height:1.5; color:#92400e; margin:6px 0 0 32px }
.mkbg-file{
  display:block; width:100%; box-sizing:border-box; font-size:14px; margin-top:6px;
  padding:10px 12px; border:1.5px dashed #cbd5e1; border-radius:10px; background:#f8fafc; cursor:pointer;
}
.mkbg-file::-webkit-file-upload-button{
  font:inherit; font-size:13.5px; font-weight:700; margin-right:12px; cursor:pointer;
  padding:7px 14px; border:none; border-radius:8px; background:#e2e8f0; color:#334155;
}

.mkbg-pay{
  display:grid; grid-template-columns:1fr minmax(190px,260px); align-items:center; gap:8px 16px; padding:12px 0;
}
.mkbg-pay + .mkbg-pay{ border-top:1px solid #f1f5f9 }
.mkbg-pay-info{ font-size:13.5px; color:#334155; line-height:1.5; min-width:0 }
.mkbg-pay-info strong{ color:#0f172a }
.mkbg-pay-info span{ display:block; font-size:12.5px; color:#94a3b8 }

.mkbg-list{ list-style:none; margin:0; padding:0 }
.mkbg-list li{
  display:flex; align-items:flex-start; gap:10px; margin:8px 0; padding:12px 14px;
  background:#fff7ed; border:1px solid #fed7aa; border-radius:10px; font-size:14px; line-height:1.5; color:#7c2d12;
}

.mkbg-foot{ padding:16px 30px 24px; border-top:1px solid #f1f5f9; flex:none; background:#fff }
.mkbg-msg{ margin:0 0 12px; font-size:13.5px; line-height:1.5; min-height:19px; color:#64748b }
.mkbg-actions{ display:flex; justify-content:flex-end; gap:10px }
.mkbg-btn{
  font-family:inherit; font-size:15px; font-weight:700; padding:12px 22px; border-radius:10px;
  border:none; cursor:pointer; line-height:1.2; transition:transform .12s ease, box-shadow .12s ease, background-color .12s ease;
}
.mkbg-btn:hover{ transform:translateY(-1px); box-shadow:0 6px 16px rgba(15,23,42,.14) }
.mkbg-btn:active{ transform:translateY(0); box-shadow:none }
.mkbg-btn[disabled]{ opacity:.6; cursor:default; transform:none; box-shadow:none }
.mkbg-btn-ghost{ background:#f1f5f9; color:#334155 }
.mkbg-btn-ghost:hover{ background:#e2e8f0 }
.mkbg-btn-primary{ background:#0b6e66; color:#fff }
.mkbg-btn-primary:hover{ background:#0a5a53 }

/* Celular / pantallas angostas: una sola columna y controles más altos.
   16px en los selects evita que iOS haga zoom al enfocarlos. */
@media (max-width:640px){
  .mkbg-overlay{ padding:12px }
  .mkbg-card{ border-radius:16px; max-height:94vh }
  .mkbg-head{ padding:20px 18px 12px }
  .mkbg-title{ font-size:18.5px }
  .mkbg-sub{ font-size:13.5px }
  .mkbg-body{ padding:14px 18px; gap:12px }
  .mkbg-sec{ padding:14px 15px; border-radius:12px }
  .mkbg-row, .mkbg-pay{ grid-template-columns:1fr; gap:6px; padding:12px 0 }
  .mkbg-select{ font-size:16px; height:48px }
  .mkbg-ctrl{ flex-wrap:wrap }
  .mkbg-foot{ padding:14px 18px 20px }
  .mkbg-actions{ flex-direction:column-reverse; gap:8px }
  .mkbg-btn{ width:100%; padding:14px 20px; font-size:15.5px }
  .mkbg-hint{ margin-left:0 }
}
/* Pantallas bajas (portátiles con poca altura): apretar sin romper nada. */
@media (max-height:620px){
  .mkbg-head{ padding-top:18px; padding-bottom:10px }
  .mkbg-title{ font-size:18px }
  .mkbg-body{ padding-top:12px; padding-bottom:12px }
  .mkbg-foot{ padding-bottom:16px }
}

/* ============================================================
 * Cotización en celular: la página no cabía a lo ancho.
 * `1fr` es `minmax(auto,1fr)`, así que la columna NO podía encogerse por
 * debajo del contenido y la tabla de productos (min-content 558px) estiraba
 * toda la página a 576px en una pantalla de 390. Con `minmax(0,1fr)` la
 * columna se ajusta y la tabla ancha se desplaza dentro de su propio recuadro
 * (`.mktpos-items-table` ya trae overflow-x:auto). Aditivo: en escritorio
 * queda idéntico.
 * ============================================================ */
.mktpos-quote-grid{ grid-template-columns: minmax(0,1fr) 380px }
.mktpos-quote-grid > *{ min-width:0 }
@media (max-width:1024px){
  .mktpos-quote-grid{ grid-template-columns: minmax(0,1fr) }
}


/* Origen de la venta ("¿de dónde nos conoce?") en Operaciones destacadas del corte */
.mktpos-ops-origen{display:inline-block;padding:2px 8px;border-radius:999px;background:#e3f8f5;color:#0b6e66;font-size:11.5px;font-weight:600;white-space:nowrap}


/* ===== Descuento a todos los productos (estilo Odoo) + excepciones por línea ===== */
.mktpos-bulkdisc{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:10px 0 4px;padding:9px 12px;background:#f8fafc;border:1px solid #e2e8f0;border-radius:10px}
.mktpos-bulkdisc-lbl{font-size:12.5px;font-weight:700;color:#334155}
.mktpos-bulkdisc-type{width:60px;padding:5px 6px;font-size:12.5px}
.mktpos-bulkdisc-val{width:92px;padding:5px 8px;font-size:12.5px}
.mktpos-bulkdisc-btn{border:none;border-radius:8px;padding:6px 12px;font-size:12.5px;font-weight:600;cursor:pointer;background:#3b4262;color:#fff}
.mktpos-bulkdisc-btn:hover{filter:brightness(1.08)}
.mktpos-bulkdisc-btn-ghost{background:#fff;color:#64748b;border:1px solid #cbd5e1}
.mktpos-bulkdisc-hint{font-size:11.5px;color:#94a3b8;flex:1 1 220px;min-width:180px}
.mktpos-qb-disc-manual{display:inline-flex;align-items:center;gap:3px;margin-top:3px;padding:1px 6px;border-radius:999px;background:#fef3c7;color:#92400e;font-size:10px;font-weight:700;letter-spacing:.02em;cursor:pointer;border:1px solid #fde68a;white-space:nowrap}
.mktpos-qb-disc-manual:hover{background:#fde68a}

/* ═══════════════════════════════════════════════════════════════════════════
   Capas fijas que tapaban botones (revisión del lunes 14-sep-2026)
   ---------------------------------------------------------------------------
   1) La barra «Guardar cambios» de Editar cotización medía todo el ancho y
      pasaba ENCIMA del pie del menú lateral (usuario y «Contraer menú»).
   2) La burbuja del chat se montaba sobre el botón «Guardar cambios».
   3) La campana de notificaciones tapaba «Correos de contador» en Facturación.
   Reglas aditivas: solo mueven capas fijas; no tocan la maquetación.
   ═══════════════════════════════════════════════════════════════════════════ */
body:has(.mktpos-sidebar) .mktpos-odoo-save-bar {
  left: var(--sb-w);
  transition: left .22s ease;
}
body.mktpos-sb-collapsed:has(.mktpos-sidebar) .mktpos-odoo-save-bar {
  left: var(--sb-w-c);
}
body:has(.mktpos-odoo-save-bar) #mktpos-chat-bubble-root {
  bottom: 88px;
}
#mkb-recips-open {
  margin-right: 56px;
}
@media (max-width: 768px) {
  body:has(.mktpos-sidebar) .mktpos-odoo-save-bar { left: 0; }
}
@media (max-width: 480px) {
  body:has(.mktpos-odoo-save-bar) #mktpos-chat-bubble-root { bottom: 80px; }
}

/* La campana flotante (44px, fija arriba a la derecha) tapaba el último botón de
   los encabezados de página («Buscar» en Catálogo). Se reserva su espacio a la
   derecha del encabezado solo en escritorio: en celular el contenido ya empieza
   debajo de la barra superior. */
@media (min-width: 769px) {
  body:has(#mktpos-notif-bell-root) .mktpos-page-header,
  body:has(#mktpos-notif-bell-root) .mktpos-quote-header { padding-right: 60px; }
}
/* Paquetes arma su encabezado sin clase: se aparta solo su botón («Dashboard» en
   Clientes y «+ Nuevo paquete» en Paquetes quedaban medio tapados). */
#pkg-new-btn { margin-right: 56px; }
/* Unificar cotizaciones: tope de alto como el resto de modales (no dependía del JS). */
#mktpos_merge_modal > div {
  max-height: 90vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* ═══════════════════════════════════════════════════════════════════════════
   Celular (390 px): pantallas que se salían a lo ancho (revisión 14-sep-2026)
   Solo celular; en escritorio no cambia nada.
   ═══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  /* Nueva cotización: los bloques de la barra de resumen medían 615 px dentro de 342 px. */
  .mktpos-sticky-footer > * { min-width: 0; max-width: 100%; box-sizing: border-box; }
  .mktpos-sticky-footer-actions { flex-wrap: wrap; }
  /* Pendientes de envío: el selector se estiraba al nombre de producto más largo. */
  #pe-product { max-width: 100%; min-width: 0; }
  /* Uso: la tabla hace scroll dentro de su tarjeta, no la página entera. */
  .mktpos-usage-wrap table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  /* Solicitudes: su contenedor no recibía el margen de las demás pantallas; el título
     quedaba bajo el botón de menú y «Actualizar» bajo la campana. */
  .mktpos-wrap:has(.mktpos-sidebar) main.mktpos-main { padding: 72px 16px 24px; }
}

/* ── v2.16.110 · Ventanas nuevas (WhatsApp, Enviar al cliente, Metas) ──
   Se agregan al <body>, fuera de .mktpos-wrap, así que no heredaban la letra
   del sistema y salían con tipografía de máquina de escribir. */
#mktpos-wa-dialog, #mktpos-send-dialog, #mktpos-goals-dialog {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color: #1f2937; line-height: 1.45; -webkit-font-smoothing: antialiased;
}
#mktpos-wa-dialog input, #mktpos-wa-dialog textarea, #mktpos-wa-dialog select, #mktpos-wa-dialog button, #mktpos-wa-dialog a,
#mktpos-send-dialog input, #mktpos-send-dialog textarea, #mktpos-send-dialog select, #mktpos-send-dialog button,
#mktpos-goals-dialog input, #mktpos-goals-dialog textarea, #mktpos-goals-dialog select, #mktpos-goals-dialog button {
  font-family: inherit;
}
#mktpos-goals-dialog label { display: block; }
/* La campana flotante (arriba a la derecha) tapaba el último botón del panel de metas. */
.mktpos-goals > div:first-child { padding-right: 52px; }

/* ── Organizaciones · pestaña «Correos» (v2.16.115) ── */
.mkorg-tabs { overflow-x: auto; scrollbar-width: thin; }
.mkorg-tab { white-space: nowrap; flex: 0 0 auto; }
.mkorg-mail-badge {
  display: inline-block; margin-top: 10px; padding: 5px 11px; border-radius: 999px;
  font-size: 12px; font-weight: 600; line-height: 1.4;
}
.mkorg-mail-badge.is-ok   { background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; }
.mkorg-mail-badge.is-warn { background: #fff7ed; color: #9a3412; border: 1px solid #fed7aa; }
.mkorg-mail-status { margin: 0 0 14px; }
.mkorg-mail-status .mkorg-mail-badge { margin-top: 0; border-radius: 8px; display: block; }
#mkorg-mail-wrap textarea {
  width: 100%; box-sizing: border-box; font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12.5px; line-height: 1.5; resize: vertical;
}
.mkorg-mail-hint { display: block; margin-top: 4px; font-size: 11.5px; color: #64748b; line-height: 1.45; }
.mkorg-mail-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 16px; }

/* ── 🔗 Conectar con MKT Admin (v2.17.0) — sección de la organización. Sin modales: todo en la tarjeta. ── */
.mktcx-card { padding: 24px 26px; }
.mktcx-title { margin: 0 0 6px; color: #0f172a; font-size: 18px; }
.mktcx-sub { margin: 0 0 16px; color: #64748b; font-size: 13px; line-height: 1.55; }
.mktcx-muted { color: #64748b; font-size: 12.5px; line-height: 1.5; display: block; }
.mktcx-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.mktcx-box { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 12px; padding: 16px; margin-bottom: 14px; min-width: 0; }
.mktcx-box-t { font-weight: 700; font-size: 13.5px; color: #1e293b; margin-bottom: 10px; }
.mktcx-tag { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 999px; background: #e3f8f5; color: #0b6e66; font-size: 11px; font-weight: 600; }
.mktcx-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 6px 0; }
.mktcx-row input[type=text], .mktcx-row input[type=url] { flex: 1 1 220px; min-width: 0; padding: 9px 11px; border: 1px solid #cbd5e1; border-radius: 9px; font-size: 14px; }
.mktcx-chk { display: flex; align-items: center; gap: 8px; padding: 4px 0; font-size: 13.5px; cursor: pointer; }
.mktcx-code { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 12px 0 6px; }
.mktcx-code code { display: block; padding: 10px 12px; background: #0f172a; color: #fef3c7; border-radius: 9px; font-size: 14px; letter-spacing: .04em; word-break: break-all; }
.mktcx-estado { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.mktcx-badge { display: inline-block; padding: 4px 11px; border-radius: 999px; font-size: 12px; font-weight: 700; background: #f1f5f9; color: #334155; }
.mktcx-badge.is-ok { background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; }
.mktcx-badge.is-warn { background: #fff7ed; color: #9a3412; border: 1px solid #fed7aa; }
.mktcx-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin-top: 10px; }
.mktcx-kpis > div { background: #fff; border: 1px solid #e2e8f0; border-radius: 10px; padding: 10px 12px; }
.mktcx-kpis small { display: block; color: #64748b; font-size: 11.5px; }
.mktcx-kpis b { display: block; font-size: 16px; color: #0f172a; margin-top: 2px; }
.mktcx-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.mktcx-chip { display: inline-flex; align-items: center; gap: 4px; padding: 5px 10px; border-radius: 999px; background: #fff; border: 1px solid #cbd5e1; font-size: 12.5px; }
.mktcx-x { border: 0; background: transparent; color: #b91c1c; font-size: 16px; line-height: 1; cursor: pointer; padding: 0 2px; }
.mktcx-err { margin: 0; padding-left: 18px; color: #991b1b; font-size: 12.5px; line-height: 1.5; }
.mktcx-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.mktcx-table th, .mktcx-table td { text-align: left; padding: 8px 6px; border-bottom: 1px solid #e2e8f0; }
.mktcx-danger { color: #b91c1c !important; }
.mktcx-msg { margin-top: 12px; font-size: 13.5px; line-height: 1.5; }
.mktcx-msg:empty { display: none; }
.mktcx-msg.is-ok { background: #ecfdf5; border: 1px solid #a7f3d0; color: #065f46; border-radius: 10px; padding: 10px 12px; }
.mktcx-msg.is-mal { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; border-radius: 10px; padding: 10px 12px; }
@media (max-width: 640px) {
  .mktcx-card { padding: 18px 16px; }
  .mktcx-table thead { display: none; }
  .mktcx-table td { display: block; border-bottom: 0; padding: 3px 0; }
  .mktcx-table tr { display: block; padding: 8px 0; border-bottom: 1px solid #e2e8f0; }
}

/* ── Reporte semanal / mensual (v2.17.10) ─────────────────── */
#mkt_pane_reporte .mkt-rep-period{display:flex;flex-wrap:wrap;align-items:center;gap:10px;margin:0 0 12px}
#mkt_pane_reporte .mkt-rep-seg{display:inline-flex;background:#f1f5f9;border:1px solid #e2e8f0;border-radius:10px;padding:3px;gap:2px;flex-wrap:wrap}
#mkt_pane_reporte .mkt-rep-seg-btn{border:0;background:transparent;padding:7px 14px;border-radius:8px;font-size:13px;font-weight:600;color:#475569;cursor:pointer;line-height:1.2}
#mkt_pane_reporte .mkt-rep-seg-btn.is-on{background:#fff;color:var(--mkt-acc,#0e5aa7);box-shadow:0 1px 3px rgba(15,23,42,.12)}
#mkt_pane_reporte #mkt_rep_week,#mkt_pane_reporte #mkt_rep_month{min-width:210px;max-width:100%}
#mkt_pane_reporte .mkt-rep-range-lbl{font-size:13px;color:#475569;background:#f8fafc;border:1px dashed #cbd5e1;border-radius:8px;padding:7px 12px}
#mkt_pane_reporte .mkt-rep-kpis{grid-template-columns:repeat(auto-fit,minmax(180px,1fr))}
#mkt_pane_reporte .mkt-rep-sub{font-size:11.5px;color:#64748b;margin-top:2px}
#mkt_rep_auto .mkt-rep-cuadre-card{position:relative;overflow:hidden;margin:20px 0 14px;padding:26px 26px 20px;border:1px solid var(--mktpos-border);border-radius:16px;background:linear-gradient(180deg,#fff,#fbfdff);box-shadow:0 6px 20px rgba(15,39,64,.06)}
#mkt_rep_auto .mkt-rep-cuadre-card::before{content:"";position:absolute;top:0;left:0;right:0;height:4px;background:linear-gradient(90deg,var(--mkt-acc,#0b6e66),color-mix(in srgb,var(--mkt-acc,#0b6e66) 25%,transparent))}
#mkt_rep_auto .mkt-rep-cuadre-tit{margin:0 0 16px;font-size:16px;font-weight:800;color:#0f2740;letter-spacing:-.01em}
#mkt_rep_auto .mkt-rep-cuadre{width:100%;border-collapse:separate;border-spacing:0;border:1px solid #e2e8f0;border-radius:12px;overflow:hidden;background:#fff}
#mkt_rep_auto .mkt-rep-cuadre td,#mkt_rep_auto .mkt-rep-cuadre th{white-space:nowrap;text-align:left;padding:13px 16px}
#mkt_rep_auto .mkt-rep-cuadre thead th{background:#f1f5f9;color:#475569;font-size:10.5px;font-weight:800;letter-spacing:.06em;text-transform:uppercase}
#mkt_rep_auto .mkt-rep-cuadre tbody td{border-top:1px solid #eef2f6;font-size:13.5px;color:#334155}
#mkt_rep_auto .mkt-rep-cuadre tbody tr:first-child td{border-top:0}
#mkt_rep_auto .mkt-rep-cuadre tbody tr:hover td{background:#f8fafc}
#mkt_rep_auto .mkt-rep-cuadre td b{color:#0f2740}
#mkt_rep_auto .mkt-rep-cuadre .mkt-rep-num{text-align:right;font-variant-numeric:tabular-nums}
#mkt_rep_auto .mkt-rep-cuadre td.mkt-rep-pend{color:#b45309;font-weight:800;background:#fffbeb}
#mkt_rep_auto .mkt-rep-cuadre tbody tr:hover td.mkt-rep-pend{background:#fef3c7}
#mkt_rep_auto .mkt-rep-cuadre td.mkt-rep-ok{color:#94a3b8}
#mkt_rep_auto .mkt-rep-cuadre-sum{max-width:460px;margin:14px 0 0 auto;background:#f8fafc}
#mkt_rep_auto .mkt-rep-cuadre-sum td{white-space:normal;background:transparent;padding:11px 16px}
#mkt_rep_auto .mkt-rep-cuadre-sum td:last-child{text-align:right;white-space:nowrap;font-variant-numeric:tabular-nums;font-weight:700}
#mkt_rep_auto .mkt-rep-cuadre-sum tr.rtot td,#mkt_rep_auto .mkt-rep-cuadre-sum tbody tr.rtot:hover td{background:color-mix(in srgb,var(--mkt-acc,#0b6e66) 12%,#fff);border-top:2px solid var(--mkt-acc,#0b6e66);color:#0f2740;font-weight:800;font-size:14.5px}
#mkt_rep_auto .mkt-rep-cuadre-nota{font-size:11.5px;color:#64748b;margin-top:14px;line-height:1.5}
@media (max-width:600px){#mkt_rep_auto .mkt-rep-cuadre-card{padding:22px 14px 16px}#mkt_rep_auto .mkt-rep-cuadre-sum{max-width:none}}
#mkt_pane_reporte .mkt-rep-prev{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:6px;margin-top:8px;padding-top:8px;border-top:1px dashed #e2e8f0;font-size:11.5px;color:#64748b}
#mkt_pane_reporte .mkt-rep-prev b{color:#334155}
#mkt_pane_reporte .mkt-rep-delta{font-weight:700;padding:1px 7px;border-radius:999px;white-space:nowrap}
#mkt_pane_reporte .mkt-rep-delta.up{color:#047857;background:#d1fae5}
#mkt_pane_reporte .mkt-rep-delta.down{color:#b91c1c;background:#fee2e2}
#mkt_pane_reporte .mkt-rep-delta.flat{color:#64748b;background:#f1f5f9}
#mkt_pane_reporte #mkt_rep_hist_card{margin-top:18px}
#mkt_pane_reporte .mkt-rep-hist-scroll{overflow-x:auto;-webkit-overflow-scrolling:touch}
#mkt_pane_reporte .mkt-rep-hist{min-width:820px;width:100%}
#mkt_pane_reporte .mkt-rep-hist td{vertical-align:top}
#mkt_pane_reporte .mkt-rep-hist-dates{font-size:11px;color:#94a3b8;margin-top:2px}
#mkt_pane_reporte .mkt-rep-hist-empty{padding:14px;border:1px dashed #cbd5e1;border-radius:10px;color:#64748b;font-size:13px;background:#f8fafc}
#mkt_pane_reporte .mkt-rep-kind{display:inline-block;font-size:11px;font-weight:700;padding:2px 9px;border-radius:999px;background:#e0f2fe;color:#0369a1}
#mkt_pane_reporte .mkt-rep-kind.mes{background:#e3f8f5;color:#6d28d9}
#mkt_pane_reporte .mkt-rep-kind.personalizado{background:#f1f5f9;color:#475569}
@media (max-width:700px){
  #mkt_pane_reporte .mkt-rep-period > select{flex:1 1 100%;min-width:0}
  #mkt_pane_reporte .mkt-rep-seg{width:100%}
  #mkt_pane_reporte .mkt-rep-seg-btn{flex:1}
}
#mkt_pane_reporte .mkt-rep-kpis .mkt-kpi-card{min-width:0}
#mkt_pane_reporte .mkt-rep-kpis .mkt-kpi-val.mkt-rep-long{font-size:22px}

/* ── 🏬 Showroom por organización (v2.18.8) ── */
.mktpos-add-product { white-space: nowrap; }
.mktpos-sr-side { margin-bottom: 8px; border-bottom: 1px solid #f0f0f5; padding-bottom: 8px; }
.mktpos-sr-side-title { color: #6b7280; }
.mktpos-sr-chip {
  display: none; position: absolute; top: 10px; left: 10px; z-index: 2;
  font-size: 10px; font-weight: 700; letter-spacing: .03em; padding: 3px 9px; border-radius: 20px;
  background: #1e1b4b; color: #fff; box-shadow: 0 2px 6px rgba(30,27,75,.25); pointer-events: none;
}
.mktpos-product-card.is-showroom .mktpos-sr-chip { display: inline-block; }
.mktpos-product-card.is-showroom { box-shadow: 0 0 0 2px #a7e3da, var(--mktpos-shadow); }
.mktpos-sr-fecha { display: block; margin-top: 6px; font-size: 11.5px; color: #6b7280; }
.mktpos-sr-toggle {
  display: block; width: 100%; margin-top: 12px; padding: 8px 10px; border-radius: 10px; cursor: pointer;
  font-size: 12.5px; font-weight: 600; line-height: 1.2; text-align: center;
  border: 1px dashed #a7e3da; background: #f8faff; color: #0b6e66; transition: background .15s, border-color .15s;
}
.mktpos-sr-toggle:hover { background: #e3f8f5; border-color: #14b8a6; }
.mktpos-sr-toggle[aria-pressed="true"] { border-style: solid; background: #e3f8f5; border-color: #8fd9cf; }
.mktpos-sr-toggle:disabled { opacity: .55; cursor: wait; }
.mktpos-sr-toggle .mktpos-sr-on { display: none; }
.mktpos-sr-toggle[aria-pressed="true"] .mktpos-sr-on { display: inline; }
.mktpos-sr-toggle[aria-pressed="true"] .mktpos-sr-off { display: none; }
.mktpos-sr-err { display: block; margin-top: 6px; font-size: 11.5px; color: #b91c1c; }
.mktpos-sr-panel {
  background: #fff; border: 1px solid var(--mktpos-border, #e8e8ed); border-radius: 14px;
  padding: 22px 24px; margin-bottom: 20px; box-shadow: var(--mktpos-shadow);
}
.mktpos-sr-panel-head { display: flex; gap: 20px; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; }
.mktpos-sr-kicker { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #0b8076; }
.mktpos-sr-title { margin: 4px 0 6px; font-size: 24px; line-height: 1.15; color: #111827; }
.mktpos-sr-sub { margin: 0; color: #6b7280; font-size: 13.5px; }
.mktpos-sr-sub strong { color: #111827; }
.mktpos-sr-rename { display: flex; flex-direction: column; gap: 6px; min-width: 0; flex: 0 1 400px; }
.mktpos-sr-rename .mktpos-sr-row { flex-wrap: nowrap; }
.mktpos-sr-rename label { font-size: 11.5px; font-weight: 600; color: #6b7280; }
.mktpos-sr-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.mktpos-sr-row .mktpos-input { min-width: 0; flex: 1 1 200px; }
.mktpos-sr-bulk { margin-top: 18px; border-top: 1px solid #f0f0f5; padding-top: 14px; }
.mktpos-sr-bulk summary { cursor: pointer; font-weight: 700; color: #111827; font-size: 14px; }
.mktpos-sr-help { margin: 10px 0 8px; color: #6b7280; font-size: 12.5px; line-height: 1.5; }
.mktpos-sr-bulk textarea { width: 100%; box-sizing: border-box; font-family: ui-monospace, Menlo, monospace; font-size: 12.5px; margin-bottom: 10px; }
.mktpos-sr-radio { display: inline-flex; gap: 6px; align-items: center; font-size: 13px; color: #374151; }
.mktpos-sr-resultado { margin-top: 12px; font-size: 13px; }
.mktpos-sr-resultado:empty { display: none; }
.mktpos-sr-resultado.is-ok { background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: 10px; padding: 12px 14px; color: #14532d; }
.mktpos-sr-resultado.is-err { background: #fef2f2; border: 1px solid #fecaca; border-radius: 10px; padding: 12px 14px; color: #991b1b; }
.mktpos-sr-resultado ul { margin: 8px 0; padding-left: 18px; max-height: 220px; overflow: auto; }
.mktpos-sr-sin { margin-top: 8px; color: #92400e; }
.mktpos-sr-recargar { margin-top: 10px; }
@media (max-width: 600px) {
  .mktpos-search-bar { flex-wrap: wrap; }
  .mktpos-search-bar .mktpos-input { flex: 1 1 0; min-width: 0; }
  .mktpos-search-bar .mktpos-add-product { flex: 1 1 100%; justify-content: center; text-align: center; }
}
@media (max-width: 768px) {
  .mktpos-sr-panel { padding: 16px; }
  .mktpos-sr-panel-head { align-items: stretch; }
  .mktpos-sr-rename { width: 100%; }
}

/* ── ✉️ Correos de la cuenta del cliente · modal «Editar cliente» (v2.18.9) ── */
.mec-cuenta { margin-top: 16px; border: 1px solid #e5e7eb; border-radius: 12px; padding: 14px 16px; background: #fafbff; }
.mec-cuenta-h { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; flex-wrap: wrap; font-size: 12px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: #374151; margin-bottom: 8px; }
.mec-saldo { font-size: 12.5px; font-weight: 700; letter-spacing: 0; text-transform: none; color: #047857; }
.mec-correos { list-style: none; margin: 0; padding: 0; }
.mec-correos li { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 0; border-top: 1px solid #eef0f4; font-size: 13px; }
.mec-correos li:first-child { border-top: 0; }
.mec-mail { font-weight: 600; color: #111827; word-break: break-all; min-width: 0; }
.mec-tag { font-size: 10.5px; font-weight: 700; padding: 2px 8px; border-radius: 99px; background: #e3f8f5; color: #0b6e66; }
.mec-tag-p { background: #ecfdf5; color: #047857; }
.mec-acts { margin-left: auto; display: inline-flex; gap: 6px; }
.mec-mini { font-size: 11.5px; font-weight: 700; padding: 5px 10px; border-radius: 8px; border: 1px solid #a7e3da; background: #fff; color: #0b6e66; cursor: pointer; }
.mec-mini:hover { background: #e3f8f5; }
.mec-mini:disabled { opacity: .55; cursor: wait; }
.mec-mini-del { border-color: #fecaca; color: #b91c1c; }
.mec-mini-del:hover { background: #fef2f2; }
.mec-mini-main { background: #0b6e66; border-color: #0b6e66; color: #fff; }
.mec-mini-main:hover { background: #0b6e66; }
.mec-warn { background: #fff7ed; border: 1px solid #fed7aa; color: #9a3412; border-radius: 10px; padding: 10px 12px; font-size: 12.5px; line-height: 1.45; margin-bottom: 8px; }
.mec-warn-acts { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.mec-note { font-size: 12.5px; color: #6b7280; line-height: 1.45; margin-bottom: 6px; }
.mec-add { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.mec-add .mktpos-input { flex: 1 1 180px; min-width: 0; }
.mec-cmsg { font-size: 12px; margin-top: 8px; }
.mec-cmsg:empty { display: none; }
.mec-cmsg.is-ok { color: #047857; }
.mec-cmsg.is-err { color: #b91c1c; }
.mec-choice { margin-top: 14px; border: 2px solid #a7e3da; border-radius: 12px; padding: 12px 14px; background: #f5f7ff; }
.mec-choice-t { font-size: 13px; font-weight: 700; color: #1e1b4b; margin-bottom: 8px; line-height: 1.4; }
.mec-opt { display: flex; gap: 10px; align-items: flex-start; padding: 8px 4px; font-size: 13px; color: #111827; cursor: pointer; line-height: 1.35; }
.mec-opt input { margin-top: 3px; flex-shrink: 0; }
.mec-opt small { color: #6b7280; font-size: 12px; }

/* ── v2.19.10 · Agregar productos con cantidad y varios a la vez ── */
.mktpos-qb-qty-pre { font-weight: 700; color: #0b6e66; text-align: center; }
.mktpos-qb-qty-pre:focus { background: #f0fbf9; }
.mktpos-qb-dd-item.mktpos-qb-dd-multi { grid-template-columns: 22px 44px 1fr auto; }
.mktpos-qb-dd-item.mktpos-qb-dd-in-cart { cursor: pointer; }
.mktpos-qb-dd-check {
  display: block; width: 20px; height: 20px; border-radius: 6px;
  border: 2px solid #cbd5e1; background: #fff; color: #fff;
  font-size: 13px; line-height: 16px; text-align: center; font-weight: 800;
  transition: background .12s, border-color .12s, transform .12s;
}
.mktpos-qb-dd-check:hover { border-color: #0b6e66; transform: scale(1.08); }
.mktpos-qb-dd-check-off { border-color: transparent; background: transparent; pointer-events: none; }
.mktpos-qb-dd-picked { background: #ecfdf5 !important; }
.mktpos-qb-dd-picked .mktpos-qb-dd-check { background: #0b6e66; border-color: #0b6e66; }
.mktpos-qb-dd-header-x { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.mktpos-qb-dd-header-x strong { color: #0b6e66; }
.mktpos-qb-dd-all {
  border: 0; background: none; color: #0b6e66; font-size: 11px; font-weight: 700;
  text-transform: none; letter-spacing: 0; cursor: pointer; padding: 2px 4px;
}
.mktpos-qb-dd-all:hover { text-decoration: underline; }
.mktpos-qb-dd-footer {
  position: sticky; bottom: 0; padding: 10px 14px; background: #fff;
  border-top: 1px solid #e5e7eb; display: flex; justify-content: flex-end;
}
.mktpos-qb-dd-footer kbd { background: rgba(255,255,255,.2); border-radius: 4px; padding: 0 5px; font-size: 10px; margin-left: 6px; }
@media (max-width: 600px) {
  .mktpos-qb-dd-item.mktpos-qb-dd-multi { grid-template-columns: 26px 36px 1fr auto; }
  .mktpos-qb-dd-check { width: 24px; height: 24px; line-height: 20px; }
}

/* ── v2.19.10 · Cortes → Productos: tablas con buscar / filtrar / ordenar ── */
.mktpos-prod-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.mktpos-prod-head h3 { margin: 0 0 12px; }
.mktpos-prod-sub { font-weight: 400; color: #94a3b8; font-size: 12px; }
.mktpos-prod-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.mktpos-panel-min .mktpos-prod-body { display: none; }
.mktpos-panel-max {
  position: fixed !important; top: 12px; right: 12px; bottom: 12px; left: 12px; z-index: 100000; margin: 0 !important;
  overflow: auto; background: #fff; box-shadow: 0 30px 80px rgba(15,23,42,.35); border-radius: 16px;
}
.mktpos-panel-max .mktpos-table-scroll { max-height: none; }
html.mktpos-has-max::after { content: ''; position: fixed; top: 0; right: 0; bottom: 0; left: 0; background: rgba(15,23,42,.45); z-index: 99999; }

.mktpos-st-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0 0 12px; }
.mktpos-st-bar .mktpos-st-q { flex: 1 1 220px; min-width: 0; max-width: 360px; }
.mktpos-st-bar .mktpos-st-sort { flex: 0 1 260px; min-width: 0; }
.mktpos-st-count { font-size: 12px; color: #64748b; margin-left: auto; white-space: nowrap; }
.mktpos-st-filters th { padding: 6px 8px !important; background: #f8fafc; }
.mktpos-st-filters .mktpos-input { width: 100%; min-width: 70px; height: 32px; padding: 4px 8px; font-size: 12px; font-weight: 400; }
.mktpos-st-sortable { cursor: pointer; user-select: none; white-space: nowrap; }
.mktpos-st-sortable:hover { color: #0b6e66; }
.mktpos-st-sortable::after { content: ' ↕'; opacity: .3; font-size: 11px; }
.mktpos-st-sortable[data-sort="asc"]::after { content: ' ▲'; opacity: 1; color: #0b6e66; }
.mktpos-st-sortable[data-sort="desc"]::after { content: ' ▼'; opacity: 1; color: #0b6e66; }
.mktpos-st-is-filtered tfoot tr { background: #fff7ed !important; }
.mktpos-cat-chip {
  display: inline-block; padding: 2px 10px; border-radius: 20px; background: #ecfdf5; color: #0b6e66;
  font-size: 11px; font-weight: 600; white-space: nowrap;
}
.mktpos-cat-link { cursor: pointer; }
.mktpos-cat-link:hover td { background: #f0fbf9; }
.mktpos-pct-bar { display: inline-block; width: 60px; height: 6px; border-radius: 6px; background: #e2e8f0; vertical-align: middle; margin-right: 6px; overflow: hidden; }
.mktpos-pct-bar i { display: block; height: 100%; background: #0b6e66; border-radius: 6px; }
@media (max-width: 600px) {
  .mktpos-st-bar .mktpos-st-q, .mktpos-st-bar .mktpos-st-sort { flex: 1 1 100%; max-width: none; }
  .mktpos-st-count { margin-left: 0; }
  .mktpos-panel-max { top: 0; right: 0; bottom: 0; left: 0; border-radius: 0; }
  .mktpos-pct-bar { display: none; }
}

/* ── v2.19.10 · Aviso «Borrador guardado» legible en la barra oscura de abajo ──
   (.mktpos-sticky-footer fuerza texto blanco con !important; el fondo claro lo hacía ilegible) */
.mktpos-sticky-footer #mktpos-autosave-indicator {
  background: rgb(255 255 255 / .08) !important; border: 1px solid rgb(255 255 255 / .2) !important;
  color: #e2e8f0 !important; font-weight: 600; padding: 8px 14px;
}
.mktpos-sticky-footer #mktpos-autosave-indicator:empty { background: transparent !important; border: 0 !important; padding: 0; }
.mktpos-sticky-footer #mktpos-autosave-indicator[data-state="saved"]    { color: #6ee7b7 !important; border-color: rgb(110 231 183 / .45) !important; background: rgb(16 185 129 / .12) !important; }
.mktpos-sticky-footer #mktpos-autosave-indicator[data-state="pending"]  { color: #fdba74 !important; border-color: rgb(253 186 116 / .45) !important; background: rgb(249 115 22 / .12) !important; }
.mktpos-sticky-footer #mktpos-autosave-indicator[data-state="restored"] { color: #93c5fd !important; border-color: rgb(147 197 253 / .45) !important; background: rgb(59 130 246 / .14) !important; }
.mktpos-sticky-footer #mktpos-autosave-indicator[data-state="error"]    { color: #fca5a5 !important; border-color: rgb(252 165 165 / .45) !important; background: rgb(239 68 68 / .14) !important; }
.mktpos-sticky-footer #mktpos-autosave-indicator span { color: inherit !important; }
