:root {
    --primary: #1976D2;
    --success: #4CAF50;
    --error: #F44336;
    --grey: #757575;
    --light-grey: #F5F5F5;
    --border: #E0E0E0;
    --text: #212121;
    --white: #FFFFFF;
    --shadow: 0 2px 4px rgba(0,0,0,0.1);
    --radius: 8px;
    --transition: all 0.2s ease;
}

* {
    box-sizing: border-box;
}

.modern-login-container {
    min-height: 100vh;
    background: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'MainFont', -apple-system, BlinkMacSystemFont, Arial, sans-serif;
}

.login-content {
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

.app-logo {
    width: 50px;
    height: 50px;
    display: block;
    margin: 0 auto 30px;
    border-radius: 10px;
}

.login-wrapper {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 30px;
    box-shadow: var(--shadow);
}

.auth-methods {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.auth-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: var(--radius);
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
    position: relative;
}

.biometric-button {
    background: var(--success);
    color: var(--white);
}

.biometric-button:hover {
    background: #45A049;
}

.biometric-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.password-button {
    background: var(--white);
    color: var(--text);
    border: 2px solid var(--border);
}

.password-button:hover {
    border-color: var(--primary);
    background: var(--light-grey);
}

.auth-icon {
    font-size: 24px !important;
}

.auth-text {
    font-size: 16px;
}

.loading-spinner {
    position: absolute;
    right: 16px;
}

.biometric-panel {
    text-align: center;
    padding: 20px 0;
}

.biometric-animation {
    margin-bottom: 20px;
}

.biometric-animation .v-icon {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.8; }
    100% { transform: scale(1); opacity: 1; }
}

.biometric-text {
    font-size: 16px;
    color: var(--grey);
    margin-bottom: 24px;
}

.scan-button {
    margin-bottom: 16px !important;
}

.back-link {
    font-size: 14px !important;
}

.form-header-mobile {
    display: none;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.input-group {
    margin: 0;
}

.modern-input .v-input__slot {
    background: var(--light-grey) !important;
    border-color: transparent !important;
}

.modern-input.v-input--is-focused .v-input__slot {
    background: var(--white) !important;
    border-color: var(--primary) !important;
}

.captcha-section {
    display: flex;
    align-items: flex-end;
    gap: 12px;
}

.captcha-display {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.captcha-code {
    background: var(--light-grey);
    padding: 10px 16px;
    border-radius: var(--radius);
    font-family: monospace;
    font-size: 18px;
    font-weight: bold;
    letter-spacing: 2px;
    user-select: none;
}

.refresh-captcha {
    background: transparent !important;
    box-shadow: none !important;
}

.captcha-input {
    flex: 1;
}

.login-button {
    margin-top: 8px !important;
    height: 48px !important;
    font-size: 16px !important;
    font-weight: 500 !important;
}

.desktop-only {
    display: block;
}

.register-link {
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
    color: var(--grey);
}

.register-button {
    font-size: 14px !important;
    text-decoration: none !important;
    font-weight: 500 !important;
}

@media (max-width: 768px) {
    .modern-login-container {
        background: var(--white);
        align-items: flex-start;
        padding-top: 60px;
    }
    
    .login-content {
        max-width: 100%;
        padding: 0;
    }
    
    .app-logo {
        width: 40px;
        height: 40px;
        margin-bottom: 20px;
    }
    
    .login-wrapper {
        border: none;
        border-radius: 0;
        box-shadow: none;
        padding: 20px;
        background: transparent;
    }
    
    .auth-button {
        padding: 18px;
        border-radius: 12px;
    }
    
    .biometric-button {
        background: var(--success);
        box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
    }
    
    .password-button {
        background: var(--white);
        border: 1px solid var(--border);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    }
    
    .form-header-mobile {
        display: flex;
        align-items: center;
        gap: 12px;
        margin-bottom: 24px;
        padding-bottom: 16px;
        border-bottom: 1px solid var(--border);
    }
    
    .back-button-mobile {
        background: var(--light-grey) !important;
        box-shadow: none !important;
    }
    
    .form-title-mobile {
        font-size: 18px;
        font-weight: 600;
        color: var(--text);
    }
    
    .desktop-only {
        display: none;
    }
    
    .login-form {
        gap: 12px;
    }
    
    .modern-input .v-input__slot {
        background: var(--white) !important;
        border: 1px solid var(--border) !important;
        box-shadow: none !important;
    }
    
    .captcha-section {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
    }
    
    .captcha-display {
        justify-content: center;
    }
    
    .captcha-code {
        padding: 12px 20px;
        font-size: 20px;
    }
    
    .login-button {
        height: 52px !important;
        border-radius: 12px !important;
        margin-top: 16px !important;
    }
    
    .register-link {
        position: fixed;
        bottom: 20px;
        left: 0;
        right: 0;
        background: var(--white);
        padding: 16px;
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
        margin: 0;
    }
}

@media (max-width: 360px) {
    .app-logo {
        width: 36px;
        height: 36px;
    }
    
    .login-wrapper {
        padding: 16px;
    }
    
    .auth-button {
        padding: 16px;
        font-size: 15px;
    }
    
    .captcha-code {
        font-size: 18px;
        padding: 10px 16px;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .login-content {
        max-width: 360px;
    }
}

@media (min-width: 1025px) {
    .login-wrapper {
        padding: 40px;
    }
    
    .auth-methods {
        gap: 16px;
    }
    
    .auth-button {
        padding: 18px;
    }
}

@media (prefers-color-scheme: dark) {
    :root {
        --white: #121212;
        --light-grey: #1E1E1E;
        --border: #2C2C2C;
        --text: #E0E0E0;
    }
    
    .modern-login-container {
        background: #121212;
    }
    
    .login-wrapper {
        background: #1E1E1E;
    }
    
    .password-button {
        background: #1E1E1E;
        color: #E0E0E0;
    }
    
    .captcha-code {
        background: #2C2C2C;
        color: #E0E0E0;
    }
}