/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* Container */
.container {
    display: flex;
    width: 100%;
    max-width: 1400px;
    height: 90vh;
    min-height: 600px;
    background: white;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

/* Left Section */
.left-section {
    flex: 0 0 65%;
    position: relative;
    overflow: hidden;
}

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* Right Section */
.right-section {
    flex: 0 0 35%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    background: #f8fafc;
}

.login-box {
    width: 100%;
    max-width: 400px;
}

.logo-header {
    text-align: center;
    margin-bottom: 40px;
}

.logo-icon {
    font-size: 48px;
    color: #667eea;
    margin-bottom: 16px;
}

.logo-header h1 {
    color: #2d3748;
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
    line-height: 1.2;
}

.subtitle {
    color: #718096;
    font-size: 14px;
    font-weight: 500;
}

/* Form Styles */
.login-form {
    background: white;
    padding: 32px;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    margin-bottom: 24px;
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #4a5568;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
}

.form-group label i {
    color: #667eea;
    width: 16px;
}

.form-group input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 16px;
    color: #2d3748;
    background: #f8fafc;
    transition: all 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group input::placeholder {
    color: #a0aec0;
}

/* Password Input Group */
.password-input-group {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #718096;
    cursor: pointer;
    padding: 4px;
    font-size: 18px;
    transition: color 0.3s ease;
}

.password-toggle:hover {
    color: #667eea;
}

/* Error Messages */
.error-message {
    color: #fc8181;
    font-size: 13px;
    margin-top: 6px;
    min-height: 20px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.error-message i {
    font-size: 14px;
}

.server-error {
    background: #fed7d7;
    color: #c53030;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    display: none;
    align-items: center;
    gap: 10px;
}

.server-error.show {
    display: flex;
}

.server-error i {
    font-size: 16px;
}

/* Login Button */
.login-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    position: relative;
    min-height: 52px;
}

.login-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.login-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Spinner */
.spinner {
    display: none;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Divider */
.divider {
    display: flex;
    align-items: center;
    margin: 24px 0;
    color: #a0aec0;
    font-size: 14px;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #e2e8f0;
}

.divider span {
    padding: 0 16px;
}

/* Admin Link */
.admin-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px;
    background: #edf2f7;
    color: #4a5568;
    text-decoration: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.3s ease;
    margin-bottom: 20px;
}

.admin-link:hover {
    background: #e2e8f0;
    color: #2d3748;
    transform: translateY(-1px);
}

/* Footer Links */
.footer-links {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
}

.footer-link {
    color: #667eea;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.3s ease;
}

.footer-link:hover {
    color: #764ba2;
    text-decoration: underline;
}

/* Security Notice */
.security-notice {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: #718096;
    font-size: 13px;
    padding: 16px;
    background: #edf2f7;
    border-radius: 10px;
}

.security-notice i {
    color: #48bb78;
    font-size: 16px;
}

/* Mobile Responsive */
@media (max-width: 1024px) {
    .container {
        flex-direction: column;
        height: auto;
        max-height: none;
        min-height: 100vh;
    }

    .left-section {
        flex: 0 0 40%;
        min-height: 300px;
    }

    .right-section {
        flex: 0 0 60%;
        padding: 20px;
    }
}

@media (max-width: 768px) {
    body {
        padding: 10px;
        background: white;
    }

    .container {
        height: auto;
        min-height: 100vh;
        border-radius: 0;
        box-shadow: none;
        flex-direction: column;
    }

    .left-section {
        flex: 0 0 30%;
        min-height: 200px;
        display: none; /* Hide image on mobile as requested */
    }

    .right-section {
        flex: 1;
        padding: 20px;
        position: relative;
    }

    .login-box {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 80%;
        max-width: none;
        background: rgba(255, 255, 255, 0.95);
        border-radius: 20px;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
        padding: 20px;
        z-index: 100;
    }

    .login-form {
        padding: 24px;
    }

    .logo-header h1 {
        font-size: 24px;
    }

    .footer-links {
        flex-direction: column;
        gap: 12px;
        align-items: center;
    }
}

@media (max-width: 480px) {
    .login-box {
        width: 90%;
        padding: 15px;
    }

    .login-form {
        padding: 20px;
    }

    .logo-header h1 {
        font-size: 20px;
    }

    .form-group input {
        padding: 12px 14px;
    }

    .login-btn {
        padding: 14px;
    }
}

/* Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-box {
    animation: fadeIn 0.6s ease-out;
}