@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
  --primary: #1565C0;
  --primary-light: #E3F2FD;
  --primary-hover: #0D47A1;
  --bg-app: #F4F6F9;
  --bg-card: #FFFFFF;
  --text-main: #1E293B;
  --text-muted: #64748B;
  --border-color: #E2E8F0;
  
  --success: #10B981;
  --success-light: #D1FAE5;
  --warning: #F59E0B;
  --warning-light: #FEF3C7;
  --danger: #EF4444;
  --danger-light: #FEE2E2;
  
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  
  --shadow-sm: 0 2px 4px rgba(0,0,0,0.02);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.05);
  --shadow-lg: 0 10px 25px rgba(21, 101, 192, 0.08);
  
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  user-select: none;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-app);
  color: var(--text-main);
  height: 125vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  zoom: 0.8;
}

/* App Layout */
.app-container {
  display: flex;
  flex-direction: column;
  width: 125vw;
  height: 125vh;
}

/* Header Navigation (Top Bar) */
.header {
  height: 90px;
  background-color: var(--bg-card);
  border-bottom: 2px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  flex-shrink: 0;
  z-index: 100;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 8px;
}

.brand-logo {
  width: 44px;
  height: 44px;
  background-color: var(--primary);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 800;
  font-size: 22px;
  box-shadow: 0 4px 10px rgba(21, 101, 192, 0.3);
}

.brand-name {
  font-weight: 800;
  font-size: 20px;
  color: var(--primary);
  letter-spacing: 0.5px;
}

.nav-menu {
  display: flex;
  flex-direction: row;
  gap: 16px;
  list-style: none;
  align-items: center;
}

.nav-item button {
  padding: 12px 20px;
  border: none;
  background: none;
  border-radius: var(--radius-md);
  color: var(--text-muted);
  font-family: var(--font-family);
  font-size: 15px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  text-align: left;
  transition: var(--transition);
}

.nav-item button svg {
  width: 20px;
  height: 20px;
  stroke: var(--text-muted);
  stroke-width: 2.2;
  fill: none;
  transition: var(--transition);
}

.nav-item.active button {
  background-color: var(--primary-light);
  color: var(--primary);
}

.nav-item.active button svg {
  stroke: var(--primary);
}

.nav-item button:hover:not(.active button) {
  background-color: #F1F5F9;
  color: var(--text-main);
}

.nav-item button:hover svg {
  stroke: var(--text-main);
}

.header-right {
  display: flex;
  align-items: center;
}

.caja-status-widget {
  background-color: #F8FAFC;
  padding: 10px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
}

