/* Modal Styles */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(8px);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

.modal-container {
    background: white;
    width: 90%;
    max-width: 340px;
    padding: 1.875rem;
    border-radius: 18px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    position: relative;
    transform: translateY(20px);
    transition: transform 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.modal-overlay.active .modal-container {
    transform: translateY(0);
}

.modal-close {
    position: absolute;
    top: 1.125rem;
    right: 1.125rem;
    background: none;
    border: none;
    font-size: 1.125rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.2s;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.modal-close:hover {
    color: var(--dark);
    background: #f1f5f9;
}

.modal-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.modal-header h2 {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--dark);
    margin-bottom: 0.375rem;
}

.modal-header p {
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Form Styles within Modal */
.form-group {
    margin-bottom: 0.9375rem;
}

.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.375rem;
    color: var(--text-main);
    font-size: 0.7125rem;
}

.form-control {
    width: 100%;
    padding: 0.5625rem 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 9px;
    font-size: 0.75rem;
    transition: all 0.2s;
    background: #f8fafc;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.form-check {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    margin-bottom: 1.125rem;
}

.form-check-input {
    width: 0.825rem;
    height: 0.825rem;
    border-radius: 3px;
    border: 1px solid #cbd5e1;
    cursor: pointer;
}

.btn-block {
    width: 100%;
    padding: 0.65625rem;
    font-size: 0.75rem;
}

.auth-switch {
    text-align: center;
    margin-top: 1.125rem;
    font-size: 0.7125rem;
    color: var(--text-muted);
}

.auth-switch a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
}

.auth-switch a:hover {
    text-decoration: underline;
}

.invalid-feedback {
    color: #ef4444;
    font-size: 0.65625rem;
    margin-top: 0.1875rem;
    display: block;
}