/*
Modern Login Styles - AsiriDent Brand Colors
Color primario: #e91e8c (rosa/fucsia del logo)
*/

/* Base Styles */
html {
    color: #263238;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    min-height: 100vh;
    min-height: 100dvh;
}

body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
    overflow-y: auto;
    position: relative;
}

/* Fondo con gradiente usando los colores del logo: azul + rosa */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background:
        radial-gradient(circle at top left, rgba(74, 125, 168, 0.28), transparent 38%),
        radial-gradient(circle at bottom right, rgba(233, 30, 140, 0.18), transparent 40%),
        linear-gradient(135deg, #1a1150 0%, #4a7da8 52%, #e91e8c 100%);
    background-size: cover;
    background-repeat: no-repeat;
    background-attachment: scroll;
}

.app-clearfix:after {
    visibility: hidden;
    display: block;
    font-size: 0;
    content: '.';
    clear: both;
    height: 0;
}

/* Login Wrapper */
.login-wrapper {
    width: 100%;
    height: 100vh;
    height: 100dvh;
    min-height: 100vh;
    min-height: 100dvh;
    padding: 22px 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
    overflow: hidden;
    -webkit-overflow-scrolling: touch;
}

/* Login Container */
.login-container {
    width: 100%;
    max-width: 390px;
    height: auto;
    min-height: 0;
    max-height: calc(100vh - 44px);
    max-height: calc(100dvh - 44px);
    background: rgba(255, 255, 255, 0.97);
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.42);
    box-shadow: 0 22px 55px rgba(13, 34, 54, 0.28);
    padding: 32px 28px;
    animation: none;
    position: relative;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
    box-sizing: border-box;
    margin: auto;
    scrollbar-gutter: stable;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Header */
.login-header {
    text-align: center;
    margin-bottom: 5px;
}

.login-logo {
    max-width: 320px;
    max-height: 120px;
    width: auto;
    height: auto;
    margin-bottom: 15px;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1));
    transition: transform 0.3s ease;
}

.login-logo:hover {
    transform: scale(1.05);
}

.login-title {
    font-size: 25px;
    font-weight: 700;
    color: #16324f;
    margin: 0 0 5px;
}

.login-subtitle {
    font-size: 13px;
    color: #60717c;
    margin: 0;
}

/* Form */
.login-form {
    margin-bottom: 15px;
    flex: 0 0 auto;
}

.input-group {
    margin-bottom: 15px;
}

.input-group label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #344b5a;
    margin-bottom: 6px;
}

.form-control {
    width: 100%;
    padding: 11px 14px;
    font-size: 14px;
    font-family: inherit;
    color: #263238;
    background-color: #f8fbfc;
    border: 1px solid #d6e1e6;
    border-radius: 8px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.form-control:focus {
    outline: none;
    border-color: #4a7da8;
    background-color: #fff;
    box-shadow: 0 0 0 3px rgba(74, 125, 168, 0.14);
}

.form-control::placeholder {
    color: #78909c;
}

/* Password Wrapper */
.password-wrapper {
    position: relative;
}

.toggle-password {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #a0aec0;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

.toggle-password:hover {
    color: #4a7da8;
}

.toggle-password:focus {
    outline: none;
    color: #4a7da8;
}

/* Form Actions */
.form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    gap: 12px;
}

/* Checkbox */
.checkbox-container {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 13px;
    color: #344b5a;
    user-select: none;
}

.checkbox-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    height: 18px;
    width: 18px;
    background-color: #fff;
    border: 1px solid #c7d5dc;
    border-radius: 4px;
    margin-right: 8px;
    position: relative;
    transition: all 0.2s ease;
}

.checkbox-container:hover input~.checkmark {
    border-color: #4a7da8;
}