.caja-status-header {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.caja-status-value {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 15px;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.status-dot.open { background-color: var(--success); box-shadow: 0 0 8px var(--success); }
.status-dot.closed { background-color: var(--danger); box-shadow: 0 0 8px var(--danger); }

/* Main Content Area */
.main-content {
  flex-grow: 1;
  height: calc(125vh - 90px);
  overflow-y: auto;
  padding: 40px 60px;
  display: flex;
  flex-direction: column;
  gap: 40px;
  width: 100%;
  max-width: 100%;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.section-title {
  font-size: 28px;
  font-weight: 800;
  color: var(--text-main);
}

.section-subtitle {
  font-size: 15px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Modules Views (SPA display toggle) */
.module-view {
  display: none;
  flex-direction: column;
  gap: 28px;
  animation: fadeIn 0.3s ease-out;
}

.module-view.active {
  display: flex;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Card Grid Styles */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}

.stat-card {
  background-color: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 20px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: #CBD5E1;
  cursor: pointer;
}

.stat-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-icon svg {
  width: 28px;
  height: 28px;
  stroke-width: 2.2;
  fill: none;
}

.stat-card.blue .stat-icon { background-color: var(--primary-light); color: var(--primary); }
.stat-card.blue .stat-icon svg { stroke: var(--primary); }

.stat-card.green .stat-icon { background-color: var(--success-light); color: var(--success); }
.stat-card.green .stat-icon svg { stroke: var(--success); }

.stat-card.orange .stat-icon { background-color: var(--warning-light); color: var(--warning); }
.stat-card.orange .stat-icon svg { stroke: var(--warning); }

.stat-card.red .stat-icon { background-color: var(--danger-light); color: var(--danger); }
.stat-card.red .stat-icon svg { stroke: var(--danger); }

.stat-details {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-value {
  font-size: 24px;
  font-weight: 800;
  color: var(--text-main);
}

/* Quick Actions Dashboard */
.dashboard-actions-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.section-label {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-main);
}

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

.action-card {
  background-color: var(--primary);
  color: white;
  border-radius: var(--radius-lg);
  padding: 28px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  border: none;
  cursor: pointer;
  text-align: left;
  transition: var(--transition);
  box-shadow: 0 6px 20px rgba(21, 101, 192, 0.15);
}

.action-card:hover {
  background-color: var(--primary-hover);
  transform: translateY(-4px);
  box-shadow: 0 10px 25px rgba(21, 101, 192, 0.25);
}

.action-card.secondary {
  background-color: var(--bg-card);
  color: var(--text-main);
  border: 2px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

.action-card.secondary:hover {
  background-color: #F8FAFC;
  border-color: #CBD5E1;
  box-shadow: var(--shadow-md);
}

.action-card svg {
  width: 32px;
  height: 32px;
  stroke-width: 2.2;
  fill: none;
}

.action-card:not(.secondary) svg { stroke: white; }
.action-card.secondary svg { stroke: var(--primary); }

.action-card-title {
  font-size: 18px;
  font-weight: 700;
}

.action-card-desc {
  font-size: 13px;
  opacity: 0.85;
  font-weight: 500;
  line-height: 1.4;
}

.action-card.secondary .action-card-desc {
  color: var(--text-muted);
}

/* Buttons (Big, tactile, accessible) */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-family: var(--font-family);
  font-weight: 700;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}

.btn-large {
  padding: 18px 32px;
  font-size: 18px;
}

.btn-normal {
  padding: 12px 24px;
  font-size: 15px;
}

.btn-small {
  padding: 8px 16px;
  font-size: 13px;
  border-radius: var(--radius-sm);
}

.btn-primary { background-color: var(--primary); color: white; }
.btn-primary:hover { background-color: var(--primary-hover); }

.btn-secondary { background-color: #E2E8F0; color: var(--text-main); }
.btn-secondary:hover { background-color: #CBD5E1; }

.btn-success { background-color: var(--success); color: white; }
.btn-success:hover { background-color: #059669; }

.btn-danger { background-color: var(--danger); color: white; }
.btn-danger:hover { background-color: #DC2626; }

.btn-outline {
  background-color: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}
.btn-outline:hover {
  background-color: var(--primary-light);
}

.btn-block {
  width: 100%;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

/* Modals */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 125vw;
  height: 125vh;
  background-color: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  animation: fadeInBackdrop 0.2s ease-out;
}

@keyframes fadeInBackdrop {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-content {
  background-color: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.15);
  border: 1px solid var(--border-color);
  width: 90%;
  max-width: 540px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: slideInModal 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes slideInModal {
  from { transform: scale(0.9) translateY(20px); opacity: 0; }
  to { transform: scale(1) translateY(0); opacity: 1; }
}

.modal-header {
  padding: 24px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-main);
}

.modal-close-btn {
  border: none;
  background: none;
  cursor: pointer;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  transition: var(--transition);
}

.modal-close-btn:hover {
  background-color: #F1F5F9;
  color: var(--text-main);
}

.modal-close-btn svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 2.5;
  fill: none;
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
  max-height: 70vh;
}

.modal-footer {
  padding: 20px 24px;
  border-top: 1px solid var(--border-color);
  background-color: #F8FAFC;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

/* Forms & Inputs (Extra Large & Accessible) */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}

.form-group label {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.input-large {
  font-family: var(--font-family);
  padding: 16px 20px;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-main);
  background-color: #F8FAFC;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  outline: none;
  transition: var(--transition);
}

.input-large:focus {
  border-color: var(--primary);
  background-color: white;
  box-shadow: 0 0 0 4px var(--primary-light);
}

.input-large::placeholder {
  color: #A0AEC0;
  font-weight: 500;
}

.input-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* Pos / Ventas Module Layout */
.pos-layout {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 32px;
  height: calc(125vh - 160px);
}

.pos-products {
  display: flex;
  flex-direction: column;
  gap: 20px;
  overflow-y: hidden;
}

.search-bar-container {
  display: flex;
  gap: 12px;
}

.search-input-wrapper {
  position: relative;
  flex-grow: 1;
}

.search-input-wrapper svg {
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  stroke: var(--text-muted);
  stroke-width: 2.2;
  fill: none;
}

.search-input-wrapper input {
  width: 100%;
  padding-left: 56px;
}

.pos-product-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
  padding: 4px;
}

.pos-product-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 12px 18px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: var(--transition);
}

.pos-product-card:hover {
  border-color: var(--primary);
  background-color: var(--primary-light);
  transform: translateX(4px);
}

.pos-product-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: left;
}

.pos-product-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.3;
}

.pos-product-cat {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
}

.pos-product-meta {
  display: flex;
  align-items: center;
  gap: 16px;
}

.pos-product-price {
  font-size: 16px;
  font-weight: 800;
  color: var(--primary);
}

.pos-product-stock-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: var(--radius-full);
}

.pos-product-stock-badge.ok { background-color: var(--success-light); color: var(--success); }
.pos-product-stock-badge.low { background-color: var(--warning-light); color: var(--warning); }
.pos-product-stock-badge.out { background-color: var(--danger-light); color: var(--danger); }

/* Cart Layout */
.pos-cart {
  background-color: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 2px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.cart-header {
  padding: 20px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #F8FAFC;
}

.cart-title {
  font-size: 18px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 8px;
}

.cart-count {
  background-color: var(--primary);
  color: white;
  font-size: 12px;
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.cart-items {
  flex-grow: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cart-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--text-muted);
  height: 100%;
  text-align: center;
  padding: 40px;
}

.cart-empty-state svg {
  width: 48px;
  height: 48px;
  stroke: var(--text-muted);
  stroke-width: 1.5;
  fill: none;
}

.cart-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px;
  background-color: #F8FAFC;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  gap: 12px;
}

.cart-item-details {
  flex-grow: 1;
  min-width: 0;
}

.cart-item-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cart-item-price {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 2px;
  font-weight: 500;
}

.cart-qty-ctrl {
  display: flex;
  align-items: center;
  border: 2px solid var(--border-color);
  background-color: white;
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.cart-qty-btn {
  border: none;
  background: none;
  width: 32px;
  height: 32px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-muted);
  transition: var(--transition);
}

.cart-qty-btn:hover {
  background-color: #F1F5F9;
  color: var(--text-main);
}

.cart-qty-val {
  width: 32px;
  text-align: center;
  font-weight: 700;
  font-size: 14px;
  color: var(--text-main);
}

.cart-item-subtotal {
  font-size: 15px;
  font-weight: 800;
  color: var(--text-main);
  min-width: 70px;
  text-align: right;
}

.cart-item-remove {
  border: none;
  background: none;
  color: var(--danger);
  cursor: pointer;
  padding: 4px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}

.cart-item-remove:hover {
  background-color: var(--danger-light);
}

.cart-item-remove svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 2.2;
  fill: none;
}

.cart-summary {
  padding: 20px;
  border-top: 1px solid var(--border-color);
  background-color: #F8FAFC;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.cart-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cart-total-label {
  font-size: 18px;
  font-weight: 800;
}

.cart-total-value {
  font-size: 26px;
  font-weight: 800;
  color: var(--primary);
}

/* Pay Options Grid in Checkout */
.pay-methods-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(105px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.btn-quick-amount {
  background-color: #F1F5F9;
  color: var(--text-main);
  border: 1px solid var(--border-color);
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 700;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-quick-amount:hover {
  background-color: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-1px);
}

.pay-method-btn {
  background-color: var(--bg-card);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  font-family: var(--font-family);
  font-weight: 700;
  font-size: 14px;
  color: var(--text-muted);
  transition: var(--transition);
}

.pay-method-btn svg {
  width: 28px;
  height: 28px;
  stroke-width: 2.2;
  stroke: var(--text-muted);
  fill: none;
}

.pay-method-btn.selected {
  border-color: var(--primary);
  background-color: var(--primary-light);
  color: var(--primary);
}

.pay-method-btn.selected svg {
  stroke: var(--primary);
}

.pay-change-calculator {
  background-color: #F1F5F9;
  padding: 16px;
  border-radius: var(--radius-md);
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.change-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.change-label {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
}

.change-val {
  font-size: 20px;
  font-weight: 800;
  color: var(--success);
}

/* Inventory List and Action buttons style */
.inventory-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.table-container {
  background-color: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.data-table th {
  background-color: #F8FAFC;
  padding: 16px 24px;
  font-size: 13px;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border-color);
}

.data-table td {
  padding: 18px 24px;
  font-size: 15px;
  color: var(--text-main);
  border-bottom: 1px solid var(--border-color);
}

.data-table tbody tr:last-child td {
  border-bottom: none;
}

.data-table tbody tr {
  transition: var(--transition);
  cursor: pointer;
}

.data-table tbody tr:hover {
  background-color: #F8FAFC;
}

.badge {
  display: inline-block;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 700;
}

.badge.success { background-color: var(--success-light); color: var(--success); }
.badge.warning { background-color: var(--warning-light); color: var(--warning); }
.badge.danger { background-color: var(--danger-light); color: var(--danger); }
.badge.neutral { background-color: #E2E8F0; color: var(--text-muted); }

/* Details Product Actions */
.product-details-actions-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 20px;
}

.btn-action-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 24px;
  background-color: var(--bg-card);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  font-family: var(--font-family);
  font-weight: 700;
  font-size: 15px;
  color: var(--text-main);
  cursor: pointer;
  transition: var(--transition);
}

.btn-action-tile svg {
  width: 32px;
  height: 32px;
  stroke-width: 2.2;
  fill: none;
}

.btn-action-tile:hover {
  border-color: var(--primary);
  background-color: var(--primary-light);
  color: var(--primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.btn-action-tile.danger-hover:hover {
  border-color: var(--danger);
  background-color: var(--danger-light);
  color: var(--danger);
}

/* Smart Orders Styles */
.orders-split {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 32px;
}

.suggestions-card {
  background-color: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.suggestion-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  border-bottom: 1px solid var(--border-color);
  gap: 16px;
}

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

.suggestion-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.suggestion-name {
  font-weight: 700;
  font-size: 16px;
}

.suggestion-meta {
  font-size: 13px;
  color: var(--text-muted);
}

.suggestion-qty-badge {
  background-color: var(--primary-light);
  color: var(--primary);
  font-weight: 700;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 14px;
}

/* Caja - Historial & Flows */
.caja-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}

.caja-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* Reports / Graphs Elements */
.reports-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}

.report-card {
  background-color: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 24px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.report-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.report-title {
  font-size: 18px;
  font-weight: 800;
}

/* Simple CSS Graph representations */
.bar-chart-container {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  height: 200px;
  padding-top: 20px;
  position: relative;
  border-bottom: 2px solid var(--border-color);
}

.bar-column {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-grow: 1;
  height: 100%;
  justify-content: flex-end;
  gap: 8px;
}

.bar-rect {
  width: 60%;
  max-width: 40px;
  background-color: var(--primary);
  border-radius: 4px 4px 0 0;
  transition: var(--transition);
  position: relative;
  cursor: pointer;
}

.bar-rect:hover {
  background-color: var(--primary-hover);
}

.bar-tooltip {
  position: absolute;
  top: -32px;
  left: 50%;
  transform: translateX(-50%);
  background-color: var(--text-main);
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  opacity: 0;
  transition: var(--transition);
  pointer-events: none;
  white-space: nowrap;
}

.bar-rect:hover .bar-tooltip {
  opacity: 1;
}

.bar-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
}

/* Horizontal top products progress list */
.top-products-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.top-product-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.top-product-header {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  font-weight: 700;
}

.top-product-sales {
  color: var(--text-muted);
}

.progress-bar-bg {
  height: 10px;
  background-color: #E2E8F0;
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background-color: var(--primary);
  border-radius: var(--radius-full);
  transition: width 0.5s ease-out;
}

/* Cash Movement History List */
.caja-historial {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.caja-mov-item {
  background-color: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 16px;
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: var(--transition);
}

.caja-mov-item:hover {
  border-color: #CBD5E1;
}

.caja-mov-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.caja-mov-desc {
  font-weight: 700;
  font-size: 15px;
}

.caja-mov-meta {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}

.caja-mov-amount {
  font-size: 18px;
  font-weight: 800;
}

.caja-mov-amount.in { color: var(--success); }
.caja-mov-amount.out { color: var(--danger); }

/* Recibo / Ticket Printable Mock */
.ticket-container {
  font-family: 'Courier New', Courier, monospace;
  background-color: white;
  border: 1px dashed #A0AEC0;
  padding: 20px;
  color: black;
  font-size: 14px;
  line-height: 1.4;
  margin-top: 10px;
}

.ticket-header {
  text-align: center;
  margin-bottom: 20px;
}

.ticket-brand {
  font-size: 20px;
  font-weight: bold;
}

.ticket-divider {
  border-top: 1px dashed black;
  margin: 10px 0;
}

.ticket-row {
  display: flex;
  justify-content: space-between;
}

.ticket-items {
  margin: 10px 0;
}

.ticket-item-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  margin-bottom: 4px;
}

.ticket-item-row.headers {
  font-weight: bold;
}

.ticket-total {
  font-size: 16px;
  font-weight: bold;
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
}

/* Responsiveness overrides */
@media (max-width: 1024px) {
  .pos-layout {
    grid-template-columns: 1fr;
    height: auto;
    overflow-y: visible;
  }
  
  .pos-products {
    overflow-y: visible;
  }
  
  .pos-product-list {
    max-height: 400px;
  }
  
  .pos-cart {
    height: 500px;
  }
  
  .reports-grid {
    grid-template-columns: 1fr;
  }
  
  .orders-split {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  body {
    flex-direction: column;
    overflow-y: auto;
    height: auto;
  }
  
  .app-container {
    flex-direction: column;
    height: auto;
  }
  
  .header {
    height: auto;
    flex-direction: column;
    padding: 16px;
    gap: 16px;
    border-bottom: 2px solid var(--border-color);
  }
  
  .brand {
    margin-bottom: 0;
  }
  
  .nav-menu {
    flex-direction: row;
    overflow-x: auto;
    padding-bottom: 8px;
    gap: 4px;
    width: 100%;
    justify-content: flex-start;
  }
  
  .nav-item button {
    padding: 10px 14px;
    font-size: 14px;
    white-space: nowrap;
    gap: 8px;
  }
  
  .main-content {
    padding: 20px;
    height: auto;
  }
}

/* ==========================================================================
   MODULE: CLIENTES & CUENTA CORRIENTE
   ========================================================================== */
.clientes-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  height: calc(125vh - 210px);
}

.clientes-list-section {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  height: 100%;
}

.clientes-cards-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
  padding: 4px;
  flex-grow: 1;
}

.cliente-card {
  background-color: var(--bg-card);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 18px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: var(--transition);
}

.cliente-card:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.cliente-card.selected {
  border-color: var(--primary);
  background-color: var(--primary-light);
}

.cliente-card-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cliente-card-name {
  font-weight: 700;
  font-size: 16px;
  color: var(--text-main);
}

.cliente-card-cuit {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
}

.cliente-card-saldo-wrapper {
  text-align: right;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cliente-card-saldo {
  font-weight: 800;
  font-size: 16px;
}

.cliente-card-saldo.debt {
  color: var(--danger);
}

.cliente-card-saldo.clean {
  color: var(--success);
}

/* Clientes Detail Section */
.clientes-detail-section {
  background-color: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 2px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  overflow-y: auto;
  height: 100%;
}

.cliente-detail-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 18px;
}

.cliente-detail-name {
  font-size: 24px;
  font-weight: 800;
  color: var(--text-main);
}

.cliente-detail-status {
  font-size: 12px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
}

.cliente-detail-status.frecuente { background-color: var(--success-light); color: var(--success); }
.cliente-detail-status.nuevo { background-color: var(--primary-light); color: var(--primary); }
.cliente-detail-status.inactivo { background-color: var(--warning-light); color: var(--warning); }

.cliente-detail-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.cliente-detail-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cliente-detail-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.cliente-detail-value {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-main);
}

