/* ==========================================
   AVICAMPO — Panel Administrativo
   Paleta: Marrón cacao + Dorado avícola
   ========================================== */

:root {
  --brown-900: #2C1A0E;
  --brown-800: #3D2410;
  --brown-700: #5C3518;
  --brown-600: #7A4520;
  --brown-500: #9A5C2A;
  --brown-400: #B87A40;
  --brown-300: #D4A060;
  --brown-200: #E8C898;
  --brown-100: #F5E8D0;
  --brown-50:  #FDF6EC;

  --gold-600: #C8920A;
  --gold-500: #D4A017;
  --gold-400: #E8B830;
  --gold-300: #F5CC60;
  --gold-200: #FDE89A;
  --gold-100: #FFF6D0;

  --bg-main:  #F8F9FA;
  --surface:  #FFFFFF;
  --text-main:#212529;
  --text-muted:#6C757D;
  --border:   #E9ECEF;
  --hover:    #F1F3F5;

  --success:  #198754;
  --success-bg: #D1E7DD;
  --warning:  #FD7E14;
  --warning-bg: #FFE5D0;
  --danger:   #DC3545;
  --danger-bg: #F8D7DA;
  --info:     #0D6EFD;
  --info-bg:  #CFE2FF;

  --sidebar-w: 260px;
  --topbar-h: 64px;

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.05);
  --shadow-lg: 0 10px 15px rgba(0,0,0,0.05);
  
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;

  --transition: all 0.2s ease-in-out;
}

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

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg-main);
  color: var(--text-main);
  line-height: 1.5;
  overflow: hidden; /* Prevent full body scroll, handle internally */
}

/* ---- LOGIN ---- */
.login-overlay {
  position: fixed; inset: 0;
  background: #FFFFFF;
  display: flex; align-items: center; justify-content: center;
  z-index: 9999;
}
.login-card {
  background: var(--surface);
  padding: 40px;
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  border: 1px solid var(--border);
  width: 100%; max-width: 400px;
  text-align: center;
}
.login-logo { height: 48px; margin-bottom: 24px; }
.login-card h2 { font-family: 'Outfit', sans-serif; color: var(--brown-900); font-size: 24px; margin-bottom: 8px; }
.login-card p { color: var(--text-muted); font-size: 14px; margin-bottom: 24px; }
.login-form { display: flex; flex-direction: column; gap: 16px; text-align: left; }
.form-group label { font-size: 13px; font-weight: 600; color: var(--brown-700); margin-bottom: 6px; display: block; }
.form-group input, .form-group select, .form-group textarea {
  width: 100%; padding: 10px 12px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-family: inherit; font-size: 14px; transition: var(--transition);
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  outline: none; border-color: var(--brown-400); box-shadow: 0 0 0 3px rgba(154,92,42,0.1);
}
.btn-login {
  background: var(--brown-700); color: white;
  border: none; border-radius: var(--radius-md);
  padding: 12px; font-size: 15px; font-weight: 600;
  cursor: pointer; transition: var(--transition);
  margin-top: 8px;
}
.btn-login:hover { background: var(--brown-900); }
.login-demo { margin-top: 24px; font-size: 12px; color: var(--text-muted); }
.login-demo code { background: var(--bg-main); padding: 2px 6px; border-radius: 4px; color: var(--brown-700); }
.login-error { color: var(--danger); font-size: 13px; text-align: center; min-height: 20px; }

/* ---- APP SHELL ---- */
.app-shell { display: flex; height: 100vh; width: 100vw; overflow: hidden; }

