/* SODVENT 4.0.1 - Estilos personalizados */

:root {
  --primary: #102454;
  --secondary: #2abba5;
  --accent: #076d5d;
  --light: #d4d6d8;
}

/* Estilos base */
* {
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.6;
  color: #333;
}

/* Botones personalizados */
.btn-primary {
  background-color: var(--primary);
  border-color: var(--primary);
  transition: all 0.3s ease;
}

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

.btn-secondary {
  background-color: var(--secondary);
  border-color: var(--secondary);
  transition: all 0.3s ease;
}

.btn-secondary:hover {
  background-color: var(--accent);
  border-color: var(--accent);
  transform: translateY(-1px);
}

/* Navegación activa */
.nav-active {
  background-color: var(--secondary);
  color: white;
  box-shadow: 0 2px 4px rgba(42, 187, 165, 0.3);
}

/* Cards de módulos */
.module-card {
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.module-card:hover {
  transform: translateY(-4px);
  border-color: var(--secondary);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

/* Formularios */
.form-input {
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  padding: 12px;
  transition: all 0.3s ease;
}

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

/* Tablas */
.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.table-striped tbody tr:nth-child(odd) {
  background-color: #f8f9fa;
}

.table-striped tbody tr:hover {
  background-color: rgba(42, 187, 165, 0.05);
}

/* Modal personalizado */
.modal-overlay {
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

/* Notificaciones toast */
.toast {
  animation: slideInRight 0.3s ease-out;
}

.toast.removing {
  animation: slideOutRight 0.3s ease-in;
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideOutRight {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(100%);
    opacity: 0;
  }
}

/* Loading spinner */
.loading-spinner {
  animation: spin 1s linear infinite;
}

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

/* Responsive específico para Tecno K15Q */
@media (max-width: 720px) and (max-height: 1612px) {
  /* Header más compacto */
  header .container {
    padding: 0.75rem 1rem;
  }
  
  header h1 {
    font-size: 1.125rem;
  }
  
  header p {
    font-size: 0.75rem;
  }
  
  /* Navegación horizontal scrollable */
  #main-nav {
    padding: 0.5rem 0;
    gap: 0.25rem;
  }
  
  #main-nav button {
    padding: 0.5rem 0.75rem;
    font-size: 0.75rem;
    min-width: fit-content;
    white-space: nowrap;
  }
  
  /* Grid de módulos más compacto */
  .mobile-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }
  
  .module-card {
    padding: 1rem;
  }
  
  .module-card i {
    font-size: 2rem !important;
    margin-bottom: 0.75rem !important;
  }
  
  .module-card h3 {
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
  }
  
  .module-card p {
    font-size: 0.75rem;
    line-height: 1.3;
  }
  
  /* Formularios más accesibles */
  .form-input {
    padding: 0.875rem;
    font-size: 0.875rem;
  }
  
  /* Botones más grandes para touch */
  button {
    min-height: 44px;
    padding: 0.75rem 1rem;
  }
  
  /* Tablas responsivas */
  .table-responsive {
    font-size: 0.75rem;
  }
  
  .table-responsive th,
  .table-responsive td {
    padding: 0.5rem 0.25rem;
  }
  
  /* Modal full-screen en móvil */
  .modal-overlay .bg-white {
    margin: 1rem;
    max-height: calc(100vh - 2rem);
  }
  
  /* Footer más compacto */
  footer {
    padding: 1rem 0;
  }
  
  footer p {
    font-size: 0.75rem;
  }
}

/* Landscape orientation para dispositivos móviles */
@media (max-height: 500px) and (orientation: landscape) {
  header .container {
    padding: 0.5rem 1rem;
  }
  
  header h1 {
    font-size: 1rem;
  }
  
  #main-nav {
    padding: 0.25rem 0;
  }
  
  main {
    padding: 1rem;
  }
  
  .module-card {
    padding: 0.75rem;
  }
}

/* Estados de carga */
.loading {
  position: relative;
  overflow: hidden;
}

.loading::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(42, 187, 165, 0.2),
    transparent
  );
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  0% {
    left: -100%;
  }
  100% {
    left: 100%;
  }
}

/* Elementos disabled */
.disabled {
  opacity: 0.6;
  pointer-events: none;
  cursor: not-allowed;
}

/* Estados de éxito y error */
.success {
  border-color: #22c55e !important;
  background-color: rgba(34, 197, 94, 0.05);
}

.error {
  border-color: #ef4444 !important;
  background-color: rgba(239, 68, 68, 0.05);
}

/* Scroll personalizado */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: var(--light);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
}

/* Print styles */
@media print {
  .no-print {
    display: none !important;
  }
  
  body {
    background: white !important;
    color: black !important;
  }
  
  .bg-primary,
  .bg-secondary,
  .bg-accent {
    background: white !important;
    color: black !important;
  }
}