/* ========================================
   Nuevo Diseño - Convertido de Next.js
   Sistema POS - Impulsa Style
   ======================================== */

/* Variables CSS basadas en el diseño Next.js */
:root {
  --background: #ffffff;
  --foreground: #0a0a0a;
  --card: #ffffff;
  --card-foreground: #0a0a0a;
  --popover: #ffffff;
  --popover-foreground: #0a0a0a;
  --primary: #0a0a0a;
  --primary-foreground: #fafafa;
  --secondary: #f5f5f5;
  --secondary-foreground: #0a0a0a;
  --muted: #f5f5f5;
  --muted-foreground: #737373;
  --accent: #f5f5f5;
  --accent-foreground: #0a0a0a;
  --destructive: #ef4444;
  --destructive-foreground: #fafafa;
  --border: #e5e5e5;
  --input: #e5e5e5;
  --ring: #d4d4d4;
  --radius: 0.5rem;
  --sidebar: #fafafa;
  --sidebar-foreground: #0a0a0a;
  --sidebar-primary: #0a0a0a;
  --sidebar-primary-foreground: #fafafa;
  --sidebar-accent: #f5f5f5;
  --sidebar-accent-foreground: #0a0a0a;
  --sidebar-border: #e5e5e5;
  --sidebar-ring: #d4d4d4;

  /* Colores de éxito */
  --success: #10b981;
  --warning: #f59e0b;
  --info: #3b82f6;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  border-color: var(--border);
}

/* Prevenir comportamientos no deseados en APK */
html {
  -webkit-text-size-adjust: 100%;
  -ms-text-size-adjust: 100%;
  touch-action: manipulation;
}

img,
a {
  -webkit-user-drag: none;
  -khtml-user-drag: none;
  -moz-user-drag: none;
  -o-user-drag: none;
  user-drag: none;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: var(--foreground);
  background-color: var(--background);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overscroll-behavior: none;
  -webkit-overflow-scrolling: touch;
  position: fixed;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

/* Layout Principal */
.app-wrapper {
  display: flex;
  height: 100vh;
  background-color: var(--secondary);
  overflow: hidden;
}

.app-sidebar {
  width: 256px;
  height: 100vh;
  position: fixed;
  left: 0;
  top: 0;
  background-color: var(--sidebar);
  border-right: 1px solid var(--sidebar-border);
  display: flex;
  flex-direction: column;
  z-index: 1000;
}

  /* Ocultar sidebar solo en móviles pequeños, mantenerlo en tablets */
  @media (max-width: 767px) {
    .app-sidebar {
      display: none !important;
    }
    
    .app-main {
      margin-left: 0 !important;
    }
  }
  
  /* Estilos para el botón de Ventas destacado en tablets (768px - 1024px) */
  @media (min-width: 768px) and (max-width: 1024px) {
    /* Botón de Ventas con círculo grande que sobresale */
    .nav-item-ventas {
      position: relative;
      flex-direction: column !important;
      padding: 8px 12px !important;
      margin-bottom: 16px !important;
      background: transparent !important;
      text-align: center !important;
    }
    
    .nav-item-ventas .nav-icon {
      width: 72px !important;
      height: 72px !important;
      background: var(--primary) !important;
      color: var(--primary-foreground) !important;
      border-radius: 50% !important;
      display: flex !important;
      align-items: center !important;
      justify-content: center !important;
      box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25), 0 4px 12px rgba(0, 0, 0, 0.2) !important;
      transform: translateY(-20px) scale(1.15) !important;
      z-index: 10 !important;
      margin: 0 auto 8px !important;
      border: 5px solid var(--background) !important;
      transition: all 0.3s ease !important;
    }
    
    .nav-item-ventas.active .nav-icon {
      background: var(--primary) !important;
      box-shadow: 0 10px 24px rgba(0, 0, 0, 0.3), 0 6px 16px rgba(0, 0, 0, 0.25) !important;
      transform: translateY(-20px) scale(1.2) !important;
    }
    
    .nav-item-ventas.active {
      background: transparent !important;
    }
    
    .nav-item-ventas:hover {
      background: transparent !important;
    }
    
    .nav-item-ventas:hover .nav-icon {
      transform: translateY(-20px) scale(1.25) !important;
    }
  }
  
  /* Para móviles pequeños, aplicar si el sidebar se muestra de alguna manera */
  @media (max-width: 767px) {
    .app-sidebar[style*="display: block"] .nav-item-ventas,
    .app-sidebar:not([style*="display: none"]) .nav-item-ventas {
      position: relative;
      flex-direction: column !important;
      padding: 8px 12px !important;
      margin-bottom: 12px !important;
      background: transparent !important;
      text-align: center !important;
    }
    
    .app-sidebar[style*="display: block"] .nav-item-ventas .nav-icon,
    .app-sidebar:not([style*="display: none"]) .nav-item-ventas .nav-icon {
      width: 64px !important;
      height: 64px !important;
      background: var(--primary) !important;
      color: var(--primary-foreground) !important;
      border-radius: 50% !important;
      display: flex !important;
      align-items: center !important;
      justify-content: center !important;
      box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25), 0 4px 10px rgba(0, 0, 0, 0.2) !important;
      transform: translateY(-16px) scale(1.15) !important;
      z-index: 10 !important;
      margin: 0 auto 8px !important;
      border: 4px solid var(--background) !important;
      transition: all 0.3s ease !important;
    }
    
    .app-sidebar[style*="display: block"] .nav-item-ventas.active .nav-icon,
    .app-sidebar:not([style*="display: none"]) .nav-item-ventas.active .nav-icon {
      background: var(--primary) !important;
      box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3), 0 6px 14px rgba(0, 0, 0, 0.25) !important;
      transform: translateY(-16px) scale(1.2) !important;
    }
  }

