.sgpm-platform,
.sgpm-platform * {
    box-sizing: border-box;
}

.sgpm-platform {
    width: 100%;
    max-width: 1500px;
    margin: 0 auto;
    color: #18212f;
    font-family: inherit;
}

.sgpm-platform a {
    color: #1769aa;
}

.sgpm-platform__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 24px;
}

.sgpm-platform__header h2 {
    margin: 4px 0 8px;
    font-size: clamp(26px, 3vw, 38px);
    line-height: 1.15;
}

.sgpm-platform__header p {
    max-width: 780px;
    margin: 0;
    color: #657083;
}

.sgpm-platform__eyebrow {
    display: block;
    color: #1769aa;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.sgpm-button,
.sgpm-dropdown__toggle {
    display: inline-flex;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 9px 16px;
    border: 1px solid #1769aa;
    border-radius: 8px;
    background: #1769aa;
    color: #fff !important;
    font: inherit;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none !important;
    cursor: pointer;
    transition: transform .16s ease, background-color .16s ease, border-color .16s ease;
}

.sgpm-button:hover,
.sgpm-dropdown__toggle:hover {
    background: #10578f;
    border-color: #10578f;
    transform: translateY(-1px);
}

.sgpm-button--secondary,
.sgpm-button--ghost {
    background: #fff;
    color: #1769aa !important;
}

.sgpm-button--secondary:hover,
.sgpm-button--ghost:hover {
    background: #f2f7fb;
}

.sgpm-platform__search {
    margin: 20px 0;
    padding: 18px;
    border: 1px solid #dce3eb;
    border-radius: 12px;
    background: #f8fafc;
}

.sgpm-platform__search label {
    display: block;
    margin-bottom: 8px;
    font-weight: 700;
}

.sgpm-platform__search-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sgpm-platform__search input[type="search"] {
    width: min(100%, 520px);
    min-height: 42px;
    padding: 9px 12px;
    border: 1px solid #cdd6e1;
    border-radius: 8px;
    background: #fff;
    color: #18212f;
    font: inherit;
}

.sgpm-table-wrap {
    width: 100%;
    overflow-x: auto;
    overflow-y: visible;
    padding-bottom: 110px;
    margin-bottom: -90px;
    border: 1px solid #dce3eb;
    border-radius: 12px;
    background: #fff;
}

.sgpm-table {
    width: 100%;
    min-width: 1010px;
    border-collapse: collapse;
    border-spacing: 0;
}

.sgpm-table th,
.sgpm-table td {
    padding: 14px 15px;
    border-bottom: 1px solid #e8edf2;
    text-align: left;
    vertical-align: middle;
}

.sgpm-table th {
    background: #f5f7fa;
    color: #465266;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .03em;
    text-transform: uppercase;
}

.sgpm-table tbody tr:last-child td {
    border-bottom: 0;
}

.sgpm-table tbody tr:hover {
    background: #fbfcfe;
}

.sgpm-table__empty {
    padding: 36px !important;
    color: #657083;
    text-align: center !important;
}

.sgpm-table__actions-cell {
    width: 130px;
}

.sgpm-status,
.sgpm-profile__status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    padding: 6px 10px;
    border-radius: 999px;
    font-weight: 800;
}

.sgpm-status.is-active,
.sgpm-profile__status.is-active {
    background: #e5f7eb;
    color: #087333;
}

.sgpm-status.is-expired,
.sgpm-profile__status.is-expired {
    background: #fce9e9;
    color: #a02b2b;
}

.sgpm-dropdown {
    position: relative;
    display: inline-block;
}

.sgpm-dropdown__toggle {
    min-height: 36px;
    padding: 7px 11px;
    border-color: #cdd6e1;
    background: #fff;
    color: #263244 !important;
    font-size: 14px;
}

.sgpm-dropdown__toggle:hover {
    border-color: #9eacbc;
    background: #f7f9fb;
}

.sgpm-dropdown__toggle .dashicons {
    display: inline-flex;
    width: 16px;
    height: 16px;
    margin: 0;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    line-height: 1;
    vertical-align: middle;
    transition: transform .18s ease;
}

.sgpm-dropdown__toggle[aria-expanded="true"] .dashicons {
    transform: rotate(180deg);
}

