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

:root {
  --mktpos-brand: #0077b6;
  --mktpos-brand-rgb: 0 119 182;
  --mktpos-brand-weak: rgba(0,119,182,.12);
  --mktpos-brand-soft: rgba(0,119,182,.06);
  --mktpos-brand-border: rgba(0,119,182,.20);

  --mktpos-bg: #f0f2f5;
  --mktpos-card: #ffffff;
  --mktpos-text: #1a1a2e;
  --mktpos-text-secondary: #555;
  --mktpos-text-muted: #888;
  --mktpos-border: #e0e0e0;
  --mktpos-radius: 12px;
  --mktpos-radius-sm: 8px;
  --mktpos-shadow: 0 2px 12px rgba(0,0,0,.06);
  --mktpos-shadow-lg: 0 8px 32px rgba(0,0,0,.10);

  /* Vibrant colors */
  --mktpos-success: #2d6a4f;
  --mktpos-success-bg: #d8f3dc;
  --mktpos-danger: #e63946;
  --mktpos-danger-bg: #fde8ea;
  --mktpos-warning: #f4a261;
  --mktpos-warning-bg: #fff3e0;
  --mktpos-info: #0077b6;
  --mktpos-info-bg: #e0f4ff;
  --mktpos-purple: #7209b7;
  --mktpos-purple-bg: #f3e5f5;
  --mktpos-emerald: #00b894;
  --mktpos-emerald-bg: #e0f7f0;
}

/* ============================================================
 * Reset & Base
 * ============================================================ */
.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;
}
.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; }

/* ============================================================
 * NAVBAR
 * ============================================================ */
.mktpos-navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  border-radius: var(--mktpos-radius);
  margin-bottom: 24px;
  box-shadow: var(--mktpos-shadow-lg);
  flex-wrap: wrap;
  gap: 12px;
}
.mktpos-navbar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.mktpos-nav-logo {
  height: 36px;
  width: auto;
  border-radius: 6px;
}
.mktpos-nav-title {
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: .5px;
}
.mktpos-navbar-links {
  display: flex;
  gap: 4px;
}
.mktpos-nav-link {
  color: rgba(255,255,255,.7) !important;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  transition: all .2s;
  text-decoration: none !important;
}
.mktpos-nav-link:hover {
  color: #fff !important;
  background: rgba(255,255,255,.12);
  text-decoration: none !important;
}
.mktpos-nav-active {
  color: #fff !important;
  background: rgba(255,255,255,.18) !important;
  font-weight: 600;
}
.mktpos-navbar-user {
  display: flex;
  align-items: center;
  gap: 12px;
}
.mktpos-nav-user-info {
  display: flex;
  flex-direction: column;
  text-align: right;
}
.mktpos-nav-user-info strong {
  color: #fff;
  font-size: 14px;
}
.mktpos-nav-user-info small {
  color: rgba(255,255,255,.5);
  font-size: 11px;
}

/* ============================================================
 * BUTTONS
 * ============================================================ */
.mktpos-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 20px;
  border: none;
  border-radius: var(--mktpos-radius-sm);
  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, #e76f51 0%, #f4a261 100%); color: #fff !important; border: none; }
.mktpos-btn-primary:hover { background: linear-gradient(135deg, #d35400 0%, #e76f51 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: #e76f51; color: #fff !important; }

.mktpos-btn-ghost {
  background: transparent;
  color: var(--mktpos-text) !important;
  border: 1.5px solid var(--mktpos-border);
}
.mktpos-btn-ghost:hover { background: var(--mktpos-bg); }

.mktpos-btn-logout {
  background: var(--mktpos-danger) !important;
  color: #fff !important;
  padding: 8px 16px;
  font-size: 13px;
}

.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: var(--mktpos-card);
  border-radius: var(--mktpos-radius);
  box-shadow: var(--mktpos-shadow);
  overflow: hidden;
  margin-bottom: 20px;
}
.mktpos-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--mktpos-border);
  flex-wrap: wrap;
  gap: 12px;
}
.mktpos-card-header h3 {
  font-size: 16px;
  color: var(--mktpos-text);
}
.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: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  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: #f4a261; color: #fff; }
.mktpos-badge-processing { background: #0077b6; 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: #e76f51; 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-content {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 16px 40px;
}
.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: 28px;
  color: var(--mktpos-text);
}
.mktpos-subtitle {
  color: var(--mktpos-text-secondary);
  margin-top: 4px;
  font-size: 14px;
}

/* ============================================================
 * LOGIN PAGE
 * ============================================================ */