.sidebar-header {
  height: 64px;
  display: flex;
  align-items: center;
  padding: 0 24px;
  border-bottom: 1px solid var(--sidebar-border);
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--sidebar-foreground);
}

.logo-icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--primary);
  color: var(--primary-foreground);
  border-radius: 8px;
  font-weight: 700;
  font-size: 18px;
}

.logo-text {
  font-size: 20px;
  font-weight: 700;
  color: var(--sidebar-foreground);
}

.logo-image {
  height: 32px;
  width: auto;
  object-fit: contain;
  display: block;
}

.sidebar-nav {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  margin-bottom: 4px;
  border-radius: 8px;
  text-decoration: none;
  color: var(--sidebar-foreground);
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s;
}

.nav-item:hover {
  background-color: var(--sidebar-accent);
  color: var(--sidebar-accent-foreground);
}

.nav-item.active {
  background-color: var(--sidebar-primary);
  color: var(--sidebar-primary-foreground);
}

.nav-icon {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sidebar-footer {
  padding: 16px;
  border-top: 1px solid var(--sidebar-border);
}

/* Main Content */
.app-main {
  flex: 1;
  margin-left: 256px;
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}

.app-header {
  height: 64px;
  background-color: var(--background);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-search {
  flex: 1;
  max-width: 384px;
  position: relative;
}

/* Estilos para dropdown de búsqueda */
.search-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  max-height: 400px;
  overflow-y: auto;
  z-index: 1000;
}

.search-results {
  padding: 4px;
}

.search-result-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 6px;
  text-decoration: none;
  color: var(--foreground);
  transition: background-color 0.2s;
}

.search-result-item:hover {
  background-color: var(--accent);
}

.search-result-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--secondary);
  border-radius: 6px;
  color: var(--muted-foreground);
}

.search-result-content {
  flex: 1;
  min-width: 0;
}

.search-result-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--foreground);
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-result-title mark {
  background-color: rgba(10, 10, 10, 0.1);
  color: var(--foreground);
  font-weight: 600;
  padding: 0 2px;
  border-radius: 2px;
}

