/* styles.css */
/* Sistema de diseño premium para CaféMayorista Hub */

:root {
  --bg-deep: #fbfaf7;
  --bg-card: #ffffff;
  --bg-card-hover: #f5ece4;
  --bg-sidebar: #f0e9e1;
  
  --primary: #8b5a2b; /* Bronce Café */
  --primary-light: #b36b24; /* Tostado Fuerte */
  --secondary: #4e8054; /* Verde Planta Café */
  --secondary-light: #3d6a42; /* Verde Tono */
  
  --success: #3d6a42;
  --success-glow: rgba(61, 106, 66, 0.1);
  --warning: #b45309;
  --warning-glow: rgba(180, 83, 9, 0.1);
  --danger: #be123c;
  --danger-glow: rgba(190, 18, 60, 0.1);
  
  --text-main: #2b170c; /* Café Muy Oscuro - Máximo contraste */
  --text-muted: #5e473a;
  --text-dim: #7d6354;
  
  --border-color: rgba(139, 90, 43, 0.22);
  --border-glow: rgba(179, 107, 36, 0.4);
  
  --font-main: 'Outfit', sans-serif;
  --font-sec: 'Inter', sans-serif;
  
  --transition-fast: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  
  --glass-shadow: 0 4px 20px 0 rgba(43, 23, 12, 0.07);
  --glass-shadow-glow: 0 4px 25px 0 rgba(139, 90, 43, 0.18);
  
  --br: 16px;
}

/* Reset y Estilos Generales */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-color: var(--bg-deep);
  background-image: radial-gradient(circle at 50% 50%, #fefdfc 0%, #f3ece6 100%);
  color: var(--text-main);
  font-family: var(--font-main);
  overflow-x: hidden;
  min-height: 100vh;
}

/* Scrollbar Personalizada */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-deep);
}
::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--primary-light);
}

/* Contenedor Principal Layout */
.app-container {
  display: flex;
  min-height: 100vh;
}

/* Sidebar Estilos */
.sidebar {
  width: 260px;
  background-color: var(--bg-sidebar);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  padding: 30px 20px;
  flex-shrink: 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 40px;
}

.logo-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: #fff;
  box-shadow: 0 0 20px rgba(205, 133, 63, 0.45);
}

.brand h2 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.5px;
  font-family: var(--font-main);
}

.brand h2 span {
  background: linear-gradient(135deg, var(--primary-light) 0%, #e0a96d 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-grow: 1;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--br);
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 15px;
  transition: var(--transition-fast);
  border-left: 3px solid transparent;
}

.nav-item:hover {
  color: var(--text-main);
  background-color: rgba(205, 133, 63, 0.08);
}

.nav-item.active {
  color: var(--primary-light);
  background: linear-gradient(90deg, rgba(205, 133, 63, 0.12) 0%, rgba(205, 133, 63, 0) 100%);
  border-left: 3px solid var(--primary-light);
  font-weight: 600;
}

.sidebar-footer {
  border-top: 1px solid var(--border-color);
  padding-top: 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sidebar-footer p {
  font-size: 14px;
  font-weight: 600;
}

/* Main Content Área */
.main-content {
  flex-grow: 1;
  padding: 30px 40px;
  max-width: calc(100vw - 260px);
  overflow-y: auto;
}

/* Header */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 20px;
}

.welcome-text h1 {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.welcome-text p {
  color: var(--text-muted);
  font-size: 14px;
  margin-top: 4px;
}

.rate-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  background-color: var(--bg-card);
  padding: 10px 20px;
  border-radius: 50px;
  border: 1px solid var(--border-color);
  font-size: 14px;
}

.rate-bar strong {
  color: var(--primary-light);
}

/* Glassmorphism Cards */
.glass-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--br);
  box-shadow: var(--glass-shadow);
  backdrop-filter: blur(16px);
  transition: var(--transition-smooth);
}

.glass-card:hover {
  border-color: var(--border-glow);
  box-shadow: var(--glass-shadow-glow);
}

/* KPIs Grid */
.kpis-section {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 30px;
}

.kpi-card {
  background-color: var(--bg-card);
  border-radius: var(--br);
  border: 1px solid var(--border-color);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--glass-shadow);
  backdrop-filter: blur(12px);
  transition: var(--transition-fast);
}

.kpi-card:hover {
  transform: translateY(-4px);
  border-color: var(--primary-light);
  box-shadow: var(--glass-shadow-glow);
}

.kpi-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}

