/* Mensagens do portal e caixa administrativa. */
.messages-page { min-width: 0; }
body.admin-dashboard.admin-messages-page { min-width: 1024px; grid-template-columns: 260px minmax(0, 1fr); }
.messages-page .admin-page-header { gap: 24px; flex-wrap: wrap; }
.messages-preview-notice {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 22px;
    padding: 14px 18px;
    border: 1px solid #e5d9c3;
    border-radius: 10px;
    color: #78613d;
    background: #faf6ed;
    font-size: .75rem;
    line-height: 1.6;
}
.messages-preview-notice strong, .messages-preview-notice span { display: block; }
.messages-preview-notice > i { font-size: 1.2rem; }
.messages-workspace {
    display: grid;
    height: 660px;
    overflow: hidden;
    border: 1px solid #e3dfd4;
    border-radius: 14px;
    background: #fffefb;
    box-shadow: 0 8px 30px rgba(44, 52, 33, .035);
}
.messages-workspace-admin { grid-template-columns: minmax(220px, 30%) minmax(0, 1fr); }
.messages-inbox { display: flex; flex-direction: column; min-width: 0; border-right: 1px solid #e3dfd4; }
.messages-inbox > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 24px 20px 18px; }
.messages-inbox > header > i { color: var(--gold); font-size: 1.3rem; }
.messages-inbox h2 { display: flex; align-items: center; gap: 9px; margin: 5px 0 0; font: 500 1.8rem var(--serif); color: var(--ink-deep); }
.messages-count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 50%; background: var(--ink); color: #fff; font: 600 .65rem var(--sans); }
.messages-search { display: flex; align-items: center; gap: 8px; margin: 0 16px 18px; padding: 10px 12px; border: 1px solid #e4e0d6; border-radius: 8px; color: #8c8e83; }
.messages-search input { width: 100%; min-width: 0; border: 0; background: transparent; color: var(--ink); font: 400 .75rem var(--sans); outline: none; }
.messages-search:focus-within { outline: 2px solid var(--gold); outline-offset: 2px; }
.messages-thread-list { flex: 1; overflow-y: auto; }
.messages-thread { display: flex; gap: 12px; align-items: center; width: 100%; padding: 20px 16px; border: 0; border-left: 3px solid transparent; border-bottom: 1px solid #eeebe3; background: transparent; color: var(--ink); text-align: left; font-family: var(--sans); cursor: pointer; }
.messages-thread.is-active { border-left-color: var(--gold); background: #f2f1e8; }
.messages-thread:hover { background: #f7f6f0; }
.messages-avatar { display: grid; flex: 0 0 40px; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: #e9ecdf; color: var(--ink); font: 600 .75rem var(--sans); }
.messages-thread-copy { display: grid; gap: 9px; min-width: 0; flex: 1; }
.messages-thread-copy > span { display: flex; align-items: center; gap: 8px; justify-content: space-between; min-width: 0; }
.messages-thread-copy strong { overflow: hidden; font-size: .76rem; text-overflow: ellipsis; white-space: nowrap; }
.messages-thread-copy small { flex-shrink: 0; color: #85877c; font-size: .62rem; }
.messages-thread-copy [data-thread-preview] { overflow: hidden; font-size: .69rem; line-height: 1.5; color: #7e8175; text-overflow: ellipsis; white-space: nowrap; }
.messages-thread-copy .messages-count { flex-shrink: 0; }
.messages-inbox-note { margin: 0; padding: 20px 16px; color: #868a7d; font-size: .67rem; border-top: 1px solid #eeebe3; }
.messages-search-empty { padding: 16px; color: #7e8175; font-size: .8rem; }
.messages-conversation { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; min-width: 0; min-height: 0; }
.messages-conversation-header { display: flex; align-items: center; gap: 12px; padding: 20px 24px; border-bottom: 1px solid #e8e4da; }
.messages-conversation-header h2 { margin: 0 0 6px; color: var(--ink-deep); font: 600 .92rem var(--sans); }
.messages-account-link { color: inherit; }
.messages-account-link i { margin-left: 5px; color: var(--gold); font-size: .75em; }
.messages-account-link:hover, .messages-account-link:focus-visible { text-decoration: underline; text-underline-offset: 3px; }
.messages-conversation-header p { margin: 0; color: #838778; font-size: .7rem; line-height: 1.5; }
.messages-header-mark { margin-left: auto; color: var(--gold); font-size: 1.4rem; }
.messages-nutritionist-logo { width: 48px; height: 48px; object-fit: contain; }
.messages-history { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; overflow-y: auto; padding: 22px 26px; background: var(--cream); }
.messages-date { align-self: center; margin: 0 0 8px; padding: 6px 12px; border: 1px solid #e6e1d4; border-radius: 20px; color: #8a816e; background: #fffefb; font-size: .65rem; }
.messages-bubble { max-width: 84%; padding: 13px 16px 10px; border: 1px solid #e7e3d9; border-radius: 2px 14px 14px; background: #fffefb; color: var(--ink-deep); }
.messages-bubble p { margin: 0 0 8px; font-size: .82rem; line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; }
.messages-bubble small { display: block; color: #888a80; font-size: .6rem; text-align: right; }
.messages-bubble.is-outgoing { align-self: flex-end; border-color: var(--ink); border-radius: 14px 2px 14px 14px; color: #fffefb; background: var(--ink); }
.messages-bubble.is-outgoing small { color: #d7ddce; }
.messages-composer { padding: 18px 24px 14px; border-top: 1px solid #e8e4da; }
.messages-composer > label { display: block; margin-bottom: 9px; color: var(--ink); font-size: .72rem; font-weight: 600; }
.messages-composer > div { display: flex; align-items: flex-end; gap: 12px; }
.messages-composer textarea { display: block; flex: 1; width: 100%; min-width: 0; min-height: 64px; max-height: 130px; padding: 12px; resize: vertical; border: 1px solid #ddd9cc; border-radius: 8px; color: var(--ink-deep); background: #fffefb; font: 400 .8rem/1.6 var(--sans); }
.messages-composer > p { margin: 10px 0 0; color: #898c80; font-size: .65rem; line-height: 1.6; }
.messages-composer .messages-feedback { color: #576846; }
.messages-feedback:empty { display: none; }
.messages-composer button { flex-shrink: 0; min-height: 44px; }
.messages-composer button:disabled { opacity: .45; cursor: default; }
.messages-empty { display: grid; justify-items: center; align-content: center; flex: 1; align-self: stretch; color: #8a8f7f; text-align: center; }
.messages-empty > i { font-size: 2rem; color: var(--gold); }
.messages-empty h3 { margin: 18px 0 8px; color: var(--ink); font: 500 1.8rem var(--serif); }
.messages-empty p { font-size: .8rem; line-height: 1.6; }
.messages-workspace [hidden] { display: none; }
.messages-thread:focus-visible, .messages-composer textarea:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.messages-back-link { display: none; }
.messages-demo-banner { margin: 0; padding: 8px 12px; background: #f4eddd; color: #78613d; text-align: center; font-size: .68rem; line-height: 1.5; }
.messages-workspace-patient .messages-conversation { grid-template-rows: auto minmax(0, 1fr) auto; }
.messages-workspace-patient .messages-history { gap: 10px; background: #efede5; }
.messages-workspace-patient .messages-history > * { flex-shrink: 0; }
.messages-workspace-patient .messages-bubble { padding: 9px 12px 6px; border-radius: 2px 12px 12px; box-shadow: 0 1px 1px rgba(44, 52, 33, .06); }
.messages-workspace-patient .messages-bubble p { margin-bottom: 4px; font-size: .94rem; line-height: 1.5; }
.messages-workspace-patient .messages-bubble.is-outgoing { border-color: #dce6d1; border-radius: 12px 2px 12px 12px; background: #e3ecd9; color: var(--ink-deep); }
.messages-workspace-patient .messages-bubble.is-outgoing small { color: #6d7b63; }
.messages-workspace-patient .messages-bubble small { font-size: .65rem; }
.messages-workspace-patient .messages-composer { padding: 10px 12px; background: #f5f4ef; }
.messages-workspace-patient .messages-composer > div { gap: 8px; align-items: flex-end; }
.messages-workspace-patient .messages-composer textarea { min-height: 48px; max-height: 120px; padding: 12px 16px; border-radius: 24px; background: #fff; resize: none; font-size: 16px; line-height: 22px; }
.messages-workspace-patient .messages-composer [data-message-send] { display: grid; place-items: center; width: 48px; height: 48px; min-height: 48px; padding: 0; border: 1px solid var(--ink-deep); border-radius: 50%; background: var(--ink-deep); color: #fff; font-size: 1.1rem; }
.messages-workspace-patient .messages-send-label { display: none; }
.messages-refresh { display: inline-grid; flex-shrink: 0; place-items: center; margin-left: auto; width: 44px; height: 44px; border: 0; border-radius: 50%; color: var(--ink); background: transparent; font-size: 1.1rem; cursor: pointer; }
.messages-refresh:focus-visible { outline: 2px solid var(--gold); }
.messages-history-button { flex-shrink: 0; align-self: center; padding: 8px 12px; border: 1px solid var(--line); border-radius: 18px; color: var(--ink); background: #fffdf7; font: 600 .72rem var(--sans); cursor: pointer; }
.messages-composer > .messages-history-button { display: block; width: auto; height: auto; margin: 0 auto 10px; }
.messages-search button { border: 0; background: transparent; color: var(--ink); cursor: pointer; min-width: 30px; min-height: 30px; }
.messages-thread-copy .messages-thread-preview { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: .7rem; color: #71776b; }
.messages-thread-phone { overflow-wrap: anywhere; font-size: .65rem; color: #71776b; }
.messages-inbox .app-pagination { display: block; padding: 12px; margin: 0; }
.messages-inbox .app-pagination > div { flex-wrap: wrap; gap: 4px; margin-top: 8px; }
.messages-inbox .app-pagination a, .messages-inbox .app-pagination strong, .messages-inbox .app-pagination > div > span { min-width: 26px; min-height: 30px; padding: 0 4px; }
.messages-read-feedback { color: #8b513d; font-size: .7rem; }
.messages-read-feedback:empty, [data-message-unread][hidden] { display: none; }
.messages-workspace .messages-history-button[hidden] { display: none; }

@media (max-width: 1100px) {
    .messages-workspace-admin .messages-thread { gap: 8px; padding-right: 12px; padding-left: 12px; }
    .messages-workspace-admin .messages-thread .messages-avatar { display: none; }
    .messages-workspace-admin .messages-composer > div { align-items: stretch; flex-direction: column; }
}
@media (max-width: 600px) {
    .messages-preview-notice { padding: 12px; font-size: .7rem; }
    .patient-nav { gap: 10px; }
    .patient-nav a { letter-spacing: 0; font-size: .7rem; }
}

@media (max-width: 767px), (max-width: 950px) and (max-height: 500px) {
    body.patient-dashboard.patient-messages-page {
        display: flex;
        flex-direction: column;
        height: var(--messages-viewport-height, 100dvh);
        min-height: 0;
        overflow: hidden;
    }
    .patient-messages-page > .patient-header,
    .patient-messages-page .patient-welcome,
    .patient-messages-page .patient-legal { display: none; }
    .patient-messages-page .patient-main { position: fixed; top: var(--messages-viewport-top, 0px); left: 0; display: flex; flex-direction: column; min-height: 0; width: 100%; height: var(--messages-viewport-height, 100dvh); margin: 0; padding: 0; }
    .patient-messages-page .messages-workspace { flex: 1; min-height: 0; height: auto; border: 0; border-radius: 0; box-shadow: none; }
    .messages-workspace-patient .messages-conversation-header { gap: 10px; padding: calc(8px + env(safe-area-inset-top)) 12px 8px 4px; border: 0; background: var(--ink-deep); color: #fff; }
    .messages-workspace-patient .messages-conversation-header h2 { color: #fff; font-size: .95rem; }
    .messages-workspace-patient .messages-conversation-header p { color: #d9dfd1; font-size: .68rem; }
    .messages-back-link { display: inline-flex; flex: 0 0 44px; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 50%; color: #fff; font-size: 1.25rem; }
    .messages-back-link:focus-visible { outline: 2px solid var(--gold-light); }
    .messages-workspace-patient .messages-nutritionist-logo { width: 40px; height: 40px; padding: 6px; border-radius: 50%; background: var(--cream); }
    .messages-workspace-patient .messages-header-mark { display: none; }
    .messages-workspace-patient .messages-refresh { color: #fff; }
    .messages-workspace-patient .messages-demo-banner { padding: 6px 10px; font-size: .64rem; }
    .messages-workspace-patient .messages-history { padding: 16px 12px; overscroll-behavior-y: contain; }
    .messages-workspace-patient .messages-bubble { max-width: 88%; }
    .messages-workspace-patient .messages-date { margin-bottom: 6px; }
    .messages-workspace-patient .messages-composer { padding: 8px 10px calc(8px + env(safe-area-inset-bottom)); border: 0; }
}

:root {
    --ink: #3e4730;
    --ink-deep: #2c3421;
    --sage: #77806b;
    --gold: #ae8750;
    --gold-light: #c9aa75;
    --cream: #faf9f5;
    --paper: #f2f0e9;
    --line: rgba(101, 94, 72, .2);
    --serif: 'Cormorant Garamond', Georgia, serif;
    --sans: 'Montserrat', Arial, sans-serif;
}

/* Paginação compartilhada */
.app-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 24px 0 4px;
    border-top: 1px solid #e5e0d4;
    margin-top: 22px;
}

.app-pagination p {
    margin: 0;
    color: #85887f;
    font-size: .78rem;
}

.app-pagination>div {
    display: flex;
    align-items: center;
    gap: 7px;
}

.app-pagination a,
.app-pagination strong,
.app-pagination>div>span {
    display: inline-grid;
    place-items: center;
    min-width: 36px;
    min-height: 36px;
    padding: 0 9px;
    border: 1px solid #dcd6c8;
    color: #4f5b46;
    background: #fff;
    font-size: .76rem;
    text-decoration: none;
}

.app-pagination a:hover,
.app-pagination a:focus-visible,
.app-pagination strong {
    border-color: #ad8750;
    color: #fff;
    background: #ad8750;
}

.app-pagination>div>span {
    opacity: .4;
}

.app-pagination b {
    color: #8d8e86;
    font-weight: 500;
}

.admin-dashboard .dashboard-panel>.app-pagination {
    margin: 22px 26px 0;
    padding: 24px 0;
}

.patient-dashboard .app-pagination {
    margin-top: 28px;
}

.patient-dashboard .patient-document-list strong {
    font-size: .875rem;
}

.patient-dashboard .patient-document-list small,
.patient-dashboard .patient-document-list a,
.patient-dashboard .patient-document-group>header small,
.patient-dashboard .patient-document-group>header>span {
    font-size: .78rem;
}

.patient-dashboard .patient-document-list a {
    min-height: 40px;
    padding: 0 4px;
}

@media (max-width: 640px) {
    .app-pagination {
        align-items: flex-start;
        flex-direction: column;
    }

    .app-pagination>div {
        max-width: 100%;
        flex-wrap: wrap;
    }
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--ink);
    background: var(--cream);
    font-family: var(--sans);
    font-size: 16px;
    line-height: 1.65;
}

a {
    color: inherit;
    text-decoration: none;
}

.site-header,
.section-wrap,
.site-footer {
    width: min(1180px, calc(100% - 48px));
    margin: 0 auto;
}

.site-header {
    min-height: 89px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    line-height: 1;
}

.brand-logo {
    display: block;
    width: auto;
    height: 42px;
    object-fit: contain;
    object-position: center;
}

.brand-copy {
    display: grid;
    gap: 6px;
}

.brand-copy strong {
    font-family: var(--serif);
    font-size: 1.3rem;
    font-weight: 600;
    letter-spacing: .01em;
}

.brand-copy small {
    color: var(--gold);
    font-size: .56rem;
    font-weight: 600;
    letter-spacing: .26em;
    text-transform: uppercase;
}

.main-menu {
    display: flex;
    align-items: center;
    gap: 30px;
    color: #58604d;
    font-size: .71rem;
    font-weight: 600;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.main-menu>a:not(.menu-cta) {
    transition: color .2s ease;
}

.main-menu>a:not(.menu-cta):hover {
    color: var(--gold);
}

.menu-cta {
    padding: 12px 18px;
    border: 1px solid var(--gold);
    color: var(--gold);
    transition: background .2s ease, color .2s ease;
}

.menu-cta:hover {
    background: var(--gold);
    color: #fff;
}

.menu-toggle {
    display: none;
    padding: 7px 0 7px 9px;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 26px;
    height: 1px;
    margin: 6px 0;
    background: var(--ink);
    transition: transform .2s ease, opacity .2s ease;
}

.hero {
    position: relative;
    min-height: 635px;
    display: grid;
    grid-template-columns: 1.06fr .94fr;
    align-items: center;
    overflow: hidden;
    background: var(--paper);
}

.hero::before,
.hero::after {
    position: absolute;
    z-index: 0;
    content: '';
    pointer-events: none;
}

.hero::before {
    inset: 0;
    opacity: .62;
    background: radial-gradient(ellipse at 73% 16%, transparent 0 19%, rgba(128, 125, 116, .13) 19.3%, transparent 20% 34%, rgba(160, 156, 147, .1) 34.3%, transparent 35%), radial-gradient(ellipse at 92% 68%, transparent 0 16%, rgba(133, 129, 122, .12) 16.2%, transparent 17%), linear-gradient(117deg, transparent 25%, rgba(154, 151, 144, .1) 25.3%, transparent 26%);
    background-size: 610px 430px, 730px 610px, 980px 650px;
}

.hero::after {
    width: 360px;
    height: 680px;
    right: -220px;
    top: -130px;
    border: 1px solid rgba(174, 135, 80, .38);
    border-radius: 50%;
    transform: rotate(26deg);
}

.hero-content {
    position: relative;
    z-index: 1;
    width: min(570px, calc(100% - 48px));
    margin: 0 0 0 max(24px, calc((100vw - 1180px) / 2));
    padding: 70px 0;
}

.eyebrow {
    margin: 0 0 17px;
    color: var(--gold);
    font-size: .65rem;
    font-weight: 700;
    letter-spacing: .21em;
    line-height: 1.5;
    text-transform: uppercase;
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

h1,
h2,
h3 {
    font-family: var(--serif);
    font-weight: 500;
    line-height: 1.04;
}

h1 {
    max-width: 650px;
    margin-bottom: 26px;
    color: var(--ink-deep);
    font-size: clamp(3.05rem, 5.1vw, 5.2rem);
}

.hero-credential {
    margin: -7px 0 16px;
    color: #8a7042;
    font-size: .62rem;
    font-weight: 700;
    letter-spacing: .055em;
    line-height: 1.6;
    text-transform: uppercase;
}

.hero-credential span {
    padding: 0 5px;
    color: #b49258;
}

.hero-text {
    max-width: 490px;
    margin-bottom: 33px;
    color: #64695e;
    font-size: 1rem;
}

.hero-actions {
    display: flex;
    align-items: center;
    gap: 29px;
    flex-wrap: wrap;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 17px;
    min-height: 52px;
    padding: 14px 22px;
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .13em;
    text-transform: uppercase;
    transition: transform .2s ease, background .2s ease, border .2s ease;
}

.button:hover {
    transform: translateY(-2px);
}

.button-primary {
    border: 1px solid var(--gold);
    background: var(--gold);
    color: #fff;
    box-shadow: 0 9px 20px rgba(112, 82, 38, .14);
}

.button-primary:hover {
    background: #98713e;
    border-color: #98713e;
}

.button-primary span {
    font-size: 1.15rem;
    font-weight: 400;
}

.button-text {
    min-height: auto;
    padding: 8px 0;
    border-bottom: 1px solid var(--gold);
    color: var(--ink);
}

.hero-art {
    position: relative;
    z-index: 1;
    min-height: 440px;
    margin-right: max(24px, calc((100vw - 1180px) / 2));
}

.hero-portrait {
    position: absolute;
    inset: 15px 0 15px 28px;
    margin: 0;
    overflow: hidden;
    border: 1px solid var(--gold);
    background: radial-gradient(ellipse at 50% 94%, rgba(174, 135, 80, .16), transparent 43%), linear-gradient(135deg, #e1e3da, #f7f5ef);
    box-shadow: inset 0 0 0 11px rgba(255, 255, 255, .18);
}

.hero-portrait::before,
.hero-portrait::after {
    position: absolute;
    z-index: 1;
    width: 65px;
    height: 65px;
    border-color: var(--gold);
    content: '';
    pointer-events: none;
}

.hero-portrait::before {
    top: -1px;
    left: -1px;
    border-top: 2px solid;
    border-left: 2px solid;
}

.hero-portrait::after {
    right: -1px;
    bottom: -1px;
    border-right: 2px solid;
    border-bottom: 2px solid;
}

.hero-portrait img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}

.hero-portrait figcaption {
    position: absolute;
    z-index: 1;
    right: 0;
    bottom: 0;
    display: grid;
    gap: 4px;
    min-width: 190px;
    padding: 15px 19px;
    color: #fffdf8;
    background: rgba(47, 59, 39, .9);
    font-family: var(--serif);
    font-size: 1.38rem;
    line-height: 1;
}

.hero-portrait figcaption span {
    color: #dfca9c;
    font-family: var(--sans);
    font-size: .49rem;
    font-weight: 700;
    letter-spacing: .2em;
    text-transform: uppercase;
}

.gold-frame {
    position: absolute;
    inset: 15px 0 15px 28px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border: 1px solid var(--gold);
    color: var(--ink);
    text-align: center;
    background: rgba(255, 255, 255, .23);
    box-shadow: inset 0 0 0 11px rgba(255, 255, 255, .11);
}

.gold-frame::before,
.gold-frame::after {
    position: absolute;
    content: '';
    width: 65px;
    height: 65px;
    border-color: var(--gold);
}

.gold-frame::before {
    left: -1px;
    top: -1px;
    border-left: 2px solid;
    border-top: 2px solid;
}

.gold-frame::after {
    right: -1px;
    bottom: -1px;
    border-right: 2px solid;
    border-bottom: 2px solid;
}

.art-logo {
    display: block;
    width: auto;
    height: 154px;
    margin-bottom: 12px;
    object-fit: contain;
}

.art-name {
    color: var(--ink);
    font-family: var(--serif);
    font-size: clamp(1.85rem, 2.8vw, 2.65rem);
    font-weight: 500;
    line-height: 1;
}

.art-line {
    width: 117px;
    height: 1px;
    margin: 17px 0 15px;
    background: var(--gold);
}

.art-role {
    color: var(--gold);
    font-size: .65rem;
    font-weight: 700;
    letter-spacing: .31em;
    text-transform: uppercase;
}

.intro {
    padding: 130px 0 120px;
}

.section-heading {
    display: grid;
    grid-template-columns: 1fr .75fr;
    gap: 90px;
    align-items: end;
}

h2 {
    margin-bottom: 0;
    color: var(--ink-deep);
    font-size: clamp(2.55rem, 4vw, 4.25rem);
}

.section-heading>p {
    max-width: 385px;
    margin: 0 0 8px;
    color: #666b60;
    font-size: .94rem;
}

.about-profile {
    max-width: 385px;
    margin: 0 0 8px;
    padding-left: 22px;
    border-left: 1px solid var(--gold);
}

.about-registration {
    display: grid;
    gap: 5px;
    margin: 0 0 13px;
    color: var(--ink-deep);
    font-family: var(--serif);
    font-size: 1.38rem;
    line-height: 1;
}

.about-registration span {
    color: var(--gold);
    font-family: var(--sans);
    font-size: .57rem;
    font-weight: 700;
    letter-spacing: .13em;
    text-transform: uppercase;
}

.about-qualification {
    margin: -5px 0 13px;
    color: #7e704f;
    font-size: .68rem;
    font-weight: 600;
    line-height: 1.5;
}

.about-profile>p:last-child {
    margin: 0;
    color: #666b60;
    font-size: .94rem;
    line-height: 1.65;
}

.values-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 55px;
    margin-top: 75px;
}

.values-grid article {
    padding-top: 19px;
    border-top: 1px solid var(--line);
}

.values-grid span {
    color: var(--gold);
    font-family: var(--serif);
    font-size: 1.3rem;
}

.values-grid h3 {
    margin: 14px 0 12px;
    font-size: 1.68rem;
}

.values-grid p {
    margin: 0;
    color: #73766e;
    font-size: .85rem;
}

.care-section {
    display: grid;
    grid-template-columns: .9fr 1.1fr;
    min-height: 660px;
    background: #e9e8df;
}

.care-visual {
    position: relative;
    display: grid;
    place-items: center;
    overflow: hidden;
    background: linear-gradient(135deg, #dee0d7, #f0efe9);
}

.care-visual::before {
    position: absolute;
    width: 480px;
    height: 480px;
    border: 1px solid rgba(174, 135, 80, .6);
    border-radius: 50%;
    content: '';
}

.care-logo {
    position: relative;
    z-index: 1;
    display: block;
    width: auto;
    height: min(59%, 365px);
    object-fit: contain;
    transform: rotate(-10deg);
}

.botanical {
    position: absolute;
    width: 220px;
    height: 390px;
    border: 1px solid rgba(75, 91, 60, .34);
    border-radius: 100% 0 100% 0;
    transform: rotate(-34deg);
}

.botanical::after {
    position: absolute;
    top: 47%;
    left: 25px;
    width: 170px;
    height: 1px;
    background: rgba(75, 91, 60, .35);
    content: '';
    transform: rotate(45deg);
}

.botanical-one {
    top: -115px;
    left: -42px;
}

.botanical-two {
    right: -55px;
    bottom: -180px;
    transform: rotate(145deg);
}

.care-copy {
    max-width: 660px;
    padding: 103px clamp(28px, 8vw, 125px);
}

.care-copy h2 {
    max-width: 520px;
    margin-bottom: 52px;
}

.care-list {
    border-top: 1px solid var(--line);
}

.care-list article {
    display: grid;
    grid-template-columns: 42px 1fr;
    gap: 18px;
    padding: 23px 0;
    border-bottom: 1px solid var(--line);
}

.care-number {
    color: var(--gold);
    font-family: var(--serif);
    font-size: 1.2rem;
}

.care-list h3 {
    margin: 0 0 7px;
    font-size: 1.45rem;
}

.care-list p {
    margin: 0;
    color: #6b7066;
    font-size: .82rem;
}

.patient-section {
    position: relative;
    overflow: hidden;
    background: var(--ink-deep);
    color: #f9f7ef;
}

.patient-section::before {
    position: absolute;
    inset: 0;
    content: '';
    opacity: .25;
    background: radial-gradient(ellipse at 8% 95%, transparent 0 32%, rgba(255, 255, 255, .22) 32.3%, transparent 33%), radial-gradient(ellipse at 96% 6%, transparent 0 24%, rgba(255, 255, 255, .19) 24.3%, transparent 25%);
}

.patient-inner {
    position: relative;
    display: grid;
    grid-template-columns: .76fr 1.24fr;
    gap: clamp(55px, 10vw, 148px);
    align-items: center;
    min-height: 493px;
    padding-top: 77px;
    padding-bottom: 77px;
}

.patient-identity {
    position: relative;
    display: grid;
    place-items: center;
    min-height: 300px;
}

.patient-identity img {
    position: relative;
    z-index: 1;
    display: block;
    width: auto;
    height: 212px;
    object-fit: contain;
}

.patient-orbit {
    position: absolute;
    width: 291px;
    height: 291px;
    border: 1px solid rgba(205, 174, 116, .62);
    border-radius: 50%;
}

.patient-orbit::before,
.patient-orbit::after {
    position: absolute;
    content: '';
    border: 1px solid rgba(205, 174, 116, .33);
    border-radius: 50%;
}

.patient-orbit::before {
    width: 367px;
    height: 218px;
    top: 37px;
    left: -38px;
    transform: rotate(-34deg);
}

.patient-orbit::after {
    width: 185px;
    height: 355px;
    top: -33px;
    left: 51px;
    transform: rotate(35deg);
}

.patient-copy {
    max-width: 580px;
}

.patient-copy .eyebrow {
    color: var(--gold-light);
}

.patient-copy h2 {
    color: #fffdf8;
    margin-bottom: 22px;
}

.patient-copy>p:not(.eyebrow) {
    max-width: 515px;
    margin-bottom: 29px;
    color: rgba(255, 255, 255, .76);
    font-size: .92rem;
}

.button-light {
    border: 1px solid var(--gold-light);
    background: transparent;
    color: #fffdf8;
}

.button-light:hover {
    border-color: var(--gold-light);
    background: var(--gold-light);
    color: var(--ink-deep);
}

.contact-section {
    display: grid;
    grid-template-columns: 1fr .72fr;
    gap: 100px;
    align-items: center;
    padding-top: 125px;
    padding-bottom: 125px;
}

.contact-section h2 {
    max-width: 560px;
}

.contact-card {
    padding: 44px;
    border: 1px solid rgba(174, 135, 80, .55);
    background: #fffdf8;
    box-shadow: 13px 13px 0 rgba(174, 135, 80, .11);
}

.contact-card>p {
    margin-bottom: 26px;
    color: #686d63;
    font-size: .88rem;
}

.contact-card small {
    display: block;
    margin-top: 22px;
    color: #8a8c85;
    font-size: .62rem;
    letter-spacing: .13em;
    text-transform: uppercase;
}

.site-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 30px;
    min-height: 126px;
    border-top: 1px solid var(--line);
}

.site-footer p {
    margin: 0;
    color: #878980;
    font-size: .65rem;
    letter-spacing: .04em;
}

.footer-info {
    display: grid;
    justify-items: end;
    gap: 10px;
}

.legal-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px 16px;
}

.legal-links a,
.patient-legal a {
    color: #697063;
    font-size: .59rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.legal-links a:hover,
.patient-legal a:hover {
    color: var(--gold);
}

.portal-page {
    min-height: 100vh;
    overflow-x: hidden;
    background: linear-gradient(135deg, #eaebe5, #f8f6ef);
}

.portal-layout {
    position: relative;
    display: grid;
    place-items: center;
    min-height: 100vh;
    padding: 92px 24px 67px;
    overflow: hidden;
}

.portal-layout::before {
    position: absolute;
    width: min(69vw, 960px);
    height: min(69vw, 960px);
    border: 1px solid rgba(174, 135, 80, .34);
    border-radius: 50%;
    content: '';
    transform: translate(43%, -47%);
}

.portal-brand {
    position: absolute;
    top: 32px;
    left: max(24px, calc((100% - 1120px) / 2));
    z-index: 1;
}

.portal-card {
    position: relative;
    z-index: 1;
    width: min(100%, 510px);
    padding: 53px;
    border: 1px solid rgba(174, 135, 80, .52);
    background: rgba(255, 254, 250, .92);
    box-shadow: 18px 18px 0 rgba(174, 135, 80, .12);
}

.portal-card h1 {
    margin-bottom: 17px;
    font-size: clamp(2.55rem, 4vw, 3.6rem);
}

.portal-card>p:not(.eyebrow):not(.portal-note):not(.form-message) {
    margin-bottom: 30px;
    color: #6b7066;
    font-size: .87rem;
}

.portal-form {
    display: grid;
    gap: 9px;
}

.portal-form label {
    margin-top: 7px;
    color: var(--ink);
    font-size: .65rem;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.portal-form input {
    width: 100%;
    height: 52px;
    padding: 0 15px;
    border: 1px solid var(--line);
    border-radius: 0;
    outline: 0;
    color: var(--ink);
    background: #fffefb;
    font: 400 max(16px, 1rem) var(--sans);
    transition: border-color .2s ease;
}

.portal-form input:focus {
    border-color: var(--gold);
}

.portal-form .button {
    width: 100%;
    margin-top: 17px;
    border-radius: 0;
    cursor: pointer;
}

.admin-login-form.is-submitting input {
    cursor: wait;
    opacity: .7;
}

.admin-login-form.is-submitting .button {
    cursor: wait;
    transform: none;
}

.admin-login-form .button:disabled {
    opacity: .82;
}

/* O botão global aumenta apenas o ícone; este span contém o texto dinâmico. */
.admin-login-form .button [data-login-label] {
    font-size: inherit;
    font-weight: inherit;
    line-height: 1;
}

.admin-login-form .button [data-login-icon] {
    display: inline-flex;
    align-items: center;
    font-size: .88rem;
    line-height: 1;
}

.admin-login-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 2px 0 0;
    color: #72786e;
    font-size: .61rem;
    font-weight: 600;
}

.admin-login-status[hidden] {
    display: none;
}

.admin-login-spinner,
.admin-login-form.is-submitting [data-login-icon] i {
    animation: admin-login-spin .8s linear infinite;
}

.admin-login-spinner {
    width: 11px;
    height: 11px;
    border: 1px solid rgba(150, 116, 62, .25);
    border-top-color: #96743e;
    border-radius: 50%;
}

@keyframes admin-login-spin {
    to {
        transform: rotate(360deg);
    }
}

.form-message {
    margin: -6px 0 20px;
    padding: 12px 14px;
    border-left: 2px solid;
    font-size: .7rem;
    line-height: 1.55;
}

.form-message-error {
    border-color: #9e5f51;
    color: #75483e;
    background: #f4e8e4;
}

.form-message-success {
    border-color: #718466;
    color: #52634a;
    background: #edf2e9;
}

.portal-help {
    display: inline-block;
    margin-top: 22px;
    padding: 0 0 2px;
    border: 0;
    border-bottom: 1px solid var(--gold);
    color: var(--ink);
    background: transparent;
    font-size: .71rem;
    font-weight: 600;
    cursor: pointer;
}

.password-help-modal {
    width: min(500px, calc(100% - 32px));
    max-width: none;
    padding: 0;
    border: 0;
    color: var(--ink);
    background: transparent;
    overflow: visible;
}

.password-help-modal::backdrop {
    background: rgba(31, 40, 26, .72);
    backdrop-filter: blur(3px);
}

.password-help-card {
    position: relative;
    padding: 43px 44px 39px;
    border: 1px solid rgba(174, 135, 80, .66);
    background: #fffefb;
    box-shadow: 18px 18px 0 rgba(21, 29, 18, .2);
    text-align: center;
}

.password-help-close {
    position: absolute;
    top: 15px;
    right: 15px;
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 1px solid #ded9ce;
    color: #73786d;
    background: transparent;
    cursor: pointer;
}

.password-help-close:hover {
    border-color: var(--gold);
    color: #665432;
}

.password-help-icon {
    display: grid;
    place-items: center;
    width: 50px;
    height: 50px;
    margin: 0 auto 18px;
    border: 1px solid #c7ad79;
    border-radius: 50%;
    color: #fff;
    background: #506047;
    font-size: 1rem;
}

.password-help-card .eyebrow {
    margin-bottom: 8px;
}

.password-help-card h2 {
    margin: 0;
    color: #34412d;
    font-family: var(--serif);
    font-size: 2.25rem;
    font-weight: 600;
    line-height: 1;
}

.password-help-card>p:not(.eyebrow) {
    margin: 18px 0 24px;
    color: #747970;
    font-size: .72rem;
    line-height: 1.7;
}

.password-help-whatsapp {
    display: inline-flex;
    justify-content: center;
    gap: 9px;
    width: 100%;
    border-radius: 0;
}

.password-help-whatsapp i {
    font-size: 1rem;
}

.password-help-cancel {
    margin-top: 17px;
    padding: 3px 0;
    border: 0;
    border-bottom: 1px solid #ccb37f;
    color: #656d60;
    background: transparent;
    font: 600 .64rem var(--sans);
    cursor: pointer;
}

.portal-note {
    margin: 28px 0 0;
    padding-top: 18px;
    border-top: 1px solid var(--line);
    color: #898b83;
    font-size: .7rem;
}

.portal-back {
    position: absolute;
    right: 0;
    bottom: 25px;
    left: 0;
    margin: 0;
    color: #5f6657;
    font-size: .68rem;
    font-weight: 600;
    letter-spacing: .08em;
    text-align: center;
    text-transform: uppercase;
}

.portal-back span {
    padding: 0 6px;
    color: var(--gold);
}

.site-document {
    background: var(--cream);
}

.portal-document {
    background: #eaebe5;
}

.admin-document {
    background: #293322;
    overscroll-behavior-y: none;
}

.admin-page {
    background: linear-gradient(135deg, #293322, #3d4a33);
    overscroll-behavior-y: none;
}

.admin-layout::before {
    border-color: rgba(205, 174, 116, .24);
}

.admin-card {
    border-color: rgba(205, 174, 116, .55);
    background: rgba(253, 252, 247, .97);
}

.admin-card .eyebrow {
    color: var(--gold);
}

.admin-page .brand-copy strong {
    color: #fffdf8;
}

.admin-dashboard {
    display: grid;
    grid-template-columns: 260px minmax(920px, 1fr);
    min-width: 1180px;
    min-height: 100vh;
    color: #3d4732;
    background: #f5f4ef;
    font-family: var(--sans);
}

.dashboard-sidebar {
    position: sticky;
    top: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding: 31px 20px 25px;
    background: #2f3b27;
    color: rgba(255, 255, 255, .76);
}

.dashboard-brand {
    display: flex;
    align-items: center;
    gap: 11px;
    margin: 0 11px 50px;
}

.dashboard-brand img {
    width: 31px;
    height: 43px;
    object-fit: contain;
}

.dashboard-brand span {
    display: grid;
    gap: 5px;
}

.dashboard-brand strong {
    color: #fffdf8;
    font-family: var(--serif);
    font-size: 1.23rem;
    font-weight: 600;
    line-height: 1;
}

.dashboard-brand small {
    color: var(--gold-light);
    font-size: .5rem;
    font-weight: 700;
    letter-spacing: .25em;
    text-transform: uppercase;
}

.dashboard-nav {
    display: grid;
    gap: 7px;
}

.dashboard-nav a,
.dashboard-nav .dashboard-nav-disabled,
.dashboard-sidebar-bottom a,
.dashboard-sidebar-bottom button {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 45px;
    padding: 0 12px;
    border: 0;
    border-radius: 3px;
    color: rgba(255, 255, 255, .68);
    background: transparent;
    font: 600 .71rem var(--sans);
    letter-spacing: .03em;
    text-align: left;
    transition: background .2s ease, color .2s ease;
}

.dashboard-nav .dashboard-nav-disabled {
    width: 100%;
    cursor: not-allowed;
    opacity: .48;
}

.dashboard-nav .dashboard-nav-disabled small {
    margin-left: auto;
    color: rgba(255, 255, 255, .58);
    font-size: .56rem;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.dashboard-nav a:hover,
.dashboard-nav .is-active,
.dashboard-sidebar-bottom a:hover,
.dashboard-sidebar-bottom button:hover {
    background: rgba(255, 255, 255, .09);
    color: #fff;
}

.dashboard-nav span,
.dashboard-sidebar-bottom span {
    width: 17px;
    color: var(--gold-light);
    font-size: 1.05rem;
    text-align: center;
}

.dashboard-nav b {
    display: grid;
    place-items: center;
    min-width: 21px;
    height: 21px;
    margin-left: auto;
    border-radius: 50%;
    color: #2f3b27;
    background: var(--gold-light);
    font-size: .58rem;
}

.dashboard-sidebar-bottom {
    display: grid;
    gap: 5px;
    margin-top: auto;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, .12);
}

.dashboard-logout-form {
    margin: 0;
}

.dashboard-logout-form button {
    width: 100%;
    cursor: pointer;
}

.dashboard-main {
    padding: 46px 55px 70px;
}

.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.admin-section-page {
    align-self: start;
}

.admin-page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 30px;
    margin-bottom: 32px;
}

.admin-page-header h1 {
    margin: 0;
    color: #2c3724;
    font-family: var(--serif);
    font-size: 3rem;
    font-weight: 500;
    line-height: 1;
}

.admin-page-header>div>p:last-child {
    max-width: 670px;
    margin: 12px 0 0;
    color: #7d8178;
    font-size: .75rem;
    line-height: 1.65;
}

.admin-list-panel {
    min-height: 430px;
}

.admin-list-heading {
    align-items: center;
}

.admin-search {
    display: flex;
    width: min(420px, 46%);
}

.admin-search input {
    min-width: 0;
    flex: 1;
    height: 39px;
    padding: 0 12px;
    border: 1px solid #ddd9cf;
    outline: 0;
    color: #4c5645;
    background: #fff;
    font: 400 .65rem var(--sans);
}

.admin-search input:focus {
    border-color: var(--gold);
}

.admin-search button {
    height: 39px;
    padding: 0 15px;
    border: 1px solid var(--gold);
    color: #fff;
    background: var(--gold);
    font: 700 .57rem var(--sans);
    letter-spacing: .07em;
    text-transform: uppercase;
    cursor: pointer;
}

.admin-full-table td {
    height: 72px;
}

.dashboard-topbar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 28px;
    margin-bottom: 39px;
}

.dashboard-date,
.panel-kicker {
    margin: 0 0 5px;
    color: #9a865d;
    font-size: .6rem;
    font-weight: 700;
    letter-spacing: .15em;
    text-transform: uppercase;
}

.dashboard-topbar h1 {
    margin: 0;
    color: #2c3724;
    font-family: var(--serif);
    font-size: 3rem;
    font-weight: 500;
    line-height: 1;
}

.dashboard-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 11px;
    max-width: 560px;
    padding-top: 3px;
}

.dashboard-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 38px;
    padding: 0 14px;
    border: 1px solid var(--gold);
    font: 700 .62rem var(--sans);
    letter-spacing: .08em;
    text-transform: uppercase;
    cursor: pointer;
}

.dashboard-button-secondary {
    color: #776847;
    background: transparent;
}

.dashboard-button-primary {
    color: #fff;
    background: var(--gold);
}

.dashboard-button:disabled,
.agenda-navigation button:disabled {
    cursor: default;
    opacity: .62;
}

.agenda-page {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 22px;
}

.agenda-page-header,
.agenda-calendar-panel,
.agenda-preview-note {
    grid-column: 1 / -1;
}

.agenda-page-header {
    margin-bottom: 10px;
}

.agenda-page-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 11px;
}

.agenda-view-switch {
    display: inline-flex;
    align-items: center;
    height: 38px;
    padding: 3px;
    border: 1px solid #ddd8cc;
    background: #fffefb;
}

.agenda-view-switch a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 29px;
    padding: 0 10px;
    color: #858477;
    font-size: .58rem;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.agenda-view-switch a.is-active {
    color: #fff;
    background: #556447;
}

.agenda-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 25px 27px 21px;
    border-bottom: 1px solid #ebe7dd;
}

.agenda-toolbar h2 {
    margin: 0;
    color: #35402c;
    font-family: var(--serif);
    font-size: 1.65rem;
    font-weight: 600;
    line-height: 1.1;
}

.agenda-navigation {
    display: flex;
    align-items: center;
    gap: 5px;
}

.agenda-navigation button,
.agenda-navigation a {
    display: grid;
    place-items: center;
    min-width: 32px;
    height: 32px;
    padding: 0;
    border: 1px solid #e1ddd2;
    color: #7f806f;
    background: #fffefb;
    font: 700 .65rem var(--sans);
    text-decoration: none;
    cursor: pointer;
}

.agenda-navigation .agenda-today-button {
    min-width: auto;
    padding: 0 12px;
    color: #7c6a45;
}

.agenda-week {
    display: grid;
    grid-template-columns: 59px repeat(7, minmax(135px, 1fr));
    min-width: 1004px;
}

.agenda-calendar-panel {
    overflow: hidden;
}

.agenda-week-scroll {
    width: 100%;
    overflow-x: auto;
    overscroll-behavior-x: contain;
}

.agenda-week-head {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 62px;
    border-bottom: 1px solid #ebe7dd;
    border-left: 1px solid #f0ede6;
    color: #82857d;
    font-size: .58rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-decoration: none;
    text-transform: uppercase;
}

a.agenda-week-head:hover {
    background: #faf8f2;
}

.agenda-week-head strong {
    display: grid;
    place-items: center;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    color: #536045;
    font-size: .66rem;
}

.agenda-week-head.is-today strong {
    color: #fff;
    background: var(--gold);
}

.agenda-time-head {
    justify-content: center;
    border-left: 0;
    color: #aaa89f;
    font-size: .52rem;
}

.agenda-time-column,
.agenda-day-column {
    display: grid;
    grid-template-rows: repeat(36, 26px);
    min-height: 936px;
}

.agenda-time-column {
    position: relative;
    padding-right: 0;
    color: #aaa9a1;
    font-size: .52rem;
    text-align: center;
}

.agenda-time-column span {
    align-self: center;
    color: #a7a79f;
    font-size: .48rem;
    font-weight: 400;
}

.agenda-time-column span.is-full-hour {
    color: #7d8076;
    font-size: .53rem;
    font-weight: 700;
}

.agenda-day-column {
    position: relative;
    grid-template-columns: minmax(0, 1fr);
    padding: 0 5px;
    border-left: 1px solid #f0ede6;
    background-image: linear-gradient(to bottom, transparent 25px, #efede6 26px);
    background-size: 100% 26px;
}

.agenda-day-column.is-today {
    background-color: #fdfbf6;
}

.agenda-day-column.is-weekend {
    background-color: #f8f7f2;
}

.agenda-grid-slot {
    grid-column: 1;
    min-width: 0;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.agenda-grid-slot:hover,
.agenda-grid-slot:focus-visible {
    background: rgba(34, 68, 47, .08);
    outline: 2px solid var(--gold);
    outline-offset: -2px;
}

.agenda-appointment {
    grid-column: 1;
    position: relative;
    z-index: 1;
    min-width: 0;
    padding: 7px 8px;
    border-left: 3px solid;
    overflow: hidden;
}

.agenda-plan-indicator {
    position: absolute;
    top: 6px;
    right: 6px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: 22px;
    padding: 2px 7px 2px 3px;
    border: 1px solid;
    border-radius: 12px;
    font-size: .47rem;
    font-weight: 700;
    line-height: 1;
    box-shadow: 0 1px 3px rgba(47, 55, 40, .12);
}

.agenda-plan-indicator > span:not(.agenda-plan-mark) {
    display: none;
}

.agenda-day-page .agenda-plan-indicator > span:not(.agenda-plan-mark) {
    display: inline;
}

.agenda-plan-mark {
    display: grid;
    flex: 0 0 16px;
    width: 16px;
    height: 16px;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    font-size: .58rem;
    line-height: 1;
}

.agenda-plan-indicator.is-pending {
    border-color: #c9948a;
    color: #85493f;
    background: #f8ebe8;
}

.agenda-plan-indicator.is-pending .agenda-plan-mark {
    background: #a9574b;
}

.agenda-plan-indicator.is-ready {
    border-color: #9aaf8b;
    color: #49663f;
    background: #eaf1e5;
}

.agenda-plan-indicator.is-ready .agenda-plan-mark {
    background: #55784a;
}

.agenda-week-page .agenda-plan-indicator {
    min-height: 16px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.agenda-appointment:has(.agenda-plan-indicator) > time,
.agenda-appointment:has(.agenda-plan-indicator) > strong {
    padding-right: 32px;
}

.agenda-day-page .agenda-appointment:has(.agenda-plan-indicator) > time,
.agenda-day-page .agenda-appointment:has(.agenda-plan-indicator) > strong {
    padding-right: 125px;
}

.agenda-appointment[data-open-appointment],
.agenda-today-list [data-open-appointment] {
    cursor: pointer;
}

.agenda-appointment[data-open-appointment]:hover,
.agenda-appointment[data-open-appointment]:focus-visible {
    outline: 2px solid rgba(174, 135, 80, .45);
    outline-offset: -2px;
}

.agenda-appointment time,
.agenda-appointment small,
.agenda-appointment strong {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.agenda-appointment time {
    margin-bottom: 1px;
    font-size: .5rem;
    font-weight: 700;
    letter-spacing: .05em;
}

.agenda-appointment strong {
    color: #465039;
    font-size: .61rem;
    line-height: 1.35;
}

.agenda-appointment small {
    margin-top: 1px;
    color: #777c70;
    font-size: .5rem;
    line-height: 1.25;
}

.agenda-appointment-therapy {
    border-color: #bd7185;
    background: #f5e2e8;
}

.agenda-appointment-child {
    border-color: #7c64a5;
    background: #eee8f6;
}

.agenda-appointment-adult {
    border-color: #527da6;
    background: #e5eef7;
}

.agenda-appointment-return {
    border-color: #aa8247;
    background: #f4ead8;
}

.agenda-appointment-blocked {
    border-color: #7b5945;
    background: repeating-linear-gradient(-45deg, #eee4dc, #eee4dc 5px, #e6d9cf 5px, #e6d9cf 10px);
}

.agenda-appointment-completed {
    border-color: #285c3b;
    background: #4b865e;
}

.agenda-appointment-missed {
    border-color: #7f2927;
    background: #ad433e;
}

.agenda-appointment-completed time,
.agenda-appointment-completed strong,
.agenda-appointment-completed small,
.agenda-appointment-missed time,
.agenda-appointment-missed strong,
.agenda-appointment-missed small {
    color: #fff;
}

.agenda-appointment .agenda-appointment-type,
.agenda-appointment .agenda-appointment-note {
    font-size: .58rem;
    line-height: 1.35;
}

.agenda-appointment .agenda-appointment-note {
    font-weight: 500;
    opacity: .9;
}

.agenda-appointment-note i {
    margin-right: 2px;
}

.agenda-calendar-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 11px 20px;
    padding: 15px 27px;
    border-top: 1px solid #ebe7dd;
    color: #7e8178;
    font-size: .56rem;
    font-weight: 600;
}

.agenda-calendar-footer span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.agenda-legend-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.agenda-legend-therapy {
    background: #bd7185;
}

.agenda-legend-child {
    background: #7c64a5;
}

.agenda-legend-adult {
    background: #527da6;
}

.agenda-legend-return {
    background: #aa8247;
}

.agenda-legend-blocked {
    background: #7b5945;
}

.agenda-legend-completed {
    background: #4b865e;
}

.agenda-legend-missed {
    background: #ad433e;
}

.agenda-today-panel {
    align-self: start;
    max-width: 410px;
}

.agenda-day-view {
    display: grid;
    grid-template-columns: 59px minmax(0, 1fr);
}

.agenda-day-view-column {
    padding: 0 14px;
}

.agenda-day-view-column .agenda-appointment {
    max-width: 560px;
}

.agenda-day-page .agenda-day-view-column .agenda-appointment-note {
    font-size: .7rem;
    line-height: 1.4;
}

.agenda-day-empty {
    grid-column: 1;
    pointer-events: none;
    display: flex;
    align-items: center;
    gap: 7px;
    align-self: center;
    grid-row: 1 / -1;
    margin: 0 auto;
    color: #96978e;
    font-size: .67rem;
}

.agenda-day-count {
    margin-top: 7px;
    color: #8e8d85;
    font-size: .56rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.agenda-month-scroll {
    width: 100%;
    overflow-x: auto;
    overscroll-behavior-x: contain;
}

.agenda-month {
    min-width: 980px;
}

.agenda-month-weekdays,
.agenda-month-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
}

.agenda-month-weekdays span {
    display: flex;
    align-items: center;
    min-height: 43px;
    padding: 0 12px;
    border-left: 1px solid #f0ede6;
    color: #888a82;
    font-size: .55rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.agenda-month-weekdays span:first-child {
    border-left: 0;
}

.agenda-month-day {
    min-width: 0;
    min-height: 158px;
    padding: 9px;
    border-top: 1px solid #ebe7dd;
    border-left: 1px solid #ebe7dd;
    background: #fffefb;
}

.agenda-month-day:nth-child(7n + 1) {
    border-left: 0;
}

.agenda-month-day.is-weekend {
    background: #faf9f5;
}

.agenda-month-day.is-other-month {
    background: #f5f4ef;
}

.agenda-month-day.is-other-month .agenda-month-day-head,
.agenda-month-day.is-other-month .agenda-month-entries {
    opacity: .58;
}

.agenda-month-day-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 7px;
    min-height: 27px;
    margin-bottom: 6px;
}

.agenda-month-day-head a {
    display: grid;
    place-items: center;
    width: 27px;
    height: 27px;
    border-radius: 50%;
    color: #536045;
    font-size: .63rem;
    font-weight: 700;
}

.agenda-month-day-head a:hover {
    color: #fff;
    background: #7a856d;
}

.agenda-month-day.is-today .agenda-month-day-head a {
    color: #fff;
    background: var(--gold);
}

.agenda-month-day-head span {
    overflow: hidden;
    color: #a09f97;
    font-size: .46rem;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.agenda-month-entries {
    display: grid;
    gap: 4px;
}

.agenda-month-entry {
    position: relative;
    min-width: 0;
    padding: 5px 6px 5px 7px;
    border-left: 3px solid;
    cursor: pointer;
}

.agenda-month-entry:has(.agenda-month-plan-indicator) {
    padding-right: 27px;
}

.agenda-month-plan-indicator {
    position: absolute;
    top: 4px;
    right: 4px;
    filter: drop-shadow(0 1px 2px rgba(47, 55, 40, .18));
}

.agenda-month-plan-indicator .agenda-plan-mark {
    width: 18px;
    height: 18px;
    font-size: .64rem;
}

.agenda-month-plan-indicator.is-pending .agenda-plan-mark {
    background: #a9574b;
}

.agenda-month-plan-indicator.is-ready .agenda-plan-mark {
    background: #55784a;
}

.agenda-month-entry:hover,
.agenda-month-entry:focus-visible {
    outline: 2px solid rgba(174, 135, 80, .45);
    outline-offset: -2px;
}

.agenda-month-entry time,
.agenda-month-entry strong,
.agenda-month-entry small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.agenda-month-entry time {
    color: #666d5f;
    font-size: .45rem;
    font-weight: 700;
}

.agenda-month-entry strong {
    color: #465039;
    font-size: .53rem;
    line-height: 1.35;
}

.agenda-month-entry small {
    color: #777c70;
    font-size: .43rem;
}

.agenda-month-entry-therapy {
    border-color: #bd7185;
    background: #f5e2e8;
}

.agenda-month-entry-child {
    border-color: #7c64a5;
    background: #eee8f6;
}

.agenda-month-entry-adult {
    border-color: #527da6;
    background: #e5eef7;
}

.agenda-month-entry-return {
    border-color: #aa8247;
    background: #f4ead8;
}

.agenda-month-entry-blocked {
    border-color: #7b5945;
    background: repeating-linear-gradient(-45deg, #eee4dc, #eee4dc 5px, #e6d9cf 5px, #e6d9cf 10px);
}

.agenda-month-entry-completed {
    border-color: #285c3b;
    background: #4b865e;
}

.agenda-month-entry-missed {
    border-color: #7f2927;
    background: #ad433e;
}

.agenda-month-entry-completed time,
.agenda-month-entry-completed strong,
.agenda-month-entry-completed small,
.agenda-month-entry-missed time,
.agenda-month-entry-missed strong,
.agenda-month-entry-missed small {
    color: #fff;
}

.agenda-month-more {
    display: inline-flex;
    width: fit-content;
    margin-top: 2px;
    color: #896f43;
    font-size: .47rem;
    font-weight: 700;
}

.agenda-month-more:hover {
    text-decoration: underline;
}

.agenda-today-list {
    padding: 0 25px;
}

.agenda-today-list article {
    display: grid;
    grid-template-columns: 39px minmax(0, 1fr) 8px;
    align-items: center;
    gap: 10px;
    padding: 14px 0;
    border-top: 1px solid #ece9e1;
}

.agenda-today-list article[role="button"]:hover,
.agenda-today-list article[role="button"]:focus-visible {
    outline: 0;
    background: #faf8f2;
}

.agenda-today-list time {
    color: #9b7c47;
    font-size: .6rem;
    font-weight: 700;
}

.agenda-today-list strong,
.agenda-today-list small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.agenda-today-list strong {
    color: #465039;
    font-size: .65rem;
}

.agenda-today-list small {
    margin-top: 2px;
    color: #92938b;
    font-size: .52rem;
}

.agenda-empty-slot {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 8px 25px 24px;
    padding: 12px;
    color: #69745f;
    background: #f2f5ee;
    font-size: .57rem;
    line-height: 1.35;
}

.agenda-empty-slot i {
    color: #899b78;
    font-size: .82rem;
}

.agenda-preview-note {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    color: #85867e;
    font-size: .6rem;
}

.agenda-preview-note i {
    color: var(--gold);
    font-size: .82rem;
}

.dashboard-modal.agenda-entry-modal {
    width: min(760px, calc(100vw - 48px));
}

.agenda-entry-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 17px;
}

.agenda-kind-selector {
    margin-bottom: 2px;
}

.agenda-entry-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 17px;
    padding-top: 18px;
    border-top: 1px solid #e8e3d9;
}

.agenda-entry-section[hidden],
.agenda-status-selector label[hidden] {
    display: none;
}

.agenda-entry-section .patient-search-field {
    min-width: 0;
}

.agenda-price-field {
    grid-column: 1 / -1;
}

.agenda-price-control {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    align-items: stretch;
}

.agenda-price-control>span {
    display: grid;
    place-items: center;
    border: 1px solid #dbd8ce;
    border-right: 0;
    color: #8d7041;
    background: #f7f3ea;
    font-size: .63rem;
    font-weight: 700;
}

.dashboard-field .agenda-price-control input {
    border-left: 0;
}

.dashboard-field .agenda-price-control input[readonly] {
    color: #777b70;
    background: #f4f3ef;
}

.agenda-price-control button {
    min-width: 134px;
    margin-left: 9px;
    padding: 0 13px;
    border: 1px solid #d7cfbf;
    color: #80683e;
    background: #fffdf8;
    font: 700 .52rem var(--sans);
    cursor: pointer;
}

.agenda-price-control button:hover,
.agenda-price-control button:focus-visible {
    border-color: #b99a65;
    background: #f8f2e7;
}

.agenda-price-help {
    color: #8c8e85;
    font-size: .53rem;
    line-height: 1.45;
}

.agenda-block-section {
    grid-template-columns: minmax(0, 1.5fr) minmax(180px, .5fr);
    align-items: end;
}

.agenda-block-explanation,
.agenda-edit-identity {
    display: flex;
    align-items: center;
    gap: 13px;
    min-height: 68px;
    padding: 12px 14px;
    border: 1px solid #e2dbd2;
    background: #f5eee8;
}

.agenda-block-explanation>i {
    display: grid;
    place-items: center;
    flex: 0 0 34px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    color: #fff;
    background: #7b5945;
}

.agenda-block-explanation strong,
.agenda-block-explanation small,
.agenda-edit-identity strong,
.agenda-edit-identity small,
.agenda-edit-identity em {
    display: block;
}

.agenda-block-explanation strong {
    color: #53473f;
    font-size: .67rem;
}

.agenda-block-explanation small {
    margin-top: 3px;
    color: #8a817a;
    font-size: .56rem;
    line-height: 1.45;
}

.agenda-entry-datetime {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: start;
    gap: 17px;
}

.agenda-entry-summary {
    display: flex;
    align-items: center;
    gap: 9px;
    min-height: 42px;
    padding: 10px 13px;
    color: #66715d;
    background: #f0f4ed;
    font-size: .61rem;
}

.agenda-entry-summary i {
    color: #8a9c79;
    font-size: .8rem;
}

.agenda-edit-identity {
    margin: 0 0 22px;
    border-color: #ded8ca;
    background: #f8f5ee;
}

.agenda-edit-icon {
    display: grid;
    place-items: center;
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    color: #fff;
    background: #58684c;
}

.agenda-edit-identity small {
    margin-bottom: 2px;
    color: #957a4e;
    font-size: .53rem;
    font-style: normal;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.agenda-edit-identity strong {
    color: #46513e;
    font-size: .72rem;
}

.agenda-edit-patient-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #46513e;
    text-decoration: none;
}

.agenda-edit-patient-link[hidden] {
    display: none;
}

.agenda-edit-patient-link i {
    color: #a78349;
    font-size: .58rem;
    transition: transform .18s ease;
}

.agenda-edit-patient-link:hover strong,
.agenda-edit-patient-link:focus-visible strong {
    color: #8a6c3a;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

.agenda-edit-patient-link:hover i,
.agenda-edit-patient-link:focus-visible i {
    transform: translate(1px, -1px);
}

.agenda-plan-control {
    position: relative;
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    align-items: center;
    gap: 13px;
    min-height: 78px;
    padding: 13px 14px;
    border: 1px solid #e0d9cc;
    background: #fbf7ef;
}

.agenda-plan-control[hidden] {
    display: none;
}

.agenda-plan-control-icon {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    color: #fff;
    background: #ad8350;
    transition: background .2s ease;
}

.agenda-plan-control.is-ready .agenda-plan-control-icon {
    background: #647b57;
}

.agenda-plan-control.is-not-required .agenda-plan-control-icon {
    background: #85877f;
}

.agenda-plan-control-copy {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.agenda-plan-control-copy small {
    color: #967947;
    font-size: .5rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.agenda-plan-control-copy strong {
    color: #46513e;
    font-size: .69rem;
}

.agenda-plan-control-copy em {
    color: #8c8e85;
    font-size: .53rem;
    font-style: normal;
}

.agenda-plan-control-actions {
    display: grid;
    justify-items: end;
    gap: 5px;
}

.agenda-plan-control-actions .dashboard-button {
    min-height: 38px;
    padding: 0 15px;
    white-space: nowrap;
}

.agenda-plan-control-actions > button:last-child {
    padding: 1px 0;
    border: 0;
    border-bottom: 1px solid #c8ad79;
    color: #7c755f;
    background: transparent;
    font: 600 .5rem var(--sans);
    cursor: pointer;
}

.agenda-plan-control-actions > button:last-child[hidden] {
    display: none;
}

.agenda-plan-control > p {
    position: absolute;
    right: 14px;
    bottom: 3px;
    margin: 0;
    color: #65755a;
    font-size: .48rem;
}

.agenda-edit-identity em {
    margin-top: 3px;
    color: #8e9087;
    font-size: .56rem;
    font-style: normal;
}

.agenda-status-selector {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    margin: 0;
    padding: 0;
    border: 0;
}

.agenda-status-selector legend {
    grid-column: 1 / -1;
    margin-bottom: 1px;
    color: #596250;
    font-size: .58rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.agenda-status-selector label {
    position: relative;
    cursor: pointer;
}

.agenda-status-selector input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.agenda-status-selector label span {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 43px;
    padding: 7px;
    border: 1px solid #dedbd2;
    color: #6f756a;
    background: #fff;
    font-size: .57rem;
    font-weight: 700;
}

.agenda-status-selector label span b {
    font: inherit;
}

.agenda-status-selector input:checked+span {
    border-color: var(--gold);
    color: #4e5a45;
    background: #f5f0e5;
    box-shadow: inset 0 -3px 0 var(--gold);
}

.agenda-status-selector .is-cancel span {
    color: #8f5a50;
}

.agenda-status-selector .is-cancel input:checked+span {
    border-color: #a76559;
    color: #824b42;
    background: #f6eae7;
    box-shadow: inset 0 -3px 0 #a76559;
}

.metric-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    margin-bottom: 22px;
}

.metric-card {
    position: relative;
    display: flex;
    gap: 16px;
    min-height: 138px;
    padding: 24px;
    border: 1px solid #e5e1d5;
    background: #fffefb;
}

.metric-card-link {
    color: inherit;
    transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.metric-card-link:hover,
.metric-card-link:focus-visible {
    border-color: #cbb58c;
    box-shadow: 0 10px 24px rgba(60, 68, 49, .06);
    transform: translateY(-2px);
}

.metric-card-link:focus-visible {
    outline: 2px solid rgba(174, 135, 80, .32);
    outline-offset: 3px;
}

.metric-card-arrow {
    position: absolute;
    top: 20px;
    right: 20px;
    color: #b7a27c;
    font-size: .65rem;
    opacity: .68;
    transition: color .2s ease, transform .2s ease;
}

.metric-card-link:hover .metric-card-arrow,
.metric-card-link:focus-visible .metric-card-arrow {
    color: #8a6e3d;
    transform: translate(2px, -2px);
}

.metric-icon {
    display: grid;
    place-items: center;
    width: 37px;
    height: 37px;
    border-radius: 50%;
    color: #9a7a45;
    background: #f4eee2;
    font-size: 1.05rem;
}

.metric-card small {
    display: block;
    color: #84877c;
    font-size: .62rem;
    font-weight: 600;
    letter-spacing: .04em;
}

.metric-card strong {
    display: block;
    margin: 1px 0;
    color: #34402b;
    font-family: var(--serif);
    font-size: 2.35rem;
    font-weight: 600;
    line-height: 1;
}

.metric-card p {
    margin: 6px 0 0;
    color: #8d8f87;
    font-size: .61rem;
}

.metric-card p b {
    color: #698058;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: minmax(560px, 1.45fr) minmax(330px, .82fr);
    gap: 22px;
}

.dashboard-panel {
    border: 1px solid #e5e1d5;
    background: #fffefb;
}

.panel-full {
    grid-column: 1 / -1;
}

.panel-users {
    grid-column: 1;
}

.panel-documents {
    grid-column: 2;
}

.panel-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    padding: 25px 26px 18px;
}

.panel-heading h2 {
    margin: 0;
    color: #35402c;
    font-family: var(--serif);
    font-size: 1.65rem;
    font-weight: 600;
    line-height: 1.1;
}

.panel-heading>a {
    margin-top: 7px;
    color: #8a7042;
    font-size: .62rem;
    font-weight: 700;
    letter-spacing: .03em;
}

.panel-heading>a i {
    margin-left: 5px;
    font-size: .54rem;
    transition: transform .2s ease;
}

.panel-heading>a:hover i,
.panel-heading>a:focus-visible i {
    transform: translateX(2px);
}

.panel-heading>a span,
.panel-footer-link span {
    padding-left: 4px;
}

.panel-total {
    margin-top: 7px;
    color: #92938b;
    font-size: .58rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.notification-count {
    display: grid;
    place-items: center;
    min-width: 25px;
    height: 25px;
    border-radius: 50%;
    color: #fff;
    background: var(--gold);
    font-size: .65rem;
    font-weight: 700;
}

.dashboard-table-wrap {
    width: 100%;
    overflow-x: auto;
}

.patient-table {
    width: 100%;
    border-collapse: collapse;
    color: #777c72;
    font-size: .65rem;
}

.patient-table th {
    padding: 0 26px 12px;
    color: #99988f;
    font-size: .56rem;
    font-weight: 700;
    letter-spacing: .09em;
    text-align: left;
    text-transform: uppercase;
}

.patient-table td {
    height: 65px;
    padding: 9px 26px;
    border-top: 1px solid #eeeae1;
    vertical-align: middle;
}

.patient-table td:first-child {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #4d5745;
}

.patient-initial {
    display: grid;
    place-items: center;
    width: 29px;
    height: 29px;
    border-radius: 50%;
    color: #6a5432;
    font-size: .56rem;
    font-weight: 700;
}

.initial-gold {
    background: #efe1c9;
}

.initial-sage {
    color: #54644b;
    background: #dfe7d7;
}

.initial-rose {
    color: #8b665d;
    background: #efe0dc;
}

.table-person,
.table-contact {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.table-person strong,
.table-contact strong {
    overflow: hidden;
    color: #4d5745;
    font-size: .65rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.table-person small,
.table-contact small {
    overflow: hidden;
    color: #9a9b93;
    font-size: .54rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.table-person .patient-search-match {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: 3px;
    overflow: visible;
    color: #8b6f3e;
    font-size: .6rem;
    line-height: 1.35;
    text-overflow: clip;
    white-space: normal;
}

.patient-search-match i {
    flex: 0 0 auto;
    color: #ae8750;
}

.user-table td:nth-child(2) {
    max-width: 210px;
}

.user-table td:nth-child(3) {
    max-width: 240px;
}

.patient-table-name-link {
    color: inherit;
    border-bottom: 1px solid transparent;
}

.patient-table-name-link:hover {
    color: #8b6f3e;
    border-color: #c7aa73;
}

.status {
    display: inline-block;
    padding: 4px 7px;
    border-radius: 10px;
    font-size: .53rem;
    font-weight: 700;
    white-space: nowrap;
}

.status-green {
    color: #597246;
    background: #edf3e9;
}

.status-muted {
    color: #8c816d;
    background: #f1eee8;
}

.status-gold {
    color: #8d6b34;
    background: #f5ecd9;
}

.dashboard-empty-state {
    display: grid;
    place-items: center;
    min-height: 190px;
    padding: 34px;
    border-top: 1px solid #eeeae1;
    text-align: center;
}

.dashboard-empty-state>span {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    margin-bottom: 11px;
    border: 1px solid #d5c29b;
    border-radius: 50%;
    color: #9a7945;
    font-family: var(--serif);
    font-size: 1.25rem;
}

.dashboard-empty-state strong {
    color: #4f5b46;
    font-size: .72rem;
}

.dashboard-empty-state p {
    margin: 5px 0 0;
    color: #96978f;
    font-size: .6rem;
}

.dashboard-empty-compact {
    min-height: 175px;
}

.document-list {
    padding: 0 26px;
}

.document-list article {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 0;
    border-top: 1px solid #eeeae1;
}

.document-icon {
    display: grid;
    place-items: center;
    width: 31px;
    height: 33px;
    color: #936e35;
    background: #f4eadb;
    font-size: .9rem;
    font-weight: 700;
}

.document-list div {
    min-width: 0;
    flex: 1;
}

.document-list strong,
.document-list small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.document-list strong {
    color: #4e5945;
    font-size: .67rem;
}

.document-list small {
    color: #96978f;
    font-size: .56rem;
}

.document-list a {
    color: #9b7b47;
    font-size: .58rem;
    font-weight: 700;
}

.panel-footer-link {
    display: block;
    margin: 2px 26px 22px;
    color: #8a7042;
    font-size: .6rem;
    font-weight: 700;
}

.dashboard-agenda-list {
    padding: 0 26px 12px;
}

.dashboard-agenda-item {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) auto 8px 10px;
    align-items: center;
    gap: 11px;
    width: 100%;
    min-height: 61px;
    padding: 0;
    border: 0;
    border-top: 1px solid #eeeae1;
    color: inherit;
    background: transparent;
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition: background .2s ease, padding .2s ease;
}

.dashboard-agenda-plan {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px 3px 4px;
    border: 1px solid;
    border-radius: 12px;
    font-size: .48rem;
    font-weight: 700;
    white-space: nowrap;
}

.dashboard-agenda-plan.is-pending {
    border-color: #c9948a;
    color: #85493f;
    background: #f8ebe8;
}

.dashboard-agenda-plan.is-pending .agenda-plan-mark {
    background: #a9574b;
}

.dashboard-agenda-plan.is-ready {
    border-color: #9aaf8b;
    color: #527048;
    background: #e8efe3;
}

.dashboard-agenda-plan.is-ready .agenda-plan-mark {
    background: #55784a;
}

.dashboard-agenda-item:hover,
.dashboard-agenda-item:focus-visible {
    padding: 0 8px;
    background: #f8f5ee;
    outline: none;
}

.dashboard-agenda-item time {
    color: #95753f;
    font-family: var(--serif);
    font-size: 1.12rem;
    font-weight: 600;
}

.dashboard-agenda-copy {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.dashboard-agenda-copy strong,
.dashboard-agenda-copy small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dashboard-agenda-copy strong {
    color: #4f5946;
    font-size: .67rem;
}

.dashboard-agenda-copy small {
    color: #96978f;
    font-size: .56rem;
}

.dashboard-agenda-chevron {
    color: #b7ad99;
    font-size: .55rem;
}

.dashboard-agenda-empty {
    min-height: 260px;
}

.dashboard-attention-list {
    padding: 0 26px 19px;
}

.dashboard-attention-list>a {
    display: grid;
    grid-template-columns: 37px minmax(0, 1fr) auto;
    align-items: center;
    gap: 11px;
    min-height: 76px;
    border-top: 1px solid #eeeae1;
    color: inherit;
}

.dashboard-attention-list>a:hover strong,
.dashboard-attention-list>a:focus-visible strong {
    color: #8a6e3d;
}

.dashboard-attention-icon {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    color: #927342;
    background: #f4eadb;
    font-size: .82rem;
}

.dashboard-attention-list>a>span:nth-child(2) {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.dashboard-attention-list strong,
.dashboard-attention-list small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dashboard-attention-list strong {
    color: #4f5946;
    font-size: .66rem;
    transition: color .2s ease;
}

.dashboard-attention-list small {
    color: #96978f;
    font-size: .54rem;
}

.dashboard-attention-list b {
    display: grid;
    place-items: center;
    min-width: 26px;
    height: 26px;
    padding: 0 7px;
    border-radius: 14px;
    color: #fff;
    background: #ad8350;
    font-size: .58rem;
}

.dashboard-attention-list b.is-clear {
    color: #5f744f;
    background: #e7efe2;
}

.dashboard-attention-clear {
    display: flex;
    align-items: center;
    gap: 7px;
    margin: 0 26px 24px;
    color: #66785a;
    font-size: .58rem;
    font-weight: 700;
}

.dashboard-plan-list {
    display: grid;
    padding: 0 26px 18px;
}

.dashboard-plan-list > a {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    min-height: 66px;
    border-top: 1px solid #eeeae1;
    color: inherit;
}

.dashboard-plan-list > a:hover strong,
.dashboard-plan-list > a:focus-visible strong {
    color: #876b3b;
}

.dashboard-plan-icon {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    color: #956d37;
    background: #f5ead8;
}

.dashboard-plan-list > a > span:nth-child(2) {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.dashboard-plan-list strong,
.dashboard-plan-list small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dashboard-plan-list strong {
    color: #4f5946;
    font-size: .66rem;
    transition: color .2s ease;
}

.dashboard-plan-list small {
    color: #92958c;
    font-size: .54rem;
}

.dashboard-plan-action {
    color: #8a7042;
    font-size: .55rem;
    font-weight: 700;
}

.dashboard-plan-action i {
    margin-left: 4px;
}

.dashboard-plan-more {
    margin: -7px 26px 21px;
    color: #8d8f87;
    font-size: .54rem;
}

.agenda-list {
    padding: 0 26px 14px;
}

.agenda-list article {
    display: grid;
    grid-template-columns: 47px 1fr auto;
    align-items: center;
    gap: 10px;
    min-height: 61px;
    border-top: 1px solid #eeeae1;
}

.agenda-list time {
    color: #95753f;
    font-family: var(--serif);
    font-size: 1.12rem;
    font-weight: 600;
}

.agenda-list strong,
.agenda-list small {
    display: block;
}

.agenda-list strong {
    color: #4f5946;
    font-size: .67rem;
}

.agenda-list small {
    color: #96978f;
    font-size: .56rem;
}

.agenda-state {
    color: #688157;
    font-size: .54rem;
    font-weight: 700;
}

.agenda-pending {
    color: #a1844e;
}

.activity-list {
    padding: 0 26px 21px;
}

.activity-list article {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 11px 0;
    border-top: 1px solid #eeeae1;
}

.activity-dot {
    width: 7px;
    height: 7px;
    margin-top: 6px;
    border-radius: 50%;
    background: #779362;
}

.activity-dot-muted {
    background: #c5b99f;
}

.activity-list p {
    margin: 0;
}

.activity-list strong,
.activity-list small {
    display: block;
}

.activity-list strong {
    color: #526047;
    font-size: .65rem;
}

.activity-list small {
    color: #989990;
    font-size: .56rem;
}

.admin-flash {
    margin: -10px 0 24px;
    padding: 13px 16px;
    border-left: 3px solid;
    font-size: .67rem;
}

.admin-flash-success {
    border-color: #71885f;
    color: #526348;
    background: #eaf0e5;
}

.admin-flash-error {
    border-color: #a36556;
    color: #75483e;
    background: #f4e8e4;
}

.document-admin-grid {
    display: grid;
    grid-template-columns: minmax(470px, 1fr) minmax(470px, 1fr);
    gap: 22px;
    align-items: start;
}

.document-upload-panel,
.document-history-panel {
    min-height: 430px;
}

.document-upload-form {
    display: grid;
    gap: 18px;
    padding: 3px 26px 29px;
}

.document-upload-form .dashboard-button {
    justify-self: start;
    min-width: 175px;
    margin-top: 3px;
}

.document-upload-form input[type="file"] {
    height: auto;
    min-height: 48px;
    padding: 12px 13px;
}

.shared-library-panel {
    min-height: 0;
}

.shared-library-grid {
    grid-template-columns: minmax(0, 1.25fr) minmax(310px, 1fr);
}

.shared-folder-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 18px;
    margin-bottom: 18px;
    padding: 10px 16px;
    border: 1px solid #dfdbd0;
    background: #f0eee7;
}

.shared-folder-name-form {
    display: flex;
    flex: 1;
    align-items: center;
    gap: 10px;
    min-width: 360px;
    max-width: 640px;
}

.shared-folder-name-form .dashboard-field {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
}

.shared-folder-name-form .dashboard-field label {
    flex-shrink: 0;
    margin: 0;
}

.shared-folder-name-form .dashboard-field input {
    height: 36px;
    min-width: 0;
}

.shared-folder-toolbar .dashboard-button {
    min-height: 36px;
    white-space: nowrap;
}

.shared-folder-remove-form {
    margin-left: auto;
}

.shared-folder-toolbar-note {
    flex-basis: 100%;
    margin: 0;
    color: #6a655b;
    font-size: .75rem;
    text-align: right;
}

.shared-folder-row {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 0 24px;
    padding: 14px 0;
    border-top: 1px solid rgba(37, 58, 49, .12);
    color: inherit;
}

a.shared-folder-row:hover .shared-row-copy strong {
    text-decoration: underline;
}

.shared-folder-row:last-of-type {
    margin-bottom: 12px;
}

.shared-row-copy {
    display: grid;
    flex: 1;
    min-width: 0;
    gap: 4px;
    overflow-wrap: anywhere;
}

.shared-row-copy small {
    font-size: .75rem;
    color: #555e56;
}

.shared-folder-icon {
    color: #5e4c2f;
    background: #f3ead9;
}

.shared-material-entry {
    padding-bottom: 12px;
}

.shared-material-entry .shared-folder-row {
    margin-bottom: 0;
}

.shared-material-edit {
    margin: 0 24px 14px;
}

.shared-material-edit summary {
    width: fit-content;
    cursor: pointer;
    font-size: .8rem;
    font-weight: 600;
}

.shared-material-edit .document-upload-form {
    padding: 15px 0;
}

.shared-material-field[hidden] {
    display: none;
}

.shared-material-image {
    display: block;
    width: auto;
    max-width: 100%;
    max-height: 420px;
    height: auto;
    border-radius: 10px;
}

.patient-document-list .shared-image-preview {
    display: block;
}

.shared-patient-library .patient-document-list strong {
    white-space: normal;
    overflow: visible;
    overflow-wrap: anywhere;
}

.shared-patient-library {
    margin: 30px auto;
}

.document-history-list {
    padding-bottom: 16px;
}

.document-history-panel .document-list article {
    display: grid;
    grid-template-columns: 31px minmax(0, 1fr) auto;
}

.document-history-panel .document-list form {
    margin: 0;
}

.document-history-panel .document-list form button {
    /* padding: 7px 0 7px 12px; */
    padding: 0;
    border: 0;
    color: #985b4e;
    background: transparent;
    font: 700 .56rem var(--sans);
    cursor: pointer;
}

.document-history-panel .document-list form button:hover {
    color: #743f35;
    text-decoration: underline;
}

.document-patient-link {
    color: #8b7042;
    border-bottom: 1px solid #d8c49e;
}

.document-patient-link:hover {
    color: #66502d;
    border-color: #8b7042;
}

.document-actions {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 11px;
    white-space: nowrap;
}

.document-actions a {
    padding: 7px 0;
    color: #8b7042;
}

.document-actions a:hover {
    color: #66502d;
    text-decoration: underline;
}

.document-actions form {
    display: inline-flex;
}

.table-action-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #8b7042;
    font-size: .58rem;
    font-weight: 700;
    white-space: nowrap;
}

.table-action-link:hover {
    color: #5d6a51;
    text-decoration: underline;
}

.patient-search-control {
    display: none;
    position: relative;
}

.patient-search-field.is-enhanced>select {
    display: none;
}

.patient-search-field.is-enhanced .patient-search-control {
    display: block;
}

.patient-search-input-wrap {
    position: relative;
}

.patient-search-input-wrap>span {
    position: absolute;
    top: 50%;
    left: 14px;
    color: #9b7b47;
    font-size: 1rem;
    transform: translateY(-52%);
    pointer-events: none;
}

.dashboard-field .patient-search-input-wrap input {
    padding: 0 14px 0 39px;
}

.dashboard-field .patient-search-input-wrap input::-webkit-search-cancel-button {
    display: none;
    -webkit-appearance: none;
}

.dashboard-field .patient-search-input-wrap:has(button:not([hidden])) input {
    padding-right: 42px;
}

.patient-search-input-wrap button {
    position: absolute;
    top: 50%;
    right: 8px;
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    padding: 0;
    border: 0;
    color: #85877f;
    background: transparent;
    font: 400 1.1rem var(--sans);
    transform: translateY(-50%);
    cursor: pointer;
}

.patient-search-input-wrap button[hidden] {
    display: none;
}

.patient-search-input-wrap button:hover {
    color: #795f34;
}

.patient-search-results {
    position: absolute;
    z-index: 10;
    top: 55px;
    right: 0;
    left: 0;
    max-height: 292px;
    padding: 5px;
    overflow-y: auto;
    border: 1px solid #d8d3c7;
    background: #fffefb;
    box-shadow: 0 14px 28px rgba(38, 47, 31, .15);
}

.patient-search-results[hidden],
.patient-search-selected[hidden] {
    display: none;
}

.patient-search-results button {
    display: grid;
    width: 100%;
    gap: 4px;
    padding: 11px 12px;
    border: 0;
    border-bottom: 1px solid #eeeae1;
    color: #4b5743;
    background: transparent;
    text-align: left;
    cursor: pointer;
}

.patient-search-results button:last-child {
    border-bottom: 0;
}

.patient-search-results button:hover,
.patient-search-results button.is-active {
    background: #f4f0e7;
    box-shadow: inset 3px 0 0 var(--gold);
}

.patient-search-results strong {
    font: 600 .68rem var(--sans);
}

.patient-search-results small {
    color: #8d8f86;
    font: 400 .56rem/1.45 var(--sans);
}

.patient-search-empty {
    margin: 0;
    padding: 15px 12px;
    color: #8b8d84;
    font-size: .62rem;
    text-align: center;
}

.patient-search-selected {
    display: grid;
    grid-template-columns: 33px 1fr auto;
    align-items: center;
    gap: 10px;
    margin-top: 9px;
    padding: 10px 12px;
    border: 1px solid #e4dfd3;
    background: #f8f5ee;
}

.patient-search-selected>span:nth-child(2) {
    min-width: 0;
}

.patient-search-selected strong,
.patient-search-selected small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.patient-search-selected strong {
    color: #4a5641;
    font-size: .65rem;
}

.patient-search-selected small {
    margin-top: 3px;
    color: #8c8e84;
    font-size: .54rem;
}

.patient-search-selected>b {
    color: #71865e;
    font-size: .75rem;
}

.patient-search-avatar {
    display: grid;
    place-items: center;
    width: 33px;
    height: 33px;
    border-radius: 50%;
    color: #6b5635;
    background: #ecdfc7;
    font-size: .56rem;
    font-weight: 700;
}

.patient-search-message {
    min-height: 0;
    margin: 7px 0 0;
    color: #985b4e;
    font-size: .57rem;
}

.patient-search-message:empty {
    display: none;
}

.patient-search-field>.patient-search-help {
    color: #85887f;
}

.settings-page-header {
    align-items: center;
}

.settings-draft-badge {
    padding: 8px 11px;
    border: 1px solid #d9ceb8;
    color: #8b754e;
    background: #f5efe4;
    font-size: .55rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.settings-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
    align-items: start;
}

.settings-panel {
    min-height: 360px;
}

.settings-panel-icon {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border: 1px solid #ddcfb6;
    border-radius: 50%;
    color: #96743e;
}

.settings-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 17px;
    padding: 3px 26px 28px;
}

.settings-form .dashboard-button {
    grid-column: 1 / -1;
    justify-self: start;
    margin-top: 4px;
}

.settings-form-note {
    display: flex;
    grid-column: 1 / -1;
    align-items: flex-start;
    gap: 8px;
    margin: 2px 0 0;
    padding-top: 14px;
    border-top: 1px solid #eeeae1;
    color: #92958c;
    font-size: .56rem;
    line-height: 1.55;
}

.settings-form-note i {
    margin-top: 2px;
    color: #a4834e;
}

.settings-admin-panel {
    grid-column: 1 / -1;
    min-height: 250px;
}

.settings-appointment-types-panel {
    grid-column: 1 / -1;
}

.settings-type-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 28px;
    padding: 0 26px;
}

.settings-type-item {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 12px;
    min-height: 75px;
    padding: 10px 0;
    border-top: 1px solid #eeeae1;
}

.settings-type-tone {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border: 1px solid;
    border-radius: 50%;
    font-size: .78rem;
}

.settings-type-tone-rose {
    border-color: #dfbdc7;
    color: #a85f74;
    background: #f7e8ed;
}

.settings-type-tone-purple {
    border-color: #cfc2df;
    color: #735a9b;
    background: #f0ebf6;
}

.settings-type-tone-blue {
    border-color: #bed0e0;
    color: #4d749a;
    background: #eaf1f7;
}

.settings-type-tone-gold {
    border-color: #ddc99f;
    color: #92703c;
    background: #f6eedf;
}

.settings-type-tone-brown {
    border-color: #d3c0b3;
    color: #76533f;
    background: #f0e7e0;
}

.settings-type-copy {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.settings-type-copy strong,
.settings-type-copy small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.settings-type-copy strong {
    color: #4d5745;
    font-size: .66rem;
}

.settings-type-copy small {
    color: #96978f;
    font-size: .53rem;
}

.settings-type-item > button {
    padding: 0;
    border: 0;
    border-bottom: 1px solid #c9ad77;
    color: #8b7042;
    background: transparent;
    cursor: pointer;
    font: 700 .56rem var(--sans);
}

.settings-type-item > button:hover,
.settings-type-item > button:focus-visible {
    color: #5d6a51;
    border-color: #7c8d70;
}

.settings-type-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 17px;
}

.dashboard-field > .dashboard-field-hint {
    color: #8b8d84;
    font-size: .54rem;
}

.settings-type-price {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    border: 1px solid #d8d4ca;
    background: #fff;
}

.settings-type-price:focus-within {
    border-color: #a8864f;
    box-shadow: 0 0 0 2px rgba(168, 134, 79, .08);
}

.settings-type-price > span {
    padding-left: 15px;
    color: #92723f;
    font-size: .65rem;
    font-weight: 700;
}

.settings-type-price input {
    border: 0;
    box-shadow: none;
}

.settings-type-price input:focus {
    box-shadow: none;
}

.settings-type-active {
    display: flex;
    align-items: center;
    gap: 11px;
    min-height: 56px;
    padding: 10px 13px;
    border: 1px solid #dfdbd1;
    cursor: pointer;
}

.settings-type-active input[type="checkbox"] {
    width: 17px;
    height: 17px;
    accent-color: #5f7254;
}

.settings-type-active span,
.settings-type-active strong,
.settings-type-active small {
    display: block;
}

.settings-type-active strong {
    color: #536049;
    font-size: .59rem;
}

.settings-type-active small {
    margin-top: 3px;
    color: #94968e;
    font-size: .49rem;
}

.settings-type-active:has(input:disabled) {
    cursor: not-allowed;
    opacity: .65;
}

.settings-type-rule-note {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 0;
    padding: 11px 13px;
    color: #7d725e;
    background: #f7f1e6;
    font-size: .54rem;
    line-height: 1.5;
}

.settings-type-rule-note[hidden] {
    display: none;
}

.settings-panel-description {
    margin: 7px 0 0;
    color: #8d8f86;
    font-size: .6rem;
}

.settings-admin-list {
    padding: 0 26px;
}

.settings-admin-list article {
    display: grid;
    grid-template-columns: 34px 1fr auto auto;
    align-items: center;
    gap: 13px;
    min-height: 72px;
    padding: 10px 0;
    border-top: 1px solid #eeeae1;
}

.settings-admin-list article>span:nth-child(2) {
    display: grid;
    gap: 3px;
}

.settings-admin-list strong {
    color: #4d5745;
    font-size: .67rem;
}

.settings-admin-list small {
    color: #96978f;
    font-size: .56rem;
}

.settings-admin-list button {
    padding: 0;
    border: 0;
    color: #8b7042;
    background: transparent;
    cursor: pointer;
    font: 700 .57rem var(--sans);
}

.settings-admin-list button:hover {
    color: #5d6a51;
}

.settings-self-label {
    color: #92958c;
    font-size: .57rem;
    font-weight: 700;
}

.settings-draft-note {
    margin: 17px 26px 24px;
    padding-top: 15px;
    border-top: 1px solid #eeeae1;
    color: #97988f;
    font-size: .57rem;
}

.settings-audit-panel {
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: 44px minmax(0, 1fr) auto;
    align-items: center;
    gap: 18px;
    min-height: 130px;
    padding: 24px 26px;
}

.settings-audit-panel h2 {
    margin: 0;
    color: #35402c;
    font-family: var(--serif);
    font-size: 1.65rem;
    font-weight: 600;
    line-height: 1.1;
}

.settings-audit-panel p:last-child {
    margin: 7px 0 0;
    color: #8d8f86;
    font-size: .6rem;
}

.settings-audit-icon {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    color: #8d6d39;
    background: #f2eadb;
    font-size: 1.08rem;
}

.audit-page {
    align-self: start;
}

.audit-page-header {
    align-items: center;
}

.audit-page-header .settings-draft-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.audit-filter-panel {
    margin-bottom: 22px;
}

.audit-filter-form {
    display: grid;
    grid-template-columns: 1.15fr 1.35fr .8fr .8fr;
    gap: 15px;
    padding: 2px 26px 26px;
}

.audit-filter-form .dashboard-field select {
    padding-right: 54px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' fill='none' stroke='%233f4937' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 12px 8px;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

.audit-filter-actions {
    display: flex;
    grid-column: 1 / -1;
    align-items: center;
    gap: 10px;
    padding-top: 3px;
}

.audit-list-panel {
    min-height: 360px;
}

.audit-list {
    padding: 0 26px 8px;
}

.audit-entry {
    display: grid;
    grid-template-columns: 38px minmax(160px, .8fr) minmax(200px, 1fr) minmax(280px, 1.5fr);
    align-items: center;
    gap: 16px;
    min-height: 82px;
    padding: 12px 0;
    border-top: 1px solid #eeeae1;
}

.audit-entry-icon {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: .9rem;
}

.audit-entry-icon-patient {
    color: #657b54;
    background: #edf2e8;
}

.audit-entry-icon-document {
    color: #8f6b34;
    background: #f5ecdc;
}

.audit-entry-icon-access {
    color: #776b8a;
    background: #f0edf4;
}

.audit-entry-icon-security {
    color: #8a675e;
    background: #f5ebe8;
}

.audit-entry-icon-admin {
    color: #68756b;
    background: #edf0ed;
}

.audit-entry-icon-appointment {
    color: #527da6;
    background: #e5eef7;
}

.audit-entry-main,
.audit-entry-actor,
.audit-entry-subject {
    display: grid;
    min-width: 0;
    gap: 3px;
}

.audit-entry-main strong,
.audit-entry-actor strong,
.audit-entry-subject strong,
.audit-entry-subject a {
    overflow: hidden;
    color: #4b5643;
    font-size: .64rem;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.audit-entry-subject a {
    color: #8a6c3a;
    border-bottom: 1px solid transparent;
    justify-self: start;
}

.audit-entry-subject a:hover {
    border-color: #c7aa73;
}

.audit-entry-main small,
.audit-entry-actor small,
.audit-entry-actor>span,
.audit-entry-subject>span {
    overflow: hidden;
    color: #989990;
    font-size: .52rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.audit-entry-actor>span,
.audit-entry-subject>span {
    color: #a18a61;
    font-size: .49rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.audit-privacy-note {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 16px 0 0;
    color: #8f9189;
    font-size: .57rem;
}

.audit-privacy-note i {
    margin-top: 3px;
    color: #a17e46;
}

.finance-page {
    align-self: start;
}

.finance-page-header {
    align-items: center;
}

.finance-header-actions {
    display: flex;
    align-items: center;
    gap: 11px;
}

.finance-period-control {
    display: grid;
    grid-template-columns: 36px minmax(145px, auto) 36px;
    align-items: center;
    height: 38px;
    border: 1px solid #ddd8cc;
    background: #fffefb;
}

.finance-period-control button {
    display: grid;
    width: 36px;
    height: 36px;
    padding: 0;
    place-items: center;
    border: 0;
    color: #8d7449;
    background: transparent;
    cursor: pointer;
}

.finance-period-control a {
    display: grid;
    width: 36px;
    height: 36px;
    place-items: center;
    color: #8d7449;
    font-size: .65rem;
}

.finance-period-control a:hover,
.finance-period-control a:focus-visible {
    color: #fff;
    background: #68775b;
}

.finance-period-control button:hover,
.finance-period-control button:focus-visible {
    color: #fff;
    background: #68775b;
}

.finance-period-control strong {
    padding: 0 12px;
    color: #4e5946;
    font-size: .6rem;
    letter-spacing: .04em;
    text-align: center;
    text-transform: uppercase;
}

.finance-preview-note {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: -9px 0 22px;
    padding: 11px 14px;
    border-left: 3px solid #b5955f;
    color: #7b725f;
    background: #f3eee3;
    font-size: .59rem;
}

.finance-preview-note > i {
    color: #987642;
    font-size: .76rem;
}

.finance-preview-note strong {
    color: #62563f;
}

.finance-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 22px;
}

.finance-summary-card {
    display: grid;
    grid-template-columns: 39px minmax(0, 1fr);
    align-items: start;
    gap: 13px;
    min-height: 125px;
    padding: 21px 19px;
    border: 1px solid #e5e1d5;
    background: #fffefb;
}

.finance-summary-icon {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 50%;
    font-size: .9rem;
}

.finance-summary-card.is-income .finance-summary-icon {
    color: #537047;
    background: #e7efe2;
}

.finance-summary-card.is-pending .finance-summary-icon {
    color: #95703b;
    background: #f5ecd9;
}

.finance-summary-card.is-expense .finance-summary-icon {
    color: #96594e;
    background: #f4e5e2;
}

.finance-summary-card.is-balance .finance-summary-icon {
    color: #4e7294;
    background: #e6eef5;
}

.finance-summary-card small,
.finance-summary-card strong,
.finance-summary-card p {
    display: block;
}

.finance-summary-card small {
    color: #85887d;
    font-size: .57rem;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
}

.finance-summary-card strong {
    margin-top: 3px;
    overflow: hidden;
    color: #35402d;
    font-family: var(--serif);
    font-size: 1.65rem;
    font-weight: 600;
    line-height: 1.1;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.finance-summary-card p {
    margin: 7px 0 0;
    color: #96988f;
    font-size: .53rem;
}

.finance-content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    align-items: start;
    gap: 22px;
}

.finance-transactions-panel {
    min-width: 0;
}

.finance-panel-heading {
    align-items: center;
}

.finance-filter-tabs {
    display: inline-flex;
    padding: 3px;
    border: 1px solid #dfdbd1;
    background: #f8f6f0;
}

.finance-filter-tabs button {
    min-height: 29px;
    padding: 0 10px;
    border: 0;
    color: #8b8b81;
    background: transparent;
    cursor: pointer;
    font: 700 .52rem var(--sans);
    letter-spacing: .05em;
    text-transform: uppercase;
}

.finance-filter-tabs button.is-active {
    color: #fff;
    background: #59694d;
}

.finance-table {
    width: 100%;
    border-collapse: collapse;
    color: #777c72;
    font-size: .61rem;
}

.finance-table th {
    padding: 0 19px 11px;
    color: #99988f;
    font-size: .52rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-align: left;
    text-transform: uppercase;
}

.finance-table th:last-child,
.finance-table td:last-child {
    text-align: right;
}

.finance-table td {
    height: 67px;
    padding: 9px 19px;
    border-top: 1px solid #eeeae1;
    vertical-align: middle;
    white-space: nowrap;
}

.finance-table td:first-child {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 230px;
}

.finance-entry-icon {
    display: grid;
    flex: 0 0 30px;
    width: 30px;
    height: 30px;
    place-items: center;
    border-radius: 50%;
    font-size: .66rem;
}

.finance-entry-icon.is-income {
    color: #527047;
    background: #e8efe3;
}

.finance-entry-icon.is-expense {
    color: #94584d;
    background: #f3e5e2;
}

.finance-entry-copy {
    display: grid;
    min-width: 0;
    gap: 3px;
}

.finance-entry-copy strong {
    overflow: hidden;
    max-width: 240px;
    color: #4b5643;
    font-size: .62rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.finance-entry-copy small {
    color: #999a92;
    font-size: .51rem;
}

.finance-status {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 11px;
    font-size: .51rem;
    font-weight: 700;
}

.finance-status.is-paid {
    color: #577147;
    background: #eaf1e5;
}

.finance-status.is-pending {
    color: #8d6a35;
    background: #f5ecd9;
}

.finance-value {
    color: #4b5643;
    font-weight: 700;
}

.finance-value.is-income {
    color: #58734c;
}

.finance-value.is-expense {
    color: #92584d;
}

.finance-table-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 57px;
    padding: 10px 19px;
    border-top: 1px solid #eeeae1;
    color: #999a92;
    font-size: .53rem;
}

.finance-table-footer button {
    padding: 0;
    border: 0;
    color: #8a6d3d;
    background: transparent;
    cursor: pointer;
    font: 700 .55rem var(--sans);
}

.finance-table-footer button i {
    margin-left: 5px;
    font-size: .48rem;
}

.finance-side-column {
    display: grid;
    gap: 22px;
}

.finance-panel-icon {
    display: grid;
    width: 37px;
    height: 37px;
    place-items: center;
    border-radius: 50%;
    color: #96733d;
    background: #f3ecdf;
    font-size: .86rem;
}

.finance-upcoming-list {
    padding: 0 22px 17px;
}

.finance-upcoming-list article {
    display: grid;
    grid-template-columns: 31px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    min-height: 66px;
    border-top: 1px solid #eeeae1;
}

.finance-upcoming-list article > span {
    display: grid;
    width: 29px;
    height: 29px;
    place-items: center;
    border-radius: 50%;
    color: #8c7146;
    background: #f2ecdf;
    font-size: .68rem;
}

.finance-upcoming-list article > div {
    display: grid;
    min-width: 0;
    gap: 2px;
}

.finance-upcoming-list strong,
.finance-upcoming-list small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.finance-upcoming-list strong {
    color: #4d5745;
    font-size: .58rem;
}

.finance-upcoming-list small {
    color: #999a92;
    font-size: .49rem;
}

.finance-upcoming-list b {
    color: #675b45;
    font-size: .55rem;
    white-space: nowrap;
}

.finance-category-list {
    display: grid;
    gap: 14px;
    padding: 2px 24px 19px;
}

.finance-category-list > div {
    display: grid;
    gap: 6px;
}

.finance-category-list span {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    color: #62695c;
    font-size: .54rem;
}

.finance-category-list b {
    color: #8b7651;
}

.finance-category-list i {
    display: block;
    height: 5px;
    overflow: hidden;
    border-radius: 4px;
    background: #ece9e1;
}

.finance-category-list em {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #708063, #a58a59);
}

.finance-category-total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0 24px 23px;
    padding-top: 15px;
    border-top: 1px solid #eeeae1;
    color: #91938a;
    font-size: .53rem;
}

.finance-category-total strong {
    color: #465140;
    font-family: var(--serif);
    font-size: 1rem;
}

.finance-expense-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 17px;
}

.finance-expense-form [hidden] {
    display: none;
}

.finance-modal-feedback {
    min-height: 18px;
    margin: 0;
    color: #8b7042;
    font-size: .57rem;
    font-weight: 600;
}

.finance-period-note {
    margin: 0 0 22px;
    color: #787e70;
    font-size: .62rem;
    line-height: 1.7;
}

.finance-filters {
    display: grid;
    grid-template-columns: 1.1fr 1fr 1fr auto;
    align-items: end;
    gap: 12px;
    padding: 0 20px 22px;
}

.finance-table th,
.finance-table td {
    padding-right: 12px;
    padding-left: 12px;
}

.finance-table td:first-child {
    min-width: 190px;
    height: auto;
    min-height: 70px;
}

.finance-entry-copy strong {
    max-width: 240px;
}

.finance-entry-copy small {
    max-width: 240px;
    white-space: normal;
    line-height: 1.5;
}

.finance-row-action,
.finance-upcoming-action,
.finance-danger-action {
    padding: 0;
    border: 0;
    background: transparent;
    color: #8a6d3d;
    cursor: pointer;
    font: 700 .6rem var(--sans);
}

.finance-row-action:hover,
.finance-upcoming-action:hover,
.finance-danger-action:hover {
    text-decoration: underline;
}

.finance-upcoming-action {
    overflow: hidden;
    color: #4d5745;
    text-align: left;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.finance-danger-action {
    margin-right: auto;
    color: #92584d;
}

.finance-status.is-cancelled {
    color: #797a72;
    background: #eeeae1;
}

.finance-list-count,
.finance-empty-copy {
    margin: 0;
    padding: 16px 20px;
    color: #85887d;
    font-size: .6rem;
    line-height: 1.6;
}

.finance-category-list .finance-empty-copy {
    padding: 0;
}

.finance-category-list progress {
    display: block;
    width: 100%;
    height: 5px;
    border: 0;
    border-radius: 4px;
    background: #ece9e1;
    accent-color: #708063;
}

.finance-category-list progress::-webkit-progress-bar {
    border-radius: 4px;
    background: #ece9e1;
}

.finance-category-list progress::-webkit-progress-value {
    border-radius: 4px;
    background: linear-gradient(90deg, #708063, #a58a59);
}

.finance-receipt-amount {
    margin: 0 0 22px;
    color: #35402d;
    font: 600 1.7rem var(--serif);
}

.finance-view-switch {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: -6px 0 22px;
    padding-bottom: 14px;
    border-bottom: 1px solid #e5e1d5;
}

.finance-view-switch a {
    padding: 10px 14px;
    color: #747b69;
    font-size: .62rem;
    font-weight: 700;
}

.finance-view-switch a[aria-current="page"] {
    color: #fffefb;
    background: #59694d;
}

.finance-view-switch a:hover,
.finance-view-switch a:focus-visible {
    box-shadow: inset 0 -2px #b5955f;
}

.finance-content-grid.is-all-pending {
    grid-template-columns: minmax(0, 1fr);
}

.finance-content-grid.is-all-pending .finance-filters {
    grid-template-columns: minmax(180px, 260px) auto;
    justify-content: start;
}

.finance-export-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 0 20px 18px;
    color: #85887d;
    font-size: .57rem;
}

.finance-export-actions a {
    padding: 6px 10px;
    border: 1px solid #ded8c9;
    color: #78613c;
    font-weight: 700;
}

.finance-export-actions a:hover,
.finance-export-actions a:focus-visible {
    background: #f3eee3;
}

.finance-overdue-label {
    display: block;
    margin-top: 5px;
    color: #a26349;
    font-size: .5rem;
    font-weight: 700;
}

.finance-all-pending-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 16px 20px;
    border-top: 1px solid #eeeae1;
    color: #8a6d3d;
    font-size: .57rem;
    font-weight: 700;
}

.finance-comparison-panel {
    margin-top: 22px;
}

.finance-comparison-note {
    margin: -7px 0 0;
    padding: 0 20px 17px;
    color: #85887d;
    font-size: .59rem;
    line-height: 1.6;
}

.finance-comparison-table {
    width: 100%;
    min-width: 520px;
    border-collapse: collapse;
    font-size: .65rem;
}

.finance-comparison-table th,
.finance-comparison-table td {
    padding: 13px 20px;
    border-top: 1px solid #eeeae1;
    text-align: right;
    white-space: nowrap;
}

.finance-comparison-table th:first-child {
    text-align: left;
}

.finance-comparison-table thead th {
    color: #85887d;
    background: #faf8f3;
    font-size: .55rem;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.finance-comparison-table tbody th a {
    color: #5d6a50;
}

.finance-comparison-table .is-selected-month {
    background: #f4f6ee;
}

.finance-comparison-table .is-income {
    color: #58704a;
}

.finance-comparison-table .is-expense {
    color: #96594e;
}

.finance-recurrence-options,
.finance-recurrence-series,
.finance-recurrence-cancel {
    margin: 0;
    padding: 14px 16px;
    border: 1px solid #e8e1d1;
    background: #faf8f2;
}

.finance-recurrence-toggle {
    display: flex;
    align-items: center;
    gap: 9px;
    color: #5d684f;
    cursor: pointer;
    font-size: .65rem;
    font-weight: 700;
}

.finance-recurrence-toggle input {
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: #59694d;
}

.finance-recurrence-details {
    display: grid;
    grid-template-columns: 130px minmax(0, 1fr);
    align-items: end;
    gap: 16px;
    margin-top: 15px;
}

.finance-recurrence-help,
.finance-recurrence-series,
.finance-recurrence-cancel p {
    margin: 0;
    color: #787e70;
    font-size: .59rem;
    line-height: 1.7;
}

.finance-recurrence-cancel p {
    margin-top: 6px;
}

.finance-expense-form [hidden] {
    display: none !important;
}

.audit-entry-icon-financial {
    color: #8a6d3d;
    background: #f3ecdf;
}

@media (max-width: 1450px) {
    .finance-content-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .finance-side-column {
        grid-template-columns: 1fr 1fr;
    }

    .finance-page-header {
        align-items: flex-start;
        flex-wrap: wrap;
    }
}

.patient-detail-back {
    display: inline-flex;
    gap: 7px;
    margin-bottom: 24px;
    color: #8a7042;
    font-size: .61rem;
    font-weight: 700;
}

.patient-detail-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    margin-bottom: 31px;
}

.patient-detail-identity {
    display: flex;
    align-items: center;
    gap: 20px;
}

.patient-detail-avatar {
    display: grid;
    place-items: center;
    width: 66px;
    height: 66px;
    border: 1px solid #d7c39b;
    border-radius: 50%;
    color: #785f38;
    background: #efe4cf;
    font: 600 1.15rem var(--serif);
}

.patient-detail-identity h1 {
    margin: 0;
    color: #2c3724;
    font-family: var(--serif);
    font-size: 3rem;
    font-weight: 500;
    line-height: 1;
}

.patient-detail-identity>div>p:last-child {
    margin: 8px 0 0;
    color: #8d8f87;
    font-size: .62rem;
}

.patient-detail-actions {
    display: flex;
    align-items: center;
    gap: 13px;
}

.patient-detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(310px, .75fr);
    gap: 22px;
    align-items: start;
}

.patient-detail-main {
    display: grid;
    gap: 22px;
}

.patient-detail-info-panel {
    min-height: 250px;
}

.patient-access-list {
    padding: 0 26px 20px;
}

.patient-access-list article {
    display: grid;
    grid-template-columns: 31px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    min-height: 82px;
    padding: 9px 0;
    border-top: 1px solid #eeeae1;
}

.access-account-copy {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.access-account-copy>strong {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    color: #4d5745;
    font-size: .67rem;
}

.access-account-copy>strong a {
    overflow: hidden;
    color: inherit;
    border-bottom: 1px solid transparent;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.access-account-copy>strong a:hover {
    color: #8b7042;
    border-color: #c8ae7d;
}

.access-account-copy>small {
    overflow: hidden;
    color: #96978f;
    font-size: .55rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.access-primary-badge {
    flex: 0 0 auto;
    padding: 3px 6px;
    border: 1px solid #d7c49c;
    color: #856a3d;
    background: #f6f0e4;
    font-size: .47rem;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.access-row-actions {
    display: flex;
    align-items: flex-end;
    flex-direction: column;
    gap: 8px;
}

.access-unlink-button {
    padding: 0;
    border: 0;
    color: #985b4e;
    background: transparent;
    font: 700 .54rem var(--sans);
    cursor: pointer;
}

.access-unlink-button:hover {
    color: #743f35;
    text-decoration: underline;
}

.access-unlink-button i {
    margin-right: 3px;
}

.access-unlink-button:disabled {
    color: #8f948a;
    cursor: not-allowed;
    text-decoration: none;
}

.patient-detail-data {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    margin: 0;
    padding: 0 26px 27px;
}

.patient-detail-data>div {
    min-width: 0;
    padding: 15px 13px 15px 0;
    border-top: 1px solid #eeeae1;
}

.patient-detail-data>div:nth-child(even) {
    padding-right: 0;
    padding-left: 13px;
}

.patient-detail-data dt {
    margin-bottom: 6px;
    color: #9a998f;
    font-size: .53rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.patient-detail-data dd {
    margin: 0;
    overflow: hidden;
    color: #4d5845;
    font-size: .66rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.patient-detail-documents {
    min-height: 260px;
}

.panel-heading-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.panel-heading-actions>a {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 5px 0;
    border-bottom: 1px solid #c7a96f;
    color: #856a3d;
    font-size: .56rem;
    font-weight: 700;
}

.panel-heading-actions>a:hover {
    color: #5f4a28;
    border-color: #856a3d;
}

.patient-detail-appointments {
    min-height: 280px;
}

.patient-appointment-list {
    padding: 0 26px 25px;
}

.patient-appointment-item {
    position: relative;
    display: grid;
    grid-template-columns: 82px minmax(0, 1fr) 118px;
    align-items: center;
    gap: 18px;
    min-height: 120px;
    padding: 17px 0 17px 15px;
    border-top: 1px solid #ebe7de;
    border-left: 3px solid #b48b4d;
}

.patient-appointment-item.is-tone-rose {
    border-left-color: #c6818f;
}

.patient-appointment-item.is-tone-purple {
    border-left-color: #8b74b5;
}

.patient-appointment-item.is-tone-blue {
    border-left-color: #7399b9;
}

.patient-appointment-item.is-tone-brown {
    border-left-color: #9c765f;
}

.patient-appointment-item.is-status-completed {
    border-left-color: #728b65;
}

.patient-appointment-item.is-status-missed {
    border-left-color: #b9655c;
}

.patient-appointment-item.is-status-cancelled {
    border-left-color: #a2a49d;
    opacity: .74;
}

.patient-appointment-item time {
    display: grid;
    justify-items: center;
    gap: 2px;
    padding-right: 18px;
    border-right: 1px solid #ebe7de;
    color: #8e9088;
    text-align: center;
}

.patient-appointment-item time strong {
    color: #35412e;
    font: 500 1.6rem/1 var(--serif);
}

.patient-appointment-item time span {
    font-size: .5rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.patient-appointment-item time small {
    margin-top: 5px;
    color: #856a3d;
    font-size: .55rem;
    font-weight: 700;
}

.patient-appointment-copy {
    display: grid;
    gap: 7px;
    min-width: 0;
}

.patient-appointment-copy>strong {
    overflow: hidden;
    color: #465140;
    font-size: .68rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.patient-appointment-copy>p {
    overflow: hidden;
    margin: 0;
    color: #8b8e85;
    font-size: .55rem;
    line-height: 1.5;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.patient-appointment-copy>p i {
    margin-right: 4px;
    color: #a48855;
}

.patient-appointment-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 5px 13px;
}

.patient-appointment-meta small {
    color: #757b70;
    font-size: .51rem;
}

.patient-appointment-meta small i {
    width: 12px;
    margin-right: 3px;
    color: #9b8358;
    text-align: center;
}

.patient-appointment-meta .is-plan-ready {
    color: #5f7b55;
    font-weight: 700;
}

.patient-appointment-meta .is-plan-pending {
    color: #9c665d;
    font-weight: 700;
}

.patient-appointment-actions {
    display: grid;
    justify-items: end;
    gap: 11px;
}

.patient-appointment-status {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 9px;
    border-radius: 999px;
    color: #766446;
    background: #f3ecdf;
    font-size: .5rem;
    font-weight: 700;
    white-space: nowrap;
}

.patient-appointment-status.is-completed {
    color: #56704d;
    background: #e9f0e5;
}

.patient-appointment-status.is-missed {
    color: #8e4e47;
    background: #f5e4e1;
}

.patient-appointment-status.is-cancelled {
    color: #6e716a;
    background: #ecece9;
}

.patient-appointment-actions>a {
    color: #856a3d;
    font-size: .53rem;
    font-weight: 700;
    white-space: nowrap;
}

.patient-appointment-actions>a:hover {
    text-decoration: underline;
}

.patient-appointment-list.is-compact .patient-appointment-item {
    min-height: 108px;
}

.patient-consultations-page {
    max-width: 1450px;
}

.patient-consultations-header {
    align-items: flex-end;
}

.patient-consultations-panel {
    min-height: 390px;
}

.patient-consultations-panel .app-pagination {
    margin-right: 26px;
    margin-left: 26px;
}

@media (max-width: 1180px) {
    .patient-appointment-item {
        grid-template-columns: 72px minmax(0, 1fr) 105px;
        gap: 13px;
    }

    .patient-appointment-meta {
        gap: 5px 9px;
    }
}

.patient-detail-documents .document-list article {
    display: grid;
    grid-template-columns: 31px minmax(0, 1fr) auto;
}

.patient-detail-documents .document-list form {
    margin: 0;
}

.patient-detail-documents .document-list form button {
    /* padding: 7px 0 7px 12px; */
    padding: 0;
    border: 0;
    color: #985b4e;
    background: transparent;
    font: 700 .56rem var(--sans);
    cursor: pointer;
}

.patient-detail-documents .document-list form button:hover {
    color: #743f35;
    text-decoration: underline;
}

.patient-detail-upload {
    position: sticky;
    top: 28px;
    min-height: 430px;
}

.patient-detail-locked {
    display: grid;
    grid-template-columns: 35px 1fr auto;
    align-items: center;
    gap: 11px;
    padding: 11px 12px;
    border: 1px solid #dccba9;
    background: #f6f1e7;
}

.patient-detail-locked>span:nth-child(2) {
    display: grid;
    gap: 3px;
}

.patient-detail-locked small {
    color: #96978e;
    font-size: .52rem;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
}

.patient-detail-locked strong {
    color: #4b5743;
    font-size: .67rem;
}

.patient-detail-locked>b {
    color: #71865e;
    font-size: .75rem;
}

.patient-detail-upload .document-upload-form {
    padding-top: 0;
}

.patient-detail-upload .document-upload-form .dashboard-button {
    width: 100%;
}

.dashboard-modal.patient-edit-modal {
    width: min(600px, calc(100vw - 48px));
}

.patient-edit-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 17px;
}

.dashboard-modal.document-delete-modal {
    width: min(520px, calc(100vw - 48px));
}

.dashboard-modal.access-unlink-modal {
    width: min(560px, calc(100vw - 48px));
}

.document-delete-confirmation {
    text-align: center;
}

.document-delete-warning {
    display: grid;
    place-items: center;
    width: 50px;
    height: 50px;
    margin: 0 auto 18px;
    border: 1px solid #b77b6d;
    border-radius: 50%;
    color: #fff;
    background: #985b4e;
    font: 600 1.35rem var(--serif);
}

.document-delete-confirmation h2 {
    margin: 0;
    color: #33402b;
    font-family: var(--serif);
    font-size: 2.25rem;
    font-weight: 600;
}

.document-delete-confirmation>p:not(.panel-kicker) {
    margin: 17px 0 25px;
    color: #777b72;
    font-size: .7rem;
    line-height: 1.7;
}

.document-delete-confirmation>p strong {
    color: #4f5947;
}

.document-delete-confirmation .dashboard-modal-actions {
    justify-content: center;
}

.document-delete-confirm-button {
    color: #fff;
    border-color: #985b4e;
    background: #985b4e;
}

.user-detail-avatar {
    color: #4e6145;
    background: #e2eadb;
}

.user-detail-grid {
    display: grid;
    grid-template-columns: minmax(560px, 1.25fr) minmax(360px, .75fr);
    gap: 22px;
    align-items: start;
}

.user-detail-main {
    display: grid;
    gap: 22px;
}

.user-account-panel {
    min-height: 250px;
}

.user-detail-data dd {
    white-space: normal;
    overflow-wrap: anywhere;
}

.user-linked-patients {
    min-height: 260px;
}

.user-patient-list {
    padding: 0 26px 20px;
}

.user-patient-list article {
    display: grid;
    grid-template-columns: 31px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    min-height: 68px;
    border-top: 1px solid #eeeae1;
}

.user-patient-list article>span:nth-child(2) {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.user-patient-list strong,
.user-patient-list small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-patient-list strong {
    color: #4d5745;
    font-size: .67rem;
}

.user-patient-list strong a {
    color: inherit;
    border-bottom: 1px solid transparent;
}

.user-patient-list strong a:hover {
    color: #8b7042;
    border-color: #c8ae7d;
}

.user-patient-list small {
    color: #96978f;
    font-size: .55rem;
}

.user-link-panel {
    position: sticky;
    top: 28px;
    min-height: 360px;
}

.user-link-form {
    display: grid;
    gap: 17px;
    padding: 0 26px 28px;
}

.user-link-form>p {
    margin: 0 0 2px;
    color: #83867c;
    font-size: .64rem;
    line-height: 1.65;
}

.user-link-form .dashboard-button {
    justify-self: start;
}

.dashboard-modal.user-edit-modal {
    width: min(650px, calc(100vw - 48px));
}

.user-edit-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 17px;
}

.user-edit-form .dashboard-field>small {
    color: #8c6a38;
}

.dashboard-modal.password-reset-modal {
    width: min(520px, calc(100vw - 48px));
}

.password-reset-confirmation {
    text-align: center;
}

.password-reset-icon {
    border-color: #c6a66c;
    background: #536149;
}

.password-reset-confirmation h2 {
    margin: 0;
    color: #33402b;
    font-family: var(--serif);
    font-size: 2.25rem;
    font-weight: 600;
}

.password-reset-confirmation>p:not(.panel-kicker) {
    margin: 17px 0 25px;
    color: #777b72;
    font-size: .7rem;
    line-height: 1.7;
}

.password-reset-confirmation .dashboard-modal-actions {
    justify-content: center;
}

.user-password-result {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 15px 28px;
    margin: -8px 0 24px;
    padding: 20px 22px;
    border: 1px solid #d6c294;
    background: #f5efe2;
}

.user-password-result h2 {
    margin: 0;
    color: #394631;
    font-family: var(--serif);
    font-size: 1.5rem;
}

.user-password-result>div:first-child>p:last-child {
    margin: 6px 0 0;
    color: #7c8076;
    font-size: .62rem;
}

.user-password-code {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-password-code code {
    min-width: 105px;
    color: #735a32;
    font: 700 1rem var(--sans);
    letter-spacing: .09em;
}

.user-password-code button {
    padding: 8px 11px;
    border: 1px solid #aa8952;
    color: #725a34;
    background: #fffaf0;
    font: 700 .56rem var(--sans);
    cursor: pointer;
}

.user-password-result .copy-feedback {
    grid-column: 1 / -1;
    margin: 0;
}

.dashboard-modal {
    width: min(700px, calc(100vw - 48px));
    max-width: none;
    max-height: calc(100vh - 48px);
    padding: 0;
    border: 0;
    color: #46503f;
    background: transparent;
    overflow: auto;
}

.dashboard-modal::backdrop {
    background: rgba(22, 29, 18, .72);
    backdrop-filter: blur(3px);
}

.dashboard-modal-card {
    position: relative;
    border: 1px solid rgba(174, 135, 80, .65);
    background: #fffefb;
    box-shadow: 20px 20px 0 rgba(20, 28, 17, .24);
}

.modal-form-view,
.modal-success-view {
    padding: 38px 41px 40px;
}

.dashboard-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 30px;
    margin-bottom: 14px;
}

.dashboard-modal-header h2,
.modal-success-view h2 {
    margin: 0;
    color: #33402b;
    font-family: var(--serif);
    font-size: 2.35rem;
    font-weight: 600;
    line-height: 1;
}

.modal-close {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 1px solid #ddd8cc;
    color: #7c7c72;
    background: transparent;
    font: 300 1.35rem/1 var(--sans);
    cursor: pointer;
}

.modal-close:hover {
    border-color: var(--gold);
    color: #755d35;
}

.dashboard-modal-intro,
.modal-success-view>p:not(.panel-kicker):not(.copy-feedback) {
    margin: 0 0 26px;
    color: #7d8178;
    font-size: .72rem;
    line-height: 1.7;
}

.patient-create-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 17px;
}

.patient-type-selector {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 9px;
    margin: 0;
    padding: 0;
    border: 0;
}

.patient-type-selector legend,
.patient-section-label {
    grid-column: 1 / -1;
    margin: 0 0 2px;
    color: #596250;
    font-size: .58rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.patient-type-selector>label {
    position: relative;
    cursor: pointer;
}

.patient-type-selector input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.patient-type-selector label>span {
    display: grid;
    gap: 4px;
    min-height: 67px;
    padding: 13px 15px;
    border: 1px solid #dbd8ce;
    background: #fff;
    transition: border-color .18s ease, background .18s ease;
}

.patient-type-selector label>span strong {
    color: #4b5743;
    font-size: .69rem;
}

.patient-type-selector label>span small {
    color: #909188;
    font-size: .57rem;
    line-height: 1.45;
}

.patient-type-selector input:checked+span {
    border-color: var(--gold);
    background: #f7f2e8;
    box-shadow: inset 3px 0 0 var(--gold);
}

.patient-type-selector input:focus-visible+span {
    outline: 2px solid rgba(174, 135, 80, .28);
    outline-offset: 2px;
}

.patient-type-selector>small {
    grid-column: 1 / -1;
    min-height: 0;
    color: #985b4e;
    font-size: .57rem;
}

.account-mode-selector {
    margin-top: 2px;
}

.account-mode-selector[disabled] {
    opacity: .6;
}

.account-existing-field {
    margin-top: 17px;
}

[data-account-mode-section][hidden] {
    display: none;
}

.field-hint {
    margin: -2px 0 0;
    color: #8b8d84;
    font-size: .58rem;
    line-height: 1.5;
}

.patient-form-section {
    padding-top: 4px;
    border-top: 1px solid #e8e3d9;
}

.patient-form-section[hidden] {
    display: none;
}

.patient-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 17px;
}

.patient-section-label {
    margin: 15px 0 13px;
}

.patient-section-label-spaced {
    margin-top: 21px;
    padding-top: 18px;
    border-top: 1px solid #ece8de;
}

.dashboard-field {
    display: grid;
    gap: 7px;
}

.dashboard-field-full {
    grid-column: 1 / -1;
}

.dashboard-field label {
    color: #596250;
    font-size: .58rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.dashboard-field label .field-optional {
    color: #92968d;
    font-weight: 500;
    letter-spacing: 0;
    text-transform: none;
}

.dashboard-field input,
.dashboard-field select {
    width: 100%;
    height: 48px;
    padding: 0 13px;
    border: 1px solid #dbd8ce;
    border-radius: 0;
    outline: 0;
    color: #3f4937;
    background: #fff;
    font: 400 .75rem var(--sans);
}

.dashboard-field select {
    cursor: pointer;
}

.dashboard-field input:focus,
.dashboard-field select:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 2px rgba(174, 135, 80, .1);
}

.dashboard-field>small {
    min-height: 14px;
    color: #985b4e;
    font-size: .57rem;
    line-height: 1.35;
}

.modal-form-error {
    grid-column: 1 / -1;
    margin: 0;
    padding: 11px 13px;
    border-left: 2px solid #9e5f51;
    color: #75483e;
    background: #f4e8e4;
    font-size: .66rem;
}

.dashboard-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 8px;
}

.dashboard-modal-actions .dashboard-button {
    min-width: 145px;
}

.dashboard-modal-actions .dashboard-button:disabled {
    cursor: wait;
    opacity: .65;
}

.modal-success-view {
    text-align: center;
}

.modal-success-icon {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    margin: 0 auto 19px;
    border: 1px solid var(--gold);
    border-radius: 50%;
    color: #fff;
    background: #536149;
    font-family: var(--serif);
    font-size: 1.65rem;
}

.modal-success-view .panel-kicker {
    margin-bottom: 8px;
}

.modal-success-view>p:not(.panel-kicker):not(.copy-feedback) {
    max-width: 450px;
    margin: 17px auto 23px;
}

.temporary-access-card {
    display: grid;
    gap: 13px;
    padding: 20px;
    border: 1px solid #ded9cd;
    background: #f5f2ea;
    text-align: left;
}

.temporary-access-card div {
    display: grid;
    grid-template-columns: 130px 1fr;
    gap: 13px;
    align-items: center;
}

.temporary-access-card small {
    color: #8f8e84;
    font-size: .55rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.temporary-access-card strong,
.temporary-access-card code {
    overflow-wrap: anywhere;
    color: #46523d;
    font: 600 .7rem var(--sans);
}

.temporary-access-card code {
    color: #876936;
    font-size: .85rem;
    letter-spacing: .06em;
}

.copy-feedback {
    min-height: 20px;
    margin: 12px 0 0;
    color: #66745a;
    font-size: .62rem;
}

.modal-success-view .dashboard-modal-actions {
    margin-top: 6px;
}

.patient-document {
    background: #f5f4ef;
}

.patient-dashboard {
    min-height: 100vh;
    background: #f5f4ef;
}

.patient-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: min(1120px, calc(100% - 48px));
    min-height: 87px;
    margin: 0 auto;
    border-bottom: 1px solid #dedcd2;
}

.patient-nav {
    display: flex;
    align-items: center;
    gap: 28px;
    margin-left: auto;
    margin-right: 28px;
}

.patient-nav a {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 8px 0;
    border-bottom: 1px solid transparent;
    color: #777c71;
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .04em;
}

.patient-nav .is-active,
.patient-nav a:hover {
    border-color: var(--gold);
    color: #59634f;
}

.patient-logout-form {
    display: flex;
    align-items: center;
    margin: 0;
}

.patient-exit {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 40px;
    padding: 8px 0;
    border: 0;
    border-bottom: 1px solid transparent;
    color: #777c71;
    background: transparent;
    font: 700 .75rem var(--sans);
    letter-spacing: .04em;
    cursor: pointer;
}

.patient-exit:hover {
    border-color: var(--gold);
    color: #59634f;
}

.patient-exit i {
    color: var(--gold);
    font-size: .72rem;
}

.patient-main {
    width: min(920px, calc(100% - 48px));
    margin: 0 auto;
    padding: 71px 0 80px;
}

.patient-welcome {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 25px;
    margin-bottom: 38px;
}

.patient-welcome h1 {
    margin: 0 0 12px;
    color: #32402a;
    font-family: var(--serif);
    font-size: clamp(2.85rem, 5vw, 4.25rem);
    font-weight: 500;
    line-height: .9;
}

.patient-welcome>div>p:not(.eyebrow) {
    max-width: 500px;
    margin: 0;
    color: #73776d;
    font-size: .9rem;
}

.patient-account-badge {
    padding: 8px 11px;
    border: 1px solid #d9ceb8;
    color: #7e6a45;
    background: #f4efe5;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.patient-portal-message {
    margin: -15px 0 28px;
}

.current-plan {
    position: relative;
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr) auto;
    gap: 37px;
    align-items: center;
    min-height: 258px;
    padding: 30px 43px 30px 30px;
    overflow: hidden;
    background: #314027;
    color: #fffdf7;
}

.current-plan::after {
    position: absolute;
    width: 390px;
    height: 390px;
    right: -195px;
    bottom: -250px;
    border: 1px solid rgba(207, 177, 119, .33);
    border-radius: 50%;
    content: '';
}

.plan-art {
    position: relative;
    z-index: 1;
    display: grid;
    place-items: center;
    height: 196px;
    overflow: hidden;
    border: 1px solid rgba(207, 177, 119, .72);
}

.plan-art::before {
    position: absolute;
    width: 155px;
    height: 155px;
    border: 1px solid rgba(207, 177, 119, .31);
    border-radius: 50%;
    content: '';
}

.plan-art img {
    position: relative;
    z-index: 1;
    width: auto;
    height: 110px;
    object-fit: contain;
}

.plan-copy {
    position: relative;
    z-index: 1;
    min-width: 0;
}

.plan-copy .eyebrow {
    color: var(--gold-light);
}

.plan-copy h2 {
    margin: 0 0 10px;
    color: #fffdf7;
    font-family: var(--serif);
    font-size: 2.25rem;
    font-weight: 500;
    line-height: 1;
    overflow-wrap: anywhere;
}

.plan-copy>p:not(.eyebrow) {
    margin: 0 0 23px;
    color: rgba(255, 255, 255, .67);
    font-size: .875rem;
}

.patient-button {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding-bottom: 5px;
    border-bottom: 1px solid var(--gold-light);
    color: #fffdf7;
    min-height: 40px;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.patient-button i {
    color: var(--gold-light);
    font-size: .72rem;
}

.plan-label {
    position: relative;
    z-index: 1;
    align-self: start;
    padding: 6px 8px;
    border: 1px solid rgba(207, 177, 119, .5);
    color: var(--gold-light);
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .08em;
}

.patient-empty-highlight {
    display: grid;
    grid-template-columns: 75px 1fr;
    align-items: center;
    gap: 25px;
    min-height: 170px;
    padding: 30px;
    border: 1px solid #dcd7ca;
    background: #fffefb;
}

.patient-empty-highlight>span {
    display: grid;
    place-items: center;
    width: 65px;
    height: 70px;
    color: #936f37;
    background: #f1e8d9;
    font-size: .63rem;
    font-weight: 700;
}

.patient-empty-highlight h2 {
    margin: 0 0 8px;
    color: #35412e;
    font-family: var(--serif);
    font-size: 1.8rem;
    font-weight: 600;
}

.patient-empty-highlight p:not(.eyebrow) {
    margin: 0;
    color: #85887f;
    font-size: .82rem;
    line-height: 1.6;
}

.patient-profiles {
    margin-top: 48px;
}

.patient-profile-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.patient-profile-grid>a {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    align-items: center;
    gap: 13px;
    min-height: 84px;
    padding: 13px 15px;
    border: 1px solid #dfdcd2;
    background: #fffefb;
}

.patient-profile-grid>a:hover {
    border-color: #c5aa77;
    background: #fbf8f0;
}

.patient-profile-avatar {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border: 1px solid #d8c49d;
    border-radius: 50%;
    color: #6e5a38;
    background: #f1e8d8;
    font: 600 .75rem var(--serif);
}

.patient-profile-grid>a>span:nth-child(2) {
    min-width: 0;
}

.patient-profile-grid strong,
.patient-profile-grid small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.patient-profile-grid strong {
    color: #4c5844;
    font-size: .875rem;
}

.patient-profile-grid small {
    margin-top: 4px;
    color: #90928a;
    font-size: .72rem;
}

.patient-profile-grid b {
    color: #8b7042;
    font-size: .72rem;
    white-space: nowrap;
}

.patient-documents {
    margin-top: 60px;
}

.patient-section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 19px;
}

.patient-section-heading h2 {
    margin: 0;
    color: #35412e;
    font-family: var(--serif);
    font-size: 2rem;
    font-weight: 600;
    line-height: 1;
}

.patient-section-heading>span {
    color: #8d8e85;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.patient-document-group {
    scroll-margin-top: 20px;
}

.patient-document-group+.patient-document-group {
    margin-top: 24px;
}

.patient-document-group>header {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 15px;
    padding: 0 2px 10px;
}

.patient-document-group>header strong,
.patient-document-group>header small {
    display: block;
}

.patient-document-group>header strong {
    color: #526047;
    font-size: .875rem;
}

.patient-document-group>header small {
    margin-top: 3px;
    color: #94968d;
    font-size: .75rem;
}

.patient-document-group>header>span {
    color: #8e8067;
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
}

.patient-document-list {
    border-top: 1px solid #dedcd2;
    background: #fffefb;
}

.patient-document-list article {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    gap: 15px;
    align-items: center;
    min-height: 84px;
    padding: 14px 24px;
    border: 1px solid #e6e3da;
    border-top: 0;
}

.patient-file-icon {
    display: grid;
    place-items: center;
    width: 37px;
    height: 39px;
    color: #936f37;
    background: #f1e8d9;
    font-size: .65rem;
    font-weight: 700;
}

.patient-document-list strong,
.patient-document-list small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.patient-document-list strong {
    color: #4f5b46;
    font-size: .76rem;
}

.patient-document-list small {
    margin-top: 3px;
    color: #979890;
    font-size: .78rem;
}

.patient-document-list a {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #907344;
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .03em;
}

.patient-document-list a i {
    font-size: .62rem;
}

.patient-file-actions {
    display: flex;
    align-items: center;
    gap: 14px;
    white-space: nowrap;
}

.patient-file-actions a:hover {
    color: #624d2d;
    text-decoration: underline;
}

.patient-empty-state {
    padding: 25px;
    border: 1px solid #e1ded4;
    color: #7c8177;
    background: #fffefb;
}

.patient-empty-state strong {
    color: #526047;
    font-size: .875rem;
}

.patient-empty-state p {
    margin: 5px 0 0;
    font-size: .78rem;
}

.patient-empty-state-list {
    border-top: 1px solid #dedcd2;
}

.patient-help {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 25px;
    margin-top: 40px;
    padding: 23px 25px;
    border: 1px solid #e0ddd3;
    background: #eeede6;
}

.patient-help>div {
    display: flex;
    align-items: center;
    gap: 14px;
}

.patient-help>div>span {
    display: grid;
    place-items: center;
    width: 31px;
    height: 31px;
    border: 1px solid var(--gold);
    border-radius: 50%;
    color: #96743e;
    font-family: var(--serif);
    font-size: 1.12rem;
}

.patient-help strong {
    color: #556047;
    font-size: .875rem;
}

.patient-help p {
    margin: 2px 0 0;
    color: #85887f;
    font-size: .78rem;
}

.patient-help>a {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    flex: 0 0 auto;
    color: #8b6f3e;
    min-height: 40px;
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .04em;
}

.patient-help>a i {
    font-size: .62rem;
}

.patient-legal {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 7px;
    margin-top: 29px;
    color: #a08f70;
    text-align: center;
}

.patient-legal span {
    color: #c0a570;
}

.patient-legal a {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    font-size: .7rem;
}

.legal-document {
    background: #eef0e9;
}

.legal-page {
    min-height: 100vh;
    background: linear-gradient(145deg, #edf0e9, #f8f7f1);
}

.legal-layout {
    width: min(960px, calc(100% - 48px));
    margin: 0 auto;
    padding: 36px 0 66px;
}

.legal-brand {
    color: #394331;
}

.legal-content {
    margin-top: 52px;
    padding: clamp(35px, 7vw, 70px);
    border: 1px solid rgba(174, 135, 80, .45);
    background: rgba(255, 254, 250, .91);
    box-shadow: 17px 17px 0 rgba(174, 135, 80, .1);
}

.legal-content h1 {
    margin: 4px 0 9px;
    color: #324029;
    font-size: clamp(2.8rem, 6vw, 4.3rem);
    line-height: .95;
}

.legal-updated {
    margin: 0;
    color: #8b8e85;
    font-size: .65rem;
    letter-spacing: .04em;
}

.legal-notice {
    margin: 31px 0 29px;
    padding: 16px 18px;
    border-left: 2px solid var(--gold);
    color: #6d7169;
    background: #f3f1ea;
    font-size: .72rem;
    line-height: 1.65;
}

.legal-notice strong {
    color: #546047;
}

.legal-toc {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 19px;
    margin: 0 0 41px;
    padding: 15px 0;
    border-top: 1px solid #e3e0d6;
    border-bottom: 1px solid #e3e0d6;
}

.legal-toc a {
    color: #8c7040;
    font-size: .6rem;
    font-weight: 700;
    letter-spacing: .04em;
}

.legal-content section {
    padding-top: 30px;
}

.legal-content section+section {
    margin-top: 30px;
    border-top: 1px solid #e7e4da;
}

.legal-content h2 {
    margin: 0 0 12px;
    color: #3b4733;
    font-size: clamp(1.75rem, 3vw, 2.25rem);
    line-height: 1;
}

.legal-content p,
.legal-content li {
    color: #6c716a;
    font-size: .78rem;
    line-height: 1.8;
}

.legal-content p {
    margin: 0 0 13px;
}

.legal-content p:last-child {
    margin-bottom: 0;
}

.legal-content ul {
    margin: 0 0 14px;
    padding-left: 20px;
}

.legal-content li+li {
    margin-top: 5px;
}

.inline-link {
    border-bottom: 1px solid var(--gold);
    color: #806636;
    font-weight: 700;
}

.legal-footer {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-top: 26px;
}

.legal-footer a {
    color: #586350;
    font-size: .63rem;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.legal-footer a:last-child {
    color: #8e7041;
}

.notfound-document {
    background: #edf0e8;
}

.notfound-page {
    min-height: 100vh;
    background: linear-gradient(145deg, #eff1eb, #f8f7f1);
}

.notfound-layout {
    position: relative;
    display: grid;
    place-items: center;
    min-height: 100vh;
    padding: 112px 24px 65px;
    overflow: hidden;
}

.notfound-layout::before,
.notfound-layout::after {
    position: absolute;
    border: 1px solid rgba(174, 135, 80, .3);
    border-radius: 50%;
    content: '';
}

.notfound-layout::before {
    width: 610px;
    height: 610px;
    top: -350px;
    right: -170px;
}

.notfound-layout::after {
    width: 410px;
    height: 410px;
    bottom: -250px;
    left: -120px;
}

.notfound-brand {
    position: absolute;
    z-index: 1;
    top: 32px;
    left: max(24px, calc((100% - 1120px) / 2));
}

.notfound-card {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: .85fr 1.15fr;
    gap: clamp(45px, 8vw, 105px);
    align-items: center;
    width: min(100%, 920px);
    padding: 58px;
    border: 1px solid rgba(174, 135, 80, .5);
    background: rgba(255, 254, 250, .84);
    box-shadow: 19px 19px 0 rgba(174, 135, 80, .1);
}

.notfound-card h1 {
    max-width: 475px;
    margin-bottom: 18px;
    color: #324029;
    font-size: clamp(2.7rem, 4.8vw, 4.35rem);
}

.notfound-card>div:last-child>p:not(.eyebrow) {
    max-width: 450px;
    margin-bottom: 28px;
    color: #6f756b;
    font-size: .88rem;
}

.notfound-art {
    position: relative;
    display: grid;
    place-items: center;
    min-height: 258px;
    color: var(--gold);
}

.notfound-art::before {
    position: absolute;
    width: 215px;
    height: 215px;
    border: 1px solid rgba(174, 135, 80, .56);
    border-radius: 50%;
    content: '';
}

.notfound-art::after {
    position: absolute;
    width: 278px;
    height: 166px;
    border: 1px solid rgba(62, 71, 48, .2);
    border-radius: 50%;
    content: '';
    transform: rotate(-37deg);
}

.notfound-art span {
    position: relative;
    z-index: 1;
    font-family: var(--serif);
    font-size: clamp(6.2rem, 12vw, 9rem);
    font-weight: 500;
    line-height: 1;
}

.notfound-art i {
    position: absolute;
    z-index: 1;
    width: 122px;
    height: 1px;
    bottom: 37px;
    background: var(--ink);
    transform: rotate(-33deg);
}

/* O segundo critério mantém o layout móvel no Safari iOS mesmo quando o navegador preserva um viewport de desktop. */
@media screen and (max-width: 850px),
screen and (max-device-width: 850px) {

    .legal-layout {
        width: min(100% - 40px, 620px);
        padding-top: 27px;
    }

    .legal-content {
        margin-top: 39px;
    }

    .patient-header {
        width: min(100% - 40px, 620px);
        min-height: 75px;
    }

    .patient-nav {
        gap: 17px;
        margin-right: 18px;
    }

    .patient-nav a {
        font-size: .72rem;
    }

    .patient-main {
        width: min(100% - 40px, 620px);
        padding: 53px 0 62px;
    }

    .patient-welcome {
        margin-bottom: 30px;
    }

    .current-plan {
        grid-template-columns: 140px 1fr;
        gap: 25px;
        min-height: 222px;
        padding: 25px;
    }

    .plan-art {
        height: 170px;
    }

    .plan-art img {
        height: 93px;
    }

    .plan-label {
        position: absolute;
        top: 18px;
        right: 18px;
    }

    .patient-documents {
        margin-top: 48px;
    }

    .patient-profile-grid {
        grid-template-columns: 1fr;
    }

    .notfound-card {
        grid-template-columns: 1fr;
        gap: 10px;
        padding: 44px;
    }

    .notfound-art {
        min-height: 180px;
    }

    .notfound-art i {
        bottom: 12px;
    }

    .site-header,
    .section-wrap,
    .site-footer {
        width: min(100% - 40px, 620px);
    }

    .site-header {
        min-height: 78px;
    }

    .menu-toggle {
        display: block;
        position: relative;
        z-index: 3;
    }

    .menu-toggle.is-open span:first-child {
        transform: translateY(7px) rotate(45deg);
    }

    .menu-toggle.is-open span:nth-child(2) {
        opacity: 0;
    }

    .menu-toggle.is-open span:last-child {
        transform: translateY(-7px) rotate(-45deg);
    }

    .main-menu {
        position: absolute;
        z-index: 2;
        top: 77px;
        right: 0;
        left: 0;
        display: none;
        padding: 24px 20px 31px;
        align-items: flex-start;
        flex-direction: column;
        gap: 21px;
        background: var(--cream);
        box-shadow: 0 12px 15px rgba(41, 49, 32, .07);
    }

    .main-menu.is-open {
        display: flex;
    }

    .hero {
        grid-template-columns: 1fr;
        min-height: auto;
        padding: 80px 20px 42px;
    }

    .hero-content {
        width: min(100%, 620px);
        margin: 0 auto;
        padding: 0;
    }

    .hero-art {
        width: 100%;
        max-width: 620px;
        height: clamp(360px, 112vw, 500px);
        min-height: 0;
        margin: 52px auto 0;
    }

    .gold-frame {
        inset: 0 10px;
    }

    .hero-portrait {
        inset: 0 10px;
    }

    .hero-portrait img {
        object-position: center top;
    }

    .intro {
        padding: 88px 0;
    }

    .section-heading {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .values-grid {
        grid-template-columns: 1fr;
        gap: 31px;
        margin-top: 53px;
    }

    .care-section {
        grid-template-columns: 1fr;
    }

    .care-visual {
        min-height: 380px;
    }

    .care-logo {
        height: 245px;
    }

    .care-copy {
        max-width: 620px;
        margin: 0 auto;
        padding: 81px 20px;
    }

    .patient-inner {
        grid-template-columns: 1fr;
        gap: 17px;
        min-height: 0;
        padding-top: 74px;
        padding-bottom: 76px;
    }

    .patient-identity {
        min-height: 240px;
    }

    .patient-identity img {
        height: 175px;
    }

    .patient-orbit {
        width: 224px;
        height: 224px;
    }

    .patient-orbit::before {
        width: 285px;
        height: 170px;
        top: 27px;
        left: -31px;
    }

    .patient-orbit::after {
        width: 144px;
        height: 275px;
        top: -25px;
        left: 39px;
    }

    .patient-copy {
        max-width: 620px;
    }

    .contact-section {
        grid-template-columns: 1fr;
        gap: 45px;
        padding-top: 88px;
        padding-bottom: 88px;
    }
}

@media (max-width: 480px) {

    .password-help-card {
        padding: 39px 23px 31px;
        box-shadow: 10px 10px 0 rgba(21, 29, 18, .18);
    }

    .password-help-card h2 {
        font-size: 1.9rem;
    }

    .password-help-card>p:not(.eyebrow) {
        font-size: .68rem;
    }

    .password-help-whatsapp {
        padding-right: 14px;
        padding-left: 14px;
        font-size: .58rem;
    }

    .patient-header {
        width: calc(100% - 32px);
        flex-wrap: wrap;
        min-height: auto;
        padding: 15px 0 13px;
        gap: 12px;
    }

    .patient-header .brand-logo {
        height: 32px;
    }

    .patient-header .brand-copy strong {
        font-size: 1rem;
    }

    .patient-header .brand-copy small {
        font-size: .56rem;
    }

    .patient-nav {
        order: 3;
        width: 100%;
        justify-content: space-around;
        margin: 1px 0 0;
        padding-top: 12px;
        border-top: 1px solid #dedcd2;
    }

    .patient-nav a {
        font-size: .75rem;
    }

    .patient-exit {
        margin-left: auto;
        font-size: .75rem;
    }

    .patient-main {
        width: calc(100% - 32px);
        padding-top: 43px;
    }

    .patient-welcome {
        display: block;
    }

    .patient-account-badge {
        display: inline-block;
        margin-top: 20px;
    }

    .current-plan {
        display: grid;
        grid-template-columns: 76px minmax(0, 1fr);
        gap: 16px;
        min-height: 0;
        padding: 20px;
    }

    .plan-art {
        width: auto;
        height: 92px;
        margin: 0;
    }

    .plan-art::before {
        width: 74px;
        height: 74px;
    }

    .plan-art img {
        height: 53px;
    }

    .plan-copy .eyebrow {
        margin-bottom: 7px;
        padding-right: 43px;
        font-size: .62rem;
    }

    .plan-copy h2 {
        font-size: 1.72rem;
    }

    .plan-copy>p:not(.eyebrow) {
        margin-bottom: 13px;
        font-size: .78rem;
    }

    .patient-button {
        gap: 7px;
        font-size: .72rem;
    }

    .plan-label {
        top: 12px;
        right: 12px;
    }

    .patient-empty-highlight {
        grid-template-columns: 55px 1fr;
        gap: 16px;
        padding: 22px 18px;
    }

    .patient-empty-highlight>span {
        width: 52px;
        height: 58px;
    }

    .patient-empty-highlight h2 {
        font-size: 1.45rem;
    }

    .patient-profiles {
        margin-top: 39px;
    }

    .patient-profile-grid>a {
        grid-template-columns: 38px minmax(0, 1fr) auto;
        padding: 12px;
    }

    .patient-documents {
        margin-top: 39px;
    }

    .patient-section-heading h2 {
        font-size: 1.78rem;
    }

    .patient-document-list article {
        grid-template-columns: 38px minmax(0, 1fr);
        gap: 12px;
        min-height: 91px;
        padding: 14px;
    }

    .patient-file-actions {
        grid-column: 2;
        flex-wrap: wrap;
        gap: 10px 15px;
        margin-top: -4px;
    }

    .patient-help {
        display: block;
        padding: 20px;
    }

    .patient-help>a {
        display: inline-flex;
        margin-top: 18px;
    }

    .legal-layout {
        width: calc(100% - 32px);
        padding: 22px 0 45px;
    }

    .legal-content {
        margin-top: 30px;
        padding: 31px 23px;
    }

    .legal-content h1 {
        font-size: 2.7rem;
    }

    .legal-toc {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 9px 14px;
        margin-bottom: 33px;
    }

    .legal-content section {
        padding-top: 25px;
    }

    .legal-content section+section {
        margin-top: 25px;
    }

    .legal-footer {
        align-items: flex-start;
        flex-direction: column;
        gap: 9px;
        margin-top: 20px;
    }

    .notfound-layout {
        align-items: start;
        padding: 118px 16px 55px;
    }

    .notfound-brand {
        top: 22px;
        left: 16px;
    }

    .notfound-card {
        padding: 31px 24px 35px;
    }

    .notfound-art {
        min-height: 147px;
    }

    .notfound-art::before {
        width: 145px;
        height: 145px;
    }

    .notfound-art::after {
        width: 194px;
        height: 116px;
    }

    .notfound-art i {
        width: 82px;
        bottom: 15px;
    }

    .notfound-card h1 {
        font-size: 2.6rem;
    }

    .site-header,
    .section-wrap,
    .site-footer {
        width: calc(100% - 32px);
    }

    .brand-logo {
        width: auto;
        height: 35px;
    }

    .brand-copy strong {
        font-size: 1.12rem;
    }

    h1 {
        font-size: 2.85rem;
    }

    h2 {
        font-size: 2.45rem;
    }

    .hero {
        padding-top: 63px;
    }

    .hero-actions {
        align-items: flex-start;
        flex-direction: column;
        gap: 18px;
    }

    .hero-art {
        height: clamp(360px, 112vw, 440px);
        min-height: 0;
        margin-top: 42px;
    }

    .art-logo {
        height: 117px;
    }

    .art-name {
        font-size: 1.8rem;
    }

    .hero-portrait figcaption {
        min-width: 167px;
        padding: 13px 15px;
        font-size: 1.16rem;
    }

    .care-copy {
        padding-left: 16px;
        padding-right: 16px;
    }

    .contact-card {
        padding: 31px 25px;
    }

    .portal-layout {
        align-items: start;
        padding-top: 119px;
    }

    .portal-card {
        padding: 39px 25px;
    }

    .portal-brand {
        top: 22px;
        left: 16px;
    }

    .site-footer {
        align-items: flex-start;
        flex-direction: column;
        justify-content: center;
        padding: 26px 0;
    }

    .footer-info {
        justify-items: start;
        gap: 8px;
    }

    .legal-links {
        justify-content: flex-start;
    }
}
