
/* ====================================
   Sistema de Gestión RRHH e Inventario TI
   ==================================== */

/* Variables CSS */
:root {
  --primary-color: #2a2a85;
  --secondary-color: #6c757d;
  --success-color: #28a745;
  --danger-color: #dc3545;
  --warning-color: #ffc107;
  --info-color: #17a2b8;
  --light-color: #f8f9fa;
  --dark-color: #1f2060;
  
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  
  --border-radius: 4px;
  --box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  --transition: all 0.3s ease;
}

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

html {
  scroll-behavior: smooth;
}

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

h1, h2, h3, h4, h5, h6 {
  margin-bottom: var(--spacing-md);
  font-weight: 600;
  line-height: 1.2;
}

a {
  text-decoration: none;
  color: var(--primary-color);
  transition: var(--transition);
}

a:hover {
  color: #1f1f6e;
}

/* Container */
.container {
  max-width: 1600px;
  margin: 0 auto;
  padding: var(--spacing-xl);
}

/* Container Responsive */
@media (max-width: 968px) {
  .container {
    padding: 1.5rem;
  }
}

@media (max-width: 576px) {
  .container {
    padding: 1rem;
  }
}

/* Navbar */
.navbar {
  background: #fff;
  box-shadow: var(--box-shadow);
  padding: 0.4rem var(--spacing-md);
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
}

.navbar-menu {
  display: flex;
  list-style: none;
  gap: 0.25rem;
  font-size: 0.85rem;
}

.navbar-menu a {
  padding: 0.3rem 0.55rem;
  border-radius: var(--border-radius);
  transition: var(--transition);
  font-size: 0.85rem;
}

.navbar-menu a i { font-size: 0.85rem; }

.navbar-menu a:hover {
  background: var(--light-color);
}

/* ── Navbar Dropdown ── */
.nav-dropdown {
  position: relative;
}

.nav-dropdown-toggle {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.85rem;
  font-family: inherit;
  color: #333;
  padding: 0.3rem 0.55rem;
  border-radius: var(--border-radius);
  display: flex;
  align-items: center;
  gap: 4px;
  transition: var(--transition);
  white-space: nowrap;
}

.nav-dropdown-toggle:hover {
  background: var(--light-color);
}

.nav-caret {
  font-size: 0.7rem;
  transition: transform 0.2s ease;
}

.nav-dropdown.open .nav-caret {
  transform: rotate(180deg);
}

.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
  list-style: none;
  min-width: 210px;
  padding: 6px 0;
  z-index: 500;
  border: 1px solid #e9ecef;
}

.nav-dropdown.open .nav-dropdown-menu {
  display: block;
}

.nav-dropdown-menu li a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  color: #333;
  font-size: 0.9rem;
  border-radius: 0;
  white-space: nowrap;
}

.nav-dropdown-menu li a:hover {
  background: #f0f4ff;
  color: var(--primary-color);
}

.nav-dropdown-menu li a i {
  width: 16px;
  text-align: center;
  color: var(--secondary-color);
}

.nav-dropdown-menu li a:hover i {
  color: var(--primary-color);
}

.dropdown-divider {
  border-top: 1px solid #e9ecef;
  margin: 4px 0;
}

.navbar-user {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

.user-role {
  color: var(--secondary-color);
  font-size: 0.875rem;
}

.btn-logout {
  padding: 0.3rem 0.6rem;
  background: var(--danger-color);
  color: white;
  border-radius: var(--border-radius);
  transition: var(--transition);
  font-size: 0.85rem;
}

.btn-logout:hover {
  background: #c82333;
  color: white;
}

/* Navbar Toggle (Hamburger) */
.navbar-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 1001;
}

.navbar-toggle span {
  width: 28px;
  height: 3px;
  background: var(--primary-color);
  border-radius: 3px;
  transition: all 0.3s ease;
}

.navbar-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(8px, 8px);
}

.navbar-toggle.active span:nth-child(2) {
  opacity: 0;
}

.navbar-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -7px);
}

/* Buttons */
.btn {
  display: inline-block;
  padding: var(--spacing-sm) var(--spacing-lg);
  border: none;
  border-radius: var(--border-radius);
  cursor: pointer;
  font-size: 1rem;
  transition: var(--transition);
  text-align: center;
}

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

.btn-primary:hover {
  background: #1f1f6e;
  color: white;
}

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

.btn-success:hover {
  background: #218838;
  color: white;
}

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

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

.btn-delete-user {
  background: #b71c1c;
  color: white;
}

.btn-delete-user:hover {
  background: #7f0000;
  color: white;
}

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

.btn-secondary:hover {
  background: #5a6268;
  color: white;
}

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

.btn-info:hover {
  background: #138496;
  color: white;
}

.btn-warning {
  background: var(--warning-color);
  color: #333;
}

.btn-warning:hover {
  background: #e0a800;
  color: #333;
}

.btn-small, .btn-sm {
  padding: var(--spacing-xs) var(--spacing-sm);
  font-size: 0.875rem;
}

.btn-large {
  padding: var(--spacing-md) var(--spacing-xl);
  font-size: 1.125rem;
}

.btn-block {
  width: 100%;
}

/* Alerts */
.alert {
  padding: var(--spacing-md);
  border-radius: var(--border-radius);
  margin-bottom: var(--spacing-md);
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  transition: opacity 0.3s ease;
}

.alert-error,
.alert-danger {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.alert-success {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.alert-warning {
  background: #fff3cd;
  color: #856404;
  border: 1px solid #ffeaa7;
}

.alert-info {
  background: #d1ecf1;
  color: #0c5460;
  border: 1px solid #bee5eb;
}

/* Alerta flotante centrada */
.alert-floating {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 9999;
  min-width: 400px;
  max-width: 600px;
  padding: 1.5rem 2rem;
  font-size: 1.1rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  animation: slideDown 0.5s ease-out;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translate(-50%, -60%);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%);
  }
}

@media (max-width: 576px) {
  .alert-floating {
    min-width: 90%;
    max-width: 90%;
  }
}