/* ---- SIDEBAR ---- */
.sidebar {
  width: var(--sidebar-w); background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  transition: transform 0.3s ease;
  z-index: 100;
}
.sidebar-logo { padding: 20px 24px; border-bottom: 1px solid var(--border); text-align: center; }
.s-logo { height: 50px; width: auto; }
.sidebar-nav { flex: 1; padding: 20px 12px; display: flex; flex-direction: column; gap: 4px; overflow-y: auto; }
.nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 16px; background: none; border: none;
  width: 100%; text-align: left; border-radius: var(--radius-md);
  color: var(--text-muted); font-size: 14px; font-weight: 500;
  cursor: pointer; transition: var(--transition); position: relative;
}
.nav-item:hover { background: var(--hover); color: var(--brown-700); }
.nav-item.active { background: var(--brown-50); color: var(--brown-700); font-weight: 600; }
.nav-item.active::before {
  content: ''; position: absolute; left: 0; top: 8px; bottom: 8px;
  width: 4px; background: var(--brown-700); border-radius: 0 4px 4px 0;
}
.nav-icon { font-size: 18px; }
.nav-badge { margin-left: auto; background: var(--warning); color: white; font-size: 11px; padding: 2px 6px; border-radius: 10px; font-weight: 700; }
.nav-divider { height: 1px; background: var(--border); margin: 12px 0; }
.sidebar-user {
  padding: 16px; border-top: 1px solid var(--border);
  display: flex; align-items: center; gap: 12px;
}
.user-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--brown-200); color: var(--brown-900);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 16px;
}
.user-info { flex: 1; overflow: hidden; }
.user-name { display: block; font-size: 14px; font-weight: 600; color: var(--brown-900); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-role { display: block; font-size: 12px; color: var(--text-muted); }
.logout-btn { background: none; border: none; color: var(--text-muted); cursor: pointer; padding: 4px; font-size: 16px; transition: var(--transition); }
.logout-btn:hover { color: var(--danger); }

/* ---- MAIN CONTENT ---- */
.main-content { flex: 1; display: flex; flex-direction: column; overflow: hidden; background: var(--bg-main); }

/* TOPBAR */
.topbar {
  height: var(--topbar-h); background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px; flex-shrink: 0;
}
.topbar-left, .topbar-right { display: flex; align-items: center; gap: 16px; }
.sidebar-toggle { display: none; background: none; border: none; font-size: 20px; cursor: pointer; color: var(--text-muted); }
.topbar-titles { display: flex; flex-direction: column; line-height: 1.2; }
.breadcrumb { font-size: 15px; font-weight: 600; color: var(--brown-900); }
.topbar-date { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.notif-btn { position: relative; cursor: pointer; font-size: 20px; padding: 4px; }
.notif-dot { position: absolute; top: 4px; right: 4px; width: 8px; height: 8px; background: var(--danger); border-radius: 50%; border: 2px solid var(--surface); display: none; }

/* PAGES */
.page { display: none; padding: 32px 40px; overflow-y: auto; flex: 1; min-height: 0; }
.page.active { display: block; flex: 1; min-height: 0; }
.page-header { display: flex; flex-direction: column; margin-bottom: 24px; position: relative; }
.page-header h1 { font-family: 'Outfit', sans-serif; font-size: 28px; font-weight: 700; color: var(--brown-900); }
.page-header p { color: var(--text-muted); font-size: 14px; }
.btn-primary-sm {
  position: absolute; right: 0; top: 50%; transform: translateY(-50%);
  background: var(--brown-700); color: white;
  border: none; border-radius: var(--radius-sm);
  padding: 8px 16px; font-size: 13px; font-weight: 600;
  cursor: pointer; transition: var(--transition);
}
.btn-primary-sm:hover { background: var(--brown-900); }

/* DASHBOARD KPIs */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin-bottom: 32px; }
.kpi-card { background: var(--surface); border: 1px solid rgba(0,0,0,0.04); border-radius: 12px; padding: 16px; display: flex; align-items: flex-start; gap: 12px; box-shadow: 0 4px 16px rgba(0,0,0,0.02); transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); position: relative; overflow: hidden; }
.kpi-card:hover { transform: translateY(-4px); box-shadow: 0 12px 24px rgba(92,53,24,0.06); border-color: rgba(92,53,24,0.08); }
.kpi-icon { width: 44px; height: 44px; border-radius: 10px; background: rgba(154,92,42,0.1); color: var(--brown-600); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.kpi-card.warning .kpi-icon { background: rgba(253,126,20,0.1); color: var(--warning); }
.kpi-card.info .kpi-icon { background: rgba(13,110,253,0.1); color: var(--info); }
.kpi-card.success .kpi-icon { background: rgba(25,135,84,0.1); color: var(--success); }
.kpi-card.highlight .kpi-icon { background: rgba(212,160,23,0.1); color: var(--gold-600); }
.kpi-body { flex: 1; }
.kpi-label { font-size: 11px; color: var(--text-muted); font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 4px; }
.kpi-value { font-family: 'Outfit', sans-serif; font-size: 24px; font-weight: 800; color: var(--brown-900); line-height: 1; margin-bottom: 6px; letter-spacing: -0.5px; }
.kpi-card.warning .kpi-value { color: var(--warning); }
.kpi-card.info .kpi-value { color: var(--info); }
.kpi-delta { font-size: 13px; font-weight: 500; display: flex; align-items: center; gap: 4px; }
.kpi-delta.positive { color: var(--success); }
.kpi-delta.negative { color: var(--danger); }
.kpi-delta.neutral { color: var(--text-muted); }

/* DASHBOARD GRID */
.dashboard-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.dash-card { background: var(--surface); border: 1px solid rgba(0,0,0,0.04); border-radius: 16px; padding: 24px; display: flex; flex-direction: column; box-shadow: 0 4px 16px rgba(0,0,0,0.02); }
.dash-card.full-width { grid-column: 1 / -1; }
.dash-card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.dash-card-header h3 { font-family: 'Outfit', sans-serif; font-size: 18px; font-weight: 700; color: var(--brown-900); }
.card-action-btn { background: none; border: none; color: var(--brown-600); font-size: 13px; font-weight: 600; cursor: pointer; transition: var(--transition); }
.card-action-btn:hover { color: var(--brown-800); text-decoration: underline; }

/* NEW CHARTS: DONUT & GAUGE */
.gauge-container { display: flex; justify-content: center; align-items: center; padding: 20px 0; }
.gauge { width: 220px; height: 110px; background: var(--border); border-radius: 110px 110px 0 0; position: relative; overflow: hidden; }
.gauge::before { content: ''; position: absolute; top: 100%; left: 0; width: 100%; height: 100%; background: conic-gradient(from 270deg, var(--gold-400) 0%, var(--gold-500) 90deg, var(--brown-600) 135deg); transform-origin: center top; transform: rotate(135deg); border-radius: 0 0 110px 110px; transition: transform 1.5s cubic-bezier(0.4, 0, 0.2, 1); }
.gauge-inner { position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); width: 170px; height: 85px; background: var(--surface); border-radius: 85px 85px 0 0; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; padding-bottom: 12px; }
.gauge-value { font-family: 'Outfit', sans-serif; font-size: 32px; font-weight: 800; color: var(--brown-900); line-height: 1; }
.gauge-inner small { font-size: 12px; color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; margin-top: 4px; }

