/* ===================================
   LOGIN PAGE STYLES - MODERN DARK THEME
   =================================== */

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

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --secondary: #8b5cf6;
    --background: #0f172a;
    --surface: #1e293b;
    --text: #f1f5f9;
    --text-muted: #94a3b8;
    --border: #334155;
    --success: #10b981;
    --error: #ef4444;
    --gradient-start: #6366f1;
    --gradient-end: #8b5cf6;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Poppins', sans-serif;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    min-height: 100vh;
    color: var(--text);
    position: relative;
    overflow-x: hidden;
}

/* Animated background elements */
body::before {
    content: '';
    position: fixed;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.1) 0%, transparent 70%);
    animation: pulse 8s ease-in-out infinite;
    z-index: 0;
}

body::after {
    content: '';
    position: fixed;
    bottom: -50%;
    left: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.1) 0%, transparent 70%);
    animation: pulse 8s ease-in-out infinite reverse;
    z-index: 0;
}

@keyframes pulse {
    0%, 100% { transform: scale(1) translate(0, 0); }
    50% { transform: scale(1.1) translate(10%, 10%); }
}

.hidden {
    display: none !important;
}

/* Main Login Container */
.login-container {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

.login-wrapper {
    width: 100%;
    max-width: 1200px;
    display: grid;
    grid-template-columns: 45% 55%;
    background: rgba(30, 41, 59, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: 30px;
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Left Side - Branding */
.login-brand {
    background: linear-gradient(135deg, var(--gradient-start) 0%, var(--gradient-end) 100%);
    padding: 60px 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.login-brand::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="100" height="100" patternUnits="userSpaceOnUse"><path d="M 100 0 L 0 0 0 100" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.brand-content {
    position: relative;
    z-index: 2;
    color: white;
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 30px;
}

.logo-icon {
    width: 70px;
    height: 70px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 35px;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.logo span {
    font-size: 32px;
    font-weight: 800;
    font-family: 'Playfair Display', serif;
}

.brand-tagline {
    font-size: 18px;
    line-height: 1.7;
    margin-bottom: 40px;
    opacity: 0.95;
}

.brand-features {
    list-style: none;
    padding: 0;
    margin: 0;
}

.brand-features li {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    font-size: 15px;
    opacity: 0.9;
}

.brand-features li i {
    font-size: 18px;
    color: #ffd700;
}

/* Right Side - Login Form */
.login-form-section {
    padding: 60px 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: var(--surface);
}

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

.form-header h2 {
    font-size: 32px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 10px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.form-header p {
    font-size: 15px;
    color: var(--text-muted);
}

/* Back to Home Button */
.btn-primary.mt-3.mb-3 {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border: none;
    padding: 10px 25px;
    border-radius: 12px;
    color: white;
    font-weight: 600;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    font-size: 14px;
    width: auto;
}

.btn-primary.mt-3.mb-3:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.4);
}

/* Alert Messages */
.alert-message {
    padding: 15px 20px;
    border-radius: 12px;
    margin-bottom: 25px;
    display: none;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    font-weight: 500;
    animation: slideDown 0.3s ease;
}

.alert-message.show {
    display: flex;
}

.alert-message i {
    font-size: 18px;
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    color: #fca5a5;
    border-left: 4px solid var(--error);
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    color: #6ee7b7;
    border-left: 4px solid var(--success);
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Role Selection Cards */
.role-selection {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
    margin-bottom: 30px;
}

.role-card {
    position: relative;
    padding: 20px 10px;
    background: rgba(15, 23, 42, 0.6);
    border: 2px solid var(--border);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.role-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.role-card:hover {
    background: rgba(15, 23, 42, 0.8);
    border-color: var(--primary);
    transform: translateY(-3px);
}

.role-card.active {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-color: var(--primary);
    color: white;
}

.role-icon {
    font-size: 28px;
    margin-bottom: 10px;
    color: var(--primary);
    transition: all 0.3s;
}

.role-card.active .role-icon {
    color: white;
}

.role-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--text);
}

.role-card.active .role-label {
    color: white;
}

.role-description {
    display: block;
    font-size: 11px;
    opacity: 0.8;
    color: var(--text-muted);
}

.role-card.active .role-description {
    color: rgba(255, 255, 255, 0.9);
}

/* Form Groups */
.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    color: var(--text);
    font-weight: 600;
    font-size: 14px;
}

.input-wrapper {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 16px;
}

.input-wrapper input {
    width: 100%;
    padding: 15px 20px 15px 50px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text);
    font-size: 15px;
    transition: all 0.3s ease;
    font-family: 'Poppins', sans-serif;
}

.input-wrapper input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
    background: rgba(15, 23, 42, 0.8);
}

.input-wrapper input::placeholder {
    color: var(--text-muted);
}

.password-toggle {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 16px;
    padding: 5px;
    transition: color 0.3s;
}

.password-toggle:hover {
    color: var(--primary);
}

/* Form Options */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-muted);
}

.remember-me input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary);
}

.forgot-link {
    color: var(--primary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: color 0.3s;
}

.forgot-link:hover {
    color: var(--secondary);
}

/* Login Button */
.btn-login {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    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::before {
    left: 100%;
}

.btn-login:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.4);
}

.btn-login:active:not(:disabled) {
    transform: translateY(0);
}

.btn-login:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.btn-login i {
    font-size: 18px;
}

/* Form Footer */
.form-footer {
    text-align: center;
    margin-top: 25px;
    font-size: 14px;
    color: var(--text-muted);
}

.form-footer a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
}

.form-footer a:hover {
    color: var(--secondary);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .login-wrapper {
        grid-template-columns: 1fr;
    }
    
    .login-brand {
        display: none;
    }
    
    .login-form-section {
        padding: 50px 40px;
    }
}

@media (max-width: 768px) {
    .login-container {
        padding: 1rem;
    }
    
    .login-wrapper {
        border-radius: 20px;
    }
    
    .login-form-section {
        padding: 40px 30px;
    }
    
    .form-header h2 {
        font-size: 26px;
    }
    
    .role-selection {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .role-icon {
        font-size: 24px;
    }
    
    .role-label {
        font-size: 12px;
    }
    
    .role-description {
        font-size: 10px;
    }
}

@media (max-width: 480px) {
    .login-form-section {
        padding: 30px 20px;
    }
    
    .form-header h2 {
        font-size: 24px;
    }
    
    .role-selection {
        grid-template-columns: 1fr;
    }
    
    .role-card {
        padding: 15px;
    }
    
    .input-wrapper input {
        padding: 13px 18px 13px 45px;
        font-size: 14px;
    }
    
    .btn-login {
        padding: 14px;
        font-size: 15px;
    }
}