.search-result-subtitle {
  font-size: 12px;
  color: var(--muted-foreground);
  display: flex;
  align-items: center;
  gap: 6px;
}

.search-result-code {
  font-family: "Monaco", "Courier New", monospace;
}

.search-result-separator {
  color: var(--border);
}

.search-result-price {
  font-size: 14px;
  font-weight: 600;
  color: var(--foreground);
}

.search-no-results {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
  text-align: center;
  gap: 8px;
}

.search-no-results p {
  font-size: 14px;
  color: var(--muted-foreground);
  margin: 0;
}

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--muted-foreground);
}

.search-input {
  width: 100%;
  height: 36px;
  padding-left: 36px;
  padding-right: 12px;
  border: 1px solid var(--input);
  border-radius: 8px;
  background-color: var(--background);
  font-size: 14px;
  transition: all 0.2s;
}

.search-input:focus {
  outline: none;
  border-color: var(--ring);
  box-shadow: 0 0 0 3px rgba(10, 10, 10, 0.1);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.header-button {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  border-radius: 8px;
  cursor: pointer;
  color: var(--foreground);
  transition: all 0.2s;
  position: relative;
}

.header-button:hover {
  background-color: var(--accent);
}

.notification-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  background-color: var(--destructive);
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 600;
  color: white;
}

/* Agregando animación de shake para la campanita */
@keyframes bellShake {
  0%, 100% {
    transform: rotate(0deg);
  }
  10%, 30%, 50%, 70%, 90% {
    transform: rotate(-10deg);
  }
  20%, 40%, 60%, 80% {
    transform: rotate(10deg);
  }
}

@keyframes bellPulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}

/* Animación para el badge al actualizarse */
@keyframes badgePop {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.2);
  }
  100% {
    transform: scale(1);
  }
}

/* Clase para activar animación cuando hay notificaciones */
.notification-bell-alert {
  animation: bellShake 1.5s ease-in-out infinite, bellPulse 1.5s ease-in-out infinite;
}

.notification-badge-pulse {
  animation: bellPulse 1.5s ease-in-out infinite;
}

.user-menu {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px;
  border-radius: 8px;
  border: none;
  background: transparent;
  cursor: pointer;
  transition: all 0.2s;
}

.user-menu:hover {
  background-color: var(--accent);
}

.user-menu-container {
  position: relative;
}

.user-menu-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border: none;
  background: transparent;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.user-menu-trigger:hover {
  background-color: var(--accent);
}

.user-menu-dropdown a:hover {
  background-color: var(--accent);
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: var(--primary);
  color: var(--primary-foreground);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
}

.main-content {
  flex: 1;
  padding: 24px;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

/* Global Loader - Deshabilitado (la app nativa ya tiene su propio loader) */
/*
.global-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  backdrop-filter: blur(1px);
  transition: opacity 0.2s ease;
}

.loader-spinner {
  width: 48px;
  height: 48px;
  border: 3px solid rgba(0, 0, 0, 0.08);
  border-top-color: rgba(0, 0, 0, 0.6);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
*/

/* Cards */
.card {
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 2px);
  padding: 24px;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.card-header {
  margin-bottom: 16px;
}

.card-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--card-foreground);
  margin-bottom: 4px;
}

.card-description {
  font-size: 14px;
  color: var(--muted-foreground);
}

.card-content {
  margin-top: 16px;
}

.card-footer {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 2px);
  padding: 24px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.stat-content {
  flex: 1;
}

.stat-label {
  font-size: 14px;
  font-weight: 500;
  color: var(--muted-foreground);
  margin-bottom: 8px;
}

.stat-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--foreground);
  margin-bottom: 4px;
}

.stat-change {
  font-size: 12px;
  font-weight: 500;
}

.stat-change.positive {
  color: var(--success);
}

.stat-change.negative {
  color: var(--destructive);
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(10, 10, 10, 0.05);
  color: var(--primary);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 500;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  white-space: nowrap;
}

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

.btn-primary:hover {
  background-color: rgba(10, 10, 10, 0.9);
}