.sgpm-dropdown__menu {
    position: absolute;
    top: calc(100% + 7px);
    right: 0;
    z-index: 100;
    min-width: 170px;
    overflow: hidden;
    border: 1px solid #d7dee7;
    border-radius: 9px;
    background: #fff;
    box-shadow: 0 14px 35px rgba(30, 45, 62, .16);
    opacity: 0;
    transform: translateY(-6px);
    transition: opacity .18s ease, transform .18s ease;
}

.sgpm-dropdown__menu.is-open {
    opacity: 1;
    transform: translateY(0);
}

.sgpm-dropdown__menu a {
    display: block;
    padding: 11px 14px;
    color: #263244;
    text-decoration: none;
}

.sgpm-dropdown__menu a:hover {
    background: #f5f7fa;
}

.sgpm-dropdown__menu .sgpm-delete-patient {
    border-top: 1px solid #edf0f4;
    color: #b42318;
}

.sgpm-pagination {
    margin-top: 24px;
}

.sgpm-pagination ul {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    padding: 0;
    margin: 0;
    list-style: none;
}

.sgpm-pagination a,
.sgpm-pagination span {
    display: inline-flex;
    min-width: 38px;
    min-height: 38px;
    align-items: center;
    justify-content: center;
    padding: 6px 10px;
    border: 1px solid #d4dce6;
    border-radius: 7px;
    background: #fff;
    color: #263244;
    font-weight: 700;
    text-decoration: none;
}

.sgpm-pagination .current {
    border-color: #1769aa;
    background: #1769aa;
    color: #fff;
}

.sgpm-profile__back {
    margin: 0 0 18px;
}

.sgpm-profile__back a {
    font-weight: 700;
    text-decoration: none;
}

.sgpm-profile__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin: 24px 0 32px;
}

.sgpm-profile__card {
    min-width: 0;
    padding: 18px;
    border: 1px solid #dce3eb;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 3px 12px rgba(30, 45, 62, .05);
}

.sgpm-profile__card span {
    display: block;
    margin-bottom: 7px;
    color: #657083;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.sgpm-profile__card strong {
    display: block;
    overflow-wrap: anywhere;
}

.sgpm-profile__history h3 {
    margin: 0 0 15px;
    font-size: 24px;
}

.sgpm-table--history {
    min-width: 760px;
}

.sgpm-message {
    margin: 0 0 20px;
    padding: 16px 18px;
    border: 1px solid #bfd4e7;
    border-radius: 10px;
    background: #eef6fc;
    color: #17466d;
}

.sgpm-message--success {
    border-color: #b8dfc5;
    background: #edf9f1;
    color: #176536;
}

.sgpm-message--error {
    border-color: #e8bcbc;
    background: #fff1f1;
    color: #8f2323;
}

.sgpm-message .sgpm-button {
    margin-left: 10px;
}

@media (max-width: 1100px) {
    .sgpm-profile__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767px) {
    .sgpm-platform__header,
    .sgpm-platform__search-row {
        flex-direction: column;
        align-items: stretch;
    }

    .sgpm-platform__header .sgpm-button,
    .sgpm-platform__search-row .sgpm-button,
    .sgpm-platform__search input[type="search"] {
        width: 100%;
    }

    .sgpm-profile__grid {
        grid-template-columns: 1fr;
    }

    .sgpm-message .sgpm-button {
        width: 100%;
        margin: 12px 0 0;
    }
}

.sgpm-login {
    max-width: 560px;
    padding: 24px 0;
}

.sgpm-login__card {
    padding: clamp(24px, 5vw, 42px);
    border: 1px solid #dce3eb;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 18px 50px rgba(30, 45, 62, .1);
}

.sgpm-login__card h2 {
    margin: 6px 0 10px;
    font-size: clamp(28px, 5vw, 40px);
    line-height: 1.15;
}

.sgpm-login__intro {
    margin: 0 0 24px;
    color: #657083;
    line-height: 1.65;
}

.sgpm-login__form {
    display: grid;
    gap: 10px;
}

.sgpm-login__form label:not(.sgpm-login__remember) {
    margin-top: 6px;
    font-weight: 700;
}

