/* Modern Login Page with Dark Mode */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --border-color: #e2e8f0;
    --input-bg: #f8f9fa;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.15);
    --accent-primary: #667eea;
    --accent-secondary: #764ba2;
    --success-bg: #f0fdf4;
    --success-text: #166534;
    --success-border: #10b981;
    --error-bg: #fef2f2;
    --error-text: #991b1b;
    --error-border: #ef4444;
}

body.dark-mode {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --border-color: #334155;
    --input-bg: #1e293b;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.5);
    --accent-primary: #818cf8;
    --accent-secondary: #a78bfa;
    --success-bg: rgba(16, 185, 129, 0.1);
    --success-text: #34d399;
    --success-border: #10b981;
    --error-bg: rgba(239, 68, 68, 0.1);
    --error-text: #f87171;
    --error-border: #ef4444;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-secondary);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    transition: background 0.3s ease, color 0.3s ease;
    position: relative;
    overflow-x: hidden;
}

/* Animated Background */
body::before {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 20% 50%, rgba(102, 126, 234, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 80% 80%, rgba(118, 75, 162, 0.1) 0%, transparent 50%);
    animation: rotate 30s linear infinite;
    z-index: 0;
    pointer-events: none;
}

body.dark-mode::before {
    background: radial-gradient(circle at 20% 50%, rgba(102, 126, 234, 0.15) 0%, transparent 50%),
                radial-gradient(circle at 80% 80%, rgba(118, 75, 162, 0.15) 0%, transparent 50%);
}

@keyframes rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Dark Mode Toggle Button */
.theme-toggle-btn {
    position: fixed;
    top: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--bg-primary);
    border: 2px solid var(--border-color);
    color: var(--text-primary);
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    z-index: 1000;
}

.theme-toggle-btn:hover {
    transform: scale(1.1) rotate(15deg);
    box-shadow: var(--shadow-lg);
    background: rgb(19, 3, 109);
    color: white;
    border-color: transparent;
}

.theme-toggle-btn:active {
    transform: scale(0.95);
}

/* Login Container */
.login-container {
    max-width: 480px;
    width: 100%;
    background: var(--bg-primary);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    position: relative;
    z-index: 1;
    border: 1px solid var(--border-color);
    animation: slideUp 0.6s ease;
}

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

.left-section {
    padding: 50px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Logo */
.login-icon-container {
    margin-bottom: 30px;
    text-align: center;
    display: flex;
    justify-content: center;
}

.login-icon-container .brand-logo-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 90px;
    height: 90px;
    border-radius: 50%;
    position: relative;
    animation: logoBob 3s ease-in-out infinite;
    flex-shrink: 0;
}

.login-icon-container .brand-logo-wrap::before {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea, #f093fb, #4facfe, #667eea);
    background-size: 300% 300%;
    animation: logoGradientSpin 4s linear infinite;
    z-index: 0;
}

.login-icon-container .brand-logo-wrap::after {
    content: '';
    position: absolute;
    inset: -8px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(102,126,234,0.35) 0%, transparent 70%);
    animation: logoGlow 3s ease-in-out infinite;
    z-index: 0;
}

.login-logo {
    width: 84px;
    height: 84px;
    border-radius: 50%;
    object-fit: cover;
    position: relative;
    z-index: 1;
    display: block;
}

@keyframes logoBob {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(-8px); }
}