/* Login Page */
.login-page {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background: linear-gradient(135deg, #2a2a85 0%, #cc0986 100%);
}

.login-container {
  width: 100%;
  max-width: 450px;
  padding: var(--spacing-xl);
}

.login-card {
  background: white;
  border-radius: 8px;
  padding: var(--spacing-xl);
  box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.login-header {
  text-align: center;
  margin-bottom: var(--spacing-xl);
}

.login-header i {
  font-size: 3rem;
  color: var(--primary-color);
  margin-bottom: var(--spacing-md);
}

.login-header h1 {
  font-size: 2rem;
  margin: var(--spacing-sm) 0;
  color: var(--text-color);
}

.login-header p {
  color: var(--secondary-color);
  margin: 0;
  font-size: 1.125rem;
}

.login-footer {
  margin-top: var(--spacing-lg);
  text-align: center;
  padding-top: var(--spacing-lg);
  border-top: 1px solid #e9ecef;
}

.login-footer p {
  color: var(--secondary-color);
  font-size: 0.875rem;
  margin: 0;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-lg);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xs);
}

.form-group label {
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
}

.form-group input, .form-group select, .form-group textarea {
  padding: var(--spacing-sm) var(--spacing-md);
  border: 1px solid #ddd;
  border-radius: var(--border-radius);
  font-size: 1rem;
}

.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
}

.form-group .form-value {
  padding: var(--spacing-sm) 0;
  font-size: 1rem;
  color: #333;
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
}

.form-group .form-value i {
  color: var(--primary-color);
}

.form-group .form-value strong {
  color: var(--primary-color);
}

.recaptcha-container {
  display: flex;
  justify-content: center;
}

/* Tables */
.table-container {
  background: white;
  border-radius: var(--border-radius);
  padding: var(--spacing-lg);
  box-shadow: var(--box-shadow);
  overflow-x: auto;
}

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

.data-table thead {
  background: linear-gradient(135deg, #2a2a85 0%, #cc0986 100%);
  color: white;
}

.data-table thead tr {
  width: 100%;
}

.data-table th {
  padding: var(--spacing-md);
  text-align: left;
  font-weight: 600;
  border-bottom: 2px solid #dee2e6;
  white-space: nowrap;
}

.data-table th i {
  margin-right: 0.5rem;
}

.data-table td {
  padding: var(--spacing-md);
  border-bottom: 1px solid #dee2e6;
  vertical-align: middle;
}

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

.no-data {
  text-align: center;
  padding: var(--spacing-xl);
  color: var(--secondary-color);
}

.actions {
  display: flex;
  gap: var(--spacing-sm);
  flex-wrap: wrap;
}

.data-table .actions .btn-sm {
  padding: 0.2rem 0.45rem;
  font-size: 0.7rem;
  border-radius: 12px;
  line-height: 1;
}

/* ── Responsive Table: Card Layout on Mobile ── */
@media (max-width: 768px) {
  .table-container {
    padding: 0.75rem;
  }

  .data-table thead,
  .catalog-table thead,
  .prov-table thead {
    display: none;
  }

  .data-table,
  .data-table tbody,
  .data-table tr,
  .data-table td,
  .catalog-table,
  .catalog-table tbody,
  .catalog-table tr,
  .catalog-table td,
  .prov-table,
  .prov-table tbody,
  .prov-table tr,
  .prov-table td {
    display: block;
    width: 100%;
  }

  .data-table tr,
  .catalog-table tr,
  .prov-table tr {
    margin-bottom: 1rem;
    border: 1px solid #dee2e6;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
  }

  .data-table tbody tr:hover,
  .catalog-table tbody tr:hover,
  .prov-table tbody tr:hover {
    background: #f8f9fa;
  }

  .data-table td,
  .catalog-table td,
  .prov-table td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 1rem;
    border-bottom: 1px solid #f0f0f0;
    text-align: right;
    gap: 0.5rem;
  }

  .data-table td:last-child,
  .catalog-table td:last-child,
  .prov-table td:last-child {
    border-bottom: none;
  }

  .data-table td::before,
  .catalog-table td::before,
  .prov-table td::before {
    content: attr(data-label);
    font-weight: 600;
    color: #495057;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    flex-shrink: 0;
    white-space: nowrap;
  }

  .data-table td .badge,
  .data-table td .status,
  .catalog-table td .badge,
  .prov-table td .badge {
    font-size: 0.7rem;
  }

  .no-data {
    justify-content: center;
  }

  .no-data::before {
    content: none !important;
  }
}

/* ── Action Buttons Stack on Small Screens ── */
@media (max-width: 576px) {
  .data-table .actions {
    flex-direction: column;
    width: 100%;
  }

  .data-table .actions .btn-sm {
    width: 100%;
    text-align: center;
    justify-content: center;
    padding: 0.5rem;
  }

  .filter-group select,
  .filter-group input {
    width: 100% !important;
  }

  .page-header .btn {
    width: 100%;
    text-align: center;
    justify-content: center;
  }

  .page-header > div {
    flex-direction: column;
    width: 100%;
  }
}

