﻿* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.login-wrapper {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 600px;
}

/* Branding Section */
.branding-section {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    padding: 60px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

    .branding-section::before {
        content: '';
        position: absolute;
        top: -50%;
        right: -50%;
        width: 200%;
        height: 200%;
        background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="2" fill="rgba(255,255,255,0.1)"/></svg>') repeat;
        animation: float 20s infinite linear;
    }

@keyframes float {
    0% {
        transform: translateX(0) translateY(0);
    }

    100% {
        transform: translateX(-50px) translateY(-50px);
    }
}

.branding-content {
    position: relative;
    z-index: 1;
}

.logo {
    margin-bottom: 40px;
}

.logo-img {
    /*width: 90px;*/
    height: 90px;
    margin-bottom: 15px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
    padding: 10px;
}

.logo h1 {
    font-size: 24px;
    font-weight: 600;
    line-height: 1.2;
}

.welcome-text {
    margin-bottom: 40px;
}

    .welcome-text h2 {
        font-size: 28px;
        font-weight: 700;
        margin-bottom: 15px;
        line-height: 1.2;
    }

    .welcome-text p {
        font-size: 16px;
        opacity: 0.9;
        line-height: 1.6;
    }

.features {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 14px;
    opacity: 0.9;
}

    .feature-item i {
        font-size: 18px;
        width: 20px;
    }

/* Form Section */
.form-section {
    padding: 60px 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.form-container {
    width: 100%;
    max-width: 400px;
}

.form-content {
    transition: all 0.3s ease;
}

    .form-content.hidden {
        display: none;
    }

.form-header {
    text-align: center;
    margin-bottom: 40px;
}

    .form-header h2 {
        font-size: 28px;
        font-weight: 700;
        color: #1a202c;
        margin-bottom: 10px;
    }

    .form-header p {
        color: #718096;
        font-size: 14px;
        line-height: 1.5;
    }

/* Form Styles */
.form-group {
    margin-bottom: 25px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #374151;
    font-size: 14px;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

    .input-wrapper i {
        position: absolute;
        left: 15px;
        color: #9ca3af;
        font-size: 14px;
        z-index: 1;
    }

    .input-wrapper input {
        width: 100%;
        padding: 15px 15px 15px 45px;
        border: 1px solid #e5e7eb;
        border-radius: 10px;
        font-size: 14px;
        transition: all 0.3s ease;
        background: #f9fafb;
    }

        .input-wrapper input:focus {
            outline: none;
            border-color: #667eea;
            background: white;
            box-shadow: 0 0 0 1px rgba(102, 126, 234, 0.1);
        }

.toggle-password {
    position: absolute;
    right: 15px;
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    padding: 5px;
    transition: color 0.3s ease;
}

    .toggle-password:hover {
        color: #667eea;
    }
/* Form Options */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 10px;
}

.checkbox-container {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
    color: #374151;
    position: relative;
    padding-left: 25px;
    line-height: 1.4;
}

    .checkbox-container input {
        position: absolute;
        opacity: 0;
        cursor: pointer;
        height: 0;
        width: 0;
    }

.checkmark {
    position: absolute;
    top: 2px;
    left: 0;
    height: 18px;
    width: 18px;
    background-color: #f9fafb;
    border: 2px solid #e5e7eb;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.checkbox-container:hover input ~ .checkmark {
    border-color: #667eea;
}

.checkbox-container input:checked ~ .checkmark {
    background-color: #667eea;
    border-color: #667eea;
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.checkbox-container input:checked ~ .checkmark:after {
    display: block;
}

.checkbox-container .checkmark:after {
    left: 5px;
    top: 2px;
    width: 4px;
    height: 8px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.forgot-password-link {
    color: #667eea;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.3s ease;
}

    .forgot-password-link:hover {
        color: #5a67d8;
        text-decoration: underline;
    }

/* Buttons */
.btn-primary {
    width: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 15px 20px;
    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;
    overflow: hidden;
}

    .btn-primary:hover {
        transform: translateY(-2px);
        box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
    }

    .btn-primary:active {
        transform: translateY(0);
    }

    .btn-primary::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-primary:hover::before {
        left: 100%;
    }

/* Form Footer */
.form-footer {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
}

    .form-footer p {
        color: #718096;
        font-size: 14px;
    }

    .form-footer a {
        color: #667eea;
        text-decoration: none;
        font-weight: 500;
        transition: color 0.3s ease;
    }

        .form-footer a:hover {
            color: #5a67d8;
            text-decoration: underline;
        }

/* Toast Notifications */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    padding: 15px 20px;
    transform: translateX(400px);
    transition: transform 0.3s ease;
    z-index: 1000;
    border-left: 4px solid #10b981;
}

    .toast.show {
        transform: translateX(0);
    }

    .toast.error {
        border-left-color: #ef4444;
    }

.toast-content {
    display: flex;
    align-items: center;
    gap: 10px;
}

.toast-icon {
    font-size: 18px;
    color: #10b981;
}

.toast.error .toast-icon {
    color: #ef4444;
}

.toast-message {
    font-size: 14px;
    color: #374151;
    font-weight: 500;
}

/* Loading State */
.btn-primary.loading {
    pointer-events: none;
    opacity: 0.7;
}

    .btn-primary.loading span {
        opacity: 0;
    }

    .btn-primary.loading::after {
        content: '';
        position: absolute;
        width: 20px;
        height: 20px;
        border: 2px solid rgba(255, 255, 255, 0.3);
        border-top: 2px solid white;
        border-radius: 50%;
        animation: spin 1s linear infinite;
    }

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Responsive Design */
@media (max-width: 968px) {
    .login-wrapper {
        grid-template-columns: 1fr;
        max-width: 500px;
        margin: 0 auto;
    }

    .branding-section {
        padding: 40px 30px;
        text-align: center;
    }

    .welcome-text h2 {
        font-size: 24px;
    }

    .features {
        flex-direction: row;
        justify-content: center;
        flex-wrap: wrap;
        gap: 30px;
    }

    .feature-item {
        flex-direction: column;
        text-align: center;
        gap: 8px;
    }
}

@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    .form-section {
        padding: 40px 30px;
    }

    .branding-section {
        padding: 30px 20px;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .form-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .welcome-text h2 {
        font-size: 20px;
    }

    .logo h1 {
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .form-section {
        padding: 30px 20px;
    }

    .form-header h2 {
        font-size: 24px;
    }

    .input-wrapper input {
        padding: 12px 12px 12px 40px;
    }

    .btn-primary {
        padding: 12px 20px;
        font-size: 14px;
    }

    .toast {
        right: 10px;
        left: 10px;
        transform: translateY(-100px);
    }

        .toast.show {
            transform: translateY(0);
        }
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-in-right {
    animation: slideInRight 0.5s ease-out;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Focus States for Accessibility */
.btn-primary:focus,
.input-wrapper input:focus,
.forgot-password-link:focus,
.form-footer a:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .input-wrapper input {
        border-width: 3px;
    }

    .btn-primary {
        border: 2px solid #000;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Additional styles for enhanced functionality */

/* Field Error Styles */
.field-error {
    color: #ef4444;
    font-size: 12px;
    margin-top: 5px;
    display: flex;
    align-items: center;
    gap: 5px;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.input-wrapper input.error {
    border-color: #ef4444;
    background-color: #fef2f2;
}

    .input-wrapper input.error:focus {
        box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
    }

/* Focused Input Styles */
.input-wrapper.focused label {
    color: #667eea;
    transform: translateY(-5px);
    font-size: 12px;
}

/* Ripple Effect */
.btn-primary {
    position: relative;
    overflow: hidden;
}

.ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: scale(0);
    animation: ripple-animation 0.6s linear;
    pointer-events: none;
}

@keyframes ripple-animation {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* Password Strength Indicator */
#passwordStrength {
    font-weight: 500;
    transition: color 0.3s ease;
}

/* Social Login Buttons (if needed) */
.social-login {
    display: flex;
    gap: 10px;
    margin: 20px 0;
}

.social-btn {
    flex: 1;
    padding: 12px;
    border: 2px solid #e5e7eb;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
}

    .social-btn:hover {
        border-color: #667eea;
        transform: translateY(-1px);
    }

    .social-btn.google {
        color: #db4437;
    }

    .social-btn.facebook {
        color: #4267b2;
    }

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

    .loading-overlay.show {
        opacity: 1;
        visibility: visible;
    }

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Enhanced Mobile Styles */
@media (max-width: 480px) {
    .form-header h2 {
        font-size: 22px;
    }

    .form-header p {
        font-size: 13px;
    }

    .checkbox-container {
        font-size: 13px;
    }

    .forgot-password-link {
        font-size: 13px;
    }

    .social-login {
        flex-direction: column;
    }

    .field-error {
        font-size: 11px;
    }
}

/* Print Styles */
@media print {
    .login-wrapper {
        box-shadow: none;
        border: 1px solid #ccc;
    }

    .branding-section {
        background: white !important;
        color: black !important;
    }

    .btn-primary {
        background: white !important;
        color: black !important;
        border: 1px solid black !important;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    body {
        background: linear-gradient(135deg, #1a202c 0%, #2d3748 100%);
    }

    .login-wrapper {
        background: #2d3748;
        color: white;
    }

    .form-header h2 {
        color: white;
    }

    .form-header p {
        color: #a0aec0;
    }

    .form-group label {
        color: #e2e8f0;
    }

    .input-wrapper input {
        background: #4a5568;
        border-color: #4a5568;
        color: white;
    }

        .input-wrapper input::placeholder {
            color: #a0aec0;
        }

        .input-wrapper input:focus {
            background: #4a5568;
            border-color: #667eea;
        }

    .checkbox-container {
        color: #e2e8f0;
    }

    .form-footer p {
        color: #a0aec0;
    }

    .toast {
        background: #4a5568;
        color: white;
    }
}

/* Accessibility Improvements */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus visible for better keyboard navigation */
.btn-primary:focus-visible,
.input-wrapper input:focus-visible,
.forgot-password-link:focus-visible,
.form-footer a:focus-visible {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* Skip link for accessibility */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: #667eea;
    color: white;
    padding: 8px;
    text-decoration: none;
    border-radius: 4px;
    z-index: 1000;
}

    .skip-link:focus {
        top: 6px;
    }

/* Enhanced Animation Performance */
.form-content,
.toast,
.btn-primary {
    will-change: transform;
}

    /* Improved Button States */
    .btn-primary:disabled {
        opacity: 0.6;
        cursor: not-allowed;
        transform: none;
    }

        .btn-primary:disabled:hover {
            transform: none;
            box-shadow: none;
        }

/* Enhanced Input States */
.input-wrapper input:invalid {
    border-color: #ef4444;
}

.input-wrapper input:valid {
    border-color: #10b981;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 4px;
}

    ::-webkit-scrollbar-thumb:hover {
        background: #5a67d8;
    }

/* Selection Styles */
::selection {
    background: #667eea;
    color: white;
}

::-moz-selection {
    background: #667eea;
    color: white;
}