.donut-container { display: flex; flex-direction: column; align-items: center; gap: 20px; padding-top: 10px; }
.donut-chart { width: 160px; height: 160px; border-radius: 50%; display: flex; align-items: center; justify-content: center; position: relative; }
.donut-hole { width: 120px; height: 120px; background: var(--surface); border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.donut-total { font-family: 'Outfit', sans-serif; font-size: 28px; font-weight: 800; color: var(--brown-900); line-height: 1; }
.donut-hole small { font-size: 11px; color: var(--text-muted); font-weight: 600; text-transform: uppercase; margin-top: 4px; }
.donut-legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; width: 100%; }
.legend-item { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-main); font-weight: 500; }
.legend-color { width: 10px; height: 10px; border-radius: 2px; }

/* FAKE CHART */
.bar-chart { flex: 1; min-height: 240px; display: flex; align-items: flex-end; gap: 16px; padding-top: 20px; border-top: 1px dashed var(--border); margin-top: 16px; }
.chart-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 12px; justify-content: flex-end; height: 100%; }
.bar-wrap { width: 100%; height: 100%; display: flex; align-items: flex-end; justify-content: center; position: relative; }
.bar { width: 100%; max-width: 48px; background: linear-gradient(180deg, var(--gold-400) 0%, var(--brown-300) 100%); border-radius: 6px 6px 0 0; transition: height 1s cubic-bezier(0.4, 0, 0.2, 1); min-height: 4px; position: relative; box-shadow: 0 4px 12px rgba(212,160,23,0.15); }
.bar:hover { background: linear-gradient(180deg, var(--gold-500) 0%, var(--brown-400) 100%); filter: brightness(1.05); cursor: pointer; }
.bar-val { position: absolute; top: -32px; background: var(--brown-900); color: white; padding: 6px 10px; border-radius: 6px; font-size: 12px; font-weight: 700; opacity: 0; transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1); white-space: nowrap; transform: translateY(8px); box-shadow: 0 4px 12px rgba(0,0,0,0.15); }
.bar-val::after { content: ''; position: absolute; bottom: -4px; left: 50%; transform: translateX(-50%); border-width: 4px 4px 0; border-style: solid; border-color: var(--brown-900) transparent transparent transparent; }
.bar:hover .bar-val { opacity: 1; transform: translateY(0); }
.chart-label { font-size: 13px; font-weight: 600; color: var(--text-muted); }

/* LISTS (Top Prods, Alerts) */
.list-item { display: flex; flex-direction: column; justify-content: center; padding: 16px 0; border-bottom: 1px solid var(--border); gap: 8px; }
.list-item:last-child { border-bottom: none; padding-bottom: 0; }
.list-row { display: flex; align-items: center; justify-content: space-between; width: 100%; }
.list-item-left { display: flex; align-items: center; gap: 12px; }
.list-idx { font-size: 13px; font-weight: 700; color: var(--gold-600); width: 16px; }
.list-name { font-size: 14px; font-weight: 600; color: var(--text-main); }
.list-val { font-size: 13px; font-weight: 700; color: var(--brown-700); }
.progress-bg { width: 100%; height: 6px; background: var(--border); border-radius: 4px; overflow: hidden; margin-top: 4px; }
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--gold-400), var(--gold-600)); border-radius: 4px; }

/* TABLES & CONTROLS */
.table-controls { display: flex; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.search-box-admin { position: relative; flex: 1; min-width: 200px; }
.search-box-admin span { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); font-size: 14px; color: var(--text-muted); }
.search-box-admin input { width: 100%; padding: 8px 12px 8px 36px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 13px; }
.search-box-admin input:focus { outline: none; border-color: var(--brown-400); }
.filter-select { padding: 8px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 13px; background: var(--surface); color: var(--text-main); cursor: pointer; }
.filter-select:focus { outline: none; border-color: var(--brown-400); }

