/* Estilos base */
body {
    font-size: .875rem;
    padding-top: 48px;
    background: #f8f9fa;
}

/* Estilos para la página de login */
body.login-page {
    padding: 0;
    margin: 0;
    min-height: 100vh;
    min-height: 100dvh;
    display: block;
    overflow-x: hidden;
    background: #f4f5f7;
    color: #121722;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

.login-layout {
    min-height: 100vh;
    min-height: 100dvh;
    display: grid;
    grid-template-columns: minmax(470px, 42%) minmax(0, 1fr);
}

.login-panel {
    position: relative;
    z-index: 2;
    min-width: 0;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border-right: 1px solid #e6e8ec;
}

.login-header {
    min-height: 84px;
    padding: 20px clamp(26px, 4vw, 54px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    border-bottom: 1px solid #eceef1;
}

.login-brand {
    min-width: 0;
    color: #11141b;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.login-brand:hover {
    color: #11141b;
}

.login-brand-mark {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: #e30613;
    color: #ffffff;
    font-size: 21px;
    box-shadow: 0 10px 24px rgba(227, 6, 19, .22);
}

.login-brand-copy {
    min-width: 0;
    padding-bottom: 1px;
    line-height: normal;
}

.login-brand-copy strong {
    display: block;
    white-space: nowrap;
    font-size: 16px;
    line-height: 1.1;
    font-weight: 900;
}

.login-brand-copy strong b {
    color: #e30613;
}

.login-brand-copy small {
    display: block;
    margin-top: 5px;
    color: #747b88;
    font-size: 9px;
    line-height: 1.2;
    font-weight: 800;
}

.login-secure {
    min-height: 36px;
    padding: 0 11px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #4c5564;
    border: 1px solid #e4e7eb;
    border-radius: 8px;
    background: #f8f9fa;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.login-secure i {
    color: #14804a;
    font-size: 15px;
}

.login-page main.login-content {
    width: min(430px, calc(100% - 52px));
    margin: auto;
    padding: 48px 0 32px;
}

.login-kicker {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 15px;
    color: #596171;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.login-kicker span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #e30613;
    box-shadow: 0 0 0 5px rgba(227, 6, 19, .10);
}

.login-content h1 {
    margin: 0;
    color: #10131a;
    font-size: 46px;
    line-height: 1.05;
    font-weight: 900;
}

.login-lead {
    margin: 13px 0 31px;
    color: #687181;
    font-size: 16px;
    line-height: 1.55;
}

.login-alert {
    min-height: 48px;
    margin-bottom: 20px;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #9f1722;
    background: #fff0f1;
    border: 1px solid #ffc8cd;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
}

.login-alert i {
    color: #e30613;
    font-size: 17px;
}

.login-form {
    display: grid;
    gap: 19px;
}

.login-control {
    display: grid;
    gap: 8px;
}

.login-control label {
    color: #252b36;
    font-size: 13px;
    font-weight: 800;
}

.login-input {
    position: relative;
    height: 56px;
}

.login-input > i {
    position: absolute;
    z-index: 2;
    top: 50%;
    left: 17px;
    transform: translateY(-50%);
    color: #7b8492;
    font-size: 18px;
    pointer-events: none;
}

.login-input input {
    width: 100%;
    height: 56px;
    padding: 0 48px;
    color: #161b24;
    background: #ffffff;
    border: 1px solid #d9dde3;
    border-radius: 8px;
    outline: none;
    font-size: 15px;
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.login-input input::placeholder {
    color: #969eaa;
}

.login-input input:hover {
    border-color: #b6bdc7;
}

.login-input input:focus {
    border-color: #e30613;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(227, 6, 19, .10);
}

.password-toggle {
    position: absolute;
    z-index: 3;
    top: 8px;
    right: 8px;
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    padding: 0;
    color: #626b79;
    background: transparent;
    border: 0;
    border-radius: 8px;
    font-size: 18px;
    cursor: pointer;
}

.password-toggle:hover,
.password-toggle:focus-visible {
    color: #e30613;
    background: #fff0f1;
    outline: none;
}

.login-submit {
    width: 100%;
    height: 56px;
    margin-top: 5px;
    padding: 0 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #ffffff;
    background: #e30613;
    border: 1px solid #e30613;
    border-radius: 8px;
    box-shadow: 0 14px 28px rgba(227, 6, 19, .20);
    font-size: 15px;
    font-weight: 900;
    cursor: pointer;
    transition: transform .18s ease, background .18s ease, box-shadow .18s ease;
}

.login-submit:hover {
    transform: translateY(-1px);
    background: #c9000b;
    border-color: #c9000b;
    box-shadow: 0 17px 34px rgba(227, 6, 19, .25);
}

.login-submit:focus-visible {
    outline: 3px solid rgba(227, 6, 19, .22);
    outline-offset: 3px;
}

.login-submit:disabled {
    cursor: wait;
    opacity: .8;
    transform: none;
}

.login-register {
    margin-top: 29px;
    padding-top: 23px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    color: #707988;
    border-top: 1px solid #eceef1;
    font-size: 13px;
}

.login-register a {
    color: #d5000c;
    font-weight: 900;
    text-decoration: none;
}

.login-register a:hover {
    text-decoration: underline;
}

.login-footer {
    min-height: 62px;
    padding: 16px clamp(26px, 4vw, 54px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    color: #858d99;
    border-top: 1px solid #eceef1;
    font-size: 11px;
    font-weight: 700;
}

.login-footer a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #4f5866;
    text-decoration: none;
}

.login-footer a:hover {
    color: #e30613;
}

.login-visual {
    position: relative;
    min-width: 0;
    min-height: 100vh;
    min-height: 100dvh;
    overflow: hidden;
    background-color: #17110f;
    background-image: url('../../../assets/img/loquiero-rest-hero.webp');
    background-repeat: no-repeat;
    background-position: 72% center;
    background-size: cover;
}

.login-visual::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .16);
    pointer-events: none;
}

.login-visual-copy {
    position: absolute;
    z-index: 2;
    left: clamp(38px, 5vw, 76px);
    bottom: clamp(42px, 7vh, 78px);
    max-width: 430px;
    color: #ffffff;
    text-shadow: 0 2px 18px rgba(0, 0, 0, .45);
}

.login-visual-copy span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.login-visual-copy span i {
    color: #ff303b;
}

.login-visual-copy h2 {
    margin: 0;
    font-size: 48px;
    line-height: 1.02;
    font-weight: 900;
}

@media (max-width: 900px) {
    .login-layout {
        grid-template-columns: 1fr;
        grid-template-rows: 118px auto;
    }

    .login-visual {
        grid-row: 1;
        min-height: 118px;
        background-position: 72% 44%;
    }

    .login-visual-copy {
        display: none;
    }

    .login-panel {
        grid-row: 2;
        min-height: calc(100dvh - 118px);
        border-right: 0;
    }

    .login-page main.login-content {
        padding-top: 38px;
    }
}

@media (max-width: 560px) {
    .login-layout {
        grid-template-rows: 92px auto;
    }

    .login-visual {
        min-height: 92px;
        background-position: 72% 45%;
    }

    .login-panel {
        min-height: calc(100dvh - 92px);
    }

    .login-header {
        min-height: 70px;
        padding: 13px 20px;
    }

    .login-brand-mark {
        width: 40px;
        height: 40px;
        flex-basis: 40px;
    }

    .login-brand-copy strong {
        font-size: 14px;
    }

    .login-secure {
        width: 38px;
        min-width: 38px;
        padding: 0;
        justify-content: center;
        font-size: 0;
    }

    .login-page main.login-content {
        width: min(100% - 40px, 430px);
        padding: 30px 0;
    }

    .login-content h1 {
        font-size: 38px;
    }

    .login-lead {
        margin-bottom: 25px;
        font-size: 15px;
    }

    .login-input,
    .login-input input,
    .login-submit {
        height: 52px;
    }

    .password-toggle {
        top: 6px;
    }

    .login-register {
        margin-top: 24px;
        padding-top: 20px;
        flex-wrap: wrap;
    }

    .login-footer {
        min-height: 54px;
        padding: 14px 20px;
    }
}

/* Estilos para el Dashboard */
.navbar {
    height: 48px;
    display: flex;
    align-items: center;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(33, 40, 50, 0.15);
    background: linear-gradient(to right, #0061f2, #6900f2) !important;
    position: static; /* Cambiado a estático */
}

.navbar-brand {
    font-size: 1.1rem;
    font-weight: 600;
    padding: 0.5rem 1rem;
    background: none;
    box-shadow: none;
    line-height: 1;
}

.sidebar {
    position: fixed;
    top: 48px; /* Ajustar para que no se superponga con el encabezado */
    bottom: 0;
    left: 0;
    z-index: 100;
    padding: 0;
    box-shadow: 0.15rem 0 1.75rem 0 rgba(33, 40, 50, 0.15);
    background: #fff !important;
}

.sidebar-sticky {
    position: relative;
    top: 0;
    height: calc(100vh - 48px);
    padding-top: 0.5rem;
    overflow-x: hidden;
    overflow-y: auto;
}

.sidebar .nav-link {
    font-weight: 500;
    color: #363d47;
    padding: 0.5rem 0.75rem; /* Reducido */
    display: flex;
    align-items: center;
    gap: 0.5rem; /* Reducido */
    transition: all 0.3s ease;
    border-radius: 0.35rem;
    margin: 0.15rem 0.25rem; /* Reducido */
}

.sidebar .nav-link {
    font-size: 0.9rem; /* Reducido */
}

.sidebar .nav-link:hover {
    color: #0061f2;
    background-color: #f8f9fa;
}

.sidebar .nav-link.active {
    color: #fff;
    background: linear-gradient(45deg, #0061f2, #6900f2);
}

.sidebar .nav-link i {
    font-size: 1.1rem;
    opacity: 0.8;
}

/* Estilos para las tarjetas */
.card {
    border: none;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(33, 40, 50, 0.15);
    transition: transform 0.15s ease-in-out;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
    background: #fff;
}

.card:hover {
    transform: translateY(-2px);
}

.card-header {
    background: transparent;
    border-bottom: 1px solid rgba(33, 40, 50, 0.125);
    padding: 1rem 1.35rem;
}

.card-title {
    color: #363d47;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

/* Estilos para tablas */
.table {
    margin-bottom: 0;
}

.table th {
    font-weight: 600;
    background-color: #f8f9fa;
    border-top: none;
}

/* Estilos para botones */
.btn {
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 0.35rem;
    transition: all 0.15s ease-in-out;
}

.btn-primary {
    background: linear-gradient(45deg, #0061f2, #6900f2);
    border: none;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 0.15rem 1.75rem 0 rgba(33, 40, 50, 0.15);
}

/* Estilos para alertas */
.alert {
    border-radius: 0.35rem;
    border: none;
    padding: 1rem 1.25rem;
}

.alert-success {
    background-color: rgba(40, 167, 69, 0.1);
    color: #28a745;
}

.alert-danger {
    background-color: rgba(220, 53, 69, 0.1);
    color: #dc3545;
}

/* Estilos para el generador QR */
#qrPreview {
    min-height: 256px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px dashed #dee2e6;
    border-radius: 0.5rem;
    margin: 1rem 0;
    padding: 1rem;
    background-color: #f8f9fa;
    transition: all 0.3s ease;
}

#qrPreview:hover {
    border-color: #0061f2;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(33, 40, 50, 0.15);
}

#qrPreview img {
    max-width: 100%;
    height: auto;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(33, 40, 50, 0.15);
    border-radius: 0.35rem;
}

/* Estilos para inputs */
.form-control:focus {
    border-color: #0061f2;
    box-shadow: 0 0 0 0.25rem rgba(0, 97, 242, 0.25);
}

main {
    padding-top: 48px; /* Ajustar el margen superior para evitar superposición */
}

.d-flex.justify-content-between.flex-wrap.flex-md-nowrap.align-items-center {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid #dee2e6;
}

/* Media queries */
@media (max-width: 767.98px) {
    .sidebar {
        top: 0;
        padding-top: 48px;
    }
    
    .sidebar-sticky {
        height: calc(100vh - 48px);
    }
}
