body {
  font-family: 'Poppins', sans-serif;
  font-size: 15px;
  color: #333;
  margin: 0;
  padding: 0;
}

/* Default layout for non-usuarios pages */
.default-layout {
  max-width: 900px;
  margin: 2rem auto;
  padding: 0 1rem;
}

/* Full width layout for usuarios page */
.usuarios-page {
  max-width: none;
  margin: 0;
  padding: 1rem;
  min-height: 100vh;
  width: 100vw;
  box-sizing: border-box;
}

.usuarios-page .page-content {
  max-width: none;
  width: 100%;
}

/* Table improvements for full width */
.table-container {
  width: 100%;
  overflow-x: auto;
  border: 1px solid #e9ecef;
  border-radius: 8px;
}

#tabla-usuarios {
  width: 100%;
  min-width: 1200px; /* Ensure minimum width for all columns */
  border-collapse: collapse;
  background: white;
}

#tabla-usuarios th,
#tabla-usuarios td {
  padding: 0.75rem 0.5rem;
  text-align: left;
  border-bottom: 1px solid #e9ecef;
  vertical-align: middle;
}

#tabla-usuarios th {
  background: #f8f9fa;
  font-weight: 600;
  position: sticky;
  top: 0;
  z-index: 10;
}

/* Action buttons styling */
.actions-cell {
  width: 80px;
  min-width: 80px;
  text-align: center;
  white-space: nowrap;
}

.btn-icon {
  background: none;
  border: none;
  padding: 4px;
  margin: 0 2px;
  cursor: pointer;
  border-radius: 4px;
  font-size: 14px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  transition: background-color 0.2s ease;
}

.btn-icon:hover {
  background-color: #f8f9fa;
}

.btn-edit:hover {
  background-color: #e3f2fd;
}

.btn-delete:hover {
  background-color: #ffebee;
}

/* Badge styles */
.badge {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: 0.375rem;
  text-transform: uppercase;
}

.badge-activo {
  background-color: #d4edda;
  color: #155724;
}

.badge-retirado {
  background-color: #f8d7da;
  color: #721c24;
}

.badge-suspendido {
  background-color: #fff3cd;
  color: #856404;
}

.role-badge {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: 0.375rem;
  text-transform: capitalize;
}

.role-estudiante {
  background-color: #cff4fc;
  color: #055160;
}

.role-profesor {
  background-color: #e2e3e5;
  color: #41464b;
}

.role-direccion {
  background-color: #f7d794;
  color: #856404;
}

.role-edqet_admin {
  background-color: #f1c0e8;
  color: #6f42c1;
}

/* Table controls styling */
.table-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.search-filters {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
}

.search-filters input,
.search-filters select {
  width: auto;
  min-width: 200px;
  margin: 0;
}