.table-wrap { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow-x: auto; box-shadow: var(--shadow-sm); }
.data-table { width: 100%; border-collapse: collapse; text-align: left; }
.data-table th { padding: 14px 16px; font-size: 12px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; border-bottom: 2px solid var(--border); background: var(--hover); white-space: nowrap; }
.data-table td { padding: 14px 16px; font-size: 13px; color: var(--text-main); border-bottom: 1px solid var(--border); vertical-align: middle; }
.data-table tbody tr:hover { background: var(--bg-main); }
.data-table tbody tr:last-child td { border-bottom: none; }

/* BADGES */
.status-badge { display: inline-flex; align-items: center; padding: 4px 8px; border-radius: 4px; font-size: 11px; font-weight: 600; letter-spacing: 0.5px; text-transform: uppercase; white-space: nowrap; }
.bg-success { background: var(--success-bg); color: var(--success); }
.bg-warning { background: var(--warning-bg); color: var(--warning); }
.bg-danger { background: var(--danger-bg); color: var(--danger); }
.bg-info { background: var(--info-bg); color: var(--info); }
.bg-neutral { background: var(--border); color: var(--text-muted); }

/* ACTION BUTTONS */
.action-btns { display: flex; gap: 8px; }
.btn-icon { background: none; border: 1px solid var(--border); border-radius: 4px; width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; font-size: 14px; cursor: pointer; transition: var(--transition); color: var(--text-muted); }
.btn-icon:hover { background: var(--hover); color: var(--brown-700); border-color: var(--brown-300); }
.btn-icon.danger:hover { color: var(--danger); border-color: var(--danger); background: var(--danger-bg); }

/* TABLA ACTION BUTTONS (DESPACHO Y ALMACÉN) */
.btn-dispatch-action {
  position: static !important;
  transform: none !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--brown-700);
  color: white !important;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  text-decoration: none;
}
.btn-dispatch-action:hover {
  background: var(--brown-900);
  transform: translateY(-1px) !important;
  box-shadow: 0 3px 8px rgba(0,0,0,0.18);
}
.btn-dispatch-action.btn-status-nuevo {
  background: #d97706; /* Ámbar cálido: Alistar */
}
.btn-dispatch-action.btn-status-nuevo:hover {
  background: #b45309;
}
.btn-dispatch-action.btn-status-proc {
  background: #0284c7; /* Azul: Despachar */
}
.btn-dispatch-action.btn-status-proc:hover {
  background: #0369a1;
}
.btn-dispatch-action.btn-status-desp {
  background: #16a34a; /* Verde: Confirmar Entrega */
}
.btn-dispatch-action.btn-status-desp:hover {
  background: #15803d;
}
.btn-dispatch-action.btn-status-done {
  background: #f1f5f9;
  color: #475569 !important;
  border: 1px solid #cbd5e1;
}
.btn-dispatch-action.btn-status-done:hover {
  background: #e2e8f0;
  color: #1e293b !important;
}