/* Badges and Status */
.badge {
  display: inline-block;
  padding: var(--spacing-xs) var(--spacing-sm);
  border-radius: var(--border-radius);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

.badge-admin {
  background: #6f42c1;
  color: white;
}

.badge-rh {
  background: #20c997;
  color: white;
}

.badge-ti {
  background: #17a2b8;
  color: white;
}

.badge-colaborador {
  background: #6c757d;
  color: white;
}

.badge-lider {
  background: #e83e8c;
  color: white;
}

.badge-prospecto {
  background: #fd7e14;
  color: white;
}

.badge-success {
  background: #28a745;
  color: white;
}

.badge-warning {
  background: #ffc107;
  color: #333;
}

.badge-danger {
  background: #dc3545;
  color: white;
}

.badge-secondary {
  background: #6c757d;
  color: white;
}

/* Text Utilities */
.text-warning {
  color: #ffc107 !important;
}

.text-danger {
  color: #dc3545 !important;
}

.text-muted {
  color: #6c757d !important;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-xs);
  padding: var(--spacing-xs) var(--spacing-sm);
  border-radius: var(--border-radius);
  font-size: 0.875rem;
}

.status-active {
  background: #d4edda;
  color: #155724;
}

.status-inactive {
  background: #f8d7da;
  color: #721c24;
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  justify-content: center;
  align-items: center;
  z-index: 2000;
}

.modal-content {
  background: white;
  padding: var(--spacing-xl);
  border-radius: var(--border-radius);
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-actions {
  display: flex;
  gap: var(--spacing-md);
  margin-top: var(--spacing-lg);
}

/* Footer */
.footer {
  background: #ffffff;
  color: #333;
  text-align: center;
  padding: var(--spacing-lg);
  margin-top: auto;
  border-top: 1px solid #e0e0e0;
}

/* Dashboard */
.dashboard-header {
  background: linear-gradient(135deg, #2a2a85 0%, #cc0986 100%);
  padding: 2rem;
  border-radius: 12px;
  margin-bottom: 2rem;
  color: white;
  box-shadow: 0 4px 12px rgba(42, 42, 133, 0.3);
  width: 100%;
  box-sizing: border-box;
}

.dashboard-header h1 {
  margin: 0 0 0.5rem 0;
  font-size: 2rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.dashboard-header h1 i {
  font-size: 1.75rem;
}

.dashboard-header p {
  margin: 0;
  opacity: 0.95;
  font-size: 1rem;
}

/* Dashboard Header Responsive */
@media (max-width: 968px) {
  .dashboard-header {
    padding: 1.5rem;
    margin-bottom: 1.5rem;
  }
  
  .dashboard-header h1 {
    font-size: 1.5rem;
    gap: 0.75rem;
  }
  
  .dashboard-header h1 i {
    font-size: 1.5rem;
  }
  
  .dashboard-header p {
    font-size: 0.9rem;
  }
}

@media (max-width: 576px) {
  .dashboard-header {
    padding: 1rem;
    margin-bottom: 1rem;
  }
  
  .dashboard-header h1 {
    font-size: 1.25rem;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  
  .dashboard-header p {
    font-size: 0.85rem;
  }
}

/* Page Actions */
.page-actions {
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
}

.page-actions .btn {
  padding: 0.875rem 1.75rem;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(42, 42, 133, 0.2);
}

.page-actions .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(42, 42, 133, 0.3);
}

/* Dashboard Layout 80/20 */
.dashboard-layout {
  display: grid;
  grid-template-columns: 1fr 150px;
  gap: 1.5rem;
  align-items: start;
}

.dashboard-main {
  min-width: 0;
}

.dashboard-sidebar {
  position: sticky;
  top: 2rem;
  min-width: 150px;
}

/* Responsive: Tablet y móvil */
@media (max-width: 968px) {
  .dashboard-layout {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .dashboard-sidebar {
    position: static;
    min-width: auto;
  }
  
  .sidebar-actions {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
  }
  
  .sidebar-action-btn {
    padding: 0.6rem 0.3rem;
    font-size: 0.7rem;
  }
  
  .sidebar-action-btn i {
    font-size: 1.2rem;
  }
}

@media (max-width: 576px) {
  .sidebar-actions {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Sidebar Styles */
.sidebar-section {
  background: white;
  padding: 1rem;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.sidebar-section h3 {
  font-size: 0.9rem;
  margin: 0 0 1rem 0;
  color: #2c3e50;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #f0f0f0;
}

.sidebar-section h3 i {
  color: #2a2a85;
}

.sidebar-actions {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.sidebar-action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  padding: 0.8rem 0.5rem;
  border-radius: 10px;
  text-decoration: none;
  color: white;
  transition: all 0.3s ease;
  border: none;
  font-weight: 600;
  font-size: 0.75rem;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  text-align: center;
}

.sidebar-action-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.sidebar-action-btn i {
  font-size: 1.5rem;
}

.sidebar-action-btn.btn-primary {
  background: linear-gradient(135deg, #2a2a85 0%, #cc0986 100%);
}

.sidebar-action-btn.btn-success {
  background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
}

.sidebar-action-btn.btn-info {
  background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
}

.sidebar-action-btn.btn-warning {
  background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
}

/* Acciones rápidas en dashboard-section (modo horizontal) */
.dashboard-section .sidebar-actions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin-top: 1rem;
  width: 100%;
  box-sizing: border-box;
}

.dashboard-section .sidebar-action-btn {
  padding: 1.5rem 1rem;
  width: 100%;
  box-sizing: border-box;
}

@media (max-width: 968px) {
  .dashboard-section .sidebar-actions {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 576px) {
  .dashboard-section .sidebar-actions {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.8rem;
  }
  
  .dashboard-section .sidebar-action-btn {
    padding: 1rem 0.5rem;
  }
}

.asistencia-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-xl);
  width: 100%;
}

.registro-card {
  background: white;
  padding: var(--spacing-xl);
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  text-align: center;
  width: 100%;
  box-sizing: border-box;
}

.fecha-actual {
  font-size: 1.125rem;
  color: var(--secondary-color);
  margin-bottom: var(--spacing-lg);
}

.registro-info {
  background: var(--light-color);
  padding: var(--spacing-md);
  border-radius: var(--border-radius);
  margin-bottom: var(--spacing-lg);
  width: 100%;
  box-sizing: border-box;
}

.registro-completado {
  background: #d4edda;
  padding: var(--spacing-xl);
  border-radius: var(--border-radius);
  border: 2px solid #28a745;
  width: 100%;
  box-sizing: border-box;
}

.registro-completado i {
  font-size: 3rem;
  color: #28a745;
  margin-bottom: var(--spacing-md);
}

.historial-reciente {
  background: white;
  padding: var(--spacing-xl);
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  width: 100%;
  box-sizing: border-box;
}

.registros-list {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-lg);
}

.registro-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--spacing-md);
  background: var(--light-color);
  border-radius: var(--border-radius);
}

/* Filters */
.filters-panel {
  background: white;
  padding: var(--spacing-lg);
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  margin-bottom: var(--spacing-lg);
}

.filters-form {
  display: flex;
  gap: var(--spacing-lg);
  align-items: end;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xs);
}

/* Page Header */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--spacing-xl);
}

/* Dashboard Admin */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1.5rem;
  margin-bottom: 2rem;
}

@media (max-width: 1400px) {
  .stats-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 968px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
}

@media (max-width: 576px) {
  .stats-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
}

.stat-card {
  background: white;
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: all 0.3s ease;
  border: 1px solid #f0f0f0;
}

.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.12);
  border-color: #2a2a85;
}