@keyframes logoGradientSpin {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes logoGlow {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    50%       { opacity: 1;   transform: scale(1.15); }
}

/* Form Title */
.form-title {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
    text-align: center;
    background: rgb(93, 68, 234);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.form-subtitle {
    font-size: 15px;
    color: var(--text-secondary);
    font-weight: 400;
    margin-bottom: 35px;
    text-align: center;
}

/* Alerts */
.alert {
    padding: 16px 20px;
    border-radius: 12px;
    margin-bottom: 24px;
    font-size: 14px;
    border: 1px solid;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slideDown 0.4s ease;
}

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

.alert::before {
    font-family: 'Bootstrap Icons';
    font-size: 18px;
}

.alert-error {
    background: var(--error-bg);
    color: var(--error-text);
    border-color: var(--error-border);
}

.alert-error::before {
    content: '\f33a';
}

.alert-success {
    background: var(--success-bg);
    color: var(--success-text);
    border-color: var(--success-border);
}

.alert-success::before {
    content: '\f26b';
}

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

label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 14px;
}

label i {
    color: var(--accent-primary);
    font-size: 16px;
}

/* Input Fields */
input {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-size: 15px;
    transition: all 0.3s ease;
    background: var(--input-bg);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
}

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

input:focus {
    outline: none;
    border-color: var(--accent-primary);
    background: var(--bg-primary);
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
    transform: translateY(-2px);
}

.input-error {
    border-color: var(--error-border);
    background: var(--error-bg);
}

/* Password Input Wrapper */
.password-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-input-wrapper input {
    padding-right: 50px;
}

.password-toggle {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.password-toggle:hover {
    color: var(--accent-primary);
    background: rgba(102, 126, 234, 0.1);
}

.password-toggle i {
    font-size: 18px;
}

/* Error Messages */
.error {
    color: var(--error-text);
    font-size: 13px;
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.error::before {
    content: '\f33a'; 
    font-family: 'Bootstrap Icons';
}

/* Login Button */
.btn {
    width: 100%;
    padding: 16px 24px;
    background: rgba(30, 14, 118, 0.795);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 10px;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(102, 126, 234, 0.4);
}

.btn:active {
    transform: translateY(-1px);
}

.btn i {
    font-size: 18px;
    transition: transform 0.3s ease;
}

.btn:hover i {
    transform: translateX(4px);
}

/* Links Section */
.links {
    text-align: center;
    margin-top: 30px;
}

.forgot-link {
    color: var(--accent-primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
    padding: 8px 12px;
    border-radius: 8px;
}

.forgot-link:hover {
    background: rgba(102, 126, 234, 0.1);
    transform: translateX(2px);
}

/* Divider */
.divider {
    text-align: center;
    margin: 24px 0;
    position: relative;
    color: var(--text-muted);
    font-size: 13px;
}

.divider::before,
.divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 40%;
    height: 1px;
    background: var(--border-color);
}

.divider::before {
    left: 0;
}

.divider::after {
    right: 0;
}

.divider span {
    background: var(--bg-primary);
    padding: 0 15px;
    position: relative;
    z-index: 1;
}

/* Registration Dropdown */
.registration-dropdown {
    position: relative;
    display: block;
    width: 100%;
    margin-top: 15px;
}

.btn-create-account {
    width: 100%;
    padding: 14px 20px;
    background: rgba(54, 33, 170, 0.904);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.btn-create-account:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.btn-create-account > span {
    display: flex;
    align-items: center;
    gap: 8px;
}

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

.icon-chevron {
    transition: transform 0.3s ease;
}

.registration-menu.active ~ .btn-create-account .icon-chevron {
    transform: rotate(180deg);
}

/* Registration Menu */
.registration-menu {
    position: absolute;
    bottom: calc(100% + 10px);
    left: 0;
    right: 0;
    background: var(--bg-primary);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 1000;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.registration-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.registration-option {
    display: flex;
    align-items: center;
    padding: 16px 18px;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.3s ease;
    border-bottom: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.registration-option:last-child {
    border-bottom: none;
}

.registration-option::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 4px;
    background: rgb(19, 3, 109);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.registration-option:hover::before {
    transform: scaleY(1);
}

.registration-option:hover {
    background: rgba(102, 126, 234, 0.05);
    padding-left: 24px;
}

.option-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin-right: 14px;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.individual-icon {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.company-icon {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
}

.registration-option:hover .option-icon {
    transform: scale(1.1) rotate(5deg);
}

.option-content {
    flex: 1;
    min-width: 0;
}

.option-title {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
    font-size: 15px;
}

.option-subtitle {
    font-size: 13px;
    color: var(--text-secondary);
}

.icon-arrow {
    font-size: 18px;
    color: var(--accent-primary);
    transition: all 0.3s ease;
    margin-left: 12px;
    flex-shrink: 0;
}

.registration-option:hover .icon-arrow {
    transform: translateX(4px);
    color: var(--accent-secondary);
}

/* Responsive Design */
@media (max-width: 768px) {
    .theme-toggle-btn {
        top: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 18px;
    }
    
    .login-container {
        max-width: 100%;
        border-radius: 20px;
    }
    
    .left-section {
        padding: 40px 30px;
    }
    
    .form-title {
        font-size: 28px;
    }
    
    .login-logo {
        width: 70px;
        height: 70px;
    }
}

@media (max-width: 480px) {
    body {
        padding: 15px;
    }
    
    .left-section {
        padding: 35px 25px;
    }
    
    .form-title {
        font-size: 26px;
    }
    
    .form-subtitle {
        font-size: 14px;
    }
}