/* MODALS */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 5000; display: flex; align-items: center; justify-content: center; backdrop-filter: blur(2px); }
.modal-box { background: var(--surface); border-radius: var(--radius-lg); width: 100%; max-width: 500px; box-shadow: var(--shadow-lg); display: flex; flex-direction: column; max-height: 90vh; }
.modal-header { padding: 16px 24px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.modal-header h3 { font-size: 18px; font-weight: 600; color: var(--text-main); }
.modal-close { background: none; border: none; font-size: 20px; color: var(--text-muted); cursor: pointer; }
.modal-close:hover { color: var(--danger); }
.modal-body { padding: 24px; overflow-y: auto; overflow-x: hidden; flex: 1; }
.modal-footer { padding: 16px 24px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 12px; }
.btn-cancel { background: var(--surface); border: 1px solid var(--border); color: var(--text-main); padding: 8px 16px; border-radius: var(--radius-sm); font-size: 13px; font-weight: 500; cursor: pointer; }
.btn-cancel:hover { background: var(--hover); }
.btn-save { background: var(--brown-700); border: none; color: white; padding: 8px 16px; border-radius: var(--radius-sm); font-size: 13px; font-weight: 500; cursor: pointer; }
.btn-save:hover { background: var(--brown-900); }

/* TOAST ADMIN */
.toast-admin { position: fixed; bottom: 24px; right: 24px; background: var(--text-main); color: white; padding: 12px 20px; border-radius: var(--radius-md); font-size: 13px; font-weight: 500; box-shadow: var(--shadow-lg); z-index: 6000; transform: translateY(100px); opacity: 0; transition: var(--transition); }
.toast-admin.show { transform: translateY(0); opacity: 1; }

/* RESPONSIVE */
@media (max-width: 1024px) {
  .dashboard-grid { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  html, body {
    overflow-y: auto !important;
    overflow-x: hidden !important;
    height: auto !important;
    min-height: 100% !important;
    -webkit-overflow-scrolling: touch !important;
    overscroll-behavior-y: auto !important;
  }
  .app-shell {
    height: auto !important;
    min-height: 100% !important;
    min-height: 100dvh !important;
    overflow: visible !important;
    display: block !important;
    width: 100% !important;
  }
  .main-content {
    height: auto !important;
    min-height: 100% !important;
    min-height: 100dvh !important;
    overflow: visible !important;
    display: block !important;
    width: 100% !important;
  }
  .topbar {
    position: sticky;
    top: 0;
    z-index: 800;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    width: 100%;
    padding: 0 16px;
  }
  .topbar-left, .topbar-right {
    gap: 10px;
  }
  .topbar-refresh-btn {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-muted);
    transition: var(--transition);
  }
  .topbar-refresh-btn:hover, .topbar-refresh-btn:active {
    background: var(--hover);
    color: var(--brown-700);
  }
  .page {
    height: auto !important;
    min-height: auto !important;
    overflow: visible !important;
    overflow-y: visible !important;
    padding: 16px 14px 180px 14px !important;
    -webkit-overflow-scrolling: touch !important;
  }
  .sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    transform: translateX(-100%);
    z-index: 1000;
  }
  .sidebar.open {
    transform: translateX(0);
    box-shadow: var(--shadow-lg);
  }
  .sidebar-toggle { display: block; }
  .page-header h1 { font-size: 24px; }
  .btn-primary-sm { position: relative; top: 0; transform: none; margin-top: 12px; display: inline-block; width: fit-content; }
  .table-controls { flex-direction: column; }
  .search-box-admin { width: 100%; }
  
  .kpi-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .kpi-card { padding: 12px; flex-direction: column; gap: 8px; }
  .kpi-icon { width: 36px; height: 36px; border-radius: 8px; font-size: 16px; }
  .kpi-value { font-size: 18px; margin-bottom: 2px; }
  .kpi-label { font-size: 10px; }
  .kpi-delta { font-size: 11px; }

  .table-wrap {
    touch-action: pan-x pan-y !important;
    -webkit-overflow-scrolling: touch !important;
    margin-bottom: 24px;
    border-radius: var(--radius-md);
  }
  .data-table {
    min-width: 620px;
  }
  .dashboard-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .dash-card {
    padding: 16px;
    margin-bottom: 16px;
  }
  .recent-quotes {
    margin-bottom: 20px;
  }
}

/* ---- NUEVAS MEJORAS FUNCIONALES MVP ---- */

/* Subida de Imagen y Compresión en Canvas */
.image-upload-wrapper {
  border: 2px dashed var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  text-align: center;
  background: var(--bg-main);
  cursor: pointer;
  transition: var(--transition);
  margin-bottom: 12px;
  position: relative;
}
.image-upload-wrapper:hover {
  border-color: var(--brown-400);
  background: var(--brown-50);
}
.image-upload-preview {
  max-width: 140px;
  max-height: 140px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  margin: 0 auto 10px;
  display: block;
  box-shadow: var(--shadow-sm);
}
.image-upload-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
}
.image-upload-placeholder .cam-icon {
  font-size: 28px;
}
.compression-badge {
  display: inline-block;
  background: var(--success-bg);
  color: var(--success);
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 999px;
  margin-top: 6px;
}

/* Miniaturas en tablas */
.table-prod-thumb {
  width: 40px;
  height: 40px;
  border-radius: 6px;
  object-fit: cover;
  background: var(--brown-50);
  border: 1px solid var(--border);
  flex-shrink: 0;
}
.table-prod-icon {
  width: 40px;
  height: 40px;
  border-radius: 6px;
  background: var(--brown-50);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

/* Asignaciones y Bloqueos de Vendedor */
.vendor-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
}
.vendor-badge.assigned-me {
  background: var(--info-bg);
  color: var(--info);
  border: 1px solid #b6d4fe;
}
.vendor-badge.locked {
  background: #f1f3f5;
  color: var(--text-muted);
  border: 1px solid var(--border);
}
.vendor-badge.unassigned {
  background: var(--warning-bg);
  color: var(--warning);
  border: 1px solid #ffe5d0;
}

/* Diálogo de Confirmación de Stock */
.stock-confirm-table {
  width: 100%;
  border-collapse: collapse;
  margin: 14px 0;
  font-size: 13px;
}
.stock-confirm-table th {
  background: var(--hover);
  padding: 8px;
  text-align: left;
  border-bottom: 2px solid var(--border);
  font-size: 11px;
  text-transform: uppercase;
}
.stock-confirm-table td {
  padding: 8px;
  border-bottom: 1px solid var(--border);
}