/* Cuenta corriente boxes */
.cliente-cc-summary {
  display: flex;
  gap: 16px;
}

.cliente-cc-box {
  flex: 1;
  padding: 16px 20px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cliente-cc-box.debt {
  background-color: var(--danger-light);
  color: var(--danger);
  border-color: #FCA5A5;
}

.cliente-cc-box.paid {
  background-color: var(--success-light);
  color: var(--success);
  border-color: #A7F3D0;
}

.cliente-cc-box-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  opacity: 0.8;
}

.cliente-cc-box-val {
  font-size: 20px;
  font-weight: 800;
}

/* Timeline */
.cliente-timeline {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-height: 250px;
  overflow-y: auto;
  padding-right: 12px;
  border-top: 1px solid var(--border-color);
  padding-top: 20px;
}

.timeline-item {
  display: flex;
  gap: 16px;
  position: relative;
  padding-bottom: 16px;
}

.timeline-item::after {
  content: '';
  position: absolute;
  left: 7px;
  top: 22px;
  bottom: 0;
  width: 2px;
  background-color: var(--border-color);
}

.timeline-item:last-child::after {
  display: none;
}

.timeline-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 3px solid white;
  box-shadow: 0 0 0 2px var(--border-color);
  z-index: 1;
  margin-top: 4px;
  flex-shrink: 0;
}

