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

:root {
    --primary-color: #00B3D7;
    --primary-dark: #009BBB;
    --primary-light: #DFF8FC;
    --secondary-color: #005F73;
    --secondary-dark: #0A3943;
    --text-color: #1F2937;
    --text-soft: #667085;
    --border-color: #D9E2EC;
    --white: #FFFFFF;
    --danger: #E5484D;
    --success: #22C55E;
    --shadow-soft: 0 10px 28px rgba(0, 0, 0, 0.10);
    --shadow-hover: 0 14px 34px rgba(0, 0, 0, 0.13);
    --radius-lg: 20px;
    --radius-md: 14px;
    --radius-sm: 10px;
    --transition: all 0.28s ease;
    --font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

html,
body {
    min-height: 100%;
    overflow-x: hidden;
    font-family: var(--font-family);
    background: linear-gradient(135deg, #004B5A 0%, #007A92 100%);
    color: var(--text-color);
}

body {
    line-height: 1.5;
}

img {
    max-width: 100%;
    display: block;
}

a {
    transition: var(--transition);
}

.page-container {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

/* =========================
   BENEFICIOS - DESKTOP
========================= */
@media (min-width: 1024px) {
    .benefits-side {
        width: 52%;
        background-image: url('/dif-admin/app/views/vws_acceso/acceso/img/2.png');
        background-size: cover;
        background-position: center;
        position: relative;
        overflow: hidden;
    }

    .benefits-side::before {
        content: '';
        position: absolute;
        inset: 0;
        background:
            linear-gradient(135deg, rgba(0, 46, 56, 0.80), rgba(0, 179, 215, 0.50));
    }

    .benefits-overlay {
        position: relative;
        z-index: 1;
        min-height: 100vh;
        padding: 36px;
        display: flex;
        align-items: center;
    }

    .benefits-content {
        max-width: 520px;
        color: var(--white);
        margin: 0 auto;
    }

    .benefits-content h2 {
        font-size: 30px;
        line-height: 1.18;
        font-weight: 700;
        margin-bottom: 22px;
        position: relative;
        padding-bottom: 14px;
    }

    .benefits-content h2::after {
        content: '';
        position: absolute;
        left: 0;
        bottom: 0;
        width: 64px;
        height: 4px;
        border-radius: 999px;
        background: rgba(255, 255, 255, 0.92);
    }

    .benefits-content ul {
        list-style: none;
        display: grid;
        gap: 12px;
        padding: 20px;
        border-radius: 18px;
        background: rgba(255, 255, 255, 0.08);
        backdrop-filter: blur(10px);
        box-shadow: 0 14px 26px rgba(0, 0, 0, 0.11);
        border: 1px solid rgba(255, 255, 255, 0.14);
    }

    .benefits-content li {
        display: flex;
        align-items: flex-start;
        gap: 12px;
        padding: 12px 14px;
        border-radius: 13px;
        background: rgba(255, 255, 255, 0.08);
        transition: var(--transition);
        font-size: 14px;
        line-height: 1.5;
    }

    .benefits-content li:hover {
        transform: translateX(4px);
        background: rgba(255, 255, 255, 0.14);
    }

    .benefits-content li i {
        width: 34px;
        height: 34px;
        min-width: 34px;
        border-radius: 50%;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        background: var(--white);
        color: var(--secondary-color);
        box-shadow: 0 6px 16px rgba(0, 0, 0, 0.14);
        font-size: 14px;
        margin-top: 1px;
    }

    .login-side {
        width: 48%;
    }
}

/* =========================
   LOGIN SIDE
========================= */
.login-side {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 22px 18px;
    background:
        radial-gradient(circle at top right, rgba(255,255,255,0.20), transparent 30%),
        linear-gradient(135deg, #00A8C9 0%, #00B3D7 45%, #33C5E3 100%);
}

.login-box {
    width: 100%;
    max-width: 430px;
    background: rgba(255, 255, 255, 0.97);
    border-radius: var(--radius-lg);
    padding: 28px 24px;
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(255, 255, 255, 0.55);
    backdrop-filter: blur(12px);
    transition: var(--transition);
}

.login-box:hover {
    box-shadow: var(--shadow-hover);
}

/* =========================
   LOGOS
========================= */
.logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 14px;
}

.logo-difundir {
    width: 142px;
    height: auto;
}

.logo-separator {
    width: 1px;
    height: 46px;
    background: linear-gradient(to bottom, transparent, rgba(0, 95, 115, 0.22), transparent);
    flex-shrink: 0;
}

.logo-cliente-wrap {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid rgba(0, 179, 215, 0.22);
    background: #F8FAFC;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.08);
    flex-shrink: 0;
}

.logo-cliente-wrap img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 8px;
}

/* =========================
   BIENVENIDA
========================= */
.welcome-message {
    text-align: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(0, 95, 115, 0.10);
}

.welcome-message p {
    color: var(--text-soft);
    font-size: 13px;
    line-height: 1.5;
}

.welcome-message b {
    color: var(--secondary-color);
}

/* =========================
   TITULO LOGIN
========================= */
.login-form-container h2 {
    text-align: center;
    color: var(--secondary-dark);
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 18px;
    letter-spacing: -0.3px;
}

/* =========================
   FORMULARIO
========================= */
.login-form {
    width: 100%;
}

.form-group {
    position: relative;
    margin-bottom: 17px;
}

.form-group input {
    width: 100%;
    height: 50px;
    padding: 18px 40px 8px 14px;
    border: 1px solid var(--border-color);
    border-radius: 13px;
    background: #F8FBFC;
    font-size: 14px;
    color: var(--text-color);
    outline: none;
    transition: var(--transition);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.7);
}

.form-group input::placeholder {
    color: transparent;
}

.form-group label {
    position: absolute;
    left: 14px;
    top: 15px;
    color: var(--text-soft);
    font-size: 14px;
    pointer-events: none;
    transition: var(--transition);
    background: transparent;
}

.form-group input:focus,
.form-group input:not(:placeholder-shown),
.form-group input:valid {
    background: var(--white);
    border-color: rgba(0, 179, 215, 0.55);
    box-shadow: 0 0 0 4px rgba(0, 179, 215, 0.10);
}

.form-group input:focus + label,
.form-group input:not(:placeholder-shown) + label,
.form-group input:valid + label {
    top: 6px;
    font-size: 10px;
    font-weight: 600;
    color: var(--primary-dark);
}

.password-group {
    position: relative;
}

.toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #7A8794;
    cursor: pointer;
    font-size: 14px;
    transition: var(--transition);
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.toggle-password:hover {
    color: var(--secondary-color);
    background: rgba(0, 179, 215, 0.08);
}

/* =========================
   RECORDAR
========================= */
.remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    padding-left: 2px;
}