.stat-icon {
  width: 64px;
  height: 64px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.75rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.stat-content {
  flex: 1;
}

.stat-content h3 {
  font-size: 1.75rem;
  margin: 0 0 0.25rem 0;
  color: #2c3e50;
  font-weight: 700;
}

.stat-content p {
  margin: 0;
  color: #7f8c8d;
  font-size: 0.9rem;
  font-weight: 500;
}

/* Stat Card Responsive */
@media (max-width: 968px) {
  .stat-card {
    padding: 1rem;
    gap: 0.75rem;
  }
  
  .stat-icon {
    width: 48px;
    height: 48px;
    font-size: 1.25rem;
  }
  
  .stat-content h3 {
    font-size: 1.25rem;
  }
  
  .stat-content p {
    font-size: 0.8rem;
  }
  
  .stat-link {
    font-size: 0.75rem;
  }
}

@media (max-width: 576px) {
  .stat-card {
    padding: 0.75rem;
  }
  
  .stat-icon {
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }
  
  .stat-content h3 {
    font-size: 1.125rem;
  }
}

.quick-actions {
  background: white;
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.quick-actions h2 {
  margin-bottom: 1.5rem;
  color: #333;
}

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

.action-card {
  padding: 1.5rem;
  border: 2px solid #e9ecef;
  border-radius: 12px;
  text-align: center;
  transition: all 0.3s ease;
  text-decoration: none;
  color: #333;
  background: white;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.action-card:hover {
  border-color: #2a2a85;
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(42, 42, 133, 0.15);
}

.action-icon {
  width: 80px;
  height: 80px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 2rem;
  margin-bottom: 1rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.action-card i {
  font-size: 2.5rem;
  color: #2a2a85;
  margin-bottom: 1rem;
  display: block;
}

.action-card h3 {
  font-size: 1.125rem;
  margin-bottom: 0.5rem;
  color: #2c3e50;
  font-weight: 600;
}

.action-card p {
  margin: 0;
  color: #7f8c8d;
  font-size: 0.875rem;
}

/* Dashboard Sections */
.dashboard-section {
  background: white;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  margin-bottom: 2rem;
  width: 100%;
  box-sizing: border-box;
}

.dashboard-section h2 {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  color: #2c3e50;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.dashboard-section h2 i {
  color: #2a2a85;
}

.welcome-text {
  font-size: 1rem;
  color: #666;
  margin-top: 0.5rem;
}

/* Dashboard Section Responsive */
@media (max-width: 968px) {
  .dashboard-section {
    padding: 1.5rem;
    margin-bottom: 1.5rem;
  }
  
  .dashboard-section h2 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
  }
}

@media (max-width: 576px) {
  .dashboard-section {
    padding: 1rem;
    margin-bottom: 1rem;
  }
  
  .dashboard-section h2 {
    font-size: 1.125rem;
  }
}

/* Modules Grid */
.modules-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

@media (max-width: 968px) {
  .modules-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 576px) {
  .modules-grid {
    grid-template-columns: 1fr;
  }
}

.module-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s ease;
  border: 2px solid #e9ecef;
  display: flex;
  flex-direction: column;
}

.module-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

.module-header {
  padding: 1.25rem 1.5rem;
  background: linear-gradient(135deg, #2a2a85 0%, #cc0986 100%);
  color: white;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.module-card.module-rh .module-header {
  background: linear-gradient(135deg, #2a2a85 0%, #cc0986 100%);
}

.module-card.module-ti .module-header {
  background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
}

.module-card.module-asistencia .module-header {
  background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
}

.module-card.module-reportes .module-header {
  background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
}

.module-header i {
  font-size: 2rem;
}

.module-header h3 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
}

.module-body {
  padding: 1.5rem;
}

.module-body p {
  color: #666;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.module-actions {
  list-style: none;
  padding: 0;
  margin: 0;
}

.module-actions li {
  margin-bottom: 0.5rem;
}

.module-actions a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.75rem;
  color: #495057;
  text-decoration: none;
  border-radius: 6px;
  transition: all 0.2s ease;
  font-size: 0.9rem;
}

.module-actions a:hover {
  background: #f8f9fa;
  color: #2a2a85;
  padding-left: 1rem;
}

.module-actions a i {
  color: #2a2a85;
  font-size: 0.9rem;
}

/* Module Card Responsive */
@media (max-width: 968px) {
  .module-header {
    padding: 1rem 1.25rem;
  }
  
  .module-header h3 {
    font-size: 1.125rem;
  }
  
  .module-body {
    padding: 1.25rem;
  }
  
  .module-body p {
    font-size: 0.85rem;
  }
  
  .module-actions a {
    font-size: 0.85rem;
    padding: 0.4rem 0.6rem;
  }
}

@media (max-width: 576px) {
  .module-header {
    padding: 0.875rem 1rem;
  }
  
  .module-header h3 {
    font-size: 1rem;
  }
  
  .module-header i {
    font-size: 1.125rem;
  }
  
  .module-body {
    padding: 1rem;
  }
}

/* Quick Actions Grid */
.quick-actions-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

@media (max-width: 968px) {
  .quick-actions-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 576px) {
  .quick-actions-grid {
    grid-template-columns: 1fr;
  }
}

.quick-action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding: 1.5rem;
  border-radius: 10px;
  text-decoration: none;
  color: white;
  transition: all 0.3s ease;
  border: none;
  font-weight: 600;
}

.quick-action-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.15);
}

.quick-action-btn i {
  font-size: 2rem;
}

.quick-action-btn span {
  font-size: 0.95rem;
}

.quick-action-btn.btn-primary {
  background: linear-gradient(135deg, #2a2a85 0%, #cc0986 100%);
}

.quick-action-btn.btn-success {
  background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
}

.quick-action-btn.btn-info {
  background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
}

.quick-action-btn.btn-warning {
  background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
}

/* Stat Card Links */
.stat-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
  color: #2a2a85;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.stat-link:hover {
  gap: 0.75rem;
  color: #cc0986;
}

.stat-link i {
  font-size: 0.75rem;
}

/* Utility classes */
.text-muted {
  color: #6c757d;
}

/* Reportes */
.reportes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
  width: 100%;
}

.reporte-card {
  background: white;
  border-radius: 8px;
  padding: 2rem;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  width: 100%;
  box-sizing: border-box;
}

.reporte-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid #e9ecef;
  width: 100%;
}

.reporte-header i {
  font-size: 2rem;
  color: var(--primary-color);
}

.reporte-header h2 {
  margin: 0;
  font-size: 1.5rem;
  color: #333;
}

.reporte-card > p {
  color: #666;
  margin-bottom: 1.5rem;
  line-height: 1.6;
  width: 100%;
}

.reporte-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
}

.info-panel {
  background: #e7f3ff;
  border-left: 4px solid #2a2a85;
  padding: 1.5rem;
  border-radius: 4px;
  display: flex;
  gap: 1rem;
  width: 100%;
  box-sizing: border-box;
}

.info-panel i {
  font-size: 1.5rem;
  color: #2a2a85;
  flex-shrink: 0;
}

.info-panel h3 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  color: #333;
}

.info-panel ul {
  margin: 0;
  padding-left: 1.5rem;
}

