/* =============== MODERN LOGIN STYLING =============== */

:root {
    --primary-color: #9c27b0;
    --primary-dark: #7b1fa2;
    --secondary-color: #673ab7;
    --gradient-start: #9c27b0;
    --gradient-end: #673ab7;
    --text-light: #ffffff;
    --text-dark: #333333;
    --bg-light: #f8f9fa;
    --bg-dark: #1a1a2e;
    --card-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    --input-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Nunito', 'Montserrat', sans-serif;
    background: linear-gradient(135deg, var(--bg-dark) 0%, #16213e 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-x: hidden;
}

.login-container {
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-wrapper {
    display: flex;
    max-width: 1200px;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    animation: fadeInUp 0.8s ease-out;
    min-height: 700px;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Left Panel - Branding */
.login-left {
    flex: 1;
    background: linear-gradient(135deg, var(--gradient-start) 0%, var(--gradient-end) 100%);
    padding: 60px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.login-left::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 1px, transparent 1px);
    background-size: 30px 30px;
    animation: float 20s linear infinite;
    opacity: 0.3;
}

@keyframes float {
    0% {
        transform: translate(0, 0) rotate(0deg);
    }
    100% {
        transform: translate(-30px, -30px) rotate(360deg);
    }
}

.brand-logo {
    text-align: center;
    margin-bottom: 40px;
    z-index: 1;
    position: relative;
}

.brand-logo i {
    font-size: 64px;
    color: white;
    margin-bottom: 20px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

.brand-text {
    color: white;
}

.brand-text h1 {
    font-family: 'Oswald', sans-serif;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.brand-text p {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 0;
}

.login-features {
    margin-top: 40px;
    z-index: 1;
    position: relative;
}

.feature-item {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    color: white;
}

.feature-item i {
    font-size: 24px;
    margin-right: 15px;
    background: rgba(255, 255, 255, 0.2);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.feature-item h4 {
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.feature-item p {
    font-size: 0.9rem;
    opacity: 0.8;
    margin-bottom: 0;
}

/* Right Panel - Login Form */
.login-right {
    flex: 1;
    padding: 60px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.login-header {
    text-align: center;
    margin-bottom: 40px;
}

.login-header h2 {
    color: var(--text-dark);
    font-size: 2.2rem;
    margin-bottom: 10px;
    font-weight: 700;
}

.login-header p {
    color: #666;
    font-size: 1rem;
}

.login-form {
    width: 100%;
}

.form-group {
    margin-bottom: 25px;
    position: relative;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-dark);
    font-weight: 600;
    font-size: 0.95rem;
}

.input-group {
    position: relative;
}

.form-control {
    width: 100%;
    padding: 16px 20px;
    padding-right: 50px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
    color: var(--text-dark);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(156, 39, 176, 0.1);
    transform: translateY(-2px);
}

.form-control.error {
    border-color: #ff4757;
}

.form-control.success {
    border-color: #2ed573;
}

.password-toggle {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 5px;
    transition: color 0.3s;
}

.password-toggle:hover {
    color: var(--primary-color);
}

.password-toggle i {
    font-size: 1.2rem;
}

.password-strength {
    height: 4px;
    background: #e0e0e0;
    border-radius: 2px;
    margin-top: 8px;
    overflow: hidden;
    position: relative;
}

.password-strength-bar {
    height: 100%;
    width: 0;
    border-radius: 2px;
    transition: width 0.3s ease, background-color 0.3s ease;
}

.form-text {
    font-size: 0.85rem;
    color: #666;
    margin-top: 6px;
    display: flex;
    align-items: center;
}

.form-text i {
    margin-right: 5px;
}

.alert {
    padding: 15px 20px;
    border-radius: 12px;
    margin-bottom: 25px;
    border: none;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.alert-danger {
    background: linear-gradient(135deg, #ff6b6b, #ff4757);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 71, 87, 0.2);
}

.alert-success {
    background: linear-gradient(135deg, #2ed573, #1dd1a1);
    color: white;
    box-shadow: 0 4px 15px rgba(46, 213, 115, 0.2);
}

.btn-login {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--gradient-start) 0%, var(--gradient-end) 100%);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-login::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-login:hover::before {
    width: 300px;
    height: 300px;
}

.btn-login:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(156, 39, 176, 0.3);
}

.btn-login:active {
    transform: translateY(-1px);
}

.btn-login:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none !important;
}

.btn-login i {
    margin-right: 10px;
}

.login-footer {
    text-align: center;
    margin-top: 30px;
    color: #666;
    font-size: 0.9rem;
}

.login-footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
}

.login-footer a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* Remember me & Forgot password */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.form-check {
    display: flex;
    align-items: center;
    margin: 0;
}

.form-check-input {
    width: 18px;
    height: 18px;
    margin-right: 8px;
    cursor: pointer;
}

.form-check-label {
    color: var(--text-dark);
    font-size: 0.9rem;
    cursor: pointer;
}

.forgot-password {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    transition: color 0.3s;
}

.forgot-password:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* Decorative Elements */
.decoration {
    position: absolute;
    z-index: 0;
}

.decoration-1 {
    top: 10%;
    left: 10%;
    width: 100px;
    height: 100px;
    border: 2px dashed rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    animation: rotate 20s linear infinite;
}

.decoration-2 {
    bottom: 10%;
    right: 10%;
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    animation: float 6s ease-in-out infinite;
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Responsive Design */
@media (max-width: 992px) {
    .login-wrapper {
        flex-direction: column;
        max-width: 500px;
    }
    
    .login-left {
        padding: 40px 30px;
    }
    
    .login-right {
        padding: 40px 30px;
    }
    
    .brand-text h1 {
        font-size: 2rem;
    }
}

@media (max-width: 576px) {
    .login-container {
        padding: 10px;
    }
    
    .login-wrapper {
        border-radius: 16px;
    }
    
    .login-left,
    .login-right {
        padding: 30px 20px;
    }
    
    .brand-text h1 {
        font-size: 1.8rem;
    }
    
    .login-header h2 {
        font-size: 1.8rem;
    }
    
    .form-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
}

/* Loading Animation */
.loading {
    display: inline-block;
    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);
    }
}