/* ===== BASE STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    min-height: 100vh;
    background: #f5f5f5;
    display: flex;
    flex-direction: column;
}

/* ===== HEADER STYLES ===== */
.header {
    background: linear-gradient(135deg, #8B0000);
    padding: 15px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    gap: 20px;
}

.logo-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-glow {
    position: absolute;
    top: -10px;
    left: -10px;
    width: calc(100% + 20px);
    height: calc(100% + 20px);
    background: radial-gradient(circle, rgba(255, 212, 0, 0.3) 0%, transparent 70%);
    border-radius: 50%;
    animation: pulse 3s ease-in-out infinite;
    z-index: -1;
}

.logo {
    width: 70px;
    height: 70px;
    transition: transform 0.3s ease;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.3));
}

.title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    margin: 0;
    text-align: center;
    letter-spacing: 1px;
    line-height: 1.2;
}

@keyframes pulse {
    0%, 100% { 
        opacity: 0.6;
        transform: scale(1);
    }
    50% { 
        opacity: 1;
        transform: scale(1.1);
    }
}

/* ===== MAIN CONTAINER ===== */
.login-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    min-height: calc(100vh - 160px);
}

.login-card {
    position: relative;
    width: 100%;
    max-width: 450px;
}

.card-glow {
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #8B0000, #B22222, #8B0000);
    border-radius: 20px;
    z-index: -1;
    opacity: 0.1;
    pointer-events: none;
}

.card {
    position: relative;
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
    padding: 40px;
    z-index: 1;
}

.subtitle {
    color: #8B0000;
    font-size: 1.8rem;
    margin: 0 0 10px 0;
    font-weight: bold;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.instruction-text {
    color: #9ca3af;
    font-size: 1rem;
    text-align: center;
    margin-bottom: 30px;
    line-height: 1.5;
}

/* ===== FORM STYLES ===== */
.form-group {
    margin-bottom: 25px;
}

.form-label {
    display: flex;
    align-items: center;
    font-size: 1rem;
    font-weight: 600;
    color: #8B0000;
    margin-bottom: 15px;
    gap: 8px;
}

/* ===== USER TYPE SELECTION (MATCHING IMAGE) ===== */
.user-type-selection {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.user-type-option {
    flex: 1;
    position: relative;
    cursor: pointer;
}

.user-type-option input[type="radio"] {
    display: none;
}

.user-type-option {
    flex: 1;
    padding: 15px 10px;
    background: #f8f9fa;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    font-weight: 600;
    color: #6b7280;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    position: relative;
}

.user-type-option i {
    font-size: 1.5rem;
    margin-bottom: 2px;
}

.user-type-option:hover {
    background: #ffffff;
    border-color: #8B0000;
    color: #8B0000;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(139, 0, 0, 0.1);
}

.user-type-option input[type="radio"]:checked + .checkmark {
    display: block;
}

.user-type-option:has(input[type="radio"]:checked) {
    background: linear-gradient(135deg, #8B0000, #B22222);
    border-color: #8B0000;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 0, 0, 0.3);
}

.checkmark {
    display: none;
}

/* Hide checkmark - we'll use the background color change instead */
.user-type-option .checkmark {
    display: none;
}

/* ===== FORM INPUT STYLES ===== */
.form-input {
    width: 100%;
    padding: 15px 18px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 1rem;
    background: #f8f9fa;
    transition: all 0.3s ease;
    outline: none;
    color: #374151;
}

.form-input::placeholder {
    color: #9ca3af;
}

.form-input:hover {
    background: #ffffff;
    border-color: #d1d5db;
}

.form-input:focus {
    border-color: #8B0000;
    box-shadow: 0 0 0 3px rgba(139, 0, 0, 0.1);
    background: #ffffff;
}

.input-hint {
    display: block;
    font-size: 0.8rem;
    color: #6b7280;
    margin-top: 6px;
    font-style: italic;
}

/* ===== EMAIL INPUT STYLES ===== */
.form-control {
    width: 100%;
    padding: 15px 18px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 1rem;
    background: #f8f9fa;
    transition: all 0.3s ease;
    outline: none;
    color: #374151;
}

.form-control::placeholder {
    color: #9ca3af;
}

.form-control:hover {
    background: #ffffff;
    border-color: #d1d5db;
}

.form-control:focus {
    border-color: #8B0000;
    box-shadow: 0 0 0 3px rgba(139, 0, 0, 0.1);
    background: #ffffff;
}

/* Add this class for consistent form inputs */
.form-input, .form-control {
    width: 100%;
    padding: 15px 18px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 1rem;
    background: #f8f9fa;
    transition: all 0.3s ease;
    outline: none;
    color: #374151;
}

/* ===== SUBMIT BUTTON (MATCHING IMAGE) ===== */
.submit-btn {
    width: 100%;
    padding: 18px 24px;
    background: linear-gradient(135deg, #8B0000, #B22222);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(139, 0, 0, 0.3);
    transition: all 0.3s ease;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.submit-btn:hover {
    background: linear-gradient(135deg, #7f1d1d, #991b1b);
    box-shadow: 0 6px 20px rgba(139, 0, 0, 0.4);
    transform: translateY(-2px);
}

.submit-btn:active {
    transform: translateY(0);
}

.submit-btn:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    transform: translateY(0);
    box-shadow: none;
}

/* ===== BACK LINK ===== */
.Back-group {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 20px;
}

.Back-link {
    color: #8B0000;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.Back-link:hover {
    color: #B22222;
    text-decoration: underline;
}

.Back-link:hover i {
    transform: translateX(-4px);
}

/* ===== FOOTER ===== */
.footer {
    background: linear-gradient(135deg, #8B0000, #B22222);
    color: white;
    text-align: center;
    padding: 15px 0;
    font-size: 0.9rem;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    margin-top: auto;
}

.footer p {
    margin: 0;
    font-weight: 500;
}

/* ===== SUCCESS/ERROR MESSAGES ===== */
.success-message, .error-message, .client-error-message {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-weight: 500;
    text-align: center;
}

.success-message {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.error-message, .client-error-message {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

/* Animation for client-side errors */
@keyframes slideInFromTop {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 10px;
        padding: 10px 15px;
    }
    
    .title {
        font-size: 1.3rem;
    }
    
    .logo {
        width: 60px;
        height: 60px;
    }
    
    .login-container {
        padding: 20px 15px;
    }
    
    .card {
        padding: 30px 25px;
    }
    
    .user-type-selection {
        flex-direction: column;
        gap: 10px;
    }
    
    .user-type-option {
        flex-direction: row;
        justify-content: center;
        padding: 15px;
        gap: 12px;
    }
    
    .user-type-option i {
        font-size: 1.3rem;
        margin-bottom: 0;
    }
}

@media (max-width: 480px) {
    .title {
        font-size: 1.1rem;
        line-height: 1.3;
        letter-spacing: 0.5px;
    }
    
    .logo {
        width: 50px;
        height: 50px;
    }
    
    .card {
        padding: 25px 20px;
    }
    
    .subtitle {
        font-size: 1.5rem;
    }
}