.info-panel li {
  margin-bottom: 0.5rem;
  color: #555;
}

/* Tabs */
.tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 2rem;
  border-bottom: 2px solid #e9ecef;
}

.tab-btn {
  padding: 1rem 1.5rem;
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  color: #6c757d;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.tab-btn:hover {
  color: var(--primary-color);
  background: #f8f9fa;
}

.tab-btn.active {
  color: var(--primary-color);
  border-bottom-color: var(--primary-color);
  background: white;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* Form Card */
.form-card {
  background: white;
  border-radius: 8px;
  padding: 2rem;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  margin-bottom: 2rem;
  width: 100%;
  box-sizing: border-box;
}

.form-card h2 {
  margin-top: 0;
  margin-bottom: 1.5rem;
  color: #333;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid #e9ecef;
}

.form-card h2:not(:first-of-type) {
  margin-top: 2rem;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.form-actions {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
}

/* Responsive */
@media (max-width: 968px) {
  .navbar {
    flex-wrap: wrap;
    padding: 1rem 1.5rem;
  }
  
  .navbar-toggle {
    display: flex;
    order: 3;
  }
  
  .navbar-brand {
    order: 1;
  }
  
  .navbar-user {
    order: 2;
    margin-left: auto;
    margin-right: 3rem;
  }
  
  .navbar-menu {
    order: 4;
    flex-direction: column;
    width: 100%;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: white;
    margin: 0;
    padding: 0;
  }
  
  .navbar-menu.active {
    max-height: 600px;
    padding: 1rem 0;
    border-top: 1px solid #e9ecef;
  }
  
  .navbar-menu li {
    width: 100%;
  }
  
  .navbar-menu a {
    display: block;
    padding: 0.75rem 1rem;
    border-left: 3px solid transparent;
  }
  
  .navbar-menu a:hover {
    background: #f8f9fa;
    border-left-color: var(--primary-color);
  }

  /* Dropdowns en mobile: accordion inline */
  .nav-dropdown { position: static; }

  .nav-dropdown-toggle {
    width: 100%;
    padding: 0.75rem 1rem;
    border-left: 3px solid transparent;
    border-radius: 0;
    justify-content: flex-start;
  }

  .nav-dropdown-toggle:hover {
    background: #f8f9fa;
    border-left-color: var(--primary-color);
  }

  .nav-dropdown-menu {
    position: static;
    box-shadow: none;
    border: none;
    border-radius: 0;
    background: #f8f9fa;
    padding: 0;
    min-width: unset;
  }

  .nav-dropdown.open .nav-dropdown-menu {
    display: block;
  }

  .nav-dropdown-menu li a {
    padding: 0.65rem 1rem 0.65rem 2rem;
    border-left: 3px solid transparent;
    font-size: 0.88rem;
  }

  .nav-dropdown-menu li a:hover {
    border-left-color: var(--primary-color);
  }

  .dropdown-divider {
    margin: 2px 0;
  }
  
  .navbar-user span {
    display: none;
  }
  
  .navbar-user .user-role {
    display: none;
  }
  
  .btn-logout {
    padding: 0.5rem;
  }
  
  .btn-logout i {
    margin: 0;
  }
  
  .btn-logout span {
    display: none;
  }
  
  .asistencia-panel {
    grid-template-columns: 1fr;
  }

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

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

  .tabs {
    flex-direction: column;
  }

  .tab-btn {
    text-align: left;
  }
}

/* Código legacy de .container eliminado para evitar conflictos */

.logo {
    height: 60px;
}

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 1px solid #d5d5f0;
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
}

.menu-toggle span {
    width: 20px;
    height: 2px;
    background: #2a2a85;
    border-radius: 999px;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.menu-toggle.is-active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.menu-toggle.is-active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.is-active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

nav ul {
    list-style: none;
    display: flex;
    gap: 1rem;
}
nav a {
    color: #2a2a85;
    text-decoration: none;
    font-weight: bold;
}
nav a:hover {
    color: #cc0986;
}
.hero {
    background: url('../img/zil.jpg') no-repeat center center/cover;
    color: #fff;
    padding: 100px 20px;
    text-align: center;
}
.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    text-shadow: 0 6px 18px rgba(0, 0, 0, 0.45), 0 2px 6px rgba(0, 0, 0, 0.35);
}
.hero-content {
    max-width: 900px;
    margin: 0 auto;
}
.hero-flag {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.3rem 0.9rem;
    border-radius: 999px;
    background: rgba(225, 0, 115, 0.12);
    color: #cc0986;
    font-weight: 700;
    letter-spacing: 0.05em;
    margin-bottom: 0.4rem;
}
.hero-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}
.hero-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 1.6rem;
    border-radius: 999px;
    font-weight: 700;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.hero-action.primary {
    background: #cc0986;
    color: #fff;
    box-shadow: 0 6px 16px rgba(225, 0, 115, 0.3);
}
.hero-action.secondary {
    border: 1px solid #cc0986;
    color: #cc0986;
}
.hero-action:hover {
    transform: translateY(-2px);
}
.hero-content p {
    font-size: 1.3rem;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.page-layout {
    display: flex;
    justify-content: center;
    gap: 1rem;
    padding-bottom: 3rem;
}

.layout-side {
    flex: 0 0 20%;
    max-width: 20%;
}

.layout-center {
    flex: 1 1 60%;
    max-width: 60%;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

@media (max-width: 1024px) {
    .layout-side {
        display: none;
    }

    .layout-center {
        max-width: 100%;
    }
}
.info-section {
    padding: 3rem 2rem;
    background: #fff;
}
.info-section.alt {
    background: #eaeaea;
}
.services {
    background: #fff;
    padding: 3rem 2rem;
}
.service-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(220px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

#resultados .service-grid {
    grid-template-columns: repeat(2, minmax(240px, 1fr));
}

#seguimiento .service-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 960px) {
    .service-grid {
        grid-template-columns: repeat(2, minmax(220px, 1fr));
    }
}

@media (max-width: 640px) {
    .service-grid {
        grid-template-columns: 1fr;
    }

    #seguimiento .service-grid,
    #resultados .service-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    header .container {
        position: relative;
    }

    .menu-toggle {
        display: inline-flex;
    }

    .main-nav {
        position: absolute;
        top: calc(100% + 10px);
        right: 0;
        width: min(290px, 92vw);
        background: #fff;
        border: 1px solid #d9e0f2;
        border-radius: 12px;
        box-shadow: 0 14px 30px rgba(23, 37, 84, 0.15);
        padding: 0.55rem;
        display: none;
        z-index: 1100;
    }

    .main-nav.is-open {
        display: block;
    }

    .main-nav ul {
        display: flex;
        flex-direction: column;
        gap: 0.2rem;
        margin: 0;
        padding: 0;
    }

    .main-nav a {
        display: block;
        border-radius: 8px;
        padding: 0.7rem 0.75rem;
    }

    .main-nav a:hover {
        background: #f3f6ff;
    }
}
.card {
    background: #f9f9f9;
    padding: 2rem;
    text-align: center;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    min-width: 210px;
}
.card i {
    font-size: 2rem;
    color: #cc0986;
    margin-bottom: 0.5rem;
}

