/* Modern Login Styles - Simple & Clean */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body, html {
    height: 100%;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, #075E54 0%, #128C7E 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

/* Main Container */
.login-container {
    width: 100%;
    max-width: 420px;
    padding: 10px;
    max-height: 100vh;
    display: flex;
    align-items: center;
}

.login-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 16px;
    padding: 24px 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
}

.login-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
}

/* Logo & Title */
.login-header {
    text-align: center;
    margin-bottom: 24px;
}

.login-logo {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.05) 100%);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255,255,255,0.2);
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.login-logo:hover {
    transform: scale(1.05);
    box-shadow: 0 12px 40px rgba(0,0,0,0.15), 0 0 20px rgba(255,255,255,0.3);
}

.login-logo img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    border-radius: 50%;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.1));
    transition: all 0.3s ease;
}

.login-logo:hover img {
    transform: scale(1.1);
    filter: drop-shadow(0 6px 12px rgba(0,0,0,0.2));
}

.login-logo i {
    font-size: 32px;
    color: white;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.login-title {
    font-size: 24px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 6px;
}

.login-subtitle {
    font-size: 13px;
    color: #6b7280;
    font-weight: 400;
}

/* Form Styles */
.login-form {
    width: 100%;
}

.form-group {
    margin-bottom: 16px;
    position: relative;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 500;
    color: #1a1a1a;
    background: #ffffff;
    transition: all 0.3s ease;
    outline: none;
}

.form-input:focus {
    border-color: #25D366;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(37, 211, 102, 0.1);
}

.form-input::placeholder {
    color: #9ca3af;
    font-weight: 400;
}

/* Password Toggle */
.password-toggle {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #9ca3af;
    font-size: 20px;
    transition: color 0.3s ease;
    user-select: none;
}

.password-toggle:hover {
    color: #25D366;
}

/* Submit Button */
.login-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    border: none;
    border-radius: 10px;
    color: white;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 20px;
    position: relative;
    overflow: hidden;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(37, 211, 102, 0.3);
}

.login-btn:active {
    transform: translateY(0);
}

.login-btn.loading {
    color: transparent;
}

.login-btn.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spinner 0.8s linear infinite;
}

/* Footer Links */
.login-footer {
    text-align: center;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #e5e7eb;
}

.login-footer a {
    color: #6b7280;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.3s ease;
}

.login-footer a:hover {
    color: #25D366;
}

/* Error & Success Messages */
.alert-message {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    font-weight: 500;
    display: none;
}

.alert-message.error {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.alert-message.success {
    background: #f0fdf4;
    color: #16a34a;
    border: 1px solid #bbf7d0;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes spinner {
    to {
        transform: rotate(360deg);
    }
}

.login-card {
    animation: fadeIn 0.6s ease-out;
}

/* Responsive Design */
@media (max-width: 480px) {
    .login-container {
        padding: 8px;
        max-height: 100vh;
    }
    
    .login-card {
        padding: 20px 16px;
        border-radius: 12px;
        max-height: 95vh;
    }
    
    .login-header {
        margin-bottom: 20px;
    }
    
    .login-logo {
        width: 70px;
        height: 70px;
        margin-bottom: 16px;
    }
    
    .login-logo img {
        width: 50px;
        height: 50px;
    }
    
    .login-logo i {
        font-size: 28px;
    }
    
    .login-title {
        font-size: 20px;
        margin-bottom: 4px;
    }
    
    .login-subtitle {
        font-size: 12px;
    }
    
    .form-group {
        margin-bottom: 14px;
    }
    
    .form-input {
        padding: 10px 14px;
        font-size: 14px;
    }
    
    .login-btn {
        padding: 10px;
        font-size: 14px;
        margin-top: 16px;
    }
    
    .login-footer {
        margin-top: 16px;
        padding-top: 12px;
    }
    
    .login-footer a {
        font-size: 12px;
    }
}

@media (max-width: 360px) {
    .login-container {
        padding: 4px;
    }
    
    .login-card {
        padding: 16px 12px;
        max-height: 98vh;
    }
    
    .login-header {
        margin-bottom: 16px;
    }
    
    .login-logo {
        width: 60px;
        height: 60px;
        margin-bottom: 12px;
    }
    
    .login-logo img {
        width: 40px;
        height: 40px;
    }
    
    .login-logo i {
        font-size: 24px;
    }
    
    .login-title {
        font-size: 18px;
    }
    
    .login-subtitle {
        font-size: 11px;
    }
    
    .form-group {
        margin-bottom: 12px;
    }
    
    .form-input {
        padding: 8px 12px;
        font-size: 13px;
    }
    
    .login-btn {
        padding: 8px;
        font-size: 13px;
        margin-top: 12px;
    }
    
    .login-footer {
        margin-top: 12px;
        padding-top: 8px;
    }
}

/* Extra small screens - prevent any scroll */
@media (max-height: 600px) {
    .login-header {
        margin-bottom: 12px;
    }
    
    .login-logo {
        width: 50px;
        height: 50px;
        margin-bottom: 8px;
    }
    
    .login-logo img {
        width: 35px;
        height: 35px;
    }
    
    .login-logo i {
        font-size: 20px;
    }
    
    .login-title {
        font-size: 16px;
        margin-bottom: 2px;
    }
    
    .login-subtitle {
        font-size: 10px;
    }
    
    .form-group {
        margin-bottom: 8px;
    }
    
    .form-input {
        padding: 6px 10px;
        font-size: 12px;
    }
    
    .login-btn {
        padding: 6px;
        font-size: 12px;
        margin-top: 8px;
    }
    
    .login-footer {
        margin-top: 8px;
        padding-top: 6px;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    body, html {
        background: linear-gradient(135deg, #075E54 0%, #0a3d37 100%);
    }
    
    .login-card {
        background: rgba(30, 27, 75, 0.95);
        border: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .login-title {
        color: #ffffff;
    }
    
    .login-subtitle {
        color: #a1a1aa;
    }
    
    .form-input {
        background: rgba(30, 27, 75, 0.8);
        border-color: rgba(255, 255, 255, 0.2);
        color: #ffffff;
    }
    
    .form-input:focus {
        border-color: #667eea;
        background: rgba(30, 27, 75, 0.9);
    }
    
    .form-input::placeholder {
        color: #71717a;
    }
    
    .login-footer {
        border-top-color: rgba(255, 255, 255, 0.1);
    }
    
    .login-footer a {
        color: #a1a1aa;
    }
    
    .login-footer a:hover {
        color: #ffffff;
    }
}

/* Focus states for accessibility */
.form-input:focus,
.login-btn:focus,
.password-toggle:focus {
    outline: 2px solid #25D366;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .login-card {
        border: 2px solid #000000;
    }
    
    .form-input {
        border: 2px solid #000000;
    }
    
    .login-btn {
        border: 2px solid #000000;
    }
}
