* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background: linear-gradient(135deg, #372109 0%, #000 50%, #372109 100%);

    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* Animated Background Particles */
.bg-particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.particle {
    position: absolute;
    border-radius: 50%;
    background: rgba(217, 122, 51, 0.32);
    animation: floatParticle linear infinite;
}

@keyframes floatParticle {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-10vh) rotate(720deg);
        opacity: 0;
    }
}

/* Main Login Container */
.login-wrapper {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 960px;
    padding: 20px;
}

.login-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.4);
    display: flex;
    min-height: 560px;
    animation: slideUp 0.8s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Left Panel - Branding */
.login-branding {
    background: linear-gradient(130deg, #a17c1a 0%, #6b4210 30%, #372109 70%, #281704 100%);
    color: #fff;
    padding: 50px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    flex: 1;
    position: relative;
    overflow: hidden;
}

.login-branding::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 70%);
    animation: rotateBg 15s linear infinite;
}

@keyframes rotateBg {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.login-branding > * {
    position: relative;
    z-index: 2;
}

.brand-logo-container {
    margin-bottom: 0px;
}

.brand-icon {
    width: 90px;
    height: 90px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255,255,255,0.3); }
    50% { transform: scale(1.05); box-shadow: 0 0 30px 10px rgba(255,255,255,0.15); }
}

.brand-icon i {
    font-size: 38px;
    color: #fff;
}

.brand-name {
    font-size: 26px;
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 8px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.brand-subtitle {
    font-size: 13px;
    font-weight: 400;
    opacity: 0.85;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.brand-description {
    font-size: 14px;
    line-height: 1.7;
    opacity: 0.9;
    max-width: 300px;
}

.brand-features {
    list-style: none;
    padding: 0;
    margin-top: 30px;
    text-align: left;
    width: 100%;
    max-width: 260px;
}

.brand-features li {
    padding: 8px 0;
    font-size: 13px;
    opacity: 0.9;
    display: flex;
    align-items: center;
    gap: 10px;
}

.brand-features li i {
    color: #d97a33;
    font-size: 14px;
    width: 20px;
    text-align: center;
}

/* Right Panel - Form */
.login-form-section {
    flex: 1;
    padding: 50px 45px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: #ffffff;
}

.form-header {
    margin-bottom: 35px;
}

.form-header h2 {
    font-size: 24px;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 8px;
}

.form-header p {
    font-size: 14px;
    color: #777;
    margin: 0;
}

/* Form Groups */
.form-group-custom {
    margin-bottom: 22px;
    position: relative;
}

.form-group-custom label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #444;
    margin-bottom: 8px;
    letter-spacing: 0.3px;
}

.input-wrapper {
    position: relative;
}

.input-wrapper .input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #aaa;
    font-size: 16px;
    transition: color 0.3s ease;
    z-index: 5;
}

.input-wrapper input {
    width: 100%;
    padding: 14px 16px 14px 46px;
    border: 2px solid #e8e8e8;
    border-radius: 12px;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    color: #333;
    background: #f9f9fb;
    transition: all 0.3s ease;
    outline: none;
}

.input-wrapper input:focus {
    border-color: #9b6fc5;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(155, 111, 197, 0.1);
}

.input-wrapper input:focus + .input-icon,
.input-wrapper input:focus ~ .input-icon {
    color: #9b6fc5;
}

.input-wrapper input::placeholder {
    color: #bbb;
}

.toggle-password {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #aaa;
    cursor: pointer;
    font-size: 16px;
    padding: 4px;
    transition: color 0.3s ease;
    z-index: 5;
}

.toggle-password:hover {
    color: #9b6fc5;
}

/* Remember & Forgot */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 13px;
    color: #555;
}

.remember-me input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid #ddd;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.checkmark i {
    font-size: 11px;
    color: #fff;
    opacity: 0;
    transform: scale(0);
    transition: all 0.2s ease;
}