.checkbox-container input:checked~.checkmark {
    background: #4a7da8;
    border-color: transparent;
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
    left: 5px;
    top: 2px;
    width: 4px;
    height: 9px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-container input:checked~.checkmark:after {
    display: block;
}

/* Button */
.btn-login {
    background: linear-gradient(135deg, #4a7da8 0%, #2c5f8a 100%);
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 18px rgba(74, 125, 168, 0.32);
}

.btn-login:hover {
    transform: translateY(-2px);
    background: linear-gradient(135deg, #2c5f8a 0%, #1a3f60 100%);
    box-shadow: 0 10px 22px rgba(74, 125, 168, 0.42);
}

.btn-login:active {
    transform: translateY(0);
}

/* Recent Users */
.recent-users {
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid #e2e8f0;
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
}

.recent-users h3 {
    font-size: 12px;
    font-weight: 600;
    color: #60717c;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 10px;
}

.users-list {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 160px;
    overflow-y: auto;
    padding-right: 5px;
}

/* Custom Scrollbar for Users List */
.users-list::-webkit-scrollbar {
    width: 6px;
}

.users-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 8px;
}

.users-list::-webkit-scrollbar-thumb {
    background: #cbd5e0;
    border-radius: 10px;
}

.users-list::-webkit-scrollbar-thumb:hover {
    background: #a0aec0;
}

.users-list li {
    display: flex;
    align-items: center;
    padding: 8px;
    background-color: #f7fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 8px;
}

.users-list li:hover {
    background-color: #fff;
    border-color: #4a7da8;
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(74, 125, 168, 0.14);
}

.users-list li img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 10px;
    border: 2px solid #e2e8f0;
}

.user-info {
    display: flex;
    flex-direction: column;
}

.user-info .username {
    font-size: 13px;
    font-weight: 600;
    color: #2d3748;
}

.user-info .fullname {
    font-size: 11px;
    color: #60717c;
}

.recent-user-select {
    width: 100%;
    margin-top: 2px;
    padding: 9px 12px;
    font-size: 12px;
    font-family: inherit;
    color: #344b5a;
    background-color: #f8fbfc;
    border: 1px solid #d6e1e6;
    border-radius: 8px;
    box-sizing: border-box;
}

.recent-user-select:focus {
    outline: none;
    border-color: #4a7da8;
    background-color: #fff;
    box-shadow: 0 0 0 3px rgba(74, 125, 168, 0.14);
}

/* Loading Indicator */
.v-loading-indicator {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(4px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
    border-radius: 20px;
}

.spinner {
    width: 36px;
    height: 36px;
    border: 3px solid #e2e8f0;
    border-top: 3px solid #4a7da8;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Responsive */
@media (max-width: 480px) {
    .login-wrapper {
        padding: 22px 12px;
    }

    .login-container {
        max-width: 100%;
        height: auto;
        max-height: calc(100vh - 44px);
        max-height: calc(100dvh - 44px);
        padding: 24px 20px;
        border-radius: 12px;
        margin: auto;
    }

    .login-title {
        font-size: 22px;
    }

    .form-control {
        font-size: 16px;
    }

    .form-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .btn-login {
        width: 100%;
        min-height: 42px;
    }
}

@media (max-height: 760px) {
    .login-wrapper {
        padding-top: 22px;
        padding-bottom: 22px;
    }

    .login-container {
        height: auto;
        max-height: calc(100vh - 44px);
        max-height: calc(100dvh - 44px);
        margin: auto;
        padding-top: 18px;
        padding-bottom: 18px;
    }

    .login-logo {
        max-height: 90px;
        margin-bottom: 10px;
    }

    .login-title {
        font-size: 22px;
        margin-bottom: 2px;
    }

    .login-subtitle {
        font-size: 12px;
    }

    .input-group {
        margin-bottom: 10px;
    }

    .form-actions {
        margin-top: 12px;
    }

    .btn-login {
        padding-top: 9px;
        padding-bottom: 9px;
    }

    .recent-users {
        margin-top: 14px;
        padding-top: 10px;
    }

    .users-list {
        max-height: 132px;
    }
}

@media (max-height: 620px) {
    .login-container {
        padding-top: 14px;
        padding-bottom: 14px;
    }

    .login-header {
        margin-bottom: 2px;
    }

    .login-logo {
        max-width: 280px;
        max-height: 80px;
        margin-bottom: 8px;
    }

    .login-title {
        font-size: 20px;
    }

    .login-subtitle {
        display: none;
    }

    .form-control {
        padding-top: 9px;
        padding-bottom: 9px;
    }

    .users-list {
        max-height: 112px;
    }
}

@media (max-height: 520px) {
    .login-wrapper {
        padding-top: 20px;
        padding-bottom: 20px;
    }

    .login-container {
        height: auto;
        max-height: calc(100vh - 40px);
        max-height: calc(100dvh - 40px);
        padding: 12px 16px;
        margin: auto;
    }

    .login-logo {
        display: none;
    }

    .input-group {
        margin-bottom: 8px;
    }

    .recent-users {
        margin-top: 10px;
        padding-top: 8px;
    }

    .users-list {
        max-height: 96px;
    }
}