.clients {
    position: relative;
}

.clients p {
    margin-top: 0.4rem;
    color: #3a4666;
}

.client-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(120px, 1fr));
    gap: 0.85rem;
    margin-top: 1.4rem;
}

.client-item {
    background: #fff;
    border: 1px solid #e2e8f3;
    border-radius: 12px;
    min-height: 92px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.65rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.client-item--on-dark {
    background: linear-gradient(135deg, #1a2554 0%, #26367c 100%);
    border-color: #30448f;
}

.client-item--on-dark .client-logo {
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.35));
}

.client-item--uninet {
    overflow: hidden;
}

.client-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 22px rgba(29, 44, 95, 0.12);
}

.client-logo {
    max-width: 100%;
    max-height: 48px;
    width: auto;
    height: auto;
    object-fit: contain;
    filter: saturate(0.96) contrast(1.04);
}

.client-item--double {
    grid-column: span 2;
}

.client-logo--double {
    max-height: 54px;
}

.client-logo--uninet {
    max-height: 70px;
    transform: scale(1.2);
}

@media (max-width: 1080px) {
    .client-grid {
        grid-template-columns: repeat(4, minmax(120px, 1fr));
    }
}

@media (max-width: 760px) {
    .client-grid {
        grid-template-columns: repeat(2, minmax(120px, 1fr));
    }

    .client-item--double {
        grid-column: span 2;
    }
}

@media (max-width: 430px) {
    .client-grid {
        grid-template-columns: 1fr;
    }

    .client-item--double {
        grid-column: span 1;
    }
}

.contact {
    padding: 3rem 2rem 3.5rem;
    background: linear-gradient(135deg, #1f2060 0%, #2a2a85 55%, #151555 100%);
    color: #fff;
}

.contact-shell {
    margin-top: 1.2rem;
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 1.5rem;
    align-items: stretch;
}

.contact-intro p {
    margin-top: 0.4rem;
    margin-bottom: 1.2rem;
    color: rgba(255, 255, 255, 0.88);
    max-width: 56ch;
}

.contact-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.contact-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.7rem 1.1rem;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 700;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.contact-btn.primary {
    background: #cc0986;
    color: #fff;
    box-shadow: 0 8px 20px rgba(225, 0, 115, 0.32);
}

.contact-btn.secondary {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.28);
}

.contact-btn:hover {
    transform: translateY(-2px);
}

.contact-card {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 14px;
    padding: 1.1rem;
    backdrop-filter: blur(2px);
}

.contact-item {
    display: flex;
    gap: 0.8rem;
    align-items: flex-start;
    padding: 0.75rem 0.2rem;
}

.contact-item + .contact-item {
    border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.contact-item i {
    color: #e060b0;
    margin-top: 0.22rem;
    width: 1.1rem;
    text-align: center;
}

.contact-label {
    display: block;
    font-size: 0.8rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.72);
    margin-bottom: 0.2rem;
}

.contact-value {
    margin: 0;
    color: #fff;
    font-weight: 600;
    text-decoration: none;
}

.contact a {
    color: #cc0986;
}

.contact-card a.contact-value {
    color: #fff;
}

.contact-card a.contact-value:hover {
    color: #fce0f0;
}

@media (max-width: 900px) {
    .contact-shell {
        grid-template-columns: 1fr;
    }
}
footer {
    background: #1a1a1a;
    color: #fff;
    padding: 1rem 0;
}

.footer-bottom {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    gap: 0.5rem;
    text-align: center;
}

.footer-links-row {
    display: flex;
    gap: 1rem;
}

.footer-links-row a {
    color: #fff;
    text-decoration: none;
    font-weight: 600;
}

.footer-links-row a:hover {
    color: #cc0986;
}

