﻿.patients-page {
    display: flex; /* Shared structural styles for official registry pages. */
    flex-direction: column;
    gap: 16px;
}

.patients-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 16px;
    flex-wrap: wrap;
    padding: 14px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.06);
}

.patients-title {
    margin: 0;
    font-size: 22px;
}

.patients-subtitle {
    margin: 6px 0 0;
    opacity: 0.75;
}

.patients-actions {
    display: flex;
    gap: 10px;
}

.patients-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.06);
    overflow: hidden;
}

.patients-table {
    width: 100%;
    border-collapse: collapse;
}

    .patients-table th, .patients-table td {
        padding: 12px 12px;
        border-bottom: 1px solid rgba(0,0,0,0.06);
        text-align: left;
    }

.patients-td-strong {
    font-weight: 900;
}

.patients-col-actions {
    width: 180px;
}

.patients-td-actions {
    display: flex;
    gap: 8px;
}

.patients-btn {
    padding: 8px 12px;
    border-radius: 12px;
    border: 1px solid rgba(0,0,0,0.12);
    background: white;
    cursor: pointer;
}

.patients-btn--primary {
    font-weight: 900;
}

.patients-btn--danger {
    border-color: rgba(244,67,54,0.35);
}

.patients-btn--small {
    padding: 6px 10px;
    border-radius: 10px;
    font-size: 13px;
}

.patients-alert {
    padding: 12px 14px;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(0,0,0,0.06);
}

.patients-alert--error {
    border-left: 4px solid #d32f2f;
}

.patients-loading {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px 14px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.06);
}

.patients-loading-spinner {
    width: 18px;
    height: 18px;
    border-radius: 999px;
    border: 2px solid rgba(0,0,0,0.18);
    border-top-color: rgba(0,0,0,0.65);
    animation: patients-spin 0.8s linear infinite;
}

@keyframes patients-spin {
    to {
        transform: rotate(360deg);
    }
}



.patients-modal-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 14px;
    border-bottom: 1px solid rgba(0,0,0,0.08);
}

.patients-modal-title {
    font-size: 18px;
    font-weight: 900;
}

.patients-modal-subtitle {
    margin-top: 4px;
    font-size: 13px;
    opacity: 0.75;
}

.patients-modal-close {
    border: 1px solid rgba(0,0,0,0.12);
    background: white;
    border-radius: 12px;
    padding: 6px 10px;
    cursor: pointer;
}

.patients-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.35);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 84px 18px 18px 18px;
    z-index: 2000;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.patients-modal {
    width: min(980px, 98vw);
    max-height: calc(100dvh - 102px);
    background: white;
    border-radius: 18px;
    box-shadow: 0 18px 50px rgba(0,0,0,0.18);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.patients-modal-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 14px;
    border-bottom: 1px solid rgba(0,0,0,0.08);
    flex: 0 0 auto;
    background: white;
    position: sticky;
    top: 0;
    z-index: 1;
}

.patients-form {
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    overflow-y: auto;
    min-height: 0;
    flex: 1 1 auto;
}

.patients-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

    .patients-field span {
        font-size: 13px;
        opacity: 0.85;
        font-weight: 900;
    }

.patients-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.patients-input {
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid rgba(0,0,0,0.12);
    background: white;
}

.patients-textarea {
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid rgba(0,0,0,0.12);
    background: white;
    resize: vertical;
}

.patients-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 6px;
}

@media (max-width: 900px) {
    .patients-td-actions {
        flex-wrap: wrap;
    }

    .patients-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    .patients-modal-backdrop {
        padding: 72px 10px 10px 10px;
    }

    .patients-modal {
        width: 100%;
        max-height: calc(100dvh - 82px);
        border-radius: 14px;
    }
}
/* =========================
   CONFIRM DELETE (reuse patients-modal styles)
========================= */

.patients-modal--confirm {
    width: min(560px, 98vw);
}

.patients-confirm-note {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(0,0,0,0.06);
    border-left: 4px solid rgba(244,67,54,0.45);
}

.patients-btn--danger-solid {
    border: 1px solid rgba(244,67,54,0.55);
    background: rgba(244,67,54,0.10);
    font-weight: 900;
}

.patients-btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

/* Optional pills used on /workers */
.patients-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid rgba(0,0,0,0.12);
    font-size: 13px;
    font-weight: 900;
    background: #fff;
}

.patients-pill--ok {
    border-color: rgba(46,125,50,0.35);
}

.patients-pill--muted {
    opacity: 0.75;
}
