/* Reusable modal alerts for admin / clinical portal (replaces window.alert / confirm) */
.ap-dialog-root {
    position: fixed;
    inset: 0;
    z-index: 2147483000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    box-sizing: border-box;
}

.ap-dialog-root[hidden] {
    display: none !important;
}

.ap-dialog-root__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    cursor: pointer;
}

.ap-dialog-root__panel {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 400px;
    margin: 0;
    padding: 26px 22px 20px;
    border-radius: 14px;
    background: #fff;
    color: #0f172a;
    box-shadow:
        0 24px 48px rgba(15, 23, 42, 0.2),
        0 0 0 1px rgba(15, 23, 42, 0.06);
    font-family: "Inter", system-ui, -apple-system, Segoe UI, sans-serif;
    text-align: left;
}

.ap-dialog-root__title {
    margin: 0 0 10px;
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #0f172a;
}

.ap-dialog-root__message {
    margin: 0 0 22px;
    font-size: 0.9rem;
    line-height: 1.5;
    color: #475569;
    white-space: pre-wrap;
}

.ap-dialog-root__message[hidden] {
    display: none;
}

.ap-dialog-root__field {
    margin: 0 0 22px;
}

.ap-dialog-root__field[hidden] {
    display: none !important;
}

.ap-dialog-root__label {
    display: block;
    margin: 0 0 8px;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #334155;
}

.ap-dialog-root__input {
    display: block;
    width: 100%;
    box-sizing: border-box;
    margin: 0;
    padding: 11px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    font: inherit;
    font-size: 0.9rem;
    color: #0f172a;
    background: #fff;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.ap-dialog-root__input::placeholder {
    color: #94a3b8;
}

.ap-dialog-root__input:focus {
    outline: none;
    border-color: #0056a4;
    box-shadow: 0 0 0 3px rgba(0, 86, 164, 0.18);
}

.ap-dialog-root__input.is-invalid {
    border-color: #dc2626;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.15);
}

.ap-dialog-root__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
}

.ap-dialog-root__btn {
    margin: 0;
    padding: 10px 18px;
    border-radius: 10px;
    font: inherit;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    color: #334155;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.ap-dialog-root__btn:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.ap-dialog-root__btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.35);
}

.ap-dialog-root__btn--primary {
    border-color: rgba(0, 86, 164, 0.35);
    background: #0056a4;
    color: #fff;
}

.ap-dialog-root__btn--primary:hover {
    background: #004a8f;
    border-color: rgba(0, 86, 164, 0.5);
    color: #fff;
}

.ap-dialog-root__btn--danger {
    border-color: rgba(185, 28, 28, 0.35);
    background: #dc2626;
    color: #fff;
}

.ap-dialog-root__btn--danger:hover {
    background: #b91c1c;
    border-color: rgba(127, 29, 29, 0.45);
    color: #fff;
}

.ap-dialog-root.is-danger .ap-dialog-root__btn--primary {
    border-color: rgba(185, 28, 28, 0.35);
    background: #dc2626;
    color: #fff;
}

.ap-dialog-root.is-danger .ap-dialog-root__btn--primary:hover {
    background: #b91c1c;
}