.section-img {
    width: 100%;
    max-height: 250px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.legal-page {
    background: radial-gradient(circle at 12% -10%, #ffffff 0%, #f2f5fb 52%, #e7ecf8 100%);
}

.legal-main {
    padding: 2rem 0 3.5rem;
}

.legal-container {
    display: block;
    max-width: 980px;
}

.legal-content {
    background: #fff;
    border: 1px solid #dbe2f2;
    border-radius: 18px;
    padding: clamp(1.2rem, 2.2vw, 2.2rem);
    box-shadow: 0 18px 40px rgba(27, 42, 93, 0.08);
}

.legal-content h1 {
    margin: 0;
    color: #1f2f7b;
    letter-spacing: 0.02em;
    font-size: clamp(1.8rem, 3vw, 2.5rem);
}

.legal-kicker {
    margin-top: 0.45rem;
    margin-bottom: var(--spacing-lg);
    color: #556386;
}

.legal-content h2 {
    margin: 0;
    margin-top: 0.3rem;
    color: #2a2a85;
    font-size: clamp(1.2rem, 2vw, 1.45rem);
}

.legal-content h3,
.legal-subtitle {
    margin-bottom: 0.5rem;
    color: #313f72;
    font-size: 1.05rem;
}

.legal-subtitle {
    margin-top: var(--spacing-lg);
}

.legal-content p,
.legal-content li {
    color: #24304b;
    line-height: 1.72;
}

.legal-content ul {
    margin: 0.45rem 0 0;
    padding-left: 1.2rem;
}

.legal-sublist {
    margin-top: var(--spacing-sm);
}

.legal-content hr {
    margin: var(--spacing-lg) 0;
    border: 0;
    border-top: 1px solid var(--color-border);
}

.legal-content a {
    color: #cc0986;
    text-decoration: none;
    font-weight: 600;
}

.legal-content a:hover {
    text-decoration: underline;
}

.company-info,
.highlight-box {
    background: #f8fafe;
    border: 1px solid #dfe6f5;
    border-left: 4px solid #cc0986;
    border-radius: 12px;
    padding: 0.95rem 1rem;
}

.company-info p,
.highlight-box p {
    margin: 0.25rem 0;
}

.legal-lead {
    margin-top: var(--spacing-md);
    font-weight: 700;
    color: #1b2f67;
}

.legal-note {
    margin-top: var(--spacing-md);
    font-size: 0.9rem;
    color: #4c5977;
}

.legal-block-space {
    margin-top: var(--spacing-lg);
}

@media (max-width: 768px) {
    .legal-main {
        padding: 1rem 0 2rem;
    }

    .legal-content {
        border-radius: 14px;
    }
}

/* Historial de Asistencia Styles */
.filters-section {
  background: white;
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  margin-bottom: 2rem;
}

.filters-form {
  display: flex;
  gap: 1rem;
  align-items: flex-end;
  flex-wrap: wrap;
}

.data-section {
  background: white;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid #f0f0f0;
}

.section-header h2 {
  margin: 0;
  color: #2c3e50;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.section-info {
  display: flex;
  gap: 1rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 600;
}

.badge-info {
  background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
  color: white;
}

.badge-success {
  background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
  color: white;
}

.badge-warning {
  background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
  color: white;
}

.no-data-message {
  text-align: center;
  padding: 4rem 2rem;
  color: #7f8c8d;
}

.no-data-message i {
  font-size: 4rem;
  color: #bdc3c7;
  margin-bottom: 1rem;
  display: block;
}

.no-data-message p {
  font-size: 1.125rem;
  margin: 0.5rem 0;
}

.no-data-message .hint {
  font-size: 0.875rem;
  color: #95a5a6;
}

.table-responsive {
  overflow-x: auto;
  margin-bottom: 2rem;
}

.time-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.8rem;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 600;
  white-space: nowrap;
}

.time-badge.entrada {
  background: #e3f2fd;
  color: #1976d2;
}

.time-badge.salida {
  background: #e8f5e9;
  color: #388e3c;
}

.location-cell {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  max-width: 250px;
}

.location-text {
  font-size: 0.85rem;
  color: #495057;
}

.hours-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.8rem;
  background: #fff3cd;
  color: #856404;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.875rem;
}

.summary-section {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 2px solid #f0f0f0;
}

.summary-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border-radius: 12px;
  border-left: 4px solid #2a2a85;
}

.summary-card i {
  font-size: 2rem;
  color: #2a2a85;
}

.summary-card div {
  display: flex;
  flex-direction: column;
}

.summary-card strong {
  font-size: 1.75rem;
  color: #2c3e50;
  font-weight: 700;
}

.summary-card span {
  font-size: 0.875rem;
  color: #7f8c8d;
  margin-top: 0.25rem;
}

/* Responsive para historial */
@media (max-width: 968px) {
  .filters-form {
    flex-direction: column;
    align-items: stretch;
  }
  
  .filters-form .form-group {
    width: 100%;
  }
  
  .data-section {
    padding: 1.5rem;
  }

  .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .data-table {
    font-size: 0.8rem;
  }

  .location-cell {
    max-width: 100%;
    flex: 1;
    justify-content: flex-end;
  }
  
  .summary-section {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .summary-card {
    padding: 1rem;
  }
  
  .summary-card i {
    font-size: 1.5rem;
  }
  
  .summary-card strong {
    font-size: 1.5rem;
  }
}

/* Estadísticas - Reportes */
.stats-section {
  background: white;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  margin-bottom: 2rem;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 3px solid #f0f0f0;
}

.section-title i {
  font-size: 2rem;
  color: #2a2a85;
}

.section-title h2 {
  margin: 0;
  font-size: 1.75rem;
  color: #2c3e50;
}

.stats-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.stats-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.stats-grid-1 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.stat-card {
  background: white;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  border-left: 4px solid #95a5a6;
  transition: all 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.12);
}

.stat-card.stat-primary {
  border-left-color: #2a2a85;
}

.stat-card.stat-success {
  border-left-color: #2ecc71;
}

.stat-card.stat-warning {
  border-left-color: #f39c12;
}

.stat-card.stat-info {
  border-left-color: #3498db;
}

.stat-card.stat-purple {
  border-left-color: #9b59b6;
}

.stat-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  color: #7f8c8d;
  font-size: 0.9rem;
  font-weight: 600;
}

.stat-header i {
  font-size: 1.25rem;
}

.stat-value {
  font-size: 3rem;
  font-weight: 700;
  color: #2c3e50;
  line-height: 1;
  margin-bottom: 0.5rem;
}

.stat-footer {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid #e9ecef;
}

.stat-label {
  font-size: 0.875rem;
  color: #95a5a6;
}

.chart-section {
  background: #f8f9fa;
  padding: 1.5rem;
  border-radius: 12px;
  margin-top: 2rem;
}