.sgpm-login__form input[type="text"],
.sgpm-login__form input[type="password"] {
    width: 100%;
    min-height: 48px;
    padding: 10px 13px;
    border: 1px solid #cdd6e1;
    border-radius: 8px;
    background: #fff;
    color: #18212f;
    font: inherit;
}

.sgpm-login__form input[type="text"]:focus,
.sgpm-login__form input[type="password"]:focus {
    border-color: #1769aa;
    outline: 2px solid rgba(23, 105, 170, .15);
    outline-offset: 1px;
}

.sgpm-login__remember {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 8px 0;
    cursor: pointer;
}

.sgpm-login__remember input {
    width: 18px;
    height: 18px;
    margin: 0;
}

.sgpm-login__submit {
    width: 100%;
    min-height: 48px;
    margin-top: 4px;
}

.sgpm-login__forgot {
    margin: 20px 0 0;
    text-align: center;
}

.sgpm-login__forgot a {
    font-weight: 700;
    text-decoration: none;
}

.sgpm-profile__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

@media (max-width: 767px) {
    .sgpm-login {
        padding: 8px 0;
    }

    .sgpm-profile__actions {
        width: 100%;
        align-items: stretch;
        flex-direction: column;
    }
}

/* Panel pacjenta 1.2.2 */
.sgpm-dashboard {
    padding: clamp(10px, 2vw, 24px) 0;
}

.sgpm-dashboard__shell {
    display: grid;
    grid-template-columns: minmax(260px, 320px) minmax(0, 1fr);
    min-height: 660px;
    overflow: hidden;
    border: 1px solid #dbe4ed;
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 24px 70px rgba(21, 39, 58, .13);
    animation: sgpmDashboardEnter .65s cubic-bezier(.22, 1, .36, 1) both;
}

.sgpm-dashboard__sidebar {
    position: relative;
    display: flex;
    min-width: 0;
    flex-direction: column;
    padding: 34px 24px 24px;
    color: #fff;
    background:
        radial-gradient(circle at 12% 8%, rgba(80, 173, 233, .34), transparent 34%),
        linear-gradient(155deg, #10263a 0%, #153f60 58%, #1769aa 100%);
}

.sgpm-dashboard__sidebar::after {
    position: absolute;
    right: -90px;
    bottom: -90px;
    width: 230px;
    height: 230px;
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 50%;
    content: '';
    pointer-events: none;
}

.sgpm-dashboard__identity,
.sgpm-dashboard__nav {
    position: relative;
    z-index: 1;
}

.sgpm-dashboard__identity {
    padding-bottom: 26px;
    border-bottom: 1px solid rgba(255, 255, 255, .16);
}

.sgpm-dashboard__identity > .sgpm-dashboard__avatar {
    margin: 0 auto 18px;
}

.sgpm-dashboard__avatar-form {
    display: flex;
    width: 116px;
    align-items: center;
    flex-direction: column;
    gap: 10px;
    margin: 0 auto 18px;
}

.sgpm-dashboard__avatar {
    position: relative;
    display: inline-flex;
    width: 92px;
    height: 92px;
    flex: 0 0 92px;
    align-items: center;
    justify-content: center;
    padding: 0;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, .55);
    border-radius: 50%;
    background: rgba(255, 255, 255, .14);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), 0 14px 30px rgba(0, 0, 0, .2);
    color: #fff;
    font: inherit;
    backdrop-filter: blur(8px);
}

.sgpm-dashboard__avatar.is-editable {
    cursor: pointer;
    transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.sgpm-dashboard__avatar.is-editable:hover,
.sgpm-dashboard__avatar.is-editable:focus-visible {
    border-color: #fff;
    box-shadow: 0 16px 34px rgba(0, 0, 0, .28);
    outline: none;
    transform: translateY(-2px);
}

.sgpm-dashboard__avatar-image,
.sgpm-dashboard__avatar-placeholder {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.sgpm-dashboard__avatar-image {
    display: block;
    object-fit: cover;
    object-position: center;
}

.sgpm-dashboard__avatar-image[hidden],
.sgpm-dashboard__avatar-placeholder[hidden] {
    display: none !important;
}

.sgpm-dashboard__avatar-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, rgba(255, 255, 255, .2), rgba(255, 255, 255, .08));
}