.action-buttons {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

/* Responsive design */
@media (max-width: 768px) {
  .table-controls {
    flex-direction: column;
    align-items: stretch;
  }
  
  .search-filters {
    flex-direction: column;
    align-items: stretch;
  }
  
  .search-filters input,
  .search-filters select {
    width: 100%;
    min-width: auto;
  }
}

/* Specific cell styling for better readability */
.timezone-cell,
.email-cell,
.password-cell,
.uuid-cell {
  font-family: 'Monaco', 'Menlo', monospace;
  font-size: 0.85rem;
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Password cell styling removed - showing actual values now */

/* Empty results styling */
.empty-results-row {
  border: none !important;
}

.empty-results-content {
  text-align: center;
  padding: 3rem 1rem;
  color: #6c757d;
}

.empty-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

.empty-text {
  font-size: 1.1rem;
  font-weight: 500;
}

/* CSV Import Modal Styling */
.modal-large {
  max-width: 90vw;
  width: 1200px;
  max-height: 90vh;
  overflow-y: auto;
}

.csv-content {
  padding: 0;
}

.csv-instructions {
  background: #f8f9fa;
  padding: 1rem;
  border-radius: 6px;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.csv-instructions p {
  margin: 0.5rem 0;
}

.file-drop-zone {
  border: 2px dashed #dee2e6;
  border-radius: 8px;
  padding: 3rem 2rem;
  text-align: center;
  background: #f8f9fa;
  transition: all 0.2s ease;
  cursor: pointer;
}

.file-drop-zone:hover,
.file-drop-zone.drag-over {
  border-color: #007bff;
  background: #f0f8ff;
}

.drop-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.drop-icon {
  font-size: 3rem;
  opacity: 0.5;
}

.btn-link {
  background: none;
  border: none;
  color: #007bff;
  text-decoration: underline;
  cursor: pointer;
  font-family: inherit;
  font-size: inherit;
  padding: 0;
  margin: 0;
}

.btn-link:hover {
  color: #0056b3;
}

/* CSV Preview Styling */
.csv-preview {
  margin-top: 2rem;
}

.csv-stats {
  display: flex;
  gap: 2rem;
  margin-bottom: 1rem;
  padding: 1rem;
  background: #f8f9fa;
  border-radius: 6px;
  flex-wrap: wrap;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 80px;
}

.stat-label {
  font-size: 0.8rem;
  color: #6c757d;
  font-weight: 500;
}

.stat-item span:last-child {
  font-size: 1.5rem;
  font-weight: bold;
  color: #2c3e50;
}

.csv-table-container {
  max-height: 400px;
  overflow: auto;
  border: 1px solid #e9ecef;
  border-radius: 6px;
  margin-bottom: 1rem;
}

#csv-preview-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  font-size: 0.85rem;
}

#csv-preview-table th,
#csv-preview-table td {
  padding: 0.5rem;
  text-align: left;
  border-bottom: 1px solid #e9ecef;
  vertical-align: middle;
}

#csv-preview-table th {
  background: #f8f9fa;
  font-weight: 600;
  position: sticky;
  top: 0;
  z-index: 10;
}

/* Row types */
.insert-row {
  background-color: #f0f8f0;
}

.update-row {
  background-color: #fff3cd;
}

.error-row {
  background-color: #f8d7da;
}

.error-row td {
  color: #721c24;
}

/* Action cell */
.action-cell {
  width: 120px;
  min-width: 120px;
}

.action-select {
  width: 100%;
  padding: 0.25rem;
  border: 1px solid #ced4da;
  border-radius: 4px;
  font-size: 0.8rem;
}

.error-indicator {
  color: #dc3545;
  font-weight: bold;
}

/* Status cell */
.status-cell {
  width: 200px;
  min-width: 200px;
}

.success-indicator {
  color: #28a745;
  font-weight: 500;
}

.error-list {
  color: #dc3545;
  font-size: 0.8rem;
  line-height: 1.3;
}

/* CSV Actions */
.csv-actions {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
  padding-top: 1rem;
  border-top: 1px solid #e9ecef;
}

/* Loading states */
.btn-loading {
  display: none;
}

.btn-loading::before {
  content: "⏳ ";
  animation: spin 1s linear infinite;
}

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

/* Modal overlay */
.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: -1;
}

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

.modal-content {
  background: white;
  border-radius: 12px;
  padding: 2rem;
  max-width: 500px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  position: relative;
}

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

.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #6c757d;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background-color 0.2s;
}

.modal-close:hover {
  background-color: #f8f9fa;
  color: #495057;
}
input, select {
  display: block;
  font-family: 'Poppins', sans-serif;
  width: 100%;
  margin: 0.5rem 0;
  padding: 0.5rem;
}
button {
  font-family: 'Poppins', sans-serif;
  padding: 0.5rem 1rem;
  margin-top: 0.5rem;
}

/* Navigation styles */
.panel-header {
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid #f0f0f0;
}

.panel-header h1 {
  margin-bottom: 1rem;
  color: #2c3e50;
}

