.auth-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s ease;
}

.auth-modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.auth-modal-content {
    background: white;
    border-radius: 8px;
    padding: 40px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: slideUp 0.3s ease;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

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

.auth-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 32px;
    cursor: pointer;
    color: #666;
    padding: 5px 10px;
    line-height: 1;
    transition: color 0.2s;
}

.auth-modal-close:hover {
    color: #000;
}

.auth-screen {
    display: none;
}

.auth-screen.active {
    display: block;
}

.auth-screen h2, .auth-screen .auth-heading {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 30px;
    font-size: 24px;
}

.back-btn {
    background: none;
    border: none;
    color: #6552AE;
    font-size: 16px;
    cursor: pointer;
    padding: 8px 0;
    margin-bottom: 20px;
    font-weight: 600;
}

.back-btn:hover {
    color: #5B4899;
}

/* Role Toggle (tabs voor ouder/oppasser switch) */
.role-toggle {
    display: flex;
    gap: 0;
    margin: 20px 0 30px 0;
    background: #f5f5f5;
    border-radius: 8px;
    padding: 4px;
}

.toggle-btn {
    flex: 1;
    padding: 12px 20px;
    border: none;
    background: transparent;
    color: #666;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.toggle-btn.active {
    background: white;
    color: #6552AE;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.toggle-btn:hover:not(.active) {
    color: #6552AE;
}

/* Role Selection */
.role-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.role-btn {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 25px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.role-btn:hover {
    border-color: #6552AE;
    background: #f8f7fc;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(123, 104, 190, 0.15);
}

.role-icon {
    font-size: 48px;
}

.role-title {
    font-size: 20px;
    font-weight: 600;
    color: #2c3e50;
}

.role-desc {
    font-size: 14px;
    color: #666;
}

/* Form Styles */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

#auth-modal .form-group {
    margin-bottom: 20px;
}

#auth-modal .form-group input[type="text"],
#auth-modal .form-group input[type="email"],
#auth-modal .form-group input[type="password"] {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
    box-sizing: border-box;
}

#auth-modal .form-group input:focus {
    outline: none;
    border-color: #6552AE;
}

#auth-modal .form-group input::placeholder {
    color: #999;
}

#auth-modal .checkbox-group {
    margin-bottom: 25px;
}

#auth-modal .checkbox-group label {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    font-size: 13px;
    color: #666;
    cursor: pointer;
}

#auth-modal .checkbox-group input[type="checkbox"] {
    margin-top: 2px;
    cursor: pointer;
    min-width: 18px;
    height: 18px;
    accent-color: #6552AE;
    flex-shrink: 0;
}

#auth-modal .checkbox-group input[type="checkbox"]:checked {
    background-color: #6552AE;
    border-color: #6552AE;
}

#auth-modal .checkbox-group a {
    color: #6552AE;
    text-decoration: none;
}

#auth-modal .checkbox-group a:hover {
    text-decoration: underline;
}

.btn-submit {
    width: 100%;
    background: #4f3f8f;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 16px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(123, 104, 190, 0.4);
}

.btn-submit:active {
    transform: translateY(0);
}

.auth-footer {
    text-align: center;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.auth-footer p {
    color: #666;
    font-size: 14px;
    margin: 0;
}

.auth-footer a {
    color: #6552AE;
    text-decoration: none;
    font-weight: 600;
}

.auth-footer a:hover {
    text-decoration: underline;
}

@media (max-width: 600px) {
    .auth-modal-content {
        padding: 30px 20px;
        width: 95%;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .auth-screen h2, .auth-screen .auth-heading {
        font-size: 20px;
    }
}
.auth-screen .auth-heading { font-weight: 700; line-height: 1.3; }
