/* Reset */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body,
html {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #030201;
    color: white;
    padding: 20px;
}

.container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    max-width: 1200px;
    width: 100%;
    margin-top: clamp(9rem, 8vw, 12rem);
    margin-left: auto;
    margin-right: auto;
    align-items: center;
    justify-items: center;
    min-height: calc(100vh - 200px);
}


/* Left logo block */

.logo-section {
    width: 100%;
    background-color: transparent;
    display: flex;
    justify-content: center;
    align-items: center;
}

.logo-container img {
    position: relative;
    width: 100%;
    max-width: 100%;
    background-color: rgb(0, 0, 0);
    padding: 15px 30px 20px 30px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
}

.logo-section img {
    max-width: 100%;
    height: auto;
    max-height: 270px;
    object-fit: contain;
}


/* Logo: cow icon with white color stroke */

.logo-icon {
    width: 90px;
    height: auto;
    flex-shrink: 0;
}

.logo-text {
    font-family: 'Arial Black', Arial, sans-serif;
    font-weight: 900;
    font-style: italic;
    font-size: 2.4rem;
    line-height: 1;
    white-space: nowrap;
    user-select: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.logo-text .white {
    color: white;
}

.logo-text .red {
    color: #AF1F1F;
}

.subtext {
    color: #AF1F1F;
    font-weight: 600;
    font-size: 1rem;
    letter-spacing: .15em;
    margin-top: 6px;
    padding-left: calc(90px + 12px);
    user-select: none;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}


/* Right login form */

.form-section {
    width: 100%;
    max-width: 520px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    justify-content: center;
    align-items: stretch;
}

label {
    font-size: 1rem;
    margin-bottom: 6px;
    user-select: none;
}

input::placeholder {
    font-style: italic;
    color: #e0dcdccc;
}


/* Password input container to hold the eye icon */

.input-container {
    position: relative;
    width: 100%;
}

.toggle-password {
    position: absolute;
    cursor: pointer;
    top: 50%;
    right: 15px;
    transform: translateY(-50%);
    fill: white;
    width: 18px;
    height: 18px;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.toggle-password:hover {
    opacity: 1;
}


/* Checkbox container */

.checkbox-container {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 5px;
    user-select: none;
    font-size: 0.9rem;
}


/* Custom green check icon */

.custom-checkbox {
    width: 22px;
    height: 22px;
    background: none;
    border: 2.5px solid #04aa04;
    border-radius: 5px;
    position: relative;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
}

.custom-checkbox svg {
    display: none;
    stroke: #04aa04;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
    width: 14px;
    height: 14px;
}

input[type="checkbox"] {
    display: none;
}

input[type="checkbox"]:checked+.custom-checkbox svg {
    display: block;
}


/* Login button */

.btn-login {
    margin-top: 12px;
    width: 240px;
    max-width: 100%;
    background-color: #AF1F1F;
    border-radius: 12px;
    padding: 14px;
    border: 1px solid #7b1212;
    color: white;
    font-weight: 700;
    font-family: 'Exo', sans-serif, Arial, sans-serif;
    font-size: 1.1rem;
    text-transform: uppercase;
    cursor: pointer;
    user-select: none;
    transition: background-color 0.3s ease;
    letter-spacing: 0.07em;
}

.btn-login:hover,
.btn-login:focus {
    background-color: #840f0f;
    outline: none;
}


/* Bottom question */

.register-prompt {
    margin-top: 15px;
    font-size: 0.9rem;
    user-select: none;
    color: white;
}

.register-prompt strong {
    font-weight: 700;
    cursor: pointer;
}

.register-prompt strong:hover {
    text-decoration: underline;
}


/*Estilos para el boton de acceder como administrador */

.admin-access-container {
    position: absolute;
    top: 20px;
    right: 30px;
    z-index: 1010;
}

.admin-button {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    background: rgba(255, 0, 0, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: #ffffff;
    text-decoration: none;
    font-size: 0.9em;
    font-weight: 600;
    letter-spacing: 0.03em;
    backdrop-filter: blur(10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.admin-button:hover {
    background: rgba(35, 35, 35, 0.95);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 12px rgba(0, 0, 0, 0.15), 0 0 0 2px rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

.admin-button:active {
    transform: translateY(1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.admin-icon {
    width: 18px;
    height: 18px;
    opacity: 0.9;
    transition: all 0.3s ease;
}

.admin-button:hover .admin-icon {
    opacity: 1;
    transform: rotate(-10deg);
}


/* mensaje de error */

.message-container {
    width: 100%;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 8px;
    display: none;
}

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

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

.message-container.show {
    display: block;
    animation: fadeIn 0.5s;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}


/*mensaje */

.message-container {
    width: 100%;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 8px;
    display: none;
}

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

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

.message-container.show {
    display: block;
    animation: fadeIn 0.5s;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}


/* Ajustes responsivos para pantallas más pequeñas */

@media (max-width: 992px) {
    .container {
        grid-template-columns: 1fr;
        gap: 24px;
        align-items: center;
        justify-items: center;
        margin-top: 7rem;
        min-height: auto;
    }
    .logo-section,
    .form-section {
        max-width: 100%;
        width: 100%;
        justify-content: center;
        align-items: center;
    }
    .logo-container {
        max-width: 400px;
        padding: 12px 20px 18px 20px;
    }
    .login-container-wrapper {
        width: 90%;
        max-width: 520px;
    }
    .btn-login {
        width: 100%;
        max-width: none;
    }
    .admin-access-container {
        position: relative;
        top: auto;
        right: auto;
        margin-top: 20px;
        display: flex;
        justify-content: center;
        width: 100%;
    }
}


/*ESTILOS DEL  HEADER DE ACCESO DISTRICARNES*/

.login-header {
    background: linear-gradient(135deg, #cc0303 20%, #000000 100%);
    /* Fondo oscuro elegante */
    color: #ffffff;
    padding: 2rem 1.5rem;
    width: 100%;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
}

.login-header h1 {
    font-weight: 700;
    font-size: 2.2rem;
    margin-bottom: 0.25rem;
}

.login-header h1 .bi {
    font-size: 2rem;
    margin-right: 0.5rem;
    vertical-align: -0.1em;
    /* Ajuste fino de alineación vertical */
}

.login-header p.lead {
    font-size: 1rem;
    color: #e0e0e0;
    margin-bottom: 0;
}


/*contenedor del login*/

.login-container-wrapper {
    width: 100%;
    max-width: 450px;
    padding: 1rem;
}

.login-form-card {
    background-color: #000000;
    padding: 2rem;
    border-radius: 0.75rem;
    box-shadow: 0 0.75rem 1.5rem rgba(0, 0, 0, 0.1);
    width: 100%;
    border: 1px solid #ff000000;
    box-sizing: border-box
}

.login-form-card .form-title {
    text-align: center;
    font-size: 1.8rem;
    font-weight: 700;
    color: #fffbfb;
    margin-bottom: 0.5rem;
}

.login-form-card .form-title .highlight {
    color: #ff0000;
}

.login-form-card .form-subtitle {
    text-align: center;
    color: #a8a8a8;
    margin-bottom: 2rem;
    font-size: 0.95rem;
}

.login-form-card .form-label {
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.3rem;
}


/* Ajustes para input-group para correcta alineación de iconos */

.login-form-card .input-group {
    border-radius: 0.375rem;
    /* Bootstrap .rounded para el grupo completo */
    /* overflow: hidden; /* Ayuda a que los border-radius internos se apliquen bien */
    border: 1px solid #ff0000;
    /* Borde para el grupo completo */
    display: flex;
    align-items: center;
}

.login-form-card .input-group:focus-within {
    /* Estilo cuando el grupo tiene foco */
    border-color: #ff0000;
    box-shadow: 0 0 0 0.25rem rgba(255, 37, 37, 0.35);
}

.login-form-card .input-group-text {
    background-color: #000000;
    border: none;
    /* Sin borde individual, el grupo lo maneja */
    /* border-right: 1px solid #ced4da; /* Borde derecho para separar del input */
    padding: 0.85rem 0.75rem;
    border-radius: 0;
    /* Sin border-radius individual */
    display: flex;
    align-items: center;
}

.login-form-card .input-group .form-control {
    border: none;
    /* Sin borde individual, el grupo lo maneja */
    border-radius: 0;
    /* Sin border-radius individual */
    padding: 0.85rem 1rem;
    font-size: 1rem;
    box-shadow: none;
    /* Quitar sombra de foco individual del input */
    flex: 1;
    outline: none;
    background-color: black;
    color: white;
}

.login-form-card .input-group .form-control:focus {
    /* El foco se maneja en .input-group:focus-within */
    box-shadow: none;
    border-color: transparent;
    outline: none;
    /* Evitar doble borde en foco */
}

.login-form-card .input-group .bi {
    color: #ff0000;
    font-size: 1.1rem;
}

.btn-login-custom {
    background-color: #ff0000;
    color: rgb(255, 255, 255);
    font-weight: 700;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    border: 1px solid #ff0000;
    transition: all 0.25s ease-in-out;
    text-transform: uppercase;
    width: 100%;
    font-size: 1rem;
    margin-top: 1.5rem;
}

.btn-login-custom:hover,
.btn-login-custom:focus {
    background-color: rgb(0, 0, 0);
    color: white;
    border-color: #ff0000;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 0, 0, 0.4);
}

.btn-login-custom .bi {
    margin-right: 0.5rem;
}

.btn-admin-custom {
    background-color: #000000;
    color: white;
    font-weight: 500;
    padding: 0.65rem 1.5rem;
    border-radius: 50px;
    border: 1px solid #f70505;
    transition: all 0.25s ease-in-out;
    width: 100%;
    font-size: 0.9rem;
    margin-top: 0.75rem;
}

.btn-admin-custom:hover,
.btn-admin-custom:focus {
    background-color: #ff00005b;
    color: white;
    border-color: #ff0000;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.login-links {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.9rem;
}

.login-links a {
    color: #ff0000;
    font-weight: 500;
    text-decoration: none;
}

.login-links a:hover {
    text-decoration: underline;
    color: #df0303;
}

.btn-phone-custom {
    background-color: #212529;
    color: white;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    border: 1px solid #ff0000;
    transition: all 0.25s ease-in-out;
    width: 100%;
    font-size: 1rem;
    text-transform: none;
}

.btn-phone-custom:hover,
.btn-phone-custom:focus {
    background-color: #343a40;
    color: white;
    border-color: #ff0000;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(255, 0, 0, 0.2);
}

.error-text {
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 0.5rem;
    display: none;
    text-align: left;
}

@media (max-width: 576px) {
    .container {
        margin-top: 6rem;
    }
    .login-header h1 {
        font-size: 1.8rem;
    }
    .login-header p.lead {
        font-size: 0.9rem;
    }
    .login-form-card {
        padding: 2rem 1.5rem;
    }
    .login-form-card .form-title {
        font-size: 1.6rem;
    }
    .login-container-wrapper {
        margin-top: 10px;
    }
    .admin-access-container {
        margin-top: 10px;
        margin-bottom: 20px;
    }
}
