/*
Modern Login Styles - Enhanced Design
*/

/* Base Styles */
html {
    color: #263238;
    background:
        radial-gradient(circle at top left, rgba(38, 208, 206, 0.24), transparent 34%),
        linear-gradient(135deg, #113b5f 0%, #0f766e 52%, #f5b642 100%);
    background-attachment: fixed;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    min-height: 100vh;
}

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

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

/* Login Wrapper */
.login-wrapper {
    width: 100%;
    min-height: 100vh;
    padding: 24px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
}

/* Login Container */
.login-container {
    width: 100%;
    max-width: 390px;
    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: slideUp 0.6s ease-out;
    position: relative;
    overflow: hidden;
    box-sizing: border-box;
}

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

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

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

.login-logo {
    max-width: 190px;
    max-height: 68px;
    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;
}

.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: #0f9f96;
    background-color: #fff;
    box-shadow: 0 0 0 3px rgba(15, 159, 150, 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: #0f9f96;
}

.toggle-password:focus {
    outline: none;
    color: #0f9f96;
}

/* 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: #0f9f96;
}

.checkbox-container input:checked~.checkmark {
    background: #0f766e;
    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: #0f766e;
    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(15, 118, 110, 0.28);
}

.btn-login:hover {
    transform: translateY(-2px);
    background: #115e59;
    box-shadow: 0 10px 22px rgba(15, 118, 110, 0.34);
}

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

/* Recent Users */
.recent-users {
    margin-top: 25px;
    padding-top: 15px;
    border-top: 1px solid #e2e8f0;
}

.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: 350px;
    /* Limit height */
    overflow-y: auto;
    /* Enable vertical scroll */
    padding-right: 5px;
    /* Space for scrollbar */
}

/* 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: #0f9f96;
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(15, 159, 150, 0.12);
}

.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;
}

/* 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 #0f9f96;
    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 {
        align-items: flex-start;
        padding: 14px;
    }

    .login-container {
        max-width: none;
        padding: 24px 18px;
        border-radius: 10px;
    }

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

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

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

@media (max-height: 620px) {
    .login-wrapper {
        align-items: flex-start;
    }

    .login-container {
        margin: 12px 0;
    }
}