.remember-me input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--primary-color);
    cursor: pointer;
    flex-shrink: 0;
}

.remember-me span {
    color: var(--text-soft);
    font-size: 13px;
}

/* =========================
   BOTONES
========================= */
button,
.recovery-button {
    width: 100%;
    min-height: 48px;
    border: none;
    border-radius: 13px;
    font-size: 14px;
    font-weight: 600;
    color: var(--white);
    cursor: pointer;
    transition: var(--transition);
}

#btn-autenticate {
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-dark));
    box-shadow: 0 10px 18px rgba(0, 95, 115, 0.18);
}

#btn-autenticate:hover {
    transform: translateY(-1px);
    box-shadow: 0 13px 22px rgba(0, 95, 115, 0.23);
}

#btn-autenticate:active {
    transform: translateY(0);
}

#btn-autenticate i {
    margin-right: 6px;
}

.recovery-button {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 10px 18px rgba(0, 179, 215, 0.16);
}

.recovery-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 13px 22px rgba(0, 179, 215, 0.20);
}

/* =========================
   LINKS
========================= */
.forgot-password {
    text-align: center;
    margin-top: 13px;
}

.forgot-password a,
.modal-footer a {
    color: var(--secondary-color);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
}

.forgot-password a:hover,
.modal-footer a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* =========================
   MENSAJES
========================= */
.error-message {
    display: none;
    margin-bottom: 18px;
    padding: 13px 14px;
    border-radius: 13px;
    background: #FFF1F2;
    border: 1px solid rgba(229, 72, 77, 0.18);
    border-left: 4px solid var(--danger);
    color: #7F1D1D;
    box-shadow: 0 6px 14px rgba(229, 72, 77, 0.08);
}