.mktpos-page-login {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  padding: 20px;
}
.mktpos-login-container {
  width: 100%;
  max-width: 440px;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0,0,0,.3);
  overflow: hidden;
}
.mktpos-login-header {
  background: linear-gradient(135deg, #e63946 0%, #f4a261 100%);
  padding: 40px 32px 32px;
  text-align: center;
}
.mktpos-login-icon {
  width: 72px;
  height: 72px;
  background: rgba(255,255,255,.2);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  backdrop-filter: blur(8px);
}
.mktpos-login-header h1 {
  color: #fff;
  font-size: 24px;
  margin-bottom: 4px;
}
.mktpos-login-header p {
  color: rgba(255,255,255,.85);
  font-size: 14px;
}
.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: #f8f9fa;
  border-top: 1px solid var(--mktpos-border);
}
.mktpos-login-footer p {
  font-size: 12px;
  color: var(--mktpos-text-muted);
}

/* 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;
}
.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: var(--mktpos-radius);
  box-shadow: var(--mktpos-shadow);
  transition: transform .2s;
}
.mktpos-kpi-card:hover { transform: translateY(-2px); }
.mktpos-kpi-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.mktpos-kpi-value {
  display: block;
  font-size: 17px;
  font-weight: 800;
}
.mktpos-kpi-label {
  display: block;
  font-size: 13px;
  margin-top: 2px;
}

/* KPI Colors - VIBRANT */
.mktpos-kpi-blue {
  background: linear-gradient(135deg, #0077b6 0%, #00b4d8 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, #2d6a4f 0%, #52b788 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, #e76f51 0%, #f4a261 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, #00b894 0%, #55efc4 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, #7209b7 0%, #b5179e 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, #e63946 0%, #f08080 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: 20px 24px;
  border-bottom: 1px solid var(--mktpos-border);
}
.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;
}
.mktpos-seller-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  padding: 20px;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border-radius: var(--mktpos-radius-sm);
  border-left: 4px solid var(--mktpos-brand, #0077b6);
  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, #0077b6);
}
.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: #2d6a4f !important; }
.mktpos-text-emerald { color: #00b894 !important; }
.mktpos-text-orange { color: #e76f51 !important; }
.mktpos-text-danger { color: #e63946 !important; }
.mktpos-text-blue { color: #0077b6 !important; }
.mktpos-text-purple { color: #7209b7 !important; }

.mktpos-badge-brand {
  background: linear-gradient(135deg, var(--mktpos-brand, #0077b6), #00b4d8) !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-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.mktpos-filter-select {
  width: 180px;
}
.mktpos-dash-table-wrap {
  overflow-x: auto;
}
.mktpos-table-scroll {
  overflow-x: auto;
}
.mktpos-dash-table {
  width: 100%;
  border-collapse: collapse;
}
.mktpos-dash-table th {
  padding: 12px 14px;
  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);
  white-space: nowrap;
}
.mktpos-dash-table td {
  padding: 12px 14px;
  font-size: 14px;
  border-bottom: 1px solid var(--mktpos-border);
  vertical-align: middle;
}
.mktpos-dash-table tr:hover td {
  background: var(--mktpos-brand-soft);
}
.mktpos-dash-actions {
  white-space: nowrap;
}
.mktpos-dash-actions .mktpos-btn {
  margin-right: 4px;
}
.mktpos-dash-pagination {
  display: flex;
  gap: 6px;
  justify-content: center;
  padding: 16px 20px;
}
.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;
}

/* ============================================================
 * 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;
  }
}

@media (max-width: 768px) {
  .mktpos-navbar {
    padding: 12px 16px;
  }
  .mktpos-navbar-links {
    order: 3;
    width: 100%;
    overflow-x: auto;
    padding-bottom: 4px;
  }
  .mktpos-nav-link {
    font-size: 13px;
    padding: 6px 12px;
  }
  .mktpos-content {
    padding: 0 12px 32px;
  }
  .mktpos-page-header h1 {
    font-size: 22px;
  }
  .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-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;
  }
}

@media (max-width: 480px) {
  .mktpos-login-container {
    border-radius: 16px;
  }
  .mktpos-login-form {
    padding: 24px 20px;
  }
  .mktpos-report-cards {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
 * 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, #e76f51, #f4a261);
}
.mktpos-state-btn[data-state="processing"].active {
  background: linear-gradient(135deg, #0077b6, #00b4d8);
}
.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: #e76f51;
  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: #0077b6; 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;
}