.timeline-dot.compra { background-color: var(--primary); box-shadow: 0 0 0 2px var(--primary-light); }
.timeline-dot.pago { background-color: var(--success); box-shadow: 0 0 0 2px var(--success-light); }
.timeline-dot.presupuesto { background-color: var(--warning); box-shadow: 0 0 0 2px var(--warning-light); }

.timeline-content {
  flex-grow: 1;
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  align-items: center;
  background-color: #F8FAFC;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
}

.timeline-text {
  font-weight: 600;
  color: var(--text-main);
}

.timeline-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.timeline-date {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
}

.timeline-amount {
  font-weight: 800;
}

.timeline-amount.pos { color: var(--success); }
.timeline-amount.neg { color: var(--danger); }

/* Alertas de Clientes */
.cliente-alert {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 600;
}

.cliente-alert.birthday { background-color: var(--primary-light); color: var(--primary); border: 1px solid #93C5FD; }
.cliente-alert.debt-warning { background-color: var(--warning-light); color: var(--warning); border: 1px solid #FCD34D; }
.cliente-alert.inactive-warning { background-color: #F1F5F9; color: var(--text-muted); border: 1px solid var(--border-color); }

/* ==========================================================================
   MODULE: PRESUPUESTOS
   ========================================================================== */
.presupuestos-layout {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* PDF Preview Sheet */
.pres-pdf-sheet {
  background-color: white;
  color: #1E293B;
  font-family: var(--font-family);
  line-height: 1.5;
}

.pres-pdf-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 24px;
  border-bottom: 2px solid #334155;
  padding-bottom: 16px;
}

.pres-pdf-company {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.pres-pdf-company-name {
  font-size: 22px;
  font-weight: 800;
  color: var(--primary);
}

.pres-pdf-company-desc {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
}

.pres-pdf-meta {
  text-align: right;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.pres-pdf-title {
  font-size: 20px;
  font-weight: 800;
  color: #334155;
  margin-bottom: 4px;
}

.pres-pdf-client {
  background-color: #F8FAFC;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 16px;
  margin-bottom: 24px;
}

.pres-pdf-client-title {
  font-size: 11px;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 8px;
  letter-spacing: 0.5px;
}

.pres-pdf-client-details {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px 20px;
}

.pres-pdf-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 24px;
}

.pres-pdf-table th {
  background-color: #E2E8F0;
  color: #334155;
  font-weight: 800;
  padding: 10px 14px;
  font-size: 12px;
  text-transform: uppercase;
  text-align: left;
  border-bottom: 2px solid #CBD5E1;
}

.pres-pdf-table td {
  padding: 12px 14px;
  font-size: 13px;
  border-bottom: 1px solid var(--border-color);
  color: #334155;
}

.pres-pdf-total-row {
  display: flex;
  justify-content: flex-end;
  border-top: 2px solid #334155;
  padding-top: 14px;
  font-size: 18px;
  font-weight: 800;
  color: #334155;
  margin-top: 12px;
}

.pres-pdf-obs {
  font-size: 12px;
  color: var(--text-muted);
  background: #F8FAFC;
  padding: 12px;
  border-radius: var(--radius-sm);
  border-left: 4px solid var(--primary);
  margin-top: 24px;
}

/* ==========================================================================
   MODULE: GASTOS
   ========================================================================== */
.gastos-stats-row {
  display: flex;
  gap: 24px;
}

@media (max-width: 1024px) {
  .clientes-layout {
    grid-template-columns: 1fr;
    height: auto;
  }
  
  .clientes-cards-container {
    max-height: 350px;
  }
  
  .gastos-stats-row {
    flex-direction: column;
    gap: 12px;
  }
}



