/* =========================================
   1. VARIABLES (Estilo Bootstrap)
   ========================================= */
:root {
    --bs-body-bg: #f4f5f7;
    --bs-card-bg: #ffffff;
    --bs-border-color: #dee2e6;
    --bs-border-radius: 0.375rem;
    --bs-primary-rgb: 90, 103, 216; /* Color de tu título */
    --bs-focus-ring-color: rgba(90, 103, 216, 0.25);
    
    /* Colores del botón del wireframe */
    --btn-bg: #dbeafe;
    --btn-color: #1e3a8a;
    --btn-hover-bg: #bfdbfe;
}

/* =========================================
   2. RESET Y BASE (Box Model)
   ========================================= */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--bs-body-bg);
    color: #212529;
    line-height: 1.5;
    display: flex;
    flex-direction: column;
    min-height: 100vh; /* Permite que el layout ocupe toda la pantalla */
}

/* =========================================
   3. UTILIDADES DE DISEÑO (Layout & Flexbox)
   ========================================= */
.min-vh-100 { min-height: 100vh; }
.d-flex { display: flex; }
.justify-content-center { justify-content: center; }
.align-items-center { align-items: center; }
.text-center { text-align: center; }
.w-100 { width: 100%; }

/* Espaciados (Margins & Paddings) */
.py-4 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.p-4 { padding: 1.5rem; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mt-2 { margin-top: 0.5rem; }
.gap-2 { gap: 0.5rem; }
.ps-0 { padding-left: 0 !important; }

/* Tipografía */
.fs-4 { font-size: 1.5rem; }
.fw-bold { font-weight: 700; }
.fw-semibold { font-weight: 600; }
.small { font-size: 0.875em; }
.text-dark { color: #212529; }
.text-secondary { color: #6c757d; }
.text-muted { color: #6c757d; }
.bg-white { background-color: #ffffff; }

/* =========================================
   4. COMPONENTES (Idénticos a Bootstrap)
   ========================================= */

/* Card */
.card {
    background-color: var(--bs-card-bg);
    border: 1px solid var(--bs-border-color);
    border-radius: var(--bs-border-radius);
}
.shadow-sm {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

/* Formularios */
.form-label {
    display: inline-block;
}

/* Input Group (Icono + Input unidos) */
.input-group {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    width: 100%;
}

.input-group-text {
    display: flex;
    align-items: center;
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    font-weight: 400;
    color: #212529;
    text-align: center;
    background-color: #fff;
    border: 1px solid var(--bs-border-color);
    border-radius: var(--bs-border-radius);
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.form-control {
    display: block;
    width: 1%; /* Permite que el input ocupe el espacio restante en flexbox */
    flex: 1 1 auto;
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    font-weight: 400;
    color: #212529;
    background-color: #fff;
    border: 1px solid var(--bs-border-color);
    border-radius: var(--bs-border-radius);
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
    outline: none;
}

/* Modificadores de bordes para que el icono y el input parezcan uno solo */
.border-end-0 { border-right: 0 !important; }
.border-start-0 { border-left: 0 !important; }

/* Estado Focus (El famoso resplandor azul de Bootstrap) */
.form-control:focus {
    border-color: rgba(var(--bs-primary-rgb), 0.5);
    box-shadow: 0 0 0 0.25rem var(--bs-focus-ring-color);
    z-index: 3; /* Asegura que el borde iluminado se sobreponga al icono */
}

/* Checkbox */
.form-check {
    display: block;
    min-height: 1.5rem;
}
.form-check-input {
    width: 1em;
    height: 1em;
    margin-top: 0.25em;
    vertical-align: top;
    background-color: #fff;
    border: 1px solid rgba(0, 0, 0, 0.25);
    border-radius: 0.25em;
    appearance: none;
    cursor: pointer;
    transition: background-color 0.15s ease-in-out, border-color 0.15s ease-in-out;
}
.form-check-input:checked {
    background-color: #5a67d8;
    border-color: #5a67d8;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='m6 10 3 3 6-6'/%3e%3c/svg%3e");
}
.form-check-input:focus {
    border-color: rgba(var(--bs-primary-rgb), 0.5);
    outline: 0;
    box-shadow: 0 0 0 0.25rem var(--bs-focus-ring-color);
}

/* Botón */
.btn {
    display: inline-block;
    font-weight: 400;
    text-align: center;
    vertical-align: middle;
    cursor: pointer;
    padding: 0.5rem 0.75rem;
    font-size: 1rem;
    border-radius: var(--bs-border-radius);
    transition: all 0.15s ease-in-out;
}

/* Estilo específico de tu botón */
.btn-custom {
    background-color: var(--btn-bg);
    color: var(--btn-color);
    border: none;
}
.btn-custom:hover {
    background-color: var(--btn-hover-bg);
}

.flex-grow-1 { flex-grow: 1; }

.navbar {
    background-color: var(--bs-card-bg);
    border-bottom: 1px solid var(--bs-border-color);
    padding: 1rem 1.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.container-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.navbar-brand {
    font-size: 1.25rem;
    font-weight: 700;
    color: #5a67d8; /* Mismo tono morado/azul de tu diseño */
    text-decoration: none;
    letter-spacing: 0.5px;
}

.navbar-nav {
    list-style: none;
    display: flex;
    flex-direction: row !important; /* Fuerza a que los elementos se alineen horizontalmente */
    gap: 1.5rem;
    margin: 0;
    padding: 0;
}

.nav-link {
    text-decoration: none;
    color: #4b5563;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.2s ease;
}

.nav-link:hover {
    color: #5a67d8;
}

/* Footer */
.footer {
    background-color: var(--bs-card-bg);
    border-top: 1px solid var(--bs-border-color);
    padding: 2rem 1rem;
    margin-top: auto; /* Esencial para que se quede en el fondo */
}