.error-message.success {
    background: #F0FDF4;
    border: 1px solid rgba(34, 197, 94, 0.18);
    border-left: 4px solid var(--success);
    color: #166534;
}

.error-message .error-title {
    margin: 0 0 6px;
    font-size: 14px;
    font-weight: 700;
}

.error-message .error-description {
    margin: 0;
    font-size: 12px;
    line-height: 1.45;
}

/* =========================
   MODAL
========================= */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    padding: 18px;
    background: rgba(0, 39, 48, 0.48);
    backdrop-filter: blur(6px);
    z-index: 1000;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.25s ease;
}

.modal-content {
    width: 100%;
    max-width: 410px;
    border-radius: 18px;
    overflow: hidden;
    background: var(--white);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.18);
    animation: slideIn 0.25s ease;
}

.modal-header {
    position: relative;
    padding: 20px 22px;
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    color: var(--white);
}

.modal-header h3 {
    font-size: 20px;
    line-height: 1.2;
    font-weight: 700;
    margin: 0;
    padding-right: 34px;
}

.close-modal {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    cursor: pointer;
    font-size: 22px;
    transition: var(--transition);
}

.close-modal:hover {
    background: rgba(255, 255, 255, 0.14);
}

.modal-body {
    padding: 22px 22px 20px;
}

.modal-description {
    color: var(--text-soft);
    font-size: 13px;
    line-height: 1.55;
    margin-bottom: 18px;
}

.modal-footer {
    text-align: center;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(0, 95, 115, 0.08);
}

.modal-footer p {
    color: var(--text-soft);
    font-size: 12px;
}

/* =========================
   ANIMACIONES
========================= */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =========================
   RESPONSIVE
========================= */
@media (max-width: 1023px) {
    .benefits-side {
        display: none;
    }

    .login-side {
        width: 100%;
        min-height: 100vh;
        padding: 16px 12px;
    }

    .login-box {
        max-width: 430px;
        padding: 24px 20px;
        border-radius: 18px;
    }
}

@media (max-width: 640px) {
    .page-container {
        min-height: 100vh;
    }

    .login-side {
        min-height: 100vh;
        padding: 12px 10px;
        align-items: center;
    }

    .login-box {
        max-width: 100%;
        padding: 20px 16px;
        border-radius: 16px;
    }

    .logo-container {
        gap: 12px;
        margin-bottom: 12px;
    }

    .logo-difundir {
        width: 118px;
    }

    .logo-separator {
        height: 36px;
    }

    .logo-cliente-wrap {
        width: 50px;
        height: 50px;
    }

    .welcome-message {
        margin-bottom: 14px;
        padding-bottom: 12px;
    }

    .welcome-message p {
        font-size: 12px;
        line-height: 1.42;
    }

    .login-form-container h2 {
        font-size: 21px;
        margin-bottom: 15px;
    }

    .form-group {
        margin-bottom: 14px;
    }

    .form-group input {
        height: 46px;
        padding: 17px 38px 8px 12px;
        font-size: 13px;
        border-radius: 12px;
    }

    .form-group label {
        left: 12px;
        top: 13px;
        font-size: 13px;
    }

    .form-group input:focus + label,
    .form-group input:not(:placeholder-shown) + label,
    .form-group input:valid + label {
        top: 6px;
        font-size: 10px;
    }

    .toggle-password {
        right: 12px;
        width: 24px;
        height: 24px;
        font-size: 14px;
    }

    .remember-me {
        gap: 8px;
        margin-bottom: 15px;
    }

    .remember-me input[type="checkbox"] {
        width: 16px;
        height: 16px;
    }

    .remember-me span,
    .forgot-password a,
    .modal-description {
        font-size: 12px;
    }

    #btn-autenticate,
    .recovery-button {
        min-height: 46px;
        font-size: 13px;
        border-radius: 12px;
    }

    .modal-content {
        max-width: 100%;
        border-radius: 16px;
    }

    .modal-header,
    .modal-body {
        padding-left: 16px;
        padding-right: 16px;
    }

    .modal-header h3 {
        font-size: 18px;
    }
}