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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 50%, #2563eb 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

/* Animated background */
body::before {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    background:
        radial-gradient(circle at 20% 50%, rgba(30, 58, 138, 0.4) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(37, 99, 235, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(30, 64, 175, 0.3) 0%, transparent 50%);
    animation: backgroundMove 20s ease-in-out infinite;
}

@keyframes backgroundMove {

    0%,
    100% {
        transform: translate(0, 0);
    }

    50% {
        transform: translate(-50px, -50px);
    }
}

.login-container {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    max-width: 1000px;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    position: relative;
    z-index: 1;
}

/* Left Panel - Branding */
.brand-panel {
    background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
    padding: 60px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    position: relative;
    overflow: hidden;
}

.brand-panel::before {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    top: -150px;
    right: -150px;
}

.brand-panel::after {
    content: '';
    position: absolute;
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    bottom: -100px;
    left: -100px;
}

.logo-wrapper {
    position: relative;
    z-index: 1;
    text-align: center;
    margin-bottom: 30px;
}

.logo-wrapper img {
    width: 290px;
    height: auto;
    margin-bottom: 30px;
}

.brand-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 10px;
    text-align: center;
}

.brand-subtitle {
    font-size: 16px;
    opacity: 0.9;
    text-align: center;
    line-height: 1.6;
}

.features-list {
    list-style: none;
    margin-top: 10px;
    position: relative;
    z-index: 1;
}

.features-list li {
    padding: 12px 0;
    display: flex;
    align-items: center;
    font-size: 14px;
    opacity: 0.95;
}

.features-list li i {
    font-size: 20px;
    margin-right: 12px;
    color: #fbbf24;
}

/* Right Panel - Login Form */
.form-panel {
    padding: 60px 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.form-header {
    margin-bottom: 40px;
}

.form-header h2 {
    font-size: 32px;
    color: #1f2937;
    margin-bottom: 8px;
    font-weight: 700;
}

.form-header p {
    color: #6b7280;
    font-size: 14px;
}

.form-group {
    margin-bottom: 24px;
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
}

.input-wrapper {
    position: relative;
}

.input-wrapper i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    font-size: 20px;
}

.form-input {
    width: 100%;
    padding: 14px 16px 14px 48px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 15px;
    transition: all 0.3s;
    background: #f9fafb;
}

.form-input:focus {
    outline: none;
    border-color: #2563eb;
    background: white;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.form-input::placeholder {
    color: #9ca3af;
}

.toggle-password {
    position: absolute;
    right: 3rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    padding: 4px;
    font-size: 20px;
    transition: color 0.3s;
}

.toggle-password:hover {
    color: #2563eb;
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.checkbox-wrapper {
    display: flex;
    align-items: center;
}

.checkbox-wrapper input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-right: 8px;
    cursor: pointer;
    accent-color: #2563eb;
}

.checkbox-wrapper label {
    font-size: 14px;
    color: #4b5563;
    cursor: pointer;
    user-select: none;
}

.forgot-link {
    font-size: 14px;
    color: #2563eb;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.forgot-link:hover {
    color: #1e40af;
    text-decoration: underline;
}

.submit-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
}

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

/* Error messages */
.error-message {
    background: #fee2e2;
    border-left: 4px solid #ef4444;
    color: #991b1b;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
}

/* Success state */
.form-input.success {
    border-color: #10b981;
    background: #f0fdf4;
}

/* Footer */
.form-footer {
    margin-top: 24px;
    text-align: center;
    font-size: 13px;
    color: #6b7280;
}

/* Responsive */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    .login-container {
        grid-template-columns: 1fr;
        max-width: 100%;
        margin: 0;
    }

    .brand-panel {
        padding: 30px 20px;
        min-height: auto;
    }

    .logo-wrapper {
        margin-bottom: 5px;
    }

    .logo-wrapper img {
        width: 250px;
        padding: 15px 10px;
        margin-bottom: 5px;
    }

    .brand-title {
        font-size: 20px;
        margin-bottom: 5px;
    }

    .brand-subtitle {
        font-size: 13px;
        line-height: 1.4;
    }

    .features-list {
        margin-top: 20px;
        display: none;
    }

    .features-list li {
        padding: 8px 0;
        font-size: 12px;
    }

    .features-list li i {
        font-size: 16px;
        margin-right: 8px;
    }

    .form-panel {
        padding: 30px 20px;
    }

    .form-header {
        margin-bottom: 20px;
    }

    .form-header h2 {
        font-size: 22px;
        margin-bottom: 5px;
    }

    .form-header p {
        font-size: 12px;
    }

    .form-group {
        margin-bottom: 16px;
    }

    .form-label {
        font-size: 13px;
        margin-bottom: 6px;
    }

    .form-input {
        padding: 12px 14px 12px 42px;
        font-size: 14px;
    }

    .input-wrapper i {
        font-size: 18px;
        left: 14px;
    }

    .toggle-password {
        right: 2rem;
        font-size: 18px;
    }

    .form-options {
        margin-bottom: 16px;
        flex-wrap: wrap;
        gap: 8px;
    }

    .checkbox-wrapper {
        font-size: 13px;
    }

    .checkbox-wrapper input[type="checkbox"] {
        width: 16px;
        height: 16px;
    }

    .forgot-link {
        font-size: 13px;
    }

    .submit-btn {
        padding: 14px;
        font-size: 15px;
    }

    .form-footer {
        margin-top: 16px;
        font-size: 11px;
    }

    .error-message {
        padding: 10px 12px;
        font-size: 12px;
        margin-bottom: 16px;
    }
}

/* Extra small devices */
@media (max-width: 375px) {
    .logo-wrapper img {
        width: 180px;
        padding: 12px 16px;
    }

    .brand-title {
        font-size: 18px;
    }

    .brand-subtitle {
        font-size: 12px;
    }

    .form-header h2 {
        font-size: 20px;
    }

    .features-list li {
        font-size: 11px;
    }
}

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

.submit-btn.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 0.6s linear infinite;
}

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