.remember-me input[type="checkbox"]:checked + .checkmark {
    background: #9b6fc5;
    border-color: #9b6fc5;
}

.remember-me input[type="checkbox"]:checked + .checkmark i {
    opacity: 1;
    transform: scale(1);
}

.forgot-link {
    font-size: 13px;
    color: #9b6fc5;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.forgot-link:hover {
    color: #7c3fa0;
    text-decoration: none;
}

/* Login Button */
.btn-login {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #b09044 0%, #000 50%, #372109 100%);
    border: none;
    border-radius: 12px;
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    font-family: 'Inter', sans-serif;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.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 ease;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(155, 111, 197, 0.4);
}

.btn-login:hover::before {
    left: 100%;
}

.btn-login:active {
    transform: translateY(0);
}

.btn-login .btn-icon {
    margin-left: 8px;
    font-size: 14px;
}

/* Divider */
.divider {
    display: flex;
    align-items: center;
    margin: 24px 0;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e8e8e8;
}

.divider span {
    padding: 0 16px;
    font-size: 12px;
    color: #aaa;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* SSO Buttons */
.sso-buttons {
    display: flex;
    gap: 12px;
}

.btn-sso {
    flex: 1;
    padding: 12px;
    border: 2px solid #e8e8e8;
    border-radius: 12px;
    background: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    color: #555;
    transition: all 0.3s ease;
}

.btn-sso:hover {
    border-color: #9b6fc5;
    background: #faf5ff;
    color: #7c3fa0;
}

.btn-sso i {
    font-size: 18px;
}

/* Footer */
.login-footer {
    margin-top: 28px;
    text-align: center;
    font-size: 12px;
    color: #aaa;
}

.login-footer a {
    color: #9b6fc5;
    text-decoration: none;
    font-weight: 600;
}

.login-footer a:hover {
    text-decoration: underline;
}

/* Loading State */
.btn-login.loading {
    pointer-events: none;
    opacity: 0.8;
}

.spinner {
    display: none;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.btn-login.loading .spinner {
    display: inline-block;
}

.btn-login.loading .btn-text {
    display: none;
}

/* Alert */
.login-alert {
    display: none;
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 13px;
    animation: fadeIn 0.3s ease;
}

.login-alert.alert-error {
    background: #fff0f0;
    color: #d32f2f;
    border: 1px solid #ffcdd2;
}

.login-alert.alert-success {
    background: #f0fff0;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===================== */
/* MOBILE RESPONSIVE     */
/* ===================== */
@media (max-width: 768px) {
    body {
        align-items: flex-start;
        padding-top: 20px;
        overflow-y: auto;
        min-height: 100vh;
    }

    .login-wrapper {
        padding: 0 15px 20px;
        max-width: 480px;
    }

    .login-card {
        flex-direction: column;
        min-height: auto;
        border-radius: 16px;
    }

    .login-branding {
        padding: 35px 25px;
        min-height: auto;
    }

    .brand-icon {
        width: 70px;
        height: 70px;
    }

    .brand-icon i {
        font-size: 30px;
    }

    .brand-name {
        font-size: 22px;
    }

    .brand-subtitle {
        font-size: 11px;
        letter-spacing: 1.5px;
        margin-bottom: 15px;
    }

    .brand-description {
        font-size: 13px;
        margin-bottom: 0;
    }

    .brand-features {
        display: none;
    }

    .login-form-section {
        padding: 30px 25px 35px;
    }

    .form-header h2 {
        font-size: 20px;
    }

    .form-header p {
        font-size: 13px;
    }

    .sso-buttons {
        flex-direction: column;
        gap: 10px;
    }
}

@media (max-width: 400px) {
    .login-wrapper {
        padding: 0 10px 15px;
    }

    .login-branding {
        padding: 25px 20px;
    }

    .login-form-section {
        padding: 25px 20px 30px;
    }

    .form-options {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }
}
