* {
    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, #0f172a 0%, #1e293b 50%, #334155 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.main-container {
    width: 100%;
    max-width: 950px;
    animation: fadeIn 0.6s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-wrapper {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    display: flex;
    min-height: 480px;
}

.brand-section {
    background: linear-gradient(135deg, #06b6d4 0%, #3b82f6 50%, #8b5cf6 100%);
    padding: 50px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    color: white;
    position: relative;
    overflow: hidden;
    flex: 0 0 58.33%;
}

.brand-section::before {
    content: "";
    position: absolute;
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    top: -100px;
    right: -100px;
}

.brand-section::after {
    content: "";
    position: absolute;
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    bottom: -50px;
    left: -50px;
}

.brand-content {
    position: relative;
    z-index: 1;
}

.brand-logo {
    font-size: 3rem;
    font-weight: 800;
    letter-spacing: 4px;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.brand-tagline {
    font-size: 1.3rem;
    font-weight: 300;
    margin-bottom: 30px;
    opacity: 0.95;
}

.brand-description {
    font-size: 1rem;
    line-height: 1.7;
    opacity: 0.9;
    max-width: 450px;
}

.feature-list {
    margin-top: 30px;
    list-style: none;
}

.feature-list li {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    font-size: 0.95rem;
}

.feature-list i {
    font-size: 1.1rem;
    margin-right: 12px;
    color: rgba(255, 255, 255, 0.9);
}

.login-section {
    padding: 40px 35px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex: 0 0 41.67%;
}

.login-header {
    margin-bottom: 25px;
}

.login-header h2 {
    color: #333;
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 6px;
}

.login-header p {
    color: #666;
    font-size: 0.9rem;
}

.form-label {
    color: #444;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.role-selection {
    margin-bottom: 1.5rem;
}

.role-selection .form-label {
    margin-bottom: 12px;
    display: block;
}

.role-badges {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.role-badge {
    flex: 1;
    min-width: 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 12px 8px;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #64748b;
    font-weight: 600;
    font-size: 0.9rem;
}

.role-badge:hover {
    border-color: #06b6d4;
    background: #f0f9ff;
    color: #06b6d4;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(6, 182, 212, 0.15);
}

.role-badge.active {
    border-color: #06b6d4;
    background: linear-gradient(135deg, #06b6d4 0%, #3b82f6 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(6, 182, 212, 0.3);
}

.input-group {
    margin-bottom: 6px;
    position: relative;
}

.input-group-text {
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    border-right: none;
    color: #999;
    font-size: 1rem;
    padding: 12px 15px;
    border-radius: 10px 0 0 10px;
    transition: all 0.3s ease;
}

.input-group .form-control {
    padding: 12px 15px;
    border: 2px solid #e5e7eb;
    border-left: none;
    border-radius: 0 10px 10px 0;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    background: #f9fafb;
}

.input-group:focus-within .input-group-text {
    border-color: #06b6d4;
    background: white;
    color: #06b6d4;
}

.input-group:focus-within .form-control {
    border-color: #06b6d4;
    background: white;
    outline: none;
}

.form-control::placeholder {
    color: #aaa;
}

.password-wrapper {
    position: relative;
    display: flex;
    flex: 1;
}

.password-wrapper .form-control {
    padding-right: 45px;
    border-radius: 0 10px 10px 0;
}

.password-toggle {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #999;
    font-size: 1rem;
    z-index: 3;
    transition: color 0.3s ease;
    padding: 5px;
}

.password-toggle:hover {
    color: #06b6d4;
}

.error-message {
    color: #dc3545;
    font-size: 0.85rem;
    margin-top: 5px;
    margin-bottom: 12px;
    display: none;
}

.input-group.error .input-group-text,
.input-group.error .form-control {
    border-color: #dc3545;
}

.input-group.error + .error-message {
    display: block;
}

.input-group.success .input-group-text,
.input-group.success .form-control {
    border-color: #10b981;
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.form-check {
    display: flex;
    align-items: center;
}

.form-check-input {
    width: 18px;
    height: 18px;
    cursor: pointer;
    border: 2px solid #d1d5db;
    margin-right: 8px;
}

.form-check-input:checked {
    background-color: #06b6d4;
    border-color: #06b6d4;
}

.form-check-label {
    color: #666;
    font-size: 0.88rem;
    cursor: pointer;
    user-select: none;
}

.forgot-link {
    color: #06b6d4;
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 600;
    transition: color 0.3s ease;
}

.forgot-link:hover {
    color: #3b82f6;
}

.btn-login {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #06b6d4 0%, #3b82f6 50%, #8b5cf6 100%);
    border: none;
    border-radius: 10px;
    color: white;
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(6, 182, 212, 0.3);
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(6, 182, 212, 0.4);
}

.btn-login:active {
    transform: translateY(0);
}

.btn-login.loading {
    pointer-events: none;
    position: relative;
}

.btn-login.loading span {
    opacity: 0;
}

.btn-login.loading::after {
    content: "";
    position: absolute;
    width: 18px;
    height: 18px;
    top: 50%;
    left: 50%;
    margin-left: -9px;
    margin-top: -9px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 991px) {
    .brand-section {
        padding: 40px 35px;
    }
    .brand-logo {
        font-size: 2.5rem;
    }
    .brand-tagline {
        font-size: 1.1rem;
    }
}

@media (max-width: 767px) {
    .login-wrapper {
        flex-direction: column;
    }
    .brand-section {
        padding: 40px 30px;
        text-align: center;
    }
    .brand-description,
    .feature-list {
        display: none;
    }
    .login-section {
        padding: 40px 30px;
    }
}

@media (max-width: 576px) {
    .role-badges {
        gap: 8px;
    }
    .role-badge {
        min-width: 70px;
        padding: 10px 6px;
        font-size: 0.85rem;
    }
}


.form-control:focus{
    box-shadow: none !important; 
}