.btn-secondary {
  background-color: var(--secondary);
  color: var(--secondary-foreground);
}

.btn-secondary:hover {
  background-color: rgba(245, 245, 245, 0.8);
}

.btn-ghost {
  background-color: transparent;
  color: var(--foreground);
}

.btn-ghost:hover {
  background-color: var(--accent);
}

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

.btn-lg {
  padding: 14px 24px;
  font-size: 16px;
}

.btn-destructive {
  background-color: var(--destructive);
  color: var(--destructive-foreground);
}

.btn-destructive:hover {
  background-color: rgba(239, 68, 68, 0.9);
}

/* Code */
code {
  background-color: var(--secondary);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: "Monaco", "Courier New", monospace;
  font-size: 0.9em;
}

/* Forms */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 8px;
  color: var(--foreground);
}

.form-input {
  width: 100%;
  height: 36px;
  padding: 8px 12px;
  border: 1px solid var(--input);
  border-radius: 8px;
  background-color: var(--background);
  font-size: 14px;
  transition: all 0.2s;
}

.form-input:focus {
  outline: none;
  border-color: var(--ring);
  box-shadow: 0 0 0 3px rgba(10, 10, 10, 0.1);
}

/* Login Page */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--secondary);
  padding: 24px;
}

.login-card {
  width: 100%;
  max-width: 400px;
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 2px);
  padding: 32px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.login-header {
  text-align: center;
  margin-bottom: 32px;
}

.login-logo {
  width: 48px;
  height: 48px;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--primary);
  color: var(--primary-foreground);
  border-radius: 12px;
  font-size: 24px;
  font-weight: 700;
}

.login-title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--card-foreground);
}

.login-subtitle {
  font-size: 14px;
  color: var(--muted-foreground);
}

.login-form {
  margin-top: 24px;
}

.login-footer {
  margin-top: 24px;
  text-align: center;
  font-size: 14px;
  color: var(--muted-foreground);
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid transparent;
}

.badge-default {
  background-color: var(--primary);
  color: var(--primary-foreground);
}

.badge-secondary {
  background-color: var(--secondary);
  color: var(--secondary-foreground);
}

.badge-destructive {
  background-color: var(--destructive);
  color: var(--destructive-foreground);
}

.badge-outline {
  border-color: var(--border);
  color: var(--foreground);
}

/* Tables */
.table-container {
  overflow-x: auto;
}

.table {
  width: 100%;
  border-collapse: collapse;
}

.table thead {
  border-bottom: 1px solid var(--border);
}

.table th {
  padding: 12px;
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted-foreground);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.table td {
  padding: 12px;
  font-size: 14px;
  color: var(--foreground);
}

.table tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background-color 0.2s;
}

.table tbody tr:hover {
  background-color: var(--muted);
}

/* Alert */
.alert {
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 16px;
  font-size: 14px;
}