/* Botones de Exportación */
.btn-export {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--brown-800);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: var(--transition);
}
.btn-export:hover {
  background: var(--brown-50);
  border-color: var(--brown-400);
  color: var(--brown-900);
}
.btn-export.btn-export-primary {
  background: var(--brown-700);
  color: white;
  border: none;
}
.btn-export.btn-export-primary:hover {
  background: var(--brown-900);
}

/* Botón de Actualización Inteligencia B2B (Compacto, Marrón y Amarillo) */
.btn-actualizar-telemetria {
  background: linear-gradient(135deg, #3D2410 0%, #5C3518 100%);
  color: #FDE047;
  border: 1.5px solid #D4A017;
  padding: 8px 20px;
  border-radius: var(--radius-sm, 8px);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.3px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 38px;
  width: auto;
  box-shadow: 0 2px 6px rgba(61, 36, 16, 0.25);
  transition: var(--transition, all 0.2s ease-in-out);
}
.btn-actualizar-telemetria:hover {
  background: linear-gradient(135deg, #5C3518 0%, #7A4520 100%);
  color: #FFFFFF;
  border-color: #FACC15;
  box-shadow: 0 4px 12px rgba(212, 160, 23, 0.35);
  transform: translateY(-1px);
}
.btn-actualizar-telemetria:active {
  transform: translateY(0);
  box-shadow: 0 1px 3px rgba(61, 36, 16, 0.2);
}


/* Estilos de Impresión / PDF */
@media print {
  body {
    background: white !important;
    color: black !important;
    overflow: visible !important;
  }
  .sidebar, .topbar, .table-controls, .btn-export, .btn-primary-sm, .action-btns, .modal-overlay, .toast-admin {
    display: none !important;
  }
  .app-shell {
    display: block !important;
  }
  .main-content {
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
  }
  .page {
    display: none !important;
  }
  .page.active {
    display: block !important;
    padding: 0 !important;
  }
  .table-wrap {
    box-shadow: none !important;
    border: 1px solid #ddd !important;
  }
  .data-table th, .data-table td {
    padding: 6px 10px !important;
    font-size: 11px !important;
  }
}

/* =======================================================
   WIDGET MONITOR DÓLAR BCV & USDT (MINIMALISTA & SENCILLO)
======================================================= */
.bcv-widget {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 3px 6px 3px 8px;
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  user-select: none;
  height: 34px;
  box-sizing: border-box;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.bcv-widget:hover {
  border-color: #cbd5e1;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.06);
}

.bcv-rate-block,
.usdt-rate-block {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 4px;
  transition: background 0.15s ease;
}

.bcv-rate-block:hover {
  background: #f8fafc;
}

.usdt-rate-block:hover {
  background: #f0fdf4;
}

.bcv-brand-tag {
  font-size: 11px;
  font-weight: 700;
  color: var(--brown-800);
  background: #f5efe6;
  padding: 1px 5px;
  border-radius: 4px;
  letter-spacing: 0.2px;
  line-height: 1.2;
}

.usdt-brand-tag {
  font-size: 11px;
  font-weight: 700;
  color: #047857;
  background: #ecfdf5;
  padding: 1px 5px;
  border-radius: 4px;
  letter-spacing: 0.2px;
  line-height: 1.2;
}

.bcv-rate-value {
  font-size: 13px;
  font-weight: 700;
  color: #1e293b;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.2px;
  line-height: 1;
}

.usdt-rate-value {
  font-size: 13px;
  font-weight: 700;
  color: #065f46;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.2px;
  line-height: 1;
}

.bcv-sep {
  width: 1px;
  height: 14px;
  background: #e2e8f0;
  flex-shrink: 0;
}

.bcv-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  cursor: pointer;
  white-space: nowrap;
  line-height: 1;
  transition: all 0.15s ease;
}

.bcv-status-pill:hover {
  filter: brightness(0.97);
}

.bcv-status-future {
  background: #fffbeb;
  color: #b45309;
  border: 1px solid #fef3c7;
}

.bcv-status-today {
  background: #f0fdf4;
  color: #15803d;
  border: 1px solid #dcfce7;
}

.bcv-btn-history,
.bcv-btn-refresh {
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: #64748b;
  border-radius: 4px;
  cursor: pointer;
  padding: 0;
  transition: background 0.15s ease, color 0.15s ease;
}

.bcv-btn-history:hover,
.bcv-btn-refresh:hover {
  background: #f1f5f9;
  color: #1e293b;
}

.bcv-btn-refresh.is-spinning svg {
  animation: bcvSpin 0.7s linear;
}

@keyframes bcvSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@media (max-width: 768px) {
  .bcv-widget {
    padding: 3px 6px;
    gap: 6px;
    height: 32px;
  }
  .bcv-status-pill {
    display: none;
  }
  .bcv-sep {
    display: none;
  }
}

/* =======================================================
   DASHBOARD: RENDIMIENTO VENDEDORES & ROTACIÓN DE STOCK
======================================================= */
.vendor-perf-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px;
  margin-top: 8px;
}
.vendor-perf-card {
  background: var(--bg-main);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.02);
  transition: var(--transition);
}
.vendor-perf-card:hover {
  border-color: var(--brown-300);
  background: var(--surface);
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}
.vendor-perf-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.vendor-perf-user {
  display: flex;
  align-items: center;
  gap: 10px;
}
.vendor-perf-avatar {
  font-size: 26px;
}
.vendor-perf-name {
  font-weight: 700;
  font-size: 14px;
  color: var(--brown-900);
}
.vendor-perf-meta {
  font-size: 11px;
  color: var(--text-muted);
}
.vendor-bar-row {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.vendor-bar-label {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 600;
}
.vendor-bar-track {
  height: 10px;
  background: #e2e8f0;
  border-radius: 5px;
  overflow: hidden;
}
.vendor-bar-fill-sales {
  height: 100%;
  background: linear-gradient(90deg, #10b981, #059669);
  border-radius: 5px;
  transition: width 0.6s ease;
}
.vendor-bar-fill-exp {
  height: 100%;
  background: linear-gradient(90deg, #f59e0b, #d97706);
  border-radius: 5px;
  transition: width 0.6s ease;
}
.vendor-kpi-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 10px 14px;
  margin-top: 4px;
}
.vendor-net-value {
  font-weight: 800;
  font-size: 16px;
  color: var(--success);
}
.vendor-roi-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}

/* ROTACIÓN DE INVENTARIO EN DASHBOARD */
.rotation-kpi-banner {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  background: var(--bg-main);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
}
.rotation-kpi-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.rotation-kpi-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.rotation-kpi-val {
  font-size: 20px;
  font-weight: 800;
  color: var(--brown-900);
}
.rotation-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 12px;
}
.rotation-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.02);
}
.rotation-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.rotation-badge-alta {
  background: #ecfdf5;
  color: #059669;
  border: 1px solid #a7f3d0;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 6px;
}
.rotation-badge-media {
  background: #fefce8;
  color: #ca8a04;
  border: 1px solid #fef08a;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 6px;
}
.rotation-badge-baja {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 6px;
}

