* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
  background-color: #f4f7f6;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
}

.auth-container {
  background: #ffffff;
  padding: 2.5rem;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  width: 100%;
  max-width: 400px;
}

.auth-container h2 {
  margin-bottom: 1.5rem;
  color: #333;
  text-align: center;
}

.form-group {
  margin-bottom: 1.2rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  color: #666;
  font-size: 0.9rem;
}

.form-group input {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 1rem;
  transition: border-color 0.2s;
}

.form-group input:focus {
  outline: none;
  border-color: #007bff;
}

.btn-primary {
  width: 100%;
  padding: 0.75rem;
  background-color: #007bff;
  border: none;
  color: white;
  font-size: 1rem;
  font-weight: bold;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.2s;
}

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

.message {
  margin-top: 1rem;
  text-align: center;
  font-size: 0.9rem;
}

.message.error {
  color: #d9534f;
}

.message.success {
  color: #5cb85c;
}


/*estilos de la tabla de dashboard*/

/* Dashboard Layout */
.dashboard-container {
  width: 95%;
  max-width: 1400px;
  margin: 20px auto;
  background: #ffffff;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid #eaeaea;
  padding-bottom: 15px;
  margin-bottom: 20px;
}

.user-badge {
  background: #e9ecef;
  padding: 6px 12px;
  border-radius: 20px;
  font-weight: 600;
  color: #495057;
}

.btn-secondary {
  background: #6c757d;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
}

/* Tabs */
.nav-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

.tab-btn {
  padding: 10px 20px;
  border: none;
  background: #e9ecef;
  color: #333;
  font-weight: bold;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.tab-btn.active {
  background: #70ad47; /* Color verde de la cabecera */
  color: white;
}

/* Tabla Estilo Excel */
.table-responsive {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  text-align: left;
}

.data-table th {
  background-color: #70ad47; /* Verde exacto del Excel */
  color: white;
  padding: 10px;
  border: 1px solid #5a8f37;
  text-transform: uppercase;
  font-size: 0.8rem;
  white-space: nowrap;
}

.data-table td {
  padding: 8px 10px;
  border: 1px solid #e0e0e0;
  white-space: nowrap;
}

.data-table tbody tr:nth-child(even) {
  background-color: #f9f9f9;
}

/* Badges y Botones */
.badge-tel {
  background-color: #5b9bd5;
  color: white;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: bold;
}

.badge-estado.vigente {
  color: #28a745;
  font-weight: bold;
}

.btn-cobrar {
  color: #007bff;
  font-weight: bold;
  text-decoration: underline;
  cursor: pointer;
}

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

/* Form Grid */
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 15px;
}

.form-card {
  background: #f8f9fa;
  padding: 20px;
  border-radius: 8px;
  border: 1px solid #e9ecef;
}
.badge-estado.vigente {
  color: #28a745;
  font-weight: bold;
}

.badge-estado.vencido {
  color: #dc3545;
  font-weight: bold;
  background-color: #f8d7da;
  padding: 2px 6px;
  border-radius: 4px;
}

/* Paginación */
.pagination-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
  margin-top: 20px;
  padding-top: 15px;
  border-top: 1px solid #eaeaea;
}

.btn-page {
  background-color: #007bff;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.2s;
}

.btn-page:hover:not(:disabled) {
  background-color: #0056b3;
}

.btn-page:disabled {
  background-color: #ccc;
  cursor: not-allowed;
}

.page-info {
  font-weight: 600;
  color: #555;
  font-size: 0.9rem;
}

/* Paginación */
.pagination-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
  margin-top: 20px;
  padding-top: 15px;
  border-top: 1px solid #eaeaea;
}

.btn-page {
  background-color: #007bff;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.2s;
}

.btn-page:hover:not(:disabled) {
  background-color: #0056b3;
}

.btn-page:disabled {
  background-color: #ccc;
  cursor: not-allowed;
}

.page-info {
  font-weight: 600;
  color: #555;
  font-size: 0.9rem;
}

/* Botón Editar en la Tabla */
.btn-edit {
  background-color: #ffc107;
  border: none;
  padding: 6px 10px;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
  transition: background-color 0.2s;
}

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

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

.modal-content {
  background-color: #fff;
  padding: 25px;
  border-radius: 10px;
  width: 90%;
  max-width: 600px;
  position: relative;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.close-btn {
  position: absolute;
  right: 15px;
  top: 15px;
  font-size: 24px;
  font-weight: bold;
  cursor: pointer;
  color: #888;
}

.close-btn:hover {
  color: #000;
}

.dashboard-container {
  display: none;
}

/* Badge de estado neutro para clientes dados de Baja */
.badge-estado.baja {
  background-color: #6c757d; /* Gris profesional */
  color: #ffffff;
  border: 1px solid #5a6268;
}

/* Opcional: Si deseas que toda la fila del cliente dado de baja tenga un aspecto atenazado/inactivo */
tr:has(.badge-estado.baja) {
  opacity: 0.7;
  background-color: #f8f9fa;
}

/* Grid para Tarjetas KPI */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

/* Tarjeta KPI base */
.kpi-card {
  background: #ffffff;
  padding: 12px 16px;
  border-radius: 8px;
  border-left: 5px solid #007bff; /* Color predeterminado */
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
  display: flex;
  flex-direction: column;
}

.kpi-card.total { border-left-color: #007bff; }  /* Azul */
.kpi-card.vigente { border-left-color: #28a745; }/* Verde */
.kpi-card.vencido { border-left-color: #dc3545; }/* Rojo */
.kpi-card.baja { border-left-color: #6c757d; }   /* Gris */

.kpi-title {
  font-size: 0.85rem;
  color: #666;
  font-weight: 600;
  text-transform: uppercase;
}

.kpi-value {
  font-size: 1.6rem;
  font-weight: bold;
  color: #222;
  margin-top: 4px;
}