.color-gold { background: rgba(205, 133, 63, 0.15); color: var(--primary-light); }
.color-red { background: rgba(225, 29, 72, 0.15); color: var(--danger); }
.color-brown { background: rgba(139, 90, 43, 0.15); color: #c49a80; }
.color-green { background: rgba(111, 176, 119, 0.15); color: var(--success); }

.kpi-details h3 {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.kpi-details h2 {
  font-size: 24px;
  font-weight: 700;
  margin: 2px 0;
  letter-spacing: -0.5px;
}

.kpi-details p {
  font-size: 11px;
  color: var(--text-dim);
}

/* Dashboard Grid layouts */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 20px;
  margin-bottom: 30px;
}

.grid-card {
  background-color: var(--bg-card);
  border-radius: var(--br);
  border: 1px solid var(--border-color);
  padding: 24px;
  box-shadow: var(--glass-shadow);
  backdrop-filter: blur(12px);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.card-header h3 {
  font-size: 18px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Formularios */
.form-group {
  margin-bottom: 15px;
}

.form-group label {
  display: block;
  font-size: 13.5px;
  font-weight: 500;
  margin-bottom: 6px;
  color: var(--text-muted);
}

input[type="text"],
input[type="number"],
input[type="password"],
textarea,
select {
  width: 100%;
  background-color: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--text-main);
  font-family: var(--font-sec);
  font-size: 14px;
  outline: none;
  transition: var(--transition-fast);
}

input:focus, textarea:focus, select:focus {
  border-color: var(--primary-light);
  box-shadow: 0 0 8px rgba(179, 107, 36, 0.25);
}

.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

.input-with-button {
  display: flex;
  gap: 8px;
}

.input-with-button input {
  flex-grow: 1;
}

/* Botones */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: var(--transition-fast);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: #fff;
  box-shadow: 0 4px 14px rgba(205, 133, 63, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(205, 133, 63, 0.45);
}

.btn-secondary {
  background-color: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-color);
  color: var(--text-main);
}

.btn-secondary:hover {
  background-color: rgba(255, 255, 255, 0.15);
}

.btn-danger {
  background-color: var(--danger);
  color: #fff;
}

.btn-danger:hover {
  background-color: #f43f5e;
}

.btn-icon-only {
  padding: 10px;
}

.btn-block {
  width: 100%;
}

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

/* Registro de foto zona */
.photo-upload-zone {
  border: 2px dashed var(--border-color);
  border-radius: 8px;
  padding: 25px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition-fast);
  background: rgba(0,0,0,0.15);
}

.photo-upload-zone:hover {
  border-color: var(--primary-light);
  background: rgba(205, 133, 63, 0.05);
}

.photo-upload-zone i {
  font-size: 32px;
  color: var(--primary-light);
  margin-bottom: 8px;
}

.photo-preview-container {
  margin-top: 10px;
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.photo-preview-container img {
  width: 100%;
  max-height: 200px;
  object-fit: cover;
  display: block;
}

.photo-preview-container button {
  position: absolute;
  bottom: 10px;
  right: 10px;
}

/* Comercios Layout */
.commerce-manager-layout {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 24px;
}

.commerce-grid-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.commerce-card {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
  transition: var(--transition-smooth);
}

.commerce-card:hover {
  border-color: var(--primary-light);
  transform: translateY(-2px);
}

.commerce-card-img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  background-color: #22150f;
  background-image: radial-gradient(circle, #3d251a 0%, #17110d 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  color: rgba(255,255,255,0.08);
}

.commerce-card-body {
  padding: 16px;
}

.commerce-card-body h5 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 4px;
}

.commerce-card-body p {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.commerce-metadata-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--text-dim);
  margin-top: 6px;
}

.commerce-metadata-row a {
  color: var(--primary-light);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.commerce-metadata-row a:hover {
  text-decoration: underline;
}

/* Lotes Layout */
.lotes-manager-layout {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 24px;
}

.lotes-grid-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 16px;
}

.lote-card {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 16px;
  transition: var(--transition-smooth);
}

.lote-card:hover {
  border-color: var(--primary-light);
}

.lote-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  padding-bottom: 10px;
  margin-bottom: 10px;
}

.lote-card-header h5 {
  font-size: 15px;
  font-weight: 700;
}

.lote-badge {
  background: rgba(205, 133, 63, 0.15);
  color: var(--primary-light);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
}

.lote-data-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  font-size: 13px;
  margin-bottom: 10px;
}

.lote-data-item span {
  color: var(--text-dim);
  display: block;
}

.lote-data-item strong {
  font-size: 14px;
  color: var(--text-main);
}

/* Ventas & Caja Layout: Stacks vertically to give full-width to the sales table */
.sales-manager-layout {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Responsive grid for the 3-column form rows that wraps to 1-column on mobile/tablet */
.responsive-form-row-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 15px;
}