.sgpm-dashboard__avatar-placeholder svg {
    position: absolute !important;
    top: 50% !important;
    right: auto !important;
    bottom: auto !important;
    left: 50% !important;
    display: block !important;
    width: 50% !important;
    height: 50% !important;
    margin: 0 !important;
    overflow: visible;
    transform: translate(-50%, -50%) !important;
    filter: drop-shadow(0 5px 9px rgba(0, 0, 0, .16));
}

.sgpm-dashboard__avatar-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    background: rgba(7, 22, 34, .7);
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    line-height: 1.25;
    text-align: center;
    opacity: 0;
    transition: opacity .2s ease;
}

.sgpm-dashboard__avatar.is-editable:hover .sgpm-dashboard__avatar-overlay,
.sgpm-dashboard__avatar.is-editable:focus-visible .sgpm-dashboard__avatar-overlay,
.sgpm-dashboard__avatar-form.has-selection .sgpm-dashboard__avatar-overlay {
    opacity: 1;
}

.sgpm-dashboard__avatar-save {
    min-height: 36px;
    padding: 8px 10px;
    border: 1px solid rgba(255, 255, 255, .42);
    border-radius: 9px;
    background: #fff;
    box-shadow: 0 8px 18px rgba(0, 0, 0, .14);
    color: #12334d;
    font: inherit;
    font-size: 11px;
    font-weight: 800;
    line-height: 1.2;
    cursor: pointer;
    transition: background-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.sgpm-dashboard__avatar-save:hover,
.sgpm-dashboard__avatar-save:focus-visible {
    background: #edf7ff;
    box-shadow: 0 10px 22px rgba(0, 0, 0, .2);
    outline: none;
    transform: translateY(-1px);
}

.sgpm-dashboard__avatar-save:disabled {
    cursor: wait;
    opacity: .7;
    transform: none;
}

.sgpm-dashboard__eyebrow {
    display: block;
    width: 100%;
    margin-bottom: 5px;
    color: rgba(255, 255, 255, .68);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .11em;
    text-align: center;
    text-transform: uppercase;
}

.sgpm-dashboard__identity h2 {
    width: 100%;
    margin: 0 0 24px;
    color: #fff;
    font-size: clamp(23px, 2.2vw, 30px);
    line-height: 1.16;
    text-align: center;
    overflow-wrap: anywhere;
}

.sgpm-dashboard__access {
    margin-bottom: 14px;
}

.sgpm-dashboard__access span,
.sgpm-dashboard__remaining span {
    display: block;
    margin-bottom: 5px;
    color: rgba(255, 255, 255, .67);
    font-size: 12px;
    font-weight: 700;
}

.sgpm-dashboard__access strong {
    display: block;
    color: #fff;
    font-size: 17px;
}

.sgpm-dashboard__remaining {
    padding: 14px 16px;
    border: 1px solid rgba(255, 255, 255, .17);
    border-radius: 14px;
    background: rgba(255, 255, 255, .1);
}

.sgpm-dashboard__remaining strong {
    display: block;
    color: #fff;
    font-size: 20px;
    line-height: 1.2;
}

.sgpm-dashboard__remaining.is-active {
    border-color: rgba(159, 235, 190, .32);
    background: rgba(54, 172, 104, .2);
}

.sgpm-dashboard__remaining.is-expired {
    border-color: rgba(255, 177, 177, .3);
    background: rgba(174, 49, 49, .2);
}

.sgpm-dashboard__nav {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 7px;
    padding-top: 24px;
}

.sgpm-dashboard__nav-item {
    position: relative;
    display: flex;
    width: 100%;
    min-height: 48px;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 11px 14px 11px 17px;
    border: 1px solid transparent;
    border-radius: 12px;
    background: transparent;
    color: rgba(255, 255, 255, .83) !important;
    font: inherit;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.25;
    text-align: left;
    text-decoration: none !important;
    cursor: pointer;
    transition: color .2s ease, background-color .2s ease, border-color .2s ease, transform .2s ease;
}

.sgpm-dashboard__nav-item::before {
    position: absolute;
    top: 50%;
    left: 6px;
    width: 3px;
    height: 0;
    border-radius: 999px;
    background: #fff;
    content: '';
    transform: translateY(-50%);
    transition: height .2s ease;
}

.sgpm-dashboard__nav-item:hover,
.sgpm-dashboard__nav-item:focus-visible,
.sgpm-dashboard__nav-item.is-active {
    border-color: rgba(255, 255, 255, .12);
    background: rgba(255, 255, 255, .13);
    color: #fff !important;
    outline: none;
    transform: translateX(2px);
}

.sgpm-dashboard__nav-item.is-active::before {
    height: 24px;
}

.sgpm-dashboard__nav-item small {
    display: inline-flex;
    min-width: 24px;
    min-height: 22px;
    align-items: center;
    justify-content: center;
    padding: 3px 7px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .14);
    color: rgba(255, 255, 255, .78);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .02em;
}

