:root {
    --color-principal: #1E88E5;
    --color-secundario: #43A047;
    --color-fondo: #F9FAFB;
    --color-texto: #333;
    --color-texto-claro: #FFF;
    --color-borde: #E0E0E0;
    --font-principal: 'Inter', 'Roboto', sans-serif;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: var(--font-principal);
    background-color: #f0f2f5; /* Un gris un poco más visible */
    color: #1a1a1a; /* Un negro más intenso */
    font-size: 16px;
    line-height: 1.6;
}

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

a:hover {
    text-decoration: underline;
}

.content-wrapper {
    padding: 2rem;
    background-color: #ffffff; /* Fondo blanco explícito */
    border-radius: 8px;
}

/* --- Formularios --- */
.form-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 2rem;
    background-color: #fff;
    border: 1px solid var(--color-borde);
    border-radius: 8px;
}

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

.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.form-control {
    display: block;
    width: 100%;
    padding: 0.75rem;
    font-size: 1rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    transition: border-color 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--color-principal);
}

/* --- Botones --- */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    text-align: center;
    transition: background-color 0.2s;
}

.btn-principal {
    background-color: var(--color-principal);
    color: var(--color-texto-claro);
}

.btn-principal:hover {
    background-color: #1a73c8;
}

.btn-secundario {
    background-color: var(--color-secundario);
    color: var(--color-texto-claro);
}

.btn-secundario:hover {
    background-color: #388e3c;
}

/* --- Tablas --- */
.table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 2rem;
}

.table th,
.table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--color-borde);
}

.table thead th {
    background-color: #f5f5f5;
    font-weight: 500;
}

/* --- Alertas --- */
.alert {
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 4px;
}

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

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

/* --- Login Page --- */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    min-height: 100vh;
    padding: 2rem;
}

/* Fix para botones de acciones en tablas */
.btn-warning, .btn-warning:hover {
    color: #fff !important;
    background-color: #ffc107 !important;
    border-color: #ffc107 !important;
}

.btn-danger, .btn-danger:hover {
    color: #fff !important;
    background-color: #dc3545 !important;
    border-color: #dc3545 !important;
}

.btn-warning i, .btn-danger i {
    color: #fff !important;
}

/* --- Estilos del Panel de Control (Dashboard) --- */
.welcome-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 0.5rem;
}

.welcome-subtitle {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 2rem;
}

.info-card {
    background-color: #fff;
    border: 1px solid var(--color-borde);
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.info-card .card-body {
    padding: 1.5rem;
}

.info-card .card-title {
    font-size: 1rem;
    font-weight: 600;
    color: #555;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.info-card .card-text {
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-principal);
    margin: 0;
}

.icon-circle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: #e3f2fd; /* Un azul muy claro */
}

.icon-circle svg {
    color: var(--color-principal);
    width: 24px;
    height: 24px;
}

/* Estilo para la tarjeta que es un enlace */
.card-link {
    text-decoration: none;
}

.card-link .card-title {
    color: #333;
    font-size: 1.1rem;
    font-weight: 600;
    text-transform: none;
}

.card-link .card-text {
    font-size: 1rem;
    font-weight: 400;
    color: #666;
}

.card-link:hover .card-title {
    color: var(--color-principal);
}

/* --- Estilos del Menú Lateral (Sidebar) --- */
.sidebar {
    min-width: 250px;
    max-width: 250px;
    background-color: #00754A;
    color: #fff;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.sidebar-heading {
    padding: 1.25rem;
    font-size: 1.5rem;
    font-weight: 700;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar .nav-link {
    color: #fff;
    padding: 0.8rem 1.25rem; /* Un poco más de padding vertical */
    display: flex;
    align-items: center;
    margin: 0.25rem 0.75rem; /* Margen para separar los elementos */
    border-radius: 8px; /* Bordes redondeados */
    transition: background-color 0.3s ease, color 0.3s ease;
}

.sidebar .nav-link i {
    margin-right: 0.85rem;
    width: 20px;
    text-align: center;
}

.sidebar .nav-item.active .nav-link,
.sidebar .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1); /* Un fondo más sutil al pasar el ratón o si está activo */
    color: #fff;
    text-decoration: none;
}

/* Separar el último elemento (Cerrar Sesión) */
.sidebar .nav-item.mt-auto {
    margin-top: auto;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Contenido Principal */
.main-content {
    flex-grow: 1;
    padding: 2rem;
    background-color: var(--color-fondo);
}

/* Forzar color de texto en el cuerpo de las tablas */
.table tbody td {
    color: #000 !important;
}

/* Forzar color de texto en el encabezado de las tablas */
.table thead th {
    color: #000 !important;
}