.alert-success {
  background-color: rgba(16, 185, 129, 0.1);
  color: var(--success);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.alert-danger {
  background-color: rgba(239, 68, 68, 0.1);
  color: var(--destructive);
  border: 1px solid rgba(239, 68, 68, 0.2);
}

/* Responsive - Tablets y Móviles */
@media (max-width: 1024px) {
  .app-sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s ease;
  }

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

  .app-main {
    margin-left: 0 !important;
  }

  .header-search {
    max-width: 200px;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  /* Adaptar tablas para móvil */
  .table thead {
    display: none;
  }

  .table, .table tbody, .table tr, .table td {
    display: block;
    width: 100%;
  }

  .table tr {
    margin-bottom: 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px;
    background-color: var(--card);
  }

  .table td {
    text-align: right;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

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

  .table td::before {
    content: attr(data-label);
    font-weight: 600;
    font-size: 12px;
    color: var(--muted-foreground);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-align: left;
  }

  .table td > div {
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  /* Adaptar botones en tablas móviles */
  .table td .btn-sm {
    font-size: 11px;
    padding: 4px 8px;
  }

  /* Main content padding más pequeño en móvil */
  .main-content {
    padding: 16px;
  }

  /* Cards padding más pequeño en móvil */
  .card {
    padding: 16px;
  }

  /* Títulos más pequeños en móvil */
  h1 {
    font-size: 24px !important;
  }

  /* Formularios en una columna en móvil */
  .form-group {
    margin-bottom: 16px;
  }

  /* Venta container responsive */
  .venta-container {
    grid-template-columns: 1fr !important;
  }

  .resumen-panel {
    position: relative !important;
    top: 0 !important;
  }

  /* Ajustar productos venta en móvil */
  .productos-venta {
    max-height: 400px !important;
  }

  /* Dashboard charts grid responsive */
  .dashboard-charts-grid {
    grid-template-columns: 1fr !important;
  }

  /* Dropdowns responsive (notificaciones, usuario y búsqueda) */
  .notifications-dropdown,
  .user-menu-dropdown {
    position: fixed !important;
    top: 64px !important;
    right: 8px !important;
    left: auto !important;
    min-width: 280px !important;
    max-width: calc(100% - 16px) !important;
    width: auto !important;
  }

  .user-menu-dropdown {
    min-width: 260px !important;
    max-height: auto !important;
  }

  .notifications-dropdown {
    max-height: 500px !important;
  }

  /* Ajustar altura de contenido de notificaciones en móvil */
  .notifications-dropdown > div:nth-child(2) {
    max-height: 300px !important;
  }

  /* Search dropdown en móvil */
  .search-dropdown {
    position: fixed !important;
    top: 64px !important;
    right: 8px !important;
    left: 8px !important;
    min-width: auto !important;
    max-width: none !important;
    width: calc(100% - 16px) !important;
    max-height: 60vh !important;
  }

  /* Reducir paddings en dropdowns móviles */
  .notifications-dropdown > div:first-child,
  .user-menu-dropdown > div:first-child {
    padding: 12px !important;
  }

  .notifications-dropdown a,
  .user-menu-dropdown a {
    padding: 10px 12px !important;
  }

  /* Reducir tamaño de iconos en notificaciones móviles */
  .notifications-dropdown a > div > div:first-child {
    width: 32px !important;
    height: 32px !important;
  }

  .notifications-dropdown a i {
    width: 16px !important;
    height: 16px !important;
  }

  /* Header actions - ajustar espaciado en móvil */
  .header-actions {
    gap: 8px;
  }

  /* User menu trigger - ocultar texto en móvil */
  .user-menu-trigger span {
    display: none;
  }

  /* Badge de notificaciones - ajustar tamaño */
  .notification-badge {
    min-width: 18px !important;
    height: 18px !important;
    font-size: 11px !important;
  }
}

/* Bottom Navigation Bar - Solo para móviles y tablets */
.bottom-nav {
  display: none;
}

@media (max-width: 1024px) {
  .bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--background);
    border-top: 1px solid var(--border);
    padding: 8px 0;
    z-index: 1000;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.1);
    justify-content: space-around;
    align-items: center;
    height: 70px;
  }
  
  .bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--muted-foreground);
    flex: 1;
    padding: 8px 4px;
    transition: all 0.2s;
    position: relative;
  }
  
  .bottom-nav-icon-wrapper {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    transition: all 0.2s;
  }
  
  .bottom-nav-icon {
    width: 24px;
    height: 24px;
    transition: all 0.2s;
  }
  
  .bottom-nav-label {
    font-size: 11px;
    margin-top: 4px;
    font-weight: 500;
  }
  
  .bottom-nav-item.active {
    color: var(--primary);
  }
  
  .bottom-nav-item.active .bottom-nav-icon-wrapper {
    background: var(--primary);
    color: var(--primary-foreground);
  }
  
  .bottom-nav-item.active .bottom-nav-icon {
    color: var(--primary-foreground);
  }
  
  /* Botón de Venta destacado en el centro - Círculo grande que sobresale */
  .bottom-nav-center {
    position: relative;
    z-index: 20;
  }
  
  .bottom-nav-center .bottom-nav-icon-wrapper {
    width: 62px !important;
    height: 62px !important;
    background: var(--primary) !important;
    color: var(--primary-foreground) !important;
    border-radius: 50% !important;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35), 0 8px 20px rgba(0, 0, 0, 0.3) !important;
    transform: translateY(-22px) scale(1.25) !important;
    border: 6px solid var(--background) !important;
    z-index: 20 !important;
    position: relative !important;
    transition: all 0.3s ease !important;
  }
  
  .bottom-nav-center .bottom-nav-icon {
     width: 28px !important;
    height: 28px !important;
    color: var(--primary-foreground) !important;
  }
  
  .bottom-nav-center.active .bottom-nav-icon-wrapper {
    background: var(--primary) !important;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4), 0 10px 24px rgba(0, 0, 0, 0.35) !important;
    transform: translateY(-22px) scale(1.3) !important;
  }
  
  .bottom-nav-center:hover .bottom-nav-icon-wrapper {
    transform: translateY(-22px) scale(1.35) !important;
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.45), 0 10px 28px rgba(0, 0, 0, 0.4) !important;
  }
  
  .bottom-nav-center .bottom-nav-label {
    position: absolute;
    bottom: -24px;
    font-size: 11px;
    font-weight: 600;
    color: var(--foreground);
    white-space: nowrap;
    left: 50%;
    transform: translateX(-50%);
  }
  
  .bottom-nav-center.active .bottom-nav-label {
    color: var(--primary);
    font-weight: 700;
  }
  
  /* Ajustar padding del main content para el bottom nav (con espacio extra para el círculo que sobresale) */
  .main-content {
    padding-bottom: 110px !important;
  }
  
  /* Asegurar que el bottom nav tenga altura suficiente para el círculo */
  .bottom-nav {
    height: 75px !important;
    padding-bottom: 20px !important;
  }
}