.admin-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.nav-btn {
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 6px;
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  color: #495057;
  font-family: 'Poppins', sans-serif;
  margin-top: 0;
}

.nav-btn:hover {
  background: #e9ecef;
  border-color: #adb5bd;
}

.nav-btn.nav-active {
  background: #007bff;
  border-color: #007bff;
  color: white;
}

.btn-logout {
  background: #dc3545;
  border: 1px solid #dc3545;
  color: white;
  border-radius: 6px;
  padding: 0.5rem 1rem;
  margin-left: auto;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.2s ease;
}

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

.admin-panel {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem;
}

/* Clean metrics list styling */
.metrics-list {
  margin-top: 2rem;
}

.metric-item {
  font-size: 1.1rem;
  margin-bottom: 1rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid #f0f0f0;
}

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

.metric-item span {
  font-weight: 600;
  color: #007bff;
}
.error {
  color: red;
}
#module-content {
  margin-top: 1.5rem;
  padding: 1rem;
  border: 1px solid #ddd;
  overflow-x: auto;
  max-width: 100%;
}

.color-verde {
  background-color: lightgreen;
}
.color-amarillo {
  background-color: #f5f176;
}
.color-rosado {
  background-color: #ffc0cb;
}

table a {
  text-decoration: none;
}

.text-center {
  text-align: center;
}

table {
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  background-color: white;
}

table thead {
  background-color: #f2f2f2;
}

table th,
table td {
  border: 1px solid #ddd;
  padding: 8px;
}

table th {
  font-weight: 600;
  font-size: 0.95rem;
  text-transform: capitalize;
  letter-spacing: 0.5px;
}

h1 {
  font-size: 1.8rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.access-table {
  border-collapse: collapse;
  margin-top: 1.5rem;
  margin-left: auto;
  margin-right: auto;
  background-color: white;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  max-width: 400px;
  width: 100%;
  font-size: small;
}

.access-table th {
  background-color: #f2f2f2;
  text-align: center;
  font-weight: 600;
  padding: 8px;
  font-size: 0.95rem;
}

.access-table td {
  border: 1px solid #ddd;
  padding: 8px;
  vertical-align: middle;
}

h3 {
  font-weight: 600;
  font-size: 1.25rem;
  text-align: center;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

#encabezado-dashboard {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 1rem;
  border-bottom: 1px solid #ddd;
  margin-bottom: 0.5rem;
  gap: 1rem;
}

.enc-col {
  display: flex;
  align-items: center;
}

.enc-col.centro {
  flex: 1;
  justify-content: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.enc-col.derecha {
  flex-direction: column;
  align-items: flex-end;
  gap: 0.5rem;
}

#logo-empresa {
  height: 100px;
}

#logo-colegio {
  height: 100px;
}

#encabezado-login {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1rem;
  border-bottom: 1px solid #ddd;
  margin-bottom: 1rem;
}

#encabezado-login img {
  height: 50px;
  margin-right: 1rem;
}

#encabezado-login h2 {
  font-size: 1.5rem;
  font-weight: 600;
}

.nav-botones {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  align-items: center;
}

.nav-botones a,
.nav-botones button {
  text-decoration: none;
  color: #333;
  padding: 0.5rem 1rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  background-color: white;
  cursor: pointer;
  transition: all 0.3s;
  font-size: 0.95rem;
  margin: 0;
}

.nav-botones a:hover,
.nav-botones button:hover {
  background-color: #f5f5f5;
  border-color: #ccc;
}

#btn-logout {
  color: #e74c3c;
  border-color: #e74c3c;
}

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

.nav-botones a.active {
  background-color: #007bff;
  color: white;
  border-color: #007bff;
}

.locked-column {
  background-color: #f5f5f5 !important;
  color: #666;
}

.enc-col.centro h2 {
  margin-bottom: 0.2rem;
}

.enc-col.centro h3 {
  margin-top: 0;
  margin-bottom: 1rem;
}