/* ===== BOLETEALO ERP - ESTILOS EXACTOS ===== */
/* Fuente: Montserrat (cargada desde Google Fonts, compatible Android 4.4) */
@import url('https://fonts.googleapis.com/css?family=Montserrat:400,500,600,700,800&display=swap');

/* ===== RESET & BASE ===== */
* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Montserrat', sans-serif !important; }
html, body { height: 100%; }
body {
  background: #f3f4f6;
  color: #3b3b3b;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: 'Montserrat', sans-serif; font-size: 14px; }
.hidden { display: none !important; }

/* ===== CSS VARIABLES ===== */
:root {
  --color-primary: #0bb3a7;
  --color-primary-rgb: 11, 179, 167;
  --color-primary-hover: #099a8f;
  --color-primary-light: #f0fdfa;
  --color-primary-dark: #023233;
  --color-primary-dark-rgb: 2, 50, 51;
  --color-primary-dark-light: #083a3a;
  --color-primary-contrast: #ffffff;
  --color-secondary: #6366f1;
  --success: #10b981;
  --danger: #dc2626;
  --warning: #f59e0b;
  --info: #3b82f6;
}

/* ===== LOGIN ===== */
.login-screen {
  height: 100vh;
  display: -webkit-flex; display: flex;
  -webkit-align-items: center; align-items: center;
  -webkit-justify-content: center; justify-content: center;
  background: #023233;
}
.login-card {
  background: #fff;
  padding: 40px 32px;
  width: 400px;
  max-width: 95%;
  border-radius: 0.75rem;
  box-shadow: 0 4px 24px rgba(0,0,0,0.2);
}
.login-logo {
  display: -webkit-flex; display: flex;
  -webkit-align-items: center; align-items: center;
  gap: 10px;
  font-size: 24px;
  font-weight: 800;
  color: #023233;
  margin-bottom: 4px;
}
.login-logo-svg { width: 36px; height: 36px; }
.login-subtitle { color: #6b7280; margin-bottom: 24px; font-size: 13px; font-weight: 500; }
.login-demo-note { color: #9ca3af; font-size: 12px; text-align: center; margin-top: 16px; }

/* ===== FORM ELEMENTS ===== */
.form-group { margin-bottom: 16px; }
.form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: #083a3a;
  margin-bottom: 6px;
  letter-spacing: 0.01em;
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.625rem 0.875rem;
  border: 1px solid #ebebeb;
  border-radius: 0.5rem;
  background: #fff;
  color: #3b3b3b;
  font-size: 0.9375rem;
  outline: none;
  -webkit-appearance: none;
  -webkit-transition: all 0.2s; transition: all 0.2s;
}
.form-group input:focus,
.form-group select:focus {
  border-color: #0bb3a7;
  box-shadow: 0 0 0 3px rgba(11,179,167,0.15);
}
.form-group input:disabled,
.form-group input[readonly] {
  background: #f9fafb;
  color: #6b7280;
}
.form-row {
  display: -webkit-flex; display: flex;
  gap: 16px;
  -webkit-flex-wrap: wrap; flex-wrap: wrap;
}
.form-row .form-group { -webkit-flex: 1; flex: 1; min-width: 140px; }

/* ===== BUTTONS ===== */
.btn {
  display: -webkit-inline-flex; display: inline-flex;
  -webkit-align-items: center; align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  border: 1px solid transparent;
  font-size: 0.9375rem;
  font-weight: 500;
  border-radius: 0.5rem;
  -webkit-transition: all 0.2s; transition: all 0.2s;
  white-space: nowrap;
  line-height: 1.5;
}
.btn:focus { outline: none; box-shadow: 0 0 0 3px rgba(11,179,167,0.2); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary { background: #0bb3a7; color: #fff; border-color: #0bb3a7; }
.btn-primary:hover { background: #099a8f; }
.btn-secondary { background: #fff; color: #083a3a; border-color: #d1d5db; }
.btn-secondary:hover { background: #f9fafb; border-color: #9ca3af; }
.btn-success { background: #10b981; color: #fff; border-radius: 0.5rem; }
.btn-danger { background: #dc2626; color: #fff; border-radius: 0.5rem; }
.btn-warning { background: #f59e0b; color: #fff; border-radius: 0.5rem; }
.btn-sm { padding: 0.5rem 1rem; font-size: 0.875rem; }
.btn-block { width: 100%; -webkit-justify-content: center; justify-content: center; }
.btn-outline { background: transparent; border: 1px solid #d1d5db; color: #374151; border-radius: 0.5rem; }

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

/* ===== SIDEBAR ===== */
.sidebar {
  width: 240px;
  min-width: 240px;
  height: 100vh;
  background: #023233;
  color: #e0e0e0;
  display: -webkit-flex; display: flex;
  -webkit-flex-direction: column; flex-direction: column;
  padding: 20px 12px;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  box-shadow: 2px 0 10px rgba(0,0,0,0.1);
}
.sidebar::-webkit-scrollbar { width: 5px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); }

.logo {
  display: -webkit-flex; display: flex;
  -webkit-align-items: center; align-items: center;
  gap: 10px;
  padding: 16px;
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.3px;
}
.logo-blocks { width: 28px; height: 28px; }

/* Menu items */
.menu-item {
  display: -webkit-flex; display: flex;
  -webkit-align-items: center; align-items: center;
  padding: 8px 4px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  color: #d1e5e5;
  -webkit-transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  -webkit-user-select: none; user-select: none;
}
.menu-item:hover {
  background: rgba(255,255,255,0.06);
  color: #fff;
  -webkit-transform: translateX(2px); transform: translateX(2px);
}
.menu-item.active {
  background: -webkit-linear-gradient(left, rgba(11,179,167,0.15) 0%, rgba(11,179,167,0.05) 100%);
  background: linear-gradient(90deg, rgba(11,179,167,0.15) 0%, rgba(11,179,167,0.05) 100%);
  color: #fff;
  border-left: 3px solid #0bb3a7;
  padding-left: 11px;
}
.menu-icon {
  width: 20px; height: 20px;
  margin-right: 8px;
  -webkit-flex-shrink: 0; flex-shrink: 0;
  opacity: 0.9;
}
.menu-icon svg { width: 100%; height: 100%; }
.menu-item.active .menu-icon { opacity: 1; }
.menu-arrow {
  margin-left: auto;
  font-size: 9px;
  opacity: 0.5;
  color: #a0c4c4;
  -webkit-transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.menu-arrow.expanded { -webkit-transform: rotate(-180deg); transform: rotate(-180deg); opacity: 0.8; }

/* Submenu */
.submenu {
  max-height: 0;
  overflow: hidden;
  -webkit-transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.submenu.open { max-height: 800px; padding: 4px 0; }
.submenu-item {
  position: relative;
  padding: 10px 16px 10px 36px;
  font-size: 13px;
  font-weight: 400;
  color: #b8d4d4;
  cursor: pointer;
  -webkit-transition: all 0.2s ease; transition: all 0.2s ease;
  margin-bottom: 2px;
  line-height: 1.4;
}
.submenu-item:before {
  content: '';
  position: absolute;
  left: 18px; top: 50%;
  -webkit-transform: translateY(-50%); transform: translateY(-50%);
  width: 4px; height: 4px;
  background: rgba(255,255,255,0.3);
  -webkit-transition: all 0.2s ease; transition: all 0.2s ease;
}
.submenu-item:hover {
  background: rgba(11,179,167,0.08);
  color: #fff;
  padding-left: 40px;
}
.submenu-item:hover:before {
  background: #0bb3a7;
  width: 6px; height: 6px;
  left: 17px;
  box-shadow: 0 0 8px rgba(11,179,167,0.6);
}
.submenu-item.active {
  background: rgba(11,179,167,0.12);
  color: #fff;
  font-weight: 500;
}
.submenu-item.active:before {
  background: #0bb3a7;
  width: 6px; height: 6px;
  box-shadow: 0 0 10px rgba(11,179,167,0.8);
}
.submenu-item.separated {
  margin-top: 8px;
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,0.08);
}

/* Menu group separator */
.menu-group + .menu-group { margin-top: 6px; }

/* Sidebar footer */
.sidebar-footer {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.user-info {
  display: -webkit-flex; display: flex;
  -webkit-align-items: center; align-items: center;
  gap: 10px;
  padding: 8px 4px;
  margin-bottom: 8px;
}
.user-avatar {
  width: 32px; height: 32px;
  background: rgba(11,179,167,0.3);
  color: #fff;
  border-radius: 50%;
  display: -webkit-flex; display: flex;
  -webkit-align-items: center; align-items: center;
  -webkit-justify-content: center; justify-content: center;
  font-size: 14px; font-weight: 600;
  -webkit-flex-shrink: 0; flex-shrink: 0;
}
.user-details {
  display: -webkit-flex; display: flex;
  -webkit-flex-direction: column; flex-direction: column;
  overflow: hidden;
}
.user-name { font-size: 13px; font-weight: 500; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-role { font-size: 11px; color: #a0c4c4; font-weight: 400; }
.logout-btn {
  display: -webkit-flex; display: flex;
  -webkit-align-items: center; align-items: center;
  gap: 8px;
  width: 100%;
  padding: 10px 8px;
  background: none;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  color: #e0a0a0;
  -webkit-transition: all 0.2s; transition: all 0.2s;
}
.logout-btn:hover { background: rgba(239,68,68,0.12); color: #f87171; }
.logout-btn svg { width: 18px; height: 18px; -webkit-flex-shrink: 0; flex-shrink: 0; }

/* ===== MAIN CONTENT ===== */
.main-content {
  -webkit-flex: 1; flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 24px;
  background: #f3f4f6;
  min-width: 0;
}
.main-content::-webkit-scrollbar { width: 6px; }
.main-content::-webkit-scrollbar-track { background: #f3f4f6; }
.main-content::-webkit-scrollbar-thumb { background: #d1d5db; }

/* ===== PAGE HEADER ===== */
.page-header {
  display: -webkit-flex; display: flex;
  -webkit-align-items: center; align-items: center;
  -webkit-justify-content: space-between; justify-content: space-between;
  margin-bottom: 20px;
  -webkit-flex-wrap: wrap; flex-wrap: wrap;
  gap: 12px;
}
.page-header h1 { font-size: 22px; font-weight: 700; color: #3b3b3b; letter-spacing: -0.3px; }
.page-header-actions {
  display: -webkit-flex; display: flex;
  gap: 8px;
  -webkit-flex-wrap: wrap; flex-wrap: wrap;
}

/* ===== CARDS ===== */
.card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  overflow: hidden;
}
.card-title {
  font-size: 14px;
  font-weight: 600;
  color: #083a3a;
  margin-bottom: 12px;
}

/* KPI Cards */
.kpi-grid {
  display: -webkit-flex; display: flex;
  gap: 16px;
  margin-bottom: 20px;
  -webkit-flex-wrap: wrap; flex-wrap: wrap;
}
.kpi-card {
  -webkit-flex: 1; flex: 1;
  min-width: 160px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  padding: 16px;
  border-left: 4px solid #0bb3a7;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.kpi-card.green { border-left-color: #10b981; }
.kpi-card.red { border-left-color: #dc2626; }
.kpi-card.blue { border-left-color: #3b82f6; }
.kpi-card.yellow { border-left-color: #f59e0b; }
.kpi-label { font-size: 11px; color: #6b7280; margin-bottom: 4px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }
.kpi-value { font-size: 22px; font-weight: 800; color: #3b3b3b; }
.kpi-sub { font-size: 11px; color: #9ca3af; margin-top: 4px; }

/* Stat cards row */
.stats-row {
  display: -webkit-flex; display: flex;
  gap: 12px;
  margin-bottom: 16px;
  -webkit-flex-wrap: wrap; flex-wrap: wrap;
}
.stat-card {
  -webkit-flex: 1; flex: 1;
  min-width: 120px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  padding: 14px 16px;
  text-align: center;
}
.stat-value { font-size: 22px; font-weight: 800; color: #3b3b3b; }
.stat-label { font-size: 11px; color: #6b7280; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }

/* ===== FILTER BAR ===== */
.filter-bar {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  padding: 14px 16px;
  margin-bottom: 16px;
  display: -webkit-flex; display: flex;
  gap: 12px;
  -webkit-flex-wrap: wrap; flex-wrap: wrap;
  -webkit-align-items: flex-end; align-items: flex-end;
}
.filter-bar input,
.filter-bar select {
  padding: 7px 10px;
  border: 1px solid #ebebeb;
  border-radius: 0.5rem;
  font-size: 13px;
  min-width: 140px;
  background: #fff;
  color: #3b3b3b;
  -webkit-transition: all 0.2s; transition: all 0.2s;
}
.filter-bar input:focus,
.filter-bar select:focus {
  border-color: #0bb3a7;
  outline: none;
  box-shadow: 0 0 0 3px rgba(11,179,167,0.1);
}

/* ===== TABLES ===== */
.table-wrapper { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  overflow: hidden;
  font-size: 0.875rem;
}
table th {
  background: #f9fafb;
  padding: 0.75rem 1rem;
  text-align: left;
  font-weight: 600;
  color: #374151;
  border-bottom: 2px solid #e5e7eb;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  white-space: nowrap;
}
table td {
  padding: 0.875rem 1rem;
  border-bottom: 1px solid #e5e7eb;
  color: #111827;
}
table tr:hover td { background: #f9fafb; }
table .text-right { text-align: right; }
table .text-center { text-align: center; }
table .mono { font-family: 'Courier New', Courier, monospace; font-size: 12px; font-weight: 700; }

/* ===== BADGES ===== */
.badge {
  display: -webkit-inline-flex; display: inline-flex;
  -webkit-align-items: center; align-items: center;
  padding: 0.25rem 0.625rem;
  font-size: 0.75rem;
  font-weight: 500;
  white-space: nowrap;
}
.badge-success { background: #d1fae5; color: #059669; }
.badge-danger { background: #fee2e2; color: #dc2626; }
.badge-warning { background: #fed7aa; color: #d97706; }
.badge-info { background: #dbeafe; color: #1e40af; }
.badge-gray { background: #f3f4f6; color: #374151; }

/* ===== PAGINATION ===== */
.pagination {
  display: -webkit-flex; display: flex;
  -webkit-align-items: center; align-items: center;
  -webkit-justify-content: space-between; justify-content: space-between;
  padding: 12px 16px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-top: none;
  border-radius: 0 0 0.75rem 0.75rem;
  font-size: 13px;
  color: #6b7280;
}
.pagination-info { font-size: 12px; }
.pagination-btns {
  display: -webkit-flex; display: flex;
  gap: 4px;
}
.pagination-btns button {
  padding: 4px 10px;
  border: 1px solid #e5e7eb;
  border-radius: 0.375rem;
  background: #fff;
  font-size: 12px;
  color: #374151;
  -webkit-transition: all 0.2s; transition: all 0.2s;
}
.pagination-btns button:hover { background: #f3f4f6; }
.pagination-btns button.active { background: #0bb3a7; color: #fff; border-color: #0bb3a7; }

/* ===== TWO COLUMN LAYOUT ===== */
.two-col {
  display: -webkit-flex; display: flex;
  gap: 16px;
  margin-bottom: 16px;
  -webkit-flex-wrap: wrap; flex-wrap: wrap;
}
.two-col > .card { -webkit-flex: 1; flex: 1; min-width: 280px; }

/* ===== BAR CHART ===== */
.chart-bar-group {
  display: -webkit-flex; display: flex;
  -webkit-align-items: flex-end; align-items: flex-end;
  gap: 8px;
  height: 150px;
  padding: 0 4px;
}

/* ===== ACTION BUTTONS IN TABLE ===== */
.action-btns {
  display: -webkit-flex; display: flex;
  gap: 4px;
}
.action-btn {
  padding: 4px 10px;
  border: 1px solid #e5e7eb;
  border-radius: 0.375rem;
  background: #fff;
  font-size: 11px;
  font-weight: 500;
  color: #374151;
  cursor: pointer;
  -webkit-transition: all 0.2s; transition: all 0.2s;
}
.action-btn:hover { background: #f9fafb; }
.action-btn.edit { color: #3b82f6; border-color: #93c5fd; }
.action-btn.edit:hover { background: #eff6ff; }
.action-btn.delete { color: #dc2626; border-color: #fca5a5; }
.action-btn.delete:hover { background: #fef2f2; }
.action-btn.view { color: #0bb3a7; border-color: #99f6e4; }
.action-btn.view:hover { background: #f0fdfa; }
.action-btn.download { color: #8b5cf6; border-color: #c4b5fd; }
.action-btn.download:hover { background: #f5f3ff; }

/* ===== POS LAYOUT ===== */
.pos-layout {
  display: -webkit-flex; display: flex;
  gap: 20px;
  height: calc(100vh - 100px);
  overflow: hidden;
}
.pos-products {
  -webkit-flex: 1; flex: 1;
  background: rgba(255,255,255,0.95);
  border: 1px solid rgba(215,215,215,0.93);
  border-radius: 0.75rem;
  display: -webkit-flex; display: flex;
  -webkit-flex-direction: column; flex-direction: column;
  overflow: hidden;
}
.pos-products-header {
  padding: 20px 24px;
  border-bottom: 2px solid #f0f4f8;
  display: -webkit-flex; display: flex;
  -webkit-justify-content: space-between; justify-content: space-between;
  -webkit-align-items: center; align-items: center;
}
.pos-products-body {
  -webkit-flex: 1; flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 16px;
}
.pos-cart {
  width: 400px;
  min-width: 340px;
  background: #fff;
  border: 1px solid rgba(215,215,215,0.93);
  border-radius: 0.75rem;
  display: -webkit-flex; display: flex;
  -webkit-flex-direction: column; flex-direction: column;
  overflow: hidden;
}
.pos-cart-header {
  padding: 16px 20px;
  border-bottom: 1px solid #e5e7eb;
  font-weight: 700;
  font-size: 16px;
  color: #083a3a;
}
.pos-cart-items {
  -webkit-flex: 1; flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 8px 12px;
}
.pos-cart-item {
  display: -webkit-flex; display: flex;
  -webkit-justify-content: space-between; justify-content: space-between;
  -webkit-align-items: center; align-items: center;
  padding: 10px 8px;
  border-bottom: 1px solid #f3f4f6;
  font-size: 13px;
}
.pos-cart-item span:last-child { font-weight: 700; color: #083a3a; }
.pos-cart-totals {
  padding: 16px 20px;
  border-top: 2px solid #e5e7eb;
  background: #f9fafb;
}
.pos-cart-total-row {
  display: -webkit-flex; display: flex;
  -webkit-justify-content: space-between; justify-content: space-between;
  padding: 4px 0;
  font-size: 13px;
  color: #6b7280;
}
.pos-cart-total-row.total {
  font-size: 20px;
  font-weight: 800;
  color: #083a3a;
  padding-top: 8px;
  margin-top: 4px;
  border-top: 2px solid #e5e7eb;
}
.pos-cart-actions { padding: 16px 20px; }

.product-grid {
  display: -webkit-flex; display: flex;
  -webkit-flex-wrap: wrap; flex-wrap: wrap;
  gap: 12px;
}
.product-card {
  width: 148px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  padding: 12px;
  cursor: pointer;
  -webkit-transition: all 0.2s; transition: all 0.2s;
  overflow: hidden;
}
.product-card:hover { border-color: #0bb3a7; box-shadow: 0 4px 12px rgba(11,179,167,0.15); }
.product-card-img {
  width: 100%;
  height: 100px;
  background: #fff;
  border-radius: 0.5rem;
  margin-bottom: 8px;
  display: -webkit-flex; display: flex;
  -webkit-align-items: center; align-items: center;
  -webkit-justify-content: center; justify-content: center;
  color: #d1d5db;
  font-size: 28px;
  overflow: hidden;
  border: 1px solid #f3f4f6;
}
.product-card-img img {
  -webkit-transition: transform 0.2s; transition: transform 0.2s;
}
.product-card:hover .product-card-img img {
  -webkit-transform: scale(1.05); transform: scale(1.05);
}
.product-card-name { font-size: 12px; font-weight: 600; color: #3b3b3b; margin-bottom: 4px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.product-card-price { font-size: 15px; font-weight: 800; color: #0bb3a7; }
.product-card-stock { font-size: 11px; color: #6b7280; margin-top: 4px; }

/* ===== CONFIG / EMPRESA ===== */
.config-section {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  padding: 0;
  margin-bottom: 16px;
  overflow: hidden;
}
.config-section h3 {
  font-size: 1.125rem;
  font-weight: 600;
  color: #fff;
  margin: 0;
  padding: 0.8rem 1.2rem;
  background: #083a3a;
  border-bottom: 2px solid #e5e7eb;
}
.config-section .form-row,
.config-section .form-group:not(.form-row .form-group) {
  padding: 0 1.5rem;
}
.config-section .form-row:first-of-type { padding-top: 1.5rem; }
.config-section .form-row:last-of-type { padding-bottom: 1.5rem; }

/* ===== TABS ===== */
.tabs {
  display: -webkit-flex; display: flex;
  border-bottom: 2px solid #e5e7eb;
  margin-bottom: 16px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.tab {
  padding: 10px 20px;
  font-size: 13px;
  font-weight: 500;
  color: #6b7280;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  white-space: nowrap;
  background: none;
  border-top: none; border-left: none; border-right: none;
  -webkit-transition: all 0.2s; transition: all 0.2s;
}
.tab:hover { color: #083a3a; }
.tab.active { color: #0bb3a7; border-bottom-color: #0bb3a7; font-weight: 600; }

/* ===== EMPTY STATE ===== */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: #9ca3af;
}
.empty-state-icon { font-size: 48px; margin-bottom: 12px; opacity: 0.5; }
.empty-state-text { font-size: 15px; font-weight: 500; }

/* ===== MOBILE HEADER ===== */
.mobile-header {
  display: none;
  -webkit-align-items: center; align-items: center;
  padding: 12px 16px;
  background: #023233;
  color: #fff;
  gap: 12px;
  -webkit-flex-shrink: 0; flex-shrink: 0;
}
.mobile-title { font-size: 18px; font-weight: 700; letter-spacing: -0.5px; }
.hamburger {
  background: none;
  border: none;
  padding: 4px;
  display: -webkit-flex; display: flex;
  -webkit-flex-direction: column; flex-direction: column;
  gap: 5px;
}
.hamburger span { display: block; width: 22px; height: 2px; background: #fff; }
.sidebar-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: 998;
}

/* ===== QUICK FILTERS ===== */
.quick-filters {
  display: -webkit-flex; display: flex;
  gap: 8px;
  margin-bottom: 16px;
  -webkit-flex-wrap: wrap; flex-wrap: wrap;
}
.quick-filter {
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 500;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  background: #fff;
  color: #374151;
  cursor: pointer;
  -webkit-transition: all 0.2s; transition: all 0.2s;
}
.quick-filter:hover { border-color: #0bb3a7; color: #0bb3a7; }
.quick-filter.active { background: #0bb3a7; color: #fff; border-color: #0bb3a7; }

/* ===== PROGRESS BAR ===== */
.progress-bar {
  height: 8px;
  background: #e5e7eb;
  border-radius: 4px;
  overflow: hidden;
  margin-top: 8px;
}
.progress-bar-fill {
  height: 100%;
  background: #0bb3a7;
  border-radius: 4px;
  -webkit-transition: width 0.3s; transition: width 0.3s;
}

/* ===== INFO PILLS (POS) ===== */
.info-pills {
  display: -webkit-flex; display: flex;
  gap: 8px;
  -webkit-flex-wrap: wrap; flex-wrap: wrap;
}
.info-pill {
  display: -webkit-flex; display: flex;
  -webkit-align-items: center; align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: rgba(255,255,255,0.9);
  border: 1px solid rgba(0,0,0,0.1);
  border-radius: 0.5rem;
  font-size: 12px;
  font-weight: 700;
  color: #1e293b;
}
.caja-monto {
  font-family: 'Courier New', monospace !important;
  font-weight: 700;
  color: #065f46;
  background: #d1fae5;
  padding: 2px 8px;
  font-size: 11px;
  margin-left: 4px;
}

/* ===== MODAL ===== */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: 2000;
  display: -webkit-flex; display: flex;
  -webkit-align-items: center; align-items: center;
  -webkit-justify-content: center; justify-content: center;
  padding: 20px;
  -webkit-animation: fadeIn 0.2s; animation: fadeIn 0.2s;
}
@-webkit-keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal-box {
  background: #fff;
  border-radius: 0.75rem;
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  display: -webkit-flex; display: flex;
  -webkit-flex-direction: column; flex-direction: column;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
  -webkit-animation: slideUp 0.3s; animation: slideUp 0.3s;
  overflow: hidden;
}
@-webkit-keyframes slideUp { from { -webkit-transform: translateY(20px); opacity: 0.5; } to { -webkit-transform: translateY(0); opacity: 1; } }
@keyframes slideUp { from { transform: translateY(20px); opacity: 0.5; } to { transform: translateY(0); opacity: 1; } }
.modal-box.wide { max-width: 800px; }
.modal-box.narrow { max-width: 420px; }
.modal-header {
  display: -webkit-flex; display: flex;
  -webkit-align-items: center; align-items: center;
  -webkit-justify-content: space-between; justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid #e5e7eb;
  background: #f9fafb;
}
.modal-header h3 { font-size: 16px; font-weight: 600; color: #083a3a; margin: 0; }
.modal-close {
  width: 32px; height: 32px;
  background: none; border: 1px solid #e5e7eb; border-radius: 0.375rem;
  font-size: 20px; color: #6b7280; cursor: pointer;
  display: -webkit-flex; display: flex;
  -webkit-align-items: center; align-items: center;
  -webkit-justify-content: center; justify-content: center;
  -webkit-transition: all 0.2s; transition: all 0.2s;
}
.modal-close:hover { background: #fee2e2; color: #dc2626; border-color: #fca5a5; }
.modal-body {
  padding: 20px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  -webkit-flex: 1; flex: 1;
}
.modal-footer {
  padding: 14px 20px;
  border-top: 1px solid #e5e7eb;
  background: #f9fafb;
  display: -webkit-flex; display: flex;
  -webkit-justify-content: flex-end; justify-content: flex-end;
  gap: 8px;
}

/* ===== TOAST ===== */
.toast {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 12px 20px;
  background: #083a3a;
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  border-radius: 0.5rem;
  z-index: 3000;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  -webkit-animation: slideIn 0.3s; animation: slideIn 0.3s;
  max-width: 360px;
}
.toast.success { background: #059669; }
.toast.error { background: #dc2626; }
.toast.warning { background: #d97706; }
@-webkit-keyframes slideIn { from { -webkit-transform: translateX(100%); opacity: 0; } to { -webkit-transform: translateX(0); opacity: 1; } }
@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* ===== DETAIL VIEW IN MODAL ===== */
.detail-row {
  display: -webkit-flex; display: flex;
  padding: 8px 0;
  border-bottom: 1px solid #f3f4f6;
  font-size: 13px;
}
.detail-label { width: 140px; color: #6b7280; font-weight: 500; -webkit-flex-shrink: 0; flex-shrink: 0; }
.detail-value { color: #111827; font-weight: 500; -webkit-flex: 1; flex: 1; }
.detail-section-title {
  font-size: 13px; font-weight: 600; color: #083a3a;
  padding: 12px 0 6px; margin-top: 8px;
  border-bottom: 2px solid #e5e7eb; text-transform: uppercase; letter-spacing: 0.05em;
}

/* ===== PROCESAR VENTA MODAL (replica exacta) ===== */
.pv-tabs-container { border-bottom: 2px solid #e5e7eb; }
.pv-tabs { display: -webkit-flex; display: flex; gap: 0; padding: 0 24px; }
.pv-tab {
  padding: 12px 20px; cursor: pointer; font-size: 13px; font-weight: 600;
  color: #6b7280; background: transparent; border-bottom: 3px solid transparent;
  -webkit-transition: all 0.3s; transition: all 0.3s; white-space: nowrap;
  display: -webkit-flex; display: flex; -webkit-align-items: center; align-items: center; gap: 8px;
}
.pv-tab:hover { color: #0bb3a7; }
.pv-tab.active { color: #0bb3a7; border-bottom-color: #0bb3a7; }
.pv-tab svg { -webkit-flex-shrink: 0; flex-shrink: 0; }

.pv-body { padding: 24px; display: -webkit-flex; display: flex; -webkit-flex-direction: column; flex-direction: column; gap: 16px; }

/* Monto a cobrar */
.pv-monto-section {
  background: -webkit-linear-gradient(top left, #f0fdfa 0%, #ccfbf1 100%);
  background: linear-gradient(135deg, #f0fdfa 0%, #ccfbf1 100%);
  border: 2px solid #0bb3a7; padding: 16px; text-align: center;
}
.pv-monto-label { display: block; font-size: 11px; font-weight: 600; color: #64748b; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 6px; }
.pv-monto-display { display: -webkit-flex; display: flex; -webkit-align-items: baseline; align-items: baseline; -webkit-justify-content: center; justify-content: center; gap: 4px; }
.pv-moneda { font-size: 18px; font-weight: 700; color: #0bb3a7; }
.pv-valor { font-size: 32px; font-weight: 900; color: #0bb3a7; }

/* Toggles */
.pv-toggle-section { display: -webkit-flex; display: flex; -webkit-justify-content: center; justify-content: center; padding: 12px 0; }
.pv-toggle-container { display: -webkit-flex; display: flex; -webkit-align-items: center; align-items: center; gap: 12px; cursor: pointer; }
.pv-toggle-container input[type="checkbox"] { display: none; }
.pv-toggle-slider {
  position: relative; width: 48px; height: 26px; background: #cbd5e0;
  -webkit-transition: all 0.3s; transition: all 0.3s; display: inline-block;
}
.pv-toggle-slider:before {
  content: ''; position: absolute; width: 20px; height: 20px;
  background: white; top: 3px; left: 3px;
  -webkit-transition: all 0.3s; transition: all 0.3s;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}
.pv-toggle-container input:checked + .pv-toggle-slider { background: #0bb3a7; }
.pv-toggle-container input:checked + .pv-toggle-slider:before { -webkit-transform: translateX(22px); transform: translateX(22px); }
.pv-toggle-label { font-size: 13px; font-weight: 600; color: #4a5568; }

/* Input prefix */
.pv-input-prefix {
  display: -webkit-flex; display: flex; -webkit-align-items: center; align-items: center;
  background: white; border: 2px solid #e2e8f0; overflow: hidden;
  -webkit-transition: all 0.3s; transition: all 0.3s;
}
.pv-input-prefix:focus-within { border-color: #0bb3a7; box-shadow: 0 0 0 3px rgba(11,179,167,0.1); }
.pv-prefix { padding: 10px 12px; background: #f7fafc; border-right: 2px solid #e2e8f0; font-weight: 700; color: #4a5568; font-size: 13px; }
.pv-input {
  width: 100%; padding: 10px 12px; border: none; font-size: 13px; font-weight: 600;
  color: #1a202c; background: white; outline: none;
}

/* Pagos section */
.pv-pagos-section { display: -webkit-flex; display: flex; -webkit-flex-direction: column; flex-direction: column; gap: 16px; }
.pv-pagos-header {
  display: -webkit-flex; display: flex; -webkit-justify-content: space-between; justify-content: space-between;
  -webkit-align-items: center; align-items: center; padding-bottom: 12px; border-bottom: 2px solid #e2e8f0;
}
.pv-pagos-title { margin: 0; font-size: 15px; font-weight: 700; color: #1a202c; }
.pv-btn-add {
  display: -webkit-flex; display: flex; -webkit-align-items: center; align-items: center; gap: 6px;
  padding: 8px 16px; background: #0bb3a7; color: #fff; border: none;
  font-size: 13px; font-weight: 700; cursor: pointer;
  -webkit-transition: all 0.3s; transition: all 0.3s;
}
.pv-btn-add:hover { background: #099a8f; }

/* Tabla pagos */
.pv-tabla-wrapper { display: -webkit-flex; display: flex; -webkit-flex-direction: column; flex-direction: column; border: 2px solid #e2e8f0; overflow: hidden; background: white; }
.pv-tabla-header {
  display: -webkit-flex; display: flex; padding: 12px; background: #f8fafc;
  border-bottom: 2px solid #e2e8f0; font-size: 12px; font-weight: 700;
  color: #64748b; text-transform: uppercase; letter-spacing: 0.5px;
}
.pv-col-metodo { -webkit-flex: 2; flex: 2; }
.pv-col-ref { -webkit-flex: 1.5; flex: 1.5; padding: 0 6px; }
.pv-col-monto { -webkit-flex: 1; flex: 1; padding: 0 6px; }
.pv-col-act { width: 44px; -webkit-flex-shrink: 0; flex-shrink: 0; display: -webkit-flex; display: flex; -webkit-align-items: center; align-items: center; -webkit-justify-content: center; justify-content: center; }

.pv-fila-row {
  display: -webkit-flex; display: flex; padding: 12px;
  border-bottom: 1px solid #f3f4f6; -webkit-transition: all 0.2s; transition: all 0.2s;
  -webkit-align-items: center; align-items: center;
}
.pv-fila-row:hover { background: #f8fafc; }
.pv-input-tabla {
  width: 100%; padding: 8px 10px; border: 1px solid #e2e8f0;
  font-size: 13px; font-weight: 500; color: #1a202c; background: white;
  -webkit-transition: all 0.2s; transition: all 0.2s;
}
.pv-input-tabla:focus { outline: none; border-color: #0bb3a7; box-shadow: 0 0 0 3px rgba(11,179,167,0.1); }
.pv-input-tabla::placeholder { color: #cbd5e0; font-weight: 400; }
.pv-input-monto { font-weight: 700; color: #0bb3a7; }
.pv-btn-delete {
  width: 36px; height: 36px; background: #fee2e2; color: #dc2626;
  border: none; cursor: pointer; display: -webkit-flex; display: flex;
  -webkit-align-items: center; align-items: center; -webkit-justify-content: center; justify-content: center;
  -webkit-transition: all 0.2s; transition: all 0.2s;
}
.pv-btn-delete:hover { background: #fecaca; }

/* Resumen */
.pv-resumen {
  display: -webkit-flex; display: flex; -webkit-flex-direction: column; flex-direction: column;
  gap: 8px; padding: 16px;
  background: -webkit-linear-gradient(top left, #f8fafc 0%, #f1f5f9 100%);
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border: 2px solid #e2e8f0;
}
.pv-resumen-row { display: -webkit-flex; display: flex; -webkit-justify-content: space-between; justify-content: space-between; -webkit-align-items: center; align-items: center; padding: 8px 0; }
.pv-resumen-label { font-size: 13px; font-weight: 600; color: #4a5568; }
.pv-resumen-valor { font-size: 18px; font-weight: 800; color: #1a202c; }
.pv-resumen-total-row { padding-top: 12px; border-top: 2px solid #e2e8f0; margin-top: 8px; }
.pv-resumen-falta { padding-top: 12px; border-top: 2px solid #fbbf24; }
.pv-resumen-vuelto { padding-top: 12px; border-top: 2px solid #10b981; margin-top: 8px; }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .mobile-header { display: -webkit-flex; display: flex; }
  .app-shell { -webkit-flex-direction: column; flex-direction: column; }
  .sidebar {
    position: fixed;
    left: -280px;
    top: 0;
    width: 280px;
    z-index: 999;
    -webkit-transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }
  .sidebar.open { left: 0; }
  .sidebar-overlay.open { display: block; }
  .main-content { padding: 16px; height: calc(100vh - 52px); }
  .kpi-grid { -webkit-flex-direction: column; flex-direction: column; }
  .two-col { -webkit-flex-direction: column; flex-direction: column; }
  .pos-layout { -webkit-flex-direction: column; flex-direction: column; height: auto; overflow: visible; }
  .pos-cart { width: 100%; min-width: 0; }
  .pos-products { height: auto; }
  .page-header { -webkit-flex-direction: column; flex-direction: column; -webkit-align-items: flex-start; align-items: flex-start; }
  table th, table td { padding: 6px 8px; }
  table th { font-size: 10px; }
  table td { font-size: 11px; }
  .product-card { width: calc(50% - 6px); }
}

/* ===== SCALED FOR SMALL SCREENS ===== */
@media (max-width: 1280px) {
  body { font-size: 13px; }
  .page-header h1 { font-size: 20px; }
  table th { font-size: 10.5px; padding: 6px 8px; }
  table td { font-size: 11.5px; padding: 6px 8px; }
  .kpi-value { font-size: 18px; }
  .kpi-card { padding: 14px; }
  .sidebar { width: 230px; min-width: 230px; }
}

@media (max-width: 1024px) {
  body { font-size: 12px; }
  .page-header h1 { font-size: 18px; }
  table th { font-size: 10px; padding: 5px 6px; }
  table td { font-size: 11px; padding: 5px 6px; }
  .kpi-value { font-size: 16px; }
  .kpi-card { padding: 12px; }
  .filter-bar input, .filter-bar select { font-size: 11px; padding: 5px 7px; }
}