@media (max-width: 768px) {
  .responsive-form-row-3 {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

.available-qty-label {
  display: block;
  font-size: 11.5px;
  color: var(--success);
  margin-top: 4px;
  font-weight: 600;
}

/* Tablas Premium */
.premium-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.premium-table th {
  padding: 12px 14px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 2px solid var(--border-color);
  letter-spacing: 0.5px;
}

.premium-table td {
  padding: 14px 14px;
  font-size: 13.5px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  vertical-align: middle;
}

.premium-table tr:hover {
  background-color: rgba(255, 255, 255, 0.02);
}

/* Badges Estado Ventas */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 30px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
}

.status-badge.pagado { background: var(--success-glow); color: var(--success); }
.status-badge.parcial { background: var(--warning-glow); color: var(--warning); }
.status-badge.pendiente { background: var(--danger-glow); color: var(--danger); }

/* Settings Layout */
.settings-layout {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 24px;
}

.settings-card {
  padding: 24px;
  border-radius: var(--br);
  border: 1px solid var(--border-color);
  background-color: var(--bg-card);
}

/* Toggle Checkbox */
.toggle-container {
  display: flex;
  align-items: center;
  position: relative;
  padding-left: 30px;
  cursor: pointer;
  font-size: 14px;
  user-select: none;
  color: var(--text-main);
  height: 20px;
}

.toggle-container input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.checkmark {
  position: absolute;
  top: 0;
  left: 0;
  height: 20px;
  width: 20px;
  background-color: rgba(0,0,0,0.3);
  border: 1px solid var(--border-color);
  border-radius: 4px;
}

.toggle-container:hover input ~ .checkmark {
  background-color: rgba(255,255,255,0.08);
}

.toggle-container input:checked ~ .checkmark {
  background-color: var(--primary-light);
  border-color: var(--primary-light);
}

.checkmark:after {
  content: "";
  position: absolute;
  display: none;
}

.toggle-container input:checked ~ .checkmark:after {
  display: block;
}

.toggle-container .checkmark:after {
  left: 6px;
  top: 2px;
  width: 5px;
  height: 10px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* Modals */
.modal {
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  backdrop-filter: blur(8px);
  overflow-y: auto;
  padding: 40px 0;
}

.modal-content {
  width: 90%;
  max-width: 480px;
  padding: 24px;
  border-radius: var(--br);
  position: relative;
}

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

.btn-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 24px;
  cursor: pointer;
}

/* SMS Preview Phone Mock */
.sms-preview-phone {
  background: #000;
  border: 12px solid #222;
  border-radius: 36px;
  padding: 20px 10px;
  max-width: 320px;
  margin: 0 auto;
}

.phone-screen {
  background: #1c1510;
  border-radius: 20px;
  padding: 15px 10px;
  min-height: 200px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.sms-bubble {
  padding: 12px 16px;
  border-radius: 18px;
  font-size: 13px;
  line-height: 1.4;
  margin-bottom: 8px;
  max-width: 85%;
  font-family: var(--font-sec);
}

.sms-bubble.recipient {
  background: #3a271c;
  color: #fff;
  align-self: flex-start;
  border-bottom-left-radius: 4px;
  border: 1px solid rgba(255,255,255,0.05);
}

.sms-timestamp {
  font-size: 11px;
  color: var(--text-dim);
  text-align: center;
  margin-top: 5px;
  display: block;
}

/* Dashboard List Items */
.dashboard-lot-item, .dashboard-sale-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px;
  background: rgba(0,0,0,0.15);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  margin-bottom: 10px;
  font-size: 13.5px;
}

.dashboard-lot-item:hover, .dashboard-sale-item:hover {
  background: rgba(205, 133, 63, 0.05);
}

/* Login Container Layout */
.login-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}

.login-card {
  width: 90%;
  max-width: 400px;
  padding: 35px;
}

.login-brand {
  text-align: center;
  margin-bottom: 30px;
}

.login-brand .logo-icon {
  margin: 0 auto 15px auto;
}

.login-brand h2 {
  font-size: 24px;
  font-weight: 800;
}