.sgpm-dashboard__nav-item.is-disabled {
    color: rgba(255, 255, 255, .42) !important;
    cursor: default;
}

.sgpm-dashboard__nav-item.is-disabled:hover {
    border-color: transparent;
    background: transparent;
    transform: none;
}

.sgpm-dashboard__nav-item.is-disabled small {
    background: rgba(255, 255, 255, .08);
    color: rgba(255, 255, 255, .46);
}

.sgpm-dashboard__nav-item--exit {
    margin-top: auto;
    border-color: rgba(255, 255, 255, .12);
}

.sgpm-dashboard__content {
    min-width: 0;
    padding: clamp(28px, 4vw, 58px);
    background:
        linear-gradient(rgba(255, 255, 255, .94), rgba(255, 255, 255, .98)),
        radial-gradient(circle at 90% 8%, rgba(23, 105, 170, .13), transparent 26%);
}

.sgpm-dashboard__panel[hidden] {
    display: none !important;
}

.sgpm-dashboard__panel.is-entering {
    animation: sgpmPanelEnter .38s cubic-bezier(.22, 1, .36, 1) both;
}

.sgpm-dashboard__panel-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 28px;
    padding-bottom: 25px;
    border-bottom: 1px solid #e4eaf0;
}

.sgpm-dashboard__panel-header h1 {
    margin: 5px 0 9px;
    color: #172333;
    font-size: clamp(29px, 3.4vw, 44px);
    line-height: 1.08;
}

.sgpm-dashboard__panel-header p {
    max-width: 700px;
    margin: 0;
    color: #69768a;
    line-height: 1.65;
}

.sgpm-dashboard__panel-header .sgpm-profile__status {
    flex: 0 0 auto;
    min-height: 38px;
    padding: 8px 14px;
    white-space: nowrap;
}

.sgpm-dashboard__data-grid.sgpm-profile__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin: 28px 0 0;
}