.chart-section h3 {
  margin: 0 0 1.5rem 0;
  color: #2c3e50;
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.role-stats {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.role-stat-item {
  display: grid;
  grid-template-columns: 200px 1fr auto;
  gap: 1rem;
  align-items: center;
  background: white;
  padding: 1rem;
  border-radius: 8px;
}

.role-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.role-info i {
  font-size: 1.5rem;
}

.role-name {
  font-weight: 600;
  color: #2c3e50;
  margin-right: auto;
}

.role-count {
  font-size: 0.875rem;
  color: #7f8c8d;
}

.role-bar {
  flex: 1;
  height: 24px;
  background: #e9ecef;
  border-radius: 12px;
  overflow: hidden;
}

.role-bar-fill {
  height: 100%;
  border-radius: 12px;
  transition: width 0.5s ease;
}

.role-percentage {
  font-weight: 700;
  font-size: 1.125rem;
  color: #2c3e50;
  min-width: 60px;
  text-align: right;
}

.subsection {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 2px solid #f0f0f0;
}

.subsection:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.subsection h3 {
  margin: 0 0 1.5rem 0;
  color: #2c3e50;
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.inventory-bar {
  display: flex;
  height: 60px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.inventory-bar-segment {
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
  transition: all 0.3s ease;
  position: relative;
}

.inventory-bar-segment:hover {
  filter: brightness(1.1);
}

.inventory-bar-segment.assigned {
  background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
}

.inventory-bar-segment.available {
  background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
}

.inventory-bar-segment span {
  font-size: 0.9rem;
  text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin-top: 2rem;
}

/* Responsive para estadísticas */
@media (max-width: 1200px) {
  .stats-grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .role-stat-item {
    grid-template-columns: 180px 1fr auto;
  }
  
  .summary-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .stats-section {
    padding: 1.5rem;
  }
  
  .section-title {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .section-title h2 {
    font-size: 1.5rem;
  }
  
  .stats-grid-3,
  .stats-grid-2 {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .stat-value {
    font-size: 2.5rem;
  }
  
  .role-stat-item {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
  
  .role-info {
    justify-content: space-between;
  }
  
  .role-percentage {
    text-align: left;
  }
  
  .inventory-bar {
    flex-direction: column;
    height: auto;
  }
  
  .inventory-bar-segment {
    min-height: 50px;
    padding: 0.75rem;
  }
  
  .summary-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .subsection h3 {
    font-size: 1.125rem;
  }
}

/* ════════════════════════════════════════════
   Modal de Detalle de Usuario
   ════════════════════════════════════════════ */

.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 3000;
  justify-content: center;
  align-items: flex-start;
  padding: 2rem 1rem;
  overflow-y: auto;
}

.modal-overlay.active {
  display: flex;
}

.modal-detalle {
  background: #fff;
  border-radius: 12px;
  width: 100%;
  max-width: 900px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
  animation: modalSlideIn 0.25s ease-out;
}

@keyframes modalSlideIn {
  from { opacity: 0; transform: translateY(-20px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-detalle-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid #e9ecef;
  background: linear-gradient(135deg, #2a2a85 0%, #cc0986 100%);
  color: #fff;
  border-radius: 12px 12px 0 0;
  position: sticky;
  top: 0;
  z-index: 10;
}

.modal-detalle-header h2 {
  margin: 0;
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.modal-detalle-close {
  background: none;
  border: none;
  color: #fff;
  font-size: 1.75rem;
  cursor: pointer;
  line-height: 1;
  padding: 0 0.25rem;
  opacity: 0.8;
  transition: opacity 0.2s;
}

.modal-detalle-close:hover {
  opacity: 1;
}

.modal-detalle-body {
  padding: 1.5rem;
}

/* Foto + nombre en cabecera */
.detalle-foto-nombre {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
  padding-bottom: 1.25rem;
  border-bottom: 2px solid #f0f0f0;
  flex-wrap: wrap;
}

.detalle-foto {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #2a2a85;
  flex-shrink: 0;
}

/* Tabs del detalle */
.detalle-tabs {
  display: flex;
  gap: 0.25rem;
  border-bottom: 2px solid #e9ecef;
  margin-bottom: 1.25rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.detalle-tab {
  padding: 0.6rem 1rem;
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  color: #6c757d;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.detalle-tab:hover {
  color: #2a2a85;
  background: #f8f9fa;
}

.detalle-tab.active {
  color: #2a2a85;
  border-bottom-color: #2a2a85;
}

.detalle-tab-content {
  display: none;
}

.detalle-tab-content.active {
  display: block;
}

/* Grid de campos */
.detalle-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0.75rem;
}

.detalle-field {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.5rem 0.75rem;
  background: #f8f9fa;
  border-radius: 6px;
}

.detalle-field label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #6c757d;
  letter-spacing: 0.03em;
}

.detalle-field span {
  font-size: 0.95rem;
  color: #333;
  word-break: break-word;
}

/* Documentos */
.detalle-docs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
}

.detalle-doc-card {
  background: #f8f9fa;
  border: 2px dashed #dee2e6;
  border-radius: 10px;
  padding: 1rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.detalle-doc-card:hover {
  border-color: #2a2a85;
  box-shadow: 0 2px 8px rgba(42, 42, 133, 0.15);
}

.detalle-doc-card i {
  font-size: 1.75rem;
  color: #2a2a85;
}

.detalle-doc-card span {
  font-weight: 600;
  font-size: 0.85rem;
}

.detalle-doc-card small {
  color: #999;
  font-size: 0.75rem;
}

.detalle-doc-empty {
  opacity: 0.6;
}

.detalle-doc-img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  border-radius: 6px;
  cursor: pointer;
  border: 1px solid #e9ecef;
}

/* Inventario items */
.detalle-inv-item {
  padding: 0.5rem 0.75rem;
  background: #f0f4ff;
  border-radius: 6px;
  margin-bottom: 0.4rem;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.detalle-inv-item i {
  color: #2a2a85;
  width: 18px;
  text-align: center;
}

/* Loading / Error */
.detalle-loading {
  text-align: center;
  padding: 3rem 1rem;
  color: #6c757d;
  font-size: 1.1rem;
}

.detalle-loading i {
  margin-right: 0.5rem;
}

.detalle-error {
  text-align: center;
  padding: 2rem;
  color: #dc3545;
  font-weight: 600;
}

/* ── Responsive Modal Detalle ── */
@media (max-width: 768px) {
  .modal-overlay {
    padding: 0;
    align-items: flex-end;
  }

  .modal-detalle {
    max-width: 100%;
    max-height: 95vh;
    border-radius: 16px 16px 0 0;
  }

  .modal-detalle-header {
    border-radius: 16px 16px 0 0;
    padding: 1rem 1.25rem;
  }

  .modal-detalle-header h2 {
    font-size: 1.1rem;
  }

  .modal-detalle-body {
    padding: 1rem;
  }

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

  .detalle-docs-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .detalle-foto {
    width: 56px;
    height: 56px;
  }

  .detalle-tabs {
    gap: 0;
  }

  .detalle-tab {
    font-size: 0.75rem;
    padding: 0.5rem 0.65rem;
  }
}

@media (max-width: 480px) {
  .detalle-docs-grid {
    grid-template-columns: 1fr;
  }

  .detalle-tab {
    font-size: 0.7rem;
    padding: 0.45rem 0.5rem;
  }
}

/* ── Global Responsive Utilities ── */
img, video, iframe { max-width: 100%; height: auto; }

.modal {
  z-index: 3000;
  display: none;
  align-items: center;
  justify-content: center;
}

.modal-content { max-width: 100%; }

.btn, button, [role="button"] { cursor: pointer; }

@media (max-width: 768px) {
  .form-row {
    flex-direction: column !important;
    gap: 0 !important;
  }

  .form-row .form-group {
    width: 100%;
  }

  .btn-group {
    flex-wrap: wrap;
  }

  .page-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .page-header h1 {
    font-size: 1.25rem;
  }
}

@media (max-width: 576px) {
  h1 { font-size: 1.3rem; }
  h2 { font-size: 1.1rem; }
  h3 { font-size: 1rem; }

  .container {
    padding: 0.75rem;
  }
}