/* Utilities */
.text-center {
  text-align: center;
}

.text-muted {
  color: var(--muted-foreground);
}

.mt-1 {
  margin-top: 4px;
}
.mt-2 {
  margin-top: 8px;
}
.mt-3 {
  margin-top: 12px;
}
.mt-4 {
  margin-top: 16px;
}
.mb-2 {
  margin-bottom: 8px;
}
.mb-4 {
  margin-bottom: 16px;
}

.gap-2 {
  gap: 8px;
}
.gap-4 {
  gap: 16px;
}
.gap-6 {
  gap: 24px;
}

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

/* ========================================
   Estilos de Impresión
   ======================================== */
@media print {
    /* Ocultar elementos que no deben imprimirse */
    .app-sidebar,
    .app-header,
    .bottom-nav,
    .no-print,
    button,
    .btn,
    .card-footer,
    .form-actions,
    a[href]:not([href^="#"]):not([href^="javascript:"]),
    nav,
    header {
        display: none !important;
    }
    
    /* Asegurar que el contenido sea visible */
    .main-content {
        margin: 0 !important;
        padding: 0 !important;
        width: 100% !important;
    }
    
    /* Estilos para tablas en impresión */
    table {
        border-collapse: collapse !important;
        width: 100% !important;
    }
    
    th, td {
        border: 1px solid #000 !important;
        padding: 8px !important;
    }
    
    /* Asegurar que las tarjetas se impriman correctamente */
    .card {
        border: 1px solid #000 !important;
        page-break-inside: avoid;
    }
    
    /* Evitar saltos de página en elementos importantes */
    .card-header,
    .card-content {
        page-break-inside: avoid;
    }
    
    /* Ajustar fuentes para impresión */
    body {
        font-size: 12pt !important;
        line-height: 1.4 !important;
    }
    
    h1, h2, h3 {
        page-break-after: avoid;
    }
    
    /* Asegurar que las imágenes se impriman */
    img {
        max-width: 100% !important;
        height: auto !important;
    }
}