.sgpm-dashboard__data-grid .sgpm-profile__card {
    position: relative;
    min-height: 112px;
    padding: 22px;
    overflow: hidden;
    border-color: #e0e7ee;
    border-radius: 16px;
    box-shadow: 0 7px 24px rgba(30, 45, 62, .055);
    transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.sgpm-dashboard__data-grid .sgpm-profile__card::after {
    position: absolute;
    right: -24px;
    bottom: -28px;
    width: 76px;
    height: 76px;
    border-radius: 50%;
    background: rgba(23, 105, 170, .045);
    content: '';
}

.sgpm-dashboard__data-grid .sgpm-profile__card:hover {
    border-color: #c4d7e8;
    box-shadow: 0 12px 30px rgba(30, 45, 62, .09);
    transform: translateY(-2px);
}

.sgpm-dashboard__data-grid .sgpm-profile__card span {
    position: relative;
    z-index: 1;
    margin-bottom: 10px;
    color: #718095;
}

.sgpm-dashboard__data-grid .sgpm-profile__card strong {
    position: relative;
    z-index: 1;
    color: #1a2737;
    font-size: 17px;
    line-height: 1.4;
}

.sgpm-dashboard__count {
    display: inline-flex;
    min-height: 38px;
    align-items: center;
    padding: 7px 13px;
    border: 1px solid #d5e2ed;
    border-radius: 999px;
    background: #f4f8fb;
    color: #31516d;
    font-size: 13px;
    font-weight: 800;
    white-space: nowrap;
}

.sgpm-dashboard__history .sgpm-table-wrap {
    padding-bottom: 0;
    margin: 28px 0 0;
    overflow-x: auto;
    border-radius: 16px;
    box-shadow: 0 7px 24px rgba(30, 45, 62, .05);
}

.sgpm-dashboard__history .sgpm-table--history {
    min-width: 720px;
}

.sgpm-dashboard__history .sgpm-table th {
    padding-top: 16px;
    padding-bottom: 16px;
    background: #f3f7fa;
}

@keyframes sgpmDashboardEnter {
    from {
        opacity: 0;
        transform: translateY(22px) scale(.992);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

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

@media (max-width: 980px) {
    .sgpm-dashboard__shell {
        grid-template-columns: 250px minmax(0, 1fr);
    }

    .sgpm-dashboard__sidebar {
        padding-right: 18px;
        padding-left: 18px;
    }

    .sgpm-dashboard__content {
        padding: 32px;
    }

    .sgpm-dashboard__data-grid.sgpm-profile__grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767px) {
    .sgpm-dashboard {
        padding: 4px 0;
    }

    .sgpm-dashboard__shell {
        grid-template-columns: 1fr;
        min-height: 0;
        border-radius: 18px;
    }

    .sgpm-dashboard__sidebar {
        padding: 26px 20px 20px;
    }

    .sgpm-dashboard__identity {
        display: flex;
        align-items: center;
        flex-direction: column;
        padding-bottom: 20px;
        text-align: center;
    }

    .sgpm-dashboard__avatar-form {
        width: 116px;
        margin: 0 auto 14px;
    }

    .sgpm-dashboard__avatar,
    .sgpm-dashboard__identity > .sgpm-dashboard__avatar {
        width: 82px;
        height: 82px;
        flex-basis: 82px;
        margin: 0 auto 14px;
    }

    .sgpm-dashboard__avatar-form .sgpm-dashboard__avatar {
        margin-bottom: 0;
    }

    .sgpm-dashboard__avatar-save {
        min-height: 34px;
        padding: 7px 10px;
        font-size: 10px;
    }

    .sgpm-dashboard__eyebrow {
        align-self: auto;
    }

    .sgpm-dashboard__identity h2 {
        align-self: auto;
        margin: 0 0 20px;
        font-size: 22px;
    }

    .sgpm-dashboard__access,
    .sgpm-dashboard__remaining {
        width: 100%;
        text-align: left;
    }

    .sgpm-dashboard__access {
        margin: 0 0 12px;
    }

    .sgpm-dashboard__nav {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        padding-top: 18px;
    }

    .sgpm-dashboard__nav-item {
        min-height: 44px;
        padding: 9px 11px 9px 14px;
        font-size: 13px;
    }

    .sgpm-dashboard__nav-item small {
        display: none;
    }

    .sgpm-dashboard__nav-item--exit {
        margin-top: 0;
    }

    .sgpm-dashboard__content {
        padding: 26px 18px 30px;
    }

    .sgpm-dashboard__panel-header {
        flex-direction: column;
        gap: 16px;
    }

    .sgpm-dashboard__panel-header .sgpm-profile__status,
    .sgpm-dashboard__count {
        align-self: flex-start;
    }

    .sgpm-dashboard__data-grid .sgpm-profile__card {
        min-height: 0;
        padding: 18px;
    }
}

@media (max-width: 460px) {
    .sgpm-dashboard__nav {
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    .sgpm-dashboard__shell,
    .sgpm-dashboard__panel.is-entering {
        animation: none;
    }

    .sgpm-dashboard__nav-item,
    .sgpm-dashboard__avatar,
    .sgpm-dashboard__avatar-overlay,
    .sgpm-dashboard__avatar-save,
    .sgpm-dashboard__data-grid .sgpm-profile__card {
        transition: none;
    }
}


/* Wyśrodkowana tabela administratora 1.2.7 */
.sgpm-sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.sgpm-platform .sgpm-table--patients .sgpm-name-column {
    width: 245px;
}

.sgpm-platform .sgpm-patient-name-cell {
    min-width: 215px;
}

.sgpm-platform .sgpm-patient-identity {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 12px;
}

.sgpm-platform .sgpm-patient-identity strong {
    min-width: 0;
    color: #1a2737;
    line-height: 1.35;
}

.sgpm-platform .sgpm-patient-avatar {
    display: inline-flex;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 1px solid #cbd7e2;
    border-radius: 50%;
    background: #edf3f8;
    color: #557089;
    box-shadow: 0 3px 10px rgba(30, 56, 80, .08);
}

.sgpm-platform .sgpm-patient-avatar img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.sgpm-platform .sgpm-patient-avatar .dashicons {
    width: 22px;
    height: 22px;
    font-size: 22px;
    line-height: 1;
}

.sgpm-platform .sgpm-table--patients .sgpm-contact-column {
    width: 142px;
    min-width: 142px;
    padding-right: 8px;
    padding-left: 8px;
    text-align: center;
}

.sgpm-platform .sgpm-table--patients th.sgpm-contact-column {
    white-space: nowrap;
}



.sgpm-platform .sgpm-contact-icon {
    display: inline-flex;
    width: 36px;
    height: 36px;
    align-items: center;
    justify-content: center;
    border: 1px solid #cedae5;
    border-radius: 50%;
    background: #fff;
    color: #1769aa;
    text-decoration: none !important;
    box-shadow: 0 3px 10px rgba(30, 56, 80, .05);
    transition: border-color .16s ease, background-color .16s ease, color .16s ease, transform .16s ease, box-shadow .16s ease;
}

.sgpm-platform .sgpm-contact-icon:hover,
.sgpm-platform .sgpm-contact-icon:focus-visible {
    border-color: #1769aa;
    background: #edf6fd;
    color: #10578f;
    outline: none;
    box-shadow: 0 6px 16px rgba(23, 105, 170, .14);
    transform: translateY(-1px);
}

.sgpm-platform .sgpm-contact-icon .dashicons {
    width: 19px;
    height: 19px;
    font-size: 19px;
    line-height: 1;
}

.sgpm-platform .sgpm-contact-icon.is-disabled {
    border-color: #e1e7ed;
    background: #f5f7f9;
    color: #a8b2bd;
    box-shadow: none;
    cursor: default;
}

/* Wyrównanie listy pacjentów 1.2.7 */
.sgpm-platform .sgpm-table--patients th,
.sgpm-platform .sgpm-table--patients td {
    text-align: center;
}

.sgpm-platform .sgpm-table--patients .sgpm-patient-identity {
    justify-content: center;
}

.sgpm-platform .sgpm-table--patients .sgpm-table__actions-cell {
    text-align: center;
}

/* Skrzynka pacjenta 1.3.0 */
.sgpm-dashboard__nav-unread {
    background: #fff !important;
    color: #153b58 !important;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, .12);
}

.sgpm-client-mailbox {
    display: grid;
    grid-template-columns: minmax(250px, 320px) minmax(0, 1fr);
    min-height: 560px;
    margin-top: 28px;
    overflow: hidden;
    border: 1px solid #dce5ed;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 10px 32px rgba(31, 49, 68, .07);
}

.sgpm-client-mailbox__list {
    min-width: 0;
    max-height: 650px;
    overflow-y: auto;
    border-right: 1px solid #dce5ed;
    background: #f7fafc;
}

.sgpm-client-mailbox__empty,
.sgpm-client-mailbox__placeholder {
    display: flex;
    min-height: 300px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 32px;
    color: #728093;
    text-align: center;
}

.sgpm-client-mailbox__empty .dashicons,
.sgpm-client-mailbox__placeholder .dashicons {
    width: 46px;
    height: 46px;
    margin-bottom: 10px;
    color: #93a9ba;
    font-size: 46px;
}

.sgpm-client-mailbox__empty strong,
.sgpm-client-mailbox__placeholder h2 {
    margin: 0 0 7px;
    color: #223c53;
    font-size: 19px;
}

.sgpm-client-mailbox__empty p,
.sgpm-client-mailbox__placeholder p {
    max-width: 420px;
    margin: 0 0 18px;
    line-height: 1.6;
}

.sgpm-client-thread-preview {
    position: relative;
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 11px;
    padding: 15px;
    border-bottom: 1px solid #e1e8ee;
    color: #253d53 !important;
    text-decoration: none !important;
    transition: background-color .18s ease, box-shadow .18s ease;
}

.sgpm-client-thread-preview:hover,
.sgpm-client-thread-preview:focus-visible,
.sgpm-client-thread-preview.is-active {
    background: #eef6fc;
    color: #183b58 !important;
    outline: none;
}

.sgpm-client-thread-preview.is-active {
    box-shadow: inset 4px 0 #1769aa;
}

.sgpm-client-thread-preview.has-unread {
    background: #f1f8fd;
}

.sgpm-client-thread-preview__icon {
    display: inline-flex;
    width: 38px;
    height: 38px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #dcecf8;
    color: #1769aa;
}

.sgpm-client-thread-preview__content {
    display: grid;
    min-width: 0;
    gap: 5px;
}

.sgpm-client-thread-preview__top {
    display: flex;
    min-width: 0;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
}

.sgpm-client-thread-preview__top strong,
.sgpm-client-thread-preview__excerpt {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sgpm-client-thread-preview__top strong {
    color: #203b52;
    font-size: 14px;
}

.sgpm-client-thread-preview__top time {
    flex: 0 0 auto;
    color: #8290a0;
    font-size: 10px;
}

.sgpm-client-thread-preview__excerpt {
    color: #718092;
    font-size: 12px;
}

.sgpm-client-thread-preview__badge {
    position: absolute;
    top: 10px;
    right: 10px;
    display: inline-flex;
    min-width: 20px;
    height: 20px;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
    border-radius: 999px;
    background: #d63638;
    color: #fff;
    font-size: 10px;
    font-weight: 800;
}

.sgpm-client-mailbox__thread {
    display: flex;
    min-width: 0;
    flex-direction: column;
    background: #fff;
}

.sgpm-client-thread__header {
    padding: 20px 24px;
    border-bottom: 1px solid #dce5ed;
}

.sgpm-client-thread__header span {
    color: #748397;
    font-size: 12px;
    font-weight: 700;
}

.sgpm-client-thread__header h2 {
    margin: 4px 0 0;
    color: #1e374e;
    font-size: 23px;
}

.sgpm-client-thread__messages {
    display: flex;
    min-height: 330px;
    max-height: 500px;
    flex: 1;
    flex-direction: column;
    gap: 14px;
    padding: 24px;
    overflow-y: auto;
    background: #f6f9fb;
}

.sgpm-client-message {
    width: min(80%, 680px);
    padding: 13px 15px;
    border: 1px solid #d8e2eb;
    border-radius: 15px;
    background: #fff;
    box-shadow: 0 4px 14px rgba(35, 55, 74, .05);
}

.sgpm-client-message.is-patient {
    align-self: flex-end;
    border-color: #b9d8ef;
    background: #eaf5fd;
}

.sgpm-client-message.is-admin {
    align-self: flex-start;
}

.sgpm-client-message__meta {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 7px;
    color: #758395;
    font-size: 11px;
}

.sgpm-client-message__meta strong {
    color: #24425c;
    font-size: 12px;
}

.sgpm-client-message__body {
    color: #263c50;
    line-height: 1.6;
    overflow-wrap: anywhere;
}

.sgpm-client-thread__reply {
    display: grid;
    gap: 9px;
    padding: 18px 24px 22px;
    border-top: 1px solid #dce5ed;
}

.sgpm-client-thread__reply label {
    color: #29455d;
    font-weight: 700;
}

.sgpm-client-thread__reply textarea {
    width: 100%;
    min-height: 104px;
    padding: 12px 14px;
    border: 1px solid #cbd8e3;
    border-radius: 12px;
    resize: vertical;
}

.sgpm-client-thread__reply .sgpm-button {
    justify-self: end;
}

@media (max-width: 980px) {
    .sgpm-client-mailbox {
        grid-template-columns: 1fr;
    }

    .sgpm-client-mailbox__list {
        max-height: 300px;
        border-right: 0;
        border-bottom: 1px solid #dce5ed;
    }
}

@media (max-width: 620px) {
    .sgpm-client-mailbox {
        margin-right: -14px;
        margin-left: -14px;
        border-radius: 14px;
    }

    .sgpm-client-thread__header,
    .sgpm-client-thread__messages,
    .sgpm-client-thread__reply {
        padding-right: 16px;
        padding-left: 16px;
    }

    .sgpm-client-message {
        width: 92%;
    }
}
