html {
    font-size: 14px;
    position: relative;
    min-height: 100%;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

body {
    margin-bottom: 60px;
}

:root {
    --primary: #2563eb;
    --primary-light: #dbeafe;
    --gray: #e5e7eb;
    --dark: #1f2937;
    --bg: #f8fafc;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI',sans-serif;
}

body {
    background: var(--bg);
    padding: 30px;
}

.container {
    max-width: 1200px;
    margin: auto;
}

.card {
    background: white;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 8px 20px rgba(0,0,0,.08);
}

.header {
    text-align: center;
    margin-bottom: 30px;
}

    .header h1 {
        font-size: 28px;
        color: var(--dark);
    }

    .header p {
        color: #6b7280;
        margin-top: 8px;
    }

.section {
    margin-bottom: 25px;
}

.section-title {
    background: var(--primary);
    color: white;
    padding: 12px 18px;
    border-radius: 10px;
    margin-bottom: 15px;
    font-weight: 600;
}

.grid {
    display: grid;
    gap: 15px;
}

.grid-2 {
    grid-template-columns: repeat(auto-fit,minmax(250px,1fr));
}

.grid-3 {
    grid-template-columns: repeat(auto-fit,minmax(220px,1fr));
}

.grid-4 {
    grid-template-columns: repeat(auto-fit,minmax(180px,1fr));
}

.form-group {
    display: flex;
    flex-direction: column;
}

label {
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
}

input,
select,
textarea {
    padding: 12px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    font-size: 14px;
    width: 100%;
}

    input:focus,
    select:focus,
    textarea:focus {
        outline: none;
        border-color: var(--primary);
    }

/* =========================================
   EFECTO FLOATING LABELS (COMPACTO)
   Solo afecta los controles, no el layout general
   ========================================= */
.form-floating {
    position: relative;
    display: flex;
    flex-direction: column;
}

    .form-floating > input,
    .form-floating > select {
        height: 46px;
        padding: 1.1rem 0.75rem 0.2rem 0.75rem;
    }

    .form-floating > textarea {
        padding: 1.1rem 0.75rem 0.2rem 0.75rem;
        height: 75px;
        resize: none;
    }

    .form-floating > label {
        position: absolute;
        top: 0;
        left: 0;
        height: 100%;
        padding: 0.65rem 0.75rem;
        pointer-events: none;
        border: 1px solid transparent;
        transform-origin: 0 0;
        transition: opacity .1s ease-in-out, transform .1s ease-in-out;
        color: #6b7280;
        font-weight: 400;
        margin-bottom: 0;
        display: flex;
        align-items: center;
    }

    .form-floating > textarea ~ label {
        align-items: flex-start;
    }

    .form-floating > input::placeholder,
    .form-floating > textarea::placeholder {
        color: transparent;
    }

    .form-floating > input:focus ~ label,
    .form-floating > input:not(:placeholder-shown) ~ label,
    .form-floating > textarea:focus ~ label,
    .form-floating > textarea:not(:placeholder-shown) ~ label,
    .form-floating > select ~ label,
    .form-floating > input[type="date"] ~ label {
        opacity: .75;
        transform: scale(.75) translateY(-0.6rem) translateX(0.15rem);
        align-items: flex-start;
    }
/* ========================================= */

.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 10px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.actions {
    text-align: right;
    margin-top: 30px;
}

.btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 14px 24px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
}

    .btn:hover {
        opacity: .9;
    }

.logo-navbar {
    height: 60px;
    width: auto;
}

.navbar {
    min-height: 80px;
}

.navbar-brand {
    padding-top: 0;
    padding-bottom: 0;
}

/* ========================================= */
/* CONTROLES DESLIZANTE SI/N0 */
/* ========================================= */


.switch {
    position: relative;
    display: inline-block;
    width: 40px; /* Reducido (antes 60px) */
    height: 22px; /* Reducido (antes 32px) */
    margin-top: 0;
}

    .switch input {
        opacity: 0;
        width: 0;
        height: 0;
    }

.switch-wrapper {
    display: flex;
    align-items: center;
    gap: 8px; /* Más pegadito al texto */
    margin-top: 5px;
    font-weight: 600;
}

.slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background-color: #d1d5db;
    transition: .3s;
    border-radius: 34px;
}

    .slider:before {
        position: absolute;
        content: "";
        height: 16px; /* Bolita más pequeña (antes 24px) */
        width: 16px; /* Bolita más pequeña (antes 24px) */
        left: 3px;
        bottom: 3px;
        background-color: white;
        transition: .3s;
        border-radius: 50%;
    }

.switch input:checked + .slider {
    background-color: #198754;
}

    .switch input:checked + .slider:before {
        transform: translateX(18px); /* Distancia ajustada al nuevo tamaño */
    }