/* ==========================================
   CICLO MENSUAL DE VENTAS & BONOS/PENALIZACIONES
   ========================================== */
.monthly-cycle-banner {
  background: linear-gradient(135deg, #fef3c7 0%, #fffbeb 50%, #fef9c3 100%);
  border: 1px solid #fde047;
  border-left: 5px solid #d4a017;
  border-radius: 10px;
  padding: 14px 18px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  box-shadow: 0 4px 12px rgba(212, 160, 23, 0.12);
  animation: fadeInBanner 0.3s ease;
}

@keyframes fadeInBanner {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

.mcb-content {
  display: flex;
  align-items: center;
  gap: 14px;
}

.mcb-icon {
  font-size: 28px;
  background: #ffffff;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
  flex-shrink: 0;
}

.mcb-text h4 {
  font-size: 15px;
  font-weight: 800;
  color: #78350f;
  margin-bottom: 2px;
}

.mcb-text p {
  font-size: 12px;
  color: #92400e;
  line-height: 1.4;
}

.mcb-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.btn-mcb-primary {
  background: #b45309;
  color: #ffffff;
  border: none;
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.btn-mcb-primary:hover {
  background: #92400e;
  transform: translateY(-1px);
}

.btn-mcb-dismiss {
  background: transparent;
  color: #a16207;
  border: 1px solid #facc15;
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-mcb-dismiss:hover {
  background: rgba(250, 204, 21, 0.2);
}

.vendor-month-select {
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #ffffff;
  color: var(--brown-900);
  cursor: pointer;
}

.vendor-month-select:focus {
  outline: none;
  border-color: var(--gold-500);
}

.vendor-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}

.badge-bonus {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}

.badge-warning-custom {
  background: #fffbeb;
  color: #b45309;
  border: 1px solid #fde68a;
}

.badge-penalty {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

/* =======================================================
   MÓDULO DE ALERTAS TELEGRAM & MONITOREO DE FALLAS
======================================================= */
.telegram-card {
  background: #ffffff;
  border: 1px solid #e7ded0;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 1px 3px rgba(44, 26, 14, 0.04);
  margin-bottom: 20px;
}

.telegram-switch-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.telegram-toggle-switch {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 26px;
}

.telegram-toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.telegram-slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #cbd5e1;
  transition: 0.25s;
  border-radius: 26px;
}

.telegram-slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.25s;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.telegram-toggle-switch input:checked + .telegram-slider {
  background-color: #0284c7;
}

.telegram-toggle-switch input:checked + .telegram-slider:before {
  transform: translateX(22px);
}

.logo-incident-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.logo-incident-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: #fdfbf7;
  border: 1px solid #ebd8c5;
  border-radius: 8px;
  padding: 10px 12px;
  transition: all 0.15s ease;
}

.logo-incident-item:hover {
  border-color: #d8cbbe;
  box-shadow: 0 2px 6px rgba(44, 26, 14, 0.05);
}

.logo-incident-icon {
  font-size: 24px;
  line-height: 1;
  flex-shrink: 0;
}

.logo-incident-info h5 {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  color: var(--brown-900);
}

.logo-incident-info p {
  margin: 2px 0 0 0;
  font-size: 11px;
  color: var(--text-muted);
}

/* ============================================================================
   BUSCADOR PREDICTIVO & CATÁLOGO DESPLEGABLE DE PRODUCTOS (PRODUCT PICKER)
   ============================================================================ */
.product-picker-container {
  position: relative;
  width: 100%;
  font-family: inherit;
}

.product-picker-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  transition: all 0.2s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.product-picker-input-wrap:focus-within {
  border-color: var(--gold-500, #D4A017);
  box-shadow: 0 0 0 3px rgba(212, 160, 23, 0.18);
}

.product-picker-search-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding-left: 10px;
  color: #94a3b8;
  pointer-events: none;
}

.product-picker-input {
  width: 100%;
  height: 38px;
  padding: 6px 10px;
  border: none;
  background: transparent;
  font-size: 13px;
  color: var(--brown-900, #2C1A0E);
  font-family: inherit;
  outline: none;
}

.product-picker-input::placeholder {
  color: #94a3b8;
  font-size: 12px;
}

.product-picker-clear-btn {
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 18px;
  cursor: pointer;
  padding: 0 8px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s;
}

.product-picker-clear-btn:hover {
  color: #ef4444;
}

.product-picker-toggle-btn {
  background: none;
  border: none;
  border-left: 1px solid #e2e8f0;
  color: #64748b;
  padding: 0 10px;
  height: 28px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s, background 0.15s;
}

.product-picker-toggle-btn:hover {
  color: var(--brown-900);
  background: #f8fafc;
}

/* MENÚ DESPLEGABLE CON CATEGORÍAS Y LISTA */
.product-picker-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.15), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  z-index: 1050;
  max-height: 380px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: pickerFadeIn 0.15s ease-out;
}

@keyframes pickerFadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* PÍLDORAS DE CATEGORÍA */
.product-picker-categories {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  overflow-x: auto;
  scrollbar-width: thin;
}

.product-picker-cat-btn {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  padding: 3px 9px;
  font-size: 11px;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.product-picker-cat-btn:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
  color: var(--brown-900);
}

.product-picker-cat-btn.active {
  background: var(--brown-900, #2C1A0E);
  border-color: var(--brown-900, #2C1A0E);
  color: #ffffff;
  box-shadow: 0 1px 3px rgba(44, 26, 14, 0.25);
}

/* LISTA DE RESULTADOS */
.product-picker-list {
  flex: 1;
  overflow-y: auto;
  max-height: 280px;
  padding: 4px 0;
  scrollbar-width: thin;
}

.product-picker-item {
  padding: 8px 12px;
  cursor: pointer;
  border-bottom: 1px solid #f1f5f9;
  transition: background 0.12s ease;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.product-picker-item:last-child {
  border-bottom: none;
}

.product-picker-item:hover,
.product-picker-item.active {
  background: #fef9ed;
}

.product-picker-item-main {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.product-picker-item-code {
  font-family: monospace;
  font-size: 12px;
  font-weight: 700;
  color: #b45309;
  background: #fef3c7;
  padding: 1px 6px;
  border-radius: 4px;
  margin-right: 6px;
  border: 1px solid #fde68a;
  flex-shrink: 0;
}

.product-picker-item-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--brown-900, #1e293b);
  flex: 1;
}

.product-picker-item-price {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 13px;
  color: #15803d;
  flex-shrink: 0;
}

.product-picker-item-sub {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 11px;
  color: #64748b;
  margin-top: 2px;
}

.product-picker-badge-brand {
  background: #e2e8f0;
  color: #334155;
  padding: 1px 6px;
  border-radius: 4px;
  font-weight: 600;
  font-size: 10px;
  text-transform: uppercase;
}

.product-picker-stock {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 600;
}

.stock-high { color: #166534; }
.stock-low { color: #d97706; }
.stock-out { color: #dc2626; font-weight: 700; }

/* RESALTADO DE FRAGMENTOS */
.picker-highlight {
  background: #fde047;
  color: #1e293b;
  font-weight: 700;
  padding: 0 2px;
  border-radius: 2px;
}

/* FOOTER DEL DESPLEGABLE */
.product-picker-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 12px;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  font-size: 11px;
  color: #64748b;
}

.product-picker-empty {
  padding: 24px 16px;
  text-align: center;
  color: #64748b;
  font-size: 13px;
}