.login-brand h2 span {
  background: linear-gradient(135deg, var(--primary-light) 0%, #e0a96d 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.login-brand p {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

.error-msg {
  background: rgba(225, 29, 72, 0.15);
  color: #ff4d6d;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 15px;
  border: 1px solid rgba(225, 29, 72, 0.3);
}

/* Sugerencias de Precios */
.suggested-prices-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 8px;
}

.suggest-box {
  background: rgba(205, 133, 63, 0.08);
  border: 1px solid rgba(205, 133, 63, 0.2);
  border-radius: 6px;
  padding: 8px;
  text-align: center;
}

.suggest-box span {
  font-size: 10.5px;
  color: var(--text-muted);
  display: block;
}

.suggest-box strong {
  font-size: 13.5px;
  color: var(--primary-light);
}

.text-brown { color: #e0a96d; }
.text-red { color: #f43f5e; }
.text-green { color: var(--success); }

/* Botón Hamburguesa Toggle */
.btn-toggle-sidebar {
  display: none;
}

/* responsive */
@media (max-width: 1024px) {
  /* Mostrar botón toggle de menú */
  .btn-toggle-sidebar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    font-size: 22px;
    box-shadow: var(--glass-shadow);
    cursor: pointer;
    transition: var(--transition-fast);
    flex-shrink: 0;
  }
  
  .btn-toggle-sidebar:hover, .btn-toggle-sidebar:focus {
    border-color: var(--primary-light);
    color: var(--primary-light);
    box-shadow: var(--glass-shadow-glow);
    outline: none;
  }

  .app-container {
    flex-direction: column;
    min-height: 100vh;
    overflow-x: hidden;
  }

  /* Sidebar como Drawer Deslizable Premium */
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 280px;
    z-index: 1000;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 5px 0 25px rgba(43, 23, 12, 0.15);
    background-color: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    padding: 30px 20px;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  /* Overlay de fondo cuando el sidebar está abierto */
  .sidebar.open::before {
    content: "";
    position: fixed;
    top: 0;
    left: 280px;
    width: calc(100vw - 280px);
    height: 100vh;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    z-index: 999;
  }

  .main-content {
    max-width: 100%;
    padding: 20px 16px;
    overflow-x: hidden;
  }

  .commerce-manager-layout, 
  .lotes-manager-layout, 
  .sales-manager-layout, 
  .settings-layout,
  .proveedores-layout {
    grid-template-columns: 1fr !important;
    gap: 20px;
  }

  .kpis-section {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)) !important;
    gap: 16px;
  }

  .dashboard-grid {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 768px) {
  .header {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
    padding-bottom: 16px;
    margin-bottom: 20px;
  }

  .welcome-text {
    width: 100%;
  }

  .welcome-text h1 {
    font-size: 24px;
  }

  /* Tasa bar premium que se adapta elegantemente */
  .rate-bar {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 16px;
    width: 100%;
    box-shadow: var(--glass-shadow);
  }

  .rate-item {
    font-size: 13px !important;
    padding: 2px 4px;
  }

  .rate-divider {
    display: none; /* Ocultar divisores rígidos en móviles y usar flex wrap */
  }

  .kpis-section {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)) !important;
  }

  .kpi-card {
    padding: 16px;
    gap: 12px;
  }

  .kpi-details h2 {
    font-size: 20px;
  }

  .form-row-2 {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

@media (max-width: 480px) {
  .kpis-section {
    grid-template-columns: 1fr !important;
  }
}

/* ======================================================================== */
/* DROPDOWN BUSCABLE PREMIUM CUSTOM */
/* ======================================================================== */
.searchable-select-wrapper {
  position: relative;
  width: 100%;
}

.searchable-select-input-container {
  position: relative;
  width: 100%;
}

.searchable-select-input-container i {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
  pointer-events: none;
  transition: var(--transition-fast);
}

.searchable-select-wrapper.open .searchable-select-input-container i {
  transform: translateY(-50%) rotate(180deg);
  color: var(--primary-light);
}

.searchable-select-dropdown {
  position: absolute;
  top: calc(100% + 5px);
  left: 0;
  width: 100%;
  max-height: 220px;
  overflow-y: auto;
  z-index: 100;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  box-shadow: var(--glass-shadow-glow);
  display: none;
  backdrop-filter: blur(20px);
}

.searchable-select-wrapper.open .searchable-select-dropdown {
  display: block;
}

.searchable-select-option {
  padding: 10px 12px;
  font-size: 13.5px;
  color: var(--text-main);
  cursor: pointer;
  transition: var(--transition-fast);
  border-bottom: 1px solid rgba(139, 90, 43, 0.08);
}

.searchable-select-option:last-child {
  border-bottom: none;
}

.searchable-select-option:hover {
  background-color: rgba(205, 133, 63, 0.12);
  color: var(--primary-light);
  padding-left: 16px;
}

.searchable-select-option.selected {
  background-color: rgba(205, 133, 63, 0.18);
  color: var(--primary-light);
  font-weight: 600;
}

.searchable-select-no-results {
  padding: 12px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
}
