/* ============= LOGIN PAGE STYLES ============= */

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
}

/* ============= LOGIN CONTAINER ============= */
.login-container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    width: 100%;
    max-width: 400px;
    margin: 20px;
    animation: slideIn 0.6s ease-out;
}

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

/* ============= HEADER ============= */
.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header h1 {
    color: #4a5568;
    font-size: 2.2em;
    margin-bottom: 10px;
    font-weight: 700;
}

.login-header .icon {
    font-size: 3em;
    color: #667eea;
    margin-bottom: 15px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.login-subtitle {
    color: #666;
    font-size: 1.1em;
    margin-bottom: 10px;
    font-weight: 500;
}

/* ============= FORM ELEMENTS ============= */
.form-group {
    margin-bottom: 20px;
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #4a5568;
    font-size: 0.95em;
}

.form-group input {
    width: 100%;
    padding: 15px 50px 15px 20px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: white;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    transform: translateY(-1px);
}

.form-group input:hover {
    border-color: #cbd5e0;
}

.form-group i {
    position: absolute;
    right: 15px;
    top: 65%;
    transform: translateY(-50%);
    color: #a0aec0;
    font-size: 1.1em;
    transition: color 0.3s ease;
}

.form-group input:focus + i {
    color: #667eea;
}

/* ============= REMEMBER ME ============= */
.remember-me {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 20px 0;
    padding: 12px 0;
}

.remember-me input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #667eea;
    cursor: pointer;
}

.remember-me label {
    font-size: 0.9em;
    color: #666;
    cursor: pointer;
    margin-bottom: 0;
    user-select: none;
}

.remember-me:hover label {
    color: #4a5568;
}

/* ============= LOGIN BUTTON ============= */
.btn-login {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
    position: relative;
    overflow: hidden;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

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

.btn-login::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-login:hover::before {
    left: 100%;
}

/* Loading state */
.btn-login.loading {
    pointer-events: none;
    opacity: 0.8;
}

.btn-login.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.btn-login.loading span {
    opacity: 0;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ============= ADMIN LINK ============= */
.admin-link {
    text-align: center;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
}

.admin-link a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9em;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 15px;
    border-radius: 8px;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.admin-link a:hover {
    background: rgba(102, 126, 234, 0.1);
    transform: translateY(-1px);
    border-color: rgba(102, 126, 234, 0.2);
}

.admin-link a i {
    font-size: 0.9em;
}

/* ============= FOOTER ============= */
.login-footer {
    text-align: center;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #f1f5f9;
}

.login-footer p {
    font-size: 0.8em;
    color: #a0aec0;
    line-height: 1.4;
    margin-bottom: 8px;
}

.version-info {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #e2e8f0, #f7fafc);
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 0.75em;
    color: #4a5568;
    font-weight: 500;
}

.version-info i {
    font-size: 0.9em;
}

/* ============= NOTIFICATION ============= */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 10px;
    color: white;
    font-weight: 600;
    z-index: 1000;
    transform: translateX(400px);
    transition: transform 0.3s ease;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
    min-width: 250px;
}

.notification.show {
    transform: translateX(0);
}

.notification.success {
    background: linear-gradient(135deg, #48bb78, #38a169);
}

.notification.error {
    background: linear-gradient(135deg, #f56565, #e53e3e);
}

.notification.warning {
    background: linear-gradient(135deg, #ed8936, #dd6b20);
}

.notification.info {
    background: linear-gradient(135deg, #4fd1c7, #38b2ac);
}

/* ============= RESPONSIVE DESIGN ============= */
@media (max-width: 480px) {
    .login-container {
        padding: 30px 25px;
        margin: 10px;
        border-radius: 15px;
    }

    .login-header h1 {
        font-size: 1.8em;
    }

    .login-header .icon {
        font-size: 2.5em;
    }

    .form-group input {
        padding: 12px 40px 12px 15px;
        font-size: 15px;
    }

    .form-group i {
        right: 12px;
        font-size: 1em;
    }

    .btn-login {
        padding: 12px;
        font-size: 15px;
    }

    .notification {
        right: 10px;
        left: 10px;
        transform: translateY(-100px);
        min-width: auto;
    }

    .notification.show {
        transform: translateY(0);
    }
}

@media (max-width: 320px) {
    .login-container {
        padding: 25px 20px;
    }

    .login-header h1 {
        font-size: 1.6em;
    }

    .admin-link a {
        font-size: 0.8em;
        padding: 8px 12px;
    }
}

/* ============= ACCESSIBILITY ============= */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus styles for accessibility */
.btn-login:focus,
.admin-link a:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

.form-group input:focus {
    outline: none; /* We handle this with box-shadow */
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .login-container {
        border: 2px solid #000;
    }
    
    .form-group input {
        border: 2px solid #000;
    }
    
    .btn-login {
        border: 2px solid #000;
    }
}