:root {
    color-scheme: light;
    --paper: #f5f5ef;
    --white: #fffefa;
    --ink: #202820;
    --muted: #737b70;
    --line: #e5e7dc;
    --green: #526e43;
    --green-deep: #344a32;
    --green-pale: #e8eee2;
    --lime: #d6e4a1;
    --rust: #bd6345;
    --soft-rust: #f4e6dc;
    --serif: "Newsreader", Georgia, serif;
    --sans: "DM Sans", "Segoe UI", sans-serif;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-width: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--sans);
    font-size: 14px;
}
.appearance-toggle {
    display: flex;
    min-height: 56px;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    cursor: pointer;
}
.appearance-toggle-copy {
    display: grid;
    gap: 4px;
}
.appearance-toggle-copy strong {
    color: var(--ink);
    font-size: 13px;
}
.appearance-toggle-copy small,
.appearance-message {
    color: var(--muted);
    font-size: 11px;
}
.appearance-toggle input {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    clip-path: inset(50%);
}
.appearance-switch {
    position: relative;
    width: 42px;
    height: 24px;
    flex: 0 0 42px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--line);
    transition: background-color 0.18s ease;
}
.appearance-switch::after {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--white);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    content: "";
    transition: transform 0.18s ease;
}
.appearance-toggle input:checked + .appearance-switch {
    background: var(--green);
}
.appearance-toggle input:checked + .appearance-switch::after {
    transform: translateX(18px);
}
.appearance-toggle input:focus-visible + .appearance-switch {
    outline: 2px solid var(--green);
    outline-offset: 3px;
}
.appearance-message:not([hidden]) {
    margin: 8px 0 0;
}
button,
input,
textarea,
select {
    font: inherit;
}
button,
a {
    -webkit-tap-highlight-color: transparent;
}
button {
    color: inherit;
}
[hidden] {
    display: none !important;
}

.auth-screen {
    display: grid;
    grid-template-columns: minmax(340px, 1.05fr) minmax(420px, 0.95fr);
    min-height: 100vh;
}
.auth-story {
    position: relative;
    display: flex;
    min-height: 720px;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    padding: 44px 50px 32px;
    color: #fffdf4;
    background: #344a32;
}
.story-image,
.story-shade {
    position: absolute;
    inset: 0;
}
.story-image {
    background-image: url("/static/nutrition-consultation.jpg?v=3");
    background-position: center;
    background-size: cover;
    transform: scale(1.01);
}
.story-shade {
    background: linear-gradient(
        180deg,
        rgba(25, 38, 25, 0.43),
        rgba(26, 40, 28, 0.19) 35%,
        rgba(23, 36, 25, 0.79)
    );
}
.story-copy,
.story-foot {
    position: relative;
    z-index: 1;
}
.eyebrow {
    display: block;
    color: rgba(255, 255, 255, 0.77);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.55px;
}
.eyebrow-green {
    color: var(--green);
}
.story-copy h1 {
    margin: 19px 0 15px;
    font-family: var(--serif);
    font-size: clamp(48px, 5.4vw, 76px);
    font-weight: 500;
    letter-spacing: 0;
    line-height: 0.99;
}
.story-copy p {
    max-width: 370px;
    margin: 0;
    color: rgba(255, 255, 255, 0.82);
    font-size: 15px;
    line-height: 1.7;
}
.story-foot {
    display: flex;
    align-items: center;
    gap: 12px;
    color: rgba(255, 255, 255, 0.76);
    font-size: 11px;
}
.story-foot > span:first-child {
    color: var(--lime);
    font-size: 10px;
    font-weight: 700;
}
.story-rule {
    width: 46px;
    height: 1px;
    background: rgba(255, 255, 255, 0.57);
}

.auth-main {
    display: flex;
    min-height: 100vh;
    flex-direction: column;
    justify-content: space-between;
    padding: 40px clamp(32px, 7vw, 100px) 25px;
    background: var(--white);
}
.auth-mobile-brand {
    display: none;
}
.auth-wrap {
    width: min(100%, 400px);
    margin: 30px auto;
}
.auth-intro h2 {
    margin: 13px 0 8px;
    font-family: var(--serif);
    font-size: 42px;
    font-weight: 500;
    letter-spacing: 0;
    line-height: 1.1;
}
.auth-intro p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.6;
}
.auth-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    margin: 31px 0 23px;
    gap: 6px;
    padding: 5px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--green-pale);
}
.auth-tabs.has-admin-setup {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}
.auth-tab {
    position: relative;
    min-height: 38px;
    padding: 7px 8px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #858b80;
    cursor: pointer;
    font-weight: 600;
}
.auth-tab::after {
    position: absolute;
    right: 0;
    bottom: 1px;
    left: 20%;
    width: 60%;
    height: 2px;
    background: transparent;
    content: "";
}
.auth-tab.is-active {
    color: var(--green-deep);
}
.auth-tab.is-active::after {
    background: var(--green);
    border-radius: 2px;
}
.auth-form {
    display: grid;
    gap: 10px;
}
.field-label {
    display: block;
    margin: 5px 0 0;
    color: #394236;
    font-size: 12px;
    font-weight: 600;
}
.auth-form input:not([type="radio"]) {
    width: 100%;
    min-height: 48px;
    padding: 0 14px;
    border: 1px solid #dfe3d9;
    border-radius: 4px;
    outline: none;
    background: #fff;
    color: var(--ink);
    transition:
        border-color 0.18s,
        box-shadow 0.18s;
}
.auth-form input::placeholder,
.text-input::placeholder,
textarea::placeholder {
    color: #a0a49b;
}
.auth-form input:focus,
.text-input:focus,
textarea:focus,
select:focus {
    border-color: var(--green);
    box-shadow: 0 0 0 3px rgba(82, 110, 67, 0.11);
    outline: 0;
}
.auth-submit {
    width: 100%;
    justify-content: space-between;
    margin-top: 10px;
}
.button {
    display: inline-flex;
    min-height: 45px;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 0 17px;
    border: 0;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition:
        background 0.18s,
        transform 0.18s;
}
.button:disabled {
    cursor: wait;
    opacity: 0.65;
}
.button-primary {
    background: var(--green-deep);
    color: white;
}
.button-primary:hover:not(:disabled) {
    transform: translateY(-1px);
    background: #273a27;
}
.button-arrow {
    font-size: 18px;
    font-weight: 400;
}
.auth-note {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 27px 0 0;
    color: var(--muted);
    font-size: 11px;
}
.note-dot,
.status-dot {
    width: 7px;
    height: 7px;
    flex: 0 0 7px;
    border-radius: 50%;
    background: #8ba36a;
}
.auth-footer {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    color: #90958d;
    font-size: 10px;
}
.auth-footer a {
    color: var(--green);
    text-decoration: none;
}
.auth-footer a:hover,
.sidebar-docs:hover {
    text-decoration: underline;
}
.form-message {
    margin: 0 0 18px;
    padding: 11px 13px;
    border: 1px solid #e8c1ad;
    border-radius: 4px;
    background: var(--soft-rust);
    color: #793b27;
    font-size: 12px;
    line-height: 1.5;
}
.form-message.success {
    border-color: #cbd9bd;
    background: var(--green-pale);
    color: var(--green-deep);
}
.admin-setup-notice {
    margin: 0 0 7px;
    padding: 10px 12px;
    border-left: 2px solid var(--rust);
    background: #f8f0e9;
    color: #75513f;
    font-size: 10px;
    line-height: 1.55;
}
.role-picker {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin: 0 0 4px;
    padding: 0;
    border: 0;
}
.role-picker legend {
    grid-column: 1 / -1;
    margin-bottom: 2px;
}
.role-option {
    position: relative;
    display: block;
}
.role-option input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}
.role-option span {
    display: grid;
    min-height: 43px;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 4px;
    color: var(--muted);
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
}
.role-option.is-selected span {
    border-color: var(--green);
    background: #f0f4eb;
    color: var(--green-deep);
}
.role-option input:focus-visible + span {
    outline: 2px solid var(--green);
    outline-offset: 2px;
}
#dietitianFields,
#clientFields {
    display: grid;
    gap: 10px;
}

.professional-verification-fields {
    margin-top: 8px;
    padding: 18px;
    border: 1px solid var(--green);
    border-left: 4px solid var(--green);
    border-radius: 10px;
    background: var(--green-pale);
    color: var(--ink);
}
.professional-verification-title {
    color: var(--green-deep);
    font-size: 14px;
}
.professional-verification-help {
    margin: 0;
    font-size: 12px;
    line-height: 1.6;
}

.workspace {
    min-height: 100vh;
}
.workspace-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 5;
    display: flex;
    width: 246px;
    flex-direction: column;
    padding: 29px 17px 20px;
    border-right: 1px solid var(--line);
    background: #fbfbf7;
}
.sidebar-label {
    margin: 0 0 11px 11px;
    color: #959a90;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 1.5px;
}
.side-nav {
    display: grid;
    max-height: calc(100vh - 190px);
    gap: 4px;
    overflow-y: auto;
}
.nav-section-label {
    padding: 10px 11px 3px;
    color: #959a90;
    font-size: 8px;
    font-weight: 700;
    letter-spacing: 1px;
}
.nav-subitem {
    min-height: 34px;
    padding-left: 27px;
    font-size: 11px;
}
.nav-item,
.signout-button {
    display: flex;
    min-height: 43px;
    align-items: center;
    gap: 12px;
    padding: 0 11px;
    border: 0;
    border-radius: 4px;
    background: transparent;
    color: #626b60;
    cursor: pointer;
    text-align: left;
    font-size: 12px;
    font-weight: 500;
}
.nav-item:hover,
.signout-button:hover {
    background: #f0f2eb;
    color: var(--green-deep);
}
.nav-item.is-current {
    background: var(--green-pale);
    color: var(--green-deep);
    font-weight: 700;
}
.nav-glyph {
    display: inline-grid;
    width: 18px;
    place-items: center;
    color: var(--green);
    font-size: 16px;
    line-height: 1;
}
.nav-count {
    display: grid;
    min-width: 20px;
    height: 20px;
    place-items: center;
    margin-left: auto;
    border-radius: 50%;
    background: var(--soft-rust);
    color: #874b34;
    font-size: 10px;
    font-weight: 700;
}
.sidebar-bottom {
    display: grid;
    gap: 10px;
    margin-top: auto;
}
.connection-status {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 11px 15px;
    border-bottom: 1px solid var(--line);
    color: #747c70;
    font-size: 10px;
}
.connection-status .status-dot {
    background: #74a45d;
    box-shadow: 0 0 0 3px #e8eee2;
}
.signout-button {
    min-height: 37px;
}
.sidebar-docs {
    padding: 4px 11px;
    color: #858b80;
    font-size: 10px;
    text-decoration: none;
}
.workspace-main {
    min-height: 100vh;
    margin-left: 246px;
}
.workspace-header {
    position: sticky;
    top: 0;
    z-index: 4;
    display: flex;
    min-height: 78px;
    align-items: center;
    justify-content: space-between;
    padding: 0 43px;
    border-bottom: 1px solid var(--line);
    background: rgba(255, 254, 250, 0.96);
}
.header-context {
    display: grid;
    gap: 5px;
}
.header-context .eyebrow {
    font-size: 9px;
}
.header-date {
    color: #777f74;
    font-size: 11px;
}
.profile-chip {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #465043;
    font-size: 11px;
    font-weight: 600;
}
/* Shared avatar account menu for all user roles. */
.account-menu { position: relative; margin-left: auto; }
.account-menu-trigger { border: 0; background: transparent; padding: 8px; border-radius: 12px; cursor: pointer; font: inherit; }
.account-menu-trigger:hover, .account-menu-trigger:focus-visible { background: #f0f5e9; }
.account-menu-trigger:focus-visible, .account-menu-item:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
.account-chevron { color: #657568; font-size: 13px; }
.account-menu-panel { position: absolute; top: calc(100% + 8px); right: 0; z-index: 100; width: min(260px, calc(100vw - 30px)); background: #fff; border: 1px solid var(--line); border-radius: 15px; padding: 8px; box-shadow: 0 16px 38px rgba(24, 46, 30, .14); }
.account-menu-panel[hidden] { display: none; }
.account-menu-heading { display: grid; gap: 4px; padding: 10px 12px 13px; border-bottom: 1px solid var(--line); margin-bottom: 5px; overflow-wrap: anywhere; }
.account-menu-heading strong { font-size: 13px; color: var(--green-deep); }
.account-menu-heading span { font-size: 11px; color: #687668; }
.account-menu-item { display: block; width: 100%; text-align: left; background: transparent; border: 0; border-radius: 8px; padding: 11px 12px; font: inherit; font-size: 12px; color: #364b39; cursor: pointer; }
.account-menu-item:hover { background: #f0f5e9; }
.account-menu-signout { border-top: 1px solid var(--line); margin-top: 3px; color: #8d443d; }
.profile-avatar {
    display: grid;
    width: 32px;
    height: 32px;
    place-items: center;
    border-radius: 50%;
    background: #e2ead7;
    color: var(--green-deep);
    font-size: 10px;
    font-weight: 700;
}
.profile-avatar-image {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}
.profile-photo-preview {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    object-fit: cover;
    background: #e2ead7;
}
.profile-photo-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    gap: 12px;
    margin-top: 16px;
}
[data-profile-photo-message][data-kind="error"] { color: #8d443d; }
[data-profile-photo-message][data-kind="success"] { color: var(--green-deep); }
.mobile-signout {
    display: none;
    min-height: 32px;
    padding: 0 8px;
    border: 0;
    background: transparent;
    color: var(--green);
    cursor: pointer;
    font-size: 10px;
    font-weight: 600;
}
.workspace-content {
    width: min(100%, 1180px);
    margin: 0 auto;
    padding: 43px;
}
.page-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 29px;
}
.page-heading h1 {
    margin: 8px 0 0;
    font-family: var(--serif);
    font-size: 39px;
    font-weight: 500;
    line-height: 1.06;
}
.page-heading p {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 12px;
}
.eyebrow-plain {
    color: var(--green);
}
.account-id {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 8px 12px;
    margin: -11px 0 19px;
    color: #737b70;
    font-size: 10px;
}
.account-id span:first-child {
    color: var(--green);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 1px;
}
.account-id strong {
    color: var(--green-deep);
    font-size: 11px;
}
.quiet-button {
    border: 1px solid #dce2d5;
    background: transparent;
    color: var(--green-deep);
}
.quiet-button:hover {
    background: #edf2e8;
}
.overview-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(240px, 0.8fr);
    gap: 17px;
}
.feature-panel {
    min-height: 258px;
    padding: 25px;
    border-radius: 5px;
    background: var(--green-deep);
    color: #fffef5;
}
.feature-panel .eyebrow {
    color: var(--lime);
}
.feature-panel h2 {
    max-width: 410px;
    margin: 13px 0 9px;
    font-family: var(--serif);
    font-size: 30px;
    font-weight: 500;
    line-height: 1.08;
}
.feature-panel p {
    max-width: 400px;
    margin: 0 0 19px;
    color: rgba(255, 255, 255, 0.72);
    font-size: 11px;
    line-height: 1.6;
}
.button-lime {
    min-height: 39px;
    background: var(--lime);
    color: var(--green-deep);
    font-size: 11px;
}
.button-lime:hover {
    background: #e2edb6;
}
.stat-panel,
.content-panel {
    border: 1px solid var(--line);
    border-radius: 5px;
    background: var(--white);
}
.stat-panel {
    display: flex;
    min-height: 258px;
    flex-direction: column;
    justify-content: space-between;
    padding: 23px;
}
.stat-label {
    color: var(--muted);
    font-size: 11px;
}
.stat-number {
    display: block;
    margin: 8px 0 3px;
    font-family: var(--serif);
    font-size: 48px;
    line-height: 1;
}
.stat-caption {
    color: #8a9087;
    font-size: 10px;
}
.stat-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 15px;
    border-top: 1px solid var(--line);
    color: var(--green);
    cursor: pointer;
    font-size: 11px;
    font-weight: 600;
}
.section-heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 15px;
    margin: 31px 0 13px;
}
.section-heading h2 {
    margin: 0;
    font-family: var(--serif);
    font-size: 22px;
    font-weight: 500;
}
.section-heading span {
    color: #858b80;
    font-size: 10px;
}
.quick-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}
.quick-link {
    display: flex;
    min-height: 103px;
    flex-direction: column;
    justify-content: space-between;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 5px;
    background: var(--white);
    color: var(--ink);
    cursor: pointer;
    text-align: left;
}
.quick-link:hover {
    border-color: #b7c6a9;
    background: #fcfdf8;
}
.quick-link strong {
    font-size: 11px;
    font-weight: 600;
}
.quick-link span {
    color: var(--green);
    font-size: 18px;
}
.client-home-feature {
    margin-bottom: 25px;
}
.admin-stat-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}
.admin-stat {
    display: grid;
    min-height: 94px;
    align-content: space-between;
    padding: 14px;
    border: 1px solid var(--line);
    background: var(--white);
}
.admin-stat span {
    color: var(--muted);
    font-size: 10px;
}
.admin-stat strong {
    color: var(--green-deep);
    font-family: var(--serif);
    font-size: 28px;
    font-weight: 500;
    line-height: 1;
}
.admin-quick-grid {
    margin-bottom: 20px;
}
.admin-table-wrap {
    width: 100%;
    overflow-x: auto;
    border-top: 1px solid var(--line);
    background: var(--white);
}
.admin-data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 11px;
    text-align: left;
}
.admin-data-table th,
.admin-data-table td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--line);
    vertical-align: top;
}
.admin-data-table th {
    background: #f0f3ea;
    color: #667260;
    font-size: 9px;
    font-weight: 700;
    white-space: nowrap;
}
.admin-data-table td {
    color: #4f594c;
}
.admin-branch-form-panel {
    margin-bottom: 20px;
}
.profile-details {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: 0;
}
.profile-details > div {
    padding: 14px 12px 13px 0;
    border-bottom: 1px solid var(--line);
}
.profile-details dt,
.goal-current span {
    color: var(--muted);
    font-size: 10px;
}
.profile-details dd {
    margin: 5px 0 0;
    color: var(--ink);
    font-size: 13px;
    font-weight: 600;
    overflow-wrap: anywhere;
}
.health-edit-panel {
    margin-top: 15px;
}
.goal-list,
.appointment-list {
    display: grid;
    gap: 9px;
}
.goal-row,
.appointment-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    padding: 15px;
    border-bottom: 1px solid var(--line);
    background: var(--white);
}
.goal-row h3,
.appointment-row h3 {
    margin: 4px 0 0;
    color: var(--green-deep);
    font-family: var(--serif);
    font-size: 18px;
    font-weight: 500;
}
.goal-current {
    display: grid;
    justify-items: end;
    gap: 4px;
}
.goal-current strong {
    font-size: 12px;
}
.appointment-row > span {
    color: var(--muted);
    font-size: 10px;
    overflow-wrap: anywhere;
}
.appointment-status {
    display: inline-flex;
    padding: 5px 8px;
    border-radius: 3px;
    background: #f5ecda;
    color: #765e2f;
    font-size: 8px;
    font-weight: 700;
    letter-spacing: 0.5px;
}
.status-confirmed {
    background: var(--green-pale);
    color: var(--green-deep);
}
.status-rejected,
.status-cancelled {
    background: var(--soft-rust);
    color: #874b34;
}
.appointment-request-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 15px;
    padding: 16px;
    border-bottom: 1px solid var(--line);
    background: var(--white);
}
.appointment-request-details h2 {
    margin: 8px 0 3px;
    color: var(--green-deep);
    font-family: var(--serif);
    font-size: 18px;
    font-weight: 500;
}
.appointment-request-details p,
.appointment-note {
    margin: 0;
    color: var(--muted);
    font-size: 10px;
}
.appointment-booking-form {
    margin-top: 16px;
}

/* Dietitian appointments calendar */
.appointment-calendar-panel {
    margin-bottom: 18px;
    padding: 18px;
}

.calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.calendar-header h2 {
    margin: 0;
    color: var(--green-deep);
    font-family: var(--serif);
    font-size: 22px;
    font-weight: 500;
}

.calendar-weekdays,
.appointment-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 7px;
}

.calendar-weekdays span {
    padding: 8px 0;
    color: var(--muted);
    font-size: 10px;
    font-weight: 700;
    text-align: center;
}

.calendar-day {
    display: flex;
    min-height: 76px;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--white);
    color: var(--ink);
    cursor: pointer;
    text-align: left;
}

.calendar-day:hover {
    border-color: var(--green-deep);
}

.calendar-day.is-selected {
    border-color: var(--green-deep);
    background: var(--green-pale);
}

.calendar-day.is-today .calendar-day-number {
    color: var(--green-deep);
    font-weight: 800;
}

.calendar-day-empty {
    min-height: 76px;
}

.calendar-day-number {
    font-size: 13px;
    font-weight: 600;
}

.calendar-day-count {
    color: var(--muted);
    font-size: 9px;
    line-height: 1.3;
}

.appointment-day-agenda {
    display: grid;
    gap: 15px;
}

.appointment-queue-section {
    padding: 18px;
}

.appointment-queue-section h3 {
    margin: 0 0 5px;
    color: var(--green-deep);
    font-family: var(--serif);
    font-size: 19px;
    font-weight: 500;
}

.appointment-queue-section > .appointment-note {
    margin-bottom: 12px;
}

.appointment-tabs {
    max-width: 100%;
}
.compact-heading {
    margin: 0;
    color: var(--green-deep);
    font-family: var(--serif);
    font-size: 20px;
    font-weight: 500;
}
.meal-view-tabs {
    display: inline-flex;
    max-width: 100%;
    gap: 3px;
    margin: -10px 0 17px;
    padding: 3px;
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: #eeefe9;
}
.meal-view-tab {
    min-height: 34px;
    padding: 0 13px;
    border: 0;
    border-radius: 3px;
    background: transparent;
    color: #697163;
    cursor: pointer;
    font-size: 10px;
    font-weight: 600;
    white-space: nowrap;
}
.meal-view-tab.is-active {
    background: var(--white);
    color: var(--green-deep);
    box-shadow: 0 1px 2px rgba(32, 40, 32, 0.09);
}
.meal-details-list {
    margin: 0;
}
.meal-details-list > div {
    display: grid;
    grid-template-columns: 90px minmax(0, 1fr);
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
}
.meal-details-list dt {
    color: var(--muted);
    font-size: 10px;
}
.meal-details-list dd {
    margin: 0;
    color: #414b3f;
    font-size: 12px;
    line-height: 1.5;
}
.content-panel {
    padding: 21px;
}
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}
.form-field {
    display: grid;
    gap: 7px;
}
.form-field.full-width {
    grid-column: 1 / -1;
}
.form-field label {
    color: #515b4f;
    font-size: 11px;
    font-weight: 600;
}
.text-input,
select,
textarea {
    width: 100%;
    min-height: 42px;
    padding: 10px 12px;
    border: 1px solid #dfe3d9;
    border-radius: 4px;
    outline: none;
    background: #fff;
    color: var(--ink);
    font-size: 12px;
}
textarea {
    min-height: 82px;
    resize: vertical;
}
.form-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 17px;
}
.client-progress-panel {
    grid-column: 1 / -1;
}
.progress-edit-panel {
    margin-top: 16px;
}
.progress-edit-copy {
    margin: 7px 0 14px;
    color: var(--muted);
    font-size: 10px;
    line-height: 1.5;
}
.client-progress-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
    align-items: center;
    gap: 30px;
}
.weight-trend {
    min-width: 0;
}
.progress-section-heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}
.progress-section-heading h2 {
    margin: 0;
    color: #515b4f;
    font-size: 12px;
    font-weight: 600;
}
.progress-section-heading strong {
    color: var(--green-deep);
    font-family: var(--serif);
    font-size: 22px;
    font-weight: 500;
}
.weight-chart {
    display: block;
    width: 100%;
    height: auto;
    margin-top: 14px;
    overflow: visible;
}
.weight-chart-grid {
    stroke: var(--line);
    stroke-dasharray: 3 5;
    stroke-width: 1;
}
.weight-chart-axis,
.weight-chart-label {
    fill: #7b8377;
    font-family: var(--sans);
    font-size: 10px;
}
.weight-chart-line {
    fill: none;
    stroke: var(--green);
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 3;
}
.weight-chart-point {
    fill: var(--white);
    stroke: var(--green);
    stroke-width: 2.5;
}
.progress-metrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: 0;
    border-top: 1px solid var(--line);
}
.progress-metrics > div {
    min-width: 0;
    padding: 13px 12px 11px 0;
    border-bottom: 1px solid var(--line);
}
.progress-metrics dt {
    color: var(--muted);
    font-size: 10px;
}
.progress-metrics dd {
    margin: 5px 0 0;
    color: var(--ink);
    font-size: 15px;
    font-weight: 600;
}
.result-list {
    display: grid;
    gap: 9px;
    margin: 17px 0 0;
    padding: 0;
    list-style: none;
}
.result-item {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: #fdfdf8;
    color: #414b3f;
    font-size: 12px;
    line-height: 1.55;
}
.result-index {
    color: var(--rust);
    font-family: var(--serif);
    font-size: 16px;
}
.subsection-label {
    margin: 22px 0 10px;
    color: var(--green);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 1.1px;
}
.notice {
    margin: 15px 0 0;
    padding: 11px 13px;
    border-left: 2px solid var(--rust);
    background: #f8f0e9;
    color: #75513f;
    font-size: 10px;
    line-height: 1.55;
}
.approval-feedback {
    display: grid;
    justify-items: start;
    gap: 8px;
}
.approval-feedback p {
    margin: 0;
}
.loading-copy,
.empty-state {
    padding: 24px 5px;
    color: #7d8479;
    font-size: 12px;
}
.review-list,
.food-list {
    display: grid;
    gap: 12px;
}
.review-card {
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 5px;
    background: var(--white);
}
.admin-approval-list {
    display: grid;
    gap: 11px;
}
.admin-approval-row {
    padding: 17px;
    border: 1px solid var(--line);
    border-radius: 5px;
    background: var(--white);
}
.admin-approval-main {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    align-items: center;
    gap: 13px;
}
.admin-approval-notes {
    margin-top: 15px;
}
.document-upload-panel {
    margin-bottom: 25px;
}
.file-input {
    min-height: 48px;
    padding: 8px;
}
.document-hint {
    margin: 0;
    color: var(--muted);
    font-size: 10px;
    line-height: 1.55;
}
.document-list {
    display: grid;
    gap: 8px;
}
.document-row {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--white);
}
.document-icon {
    display: grid;
    width: 31px;
    height: 35px;
    place-items: center;
    border: 1px solid #dfe3d9;
    border-radius: 3px;
    color: var(--green);
    font-size: 15px;
}
.document-details h3 {
    margin: 0;
    color: var(--green-deep);
    font-size: 11px;
    font-weight: 600;
    overflow-wrap: anywhere;
}
.document-download-link {
    display: inline-flex;
    min-height: 30px;
    align-items: center;
    gap: 7px;
    padding: 3px 8px;
    border: 1px solid var(--line);
    border-radius: 5px;
    background: var(--white);
    color: var(--green-deep);
    text-decoration: none;
}
.document-download-link:hover {
    text-decoration: underline;
}
.document-download-link[aria-busy="true"] {
    opacity: 0.65;
    pointer-events: none;
}
.download-icon {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
}
.document-details p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 9px;
}
.admin-document-list {
    display: grid;
    gap: 6px;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid var(--line);
}
.admin-document-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: #596354;
    font-size: 10px;
}
.admin-document-row button {
    min-height: 30px;
}
.document-preview {
    width: min(1040px, calc(100vw - 32px));
    height: min(900px, calc(100dvh - 32px));
    max-width: none;
    max-height: none;
    padding: 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 5px;
    background: var(--white);
}
.document-preview::backdrop {
    background: rgba(24, 32, 24, 0.62);
}
.document-preview-header {
    display: flex;
    height: 52px;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 0 14px;
    border-bottom: 1px solid var(--line);
}
.document-preview-header strong {
    overflow: hidden;
    color: var(--green-deep);
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.document-preview iframe {
    display: block;
    width: 100%;
    height: calc(100% - 52px);
    border: 0;
    background: #f0f1ed;
}
.review-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 7px;
    margin-bottom: 12px;
    color: #7f867c;
    font-size: 10px;
}
.review-client {
    color: var(--green-deep);
    font-weight: 700;
}
.assistant-topics {
    margin-bottom: 16px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--white);
}
.assistant-topics-heading {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px 15px;
    margin-bottom: 10px;
}
.assistant-topics-heading > span:last-child {
    color: var(--muted);
    font-size: 10px;
}
.assistant-topic-list {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}
.assistant-topic {
    min-height: 34px;
    padding: 0 11px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--white);
    color: #586252;
    cursor: pointer;
    font-size: 10px;
    font-weight: 600;
}
.assistant-topic:hover {
    border-color: #b7c6a9;
    color: var(--green-deep);
}
.assistant-topic.is-primary {
    border-color: var(--green-deep);
    background: var(--green-deep);
    color: #fff;
}
.assistant-topic:focus-visible {
    outline: 2px solid var(--green);
    outline-offset: 2px;
}
.chat-panel {
    display: grid;
    gap: 18px;
}
.ai-workspace-tabs {
    display: inline-flex;
    width: fit-content;
    gap: 3px;
    margin: -10px 0 19px;
    padding: 3px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: #eeefe9;
}
.ai-workspace-tab {
    min-height: 34px;
    padding: 0 15px;
    border: 0;
    border-radius: 3px;
    background: transparent;
    color: #697163;
    cursor: pointer;
    font-size: 11px;
    font-weight: 600;
}
.ai-workspace-tab.is-active {
    background: var(--white);
    color: var(--green-deep);
    box-shadow: 0 1px 2px rgba(32, 40, 32, 0.09);
}
.chat-thread {
    display: grid;
    gap: 12px;
    max-height: 430px;
    overflow-y: auto;
    padding-right: 4px;
}
.chat-bubble {
    display: grid;
    gap: 7px;
    padding: 13px 14px;
    border: 1px solid var(--line);
    border-radius: 5px;
    background: #fdfdf8;
}
.chat-bubble.assistant {
    background: #f2f7ee;
    border-color: #dde7d6;
}
.chat-bubble strong {
    color: var(--green-deep);
    font-size: 10px;
}
.chat-bubble p {
    margin: 0;
    color: #495546;
    font-size: 12px;
    line-height: 1.7;
    white-space: pre-wrap;
}
.chat-form {
    display: grid;
    gap: 10px;
}
.chat-form textarea {
    min-height: 90px;
}
.review-card .result-list {
    margin-top: 0;
}
.review-notes {
    margin-top: 12px;
}
.review-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 12px;
}
.button-small {
    min-height: 34px;
    padding: 0 12px;
    font-size: 10px;
}
.button-approve {
    background: var(--green-deep);
    color: white;
}
.button-reject {
    border: 1px solid #ead3c7;
    background: transparent;
    color: #9a4c30;
}
.food-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) repeat(4, minmax(55px, 0.4fr));
    align-items: center;
    gap: 12px;
    padding: 13px 15px;
    border-bottom: 1px solid var(--line);
    background: var(--white);
    font-size: 11px;
}
.client-table {
    overflow-x: auto;
}
.client-table .food-row {
    min-width: 760px;
    grid-template-columns: 100px minmax(145px, 1.3fr) 45px minmax(120px, 1fr) 68px 66px;
}
.dietitian-directory {
    border-top: 1px solid var(--line);
    background: var(--white);
}
.dietitian-row {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    min-height: 76px;
    padding: 12px 15px;
    border-bottom: 1px solid var(--line);
}
.patient-dietitian-directory .dietitian-row > .button {
    white-space: nowrap;
}
.dietitian-row:last-child {
    border-bottom: 0;
}
.dietitian-avatar {
    position: relative;
    overflow: hidden;
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 50%;
    background: var(--green-pale);
    color: var(--green-deep);
    font-size: 10px;
    font-weight: 700;
}
.profile-photo-avatar img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.dietitian-details h2 {
    margin: 0;
    color: var(--green-deep);
    font-family: var(--serif);
    font-size: 17px;
    font-weight: 500;
}
.dietitian-details p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 10px;
}
.dietitian-status {
    padding: 5px 8px;
    border-radius: 3px;
    background: #eef0e9;
    color: #666e60;
    font-size: 8px;
    font-weight: 700;
    letter-spacing: 0.6px;
    white-space: nowrap;
}
.status-approved {
    background: var(--green-pale);
    color: var(--green-deep);
}
.status-pending {
    background: #f5ecda;
    color: #765e2f;
}
.status-rejected,
.status-suspended {
    background: var(--soft-rust);
    color: #874b34;
}
.dietitian-section-heading {
    margin-top: 19px;
}
.form-section-heading {
    margin: 0 0 13px;
}
.recipe-form-panel {
    margin-bottom: 26px;
}
.recipe-list,
.meal-plan-list {
    display: grid;
    gap: 10px;
}
.recipe-row,
.meal-plan-row {
    padding: 17px 18px;
    border: 1px solid var(--line);
    border-radius: 5px;
    background: var(--white);
}
.recipe-row-top,
.meal-plan-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.recipe-row-top h3,
.meal-plan-heading h3 {
    margin: 0;
    color: var(--green-deep);
    font-family: var(--serif);
    font-size: 19px;
    font-weight: 500;
}
.recipe-row-top > span,
.meal-plan-client {
    color: #899086;
    font-size: 9px;
}
.recipe-ingredients {
    margin: 10px 0 6px;
    color: var(--green);
    font-size: 10px;
    font-weight: 600;
    line-height: 1.6;
}
.recipe-instructions {
    margin: 0;
    color: #626b60;
    font-size: 11px;
    line-height: 1.6;
    white-space: pre-wrap;
}
.meal-plan-heading .subsection-label {
    margin: 0 0 5px;
}
.plan-status {
    padding: 5px 8px;
    border-radius: 3px;
    background: var(--green-pale);
    color: var(--green-deep);
    font-size: 8px;
    font-weight: 700;
}
.meal-plan-client {
    margin: 7px 0 0;
}
.meal-summary {
    display: grid;
    gap: 7px;
    margin: 14px 0 0;
    padding: 0;
    list-style: none;
}
.meal-summary li {
    display: flex;
    gap: 9px;
    color: #515b4f;
    font-size: 11px;
    line-height: 1.5;
}
.meal-summary li::before {
    color: var(--rust);
    content: "•";
}
.food-row:first-child {
    border-radius: 5px 5px 0 0;
}
.food-row:last-child {
    border-bottom: 0;
    border-radius: 0 0 5px 5px;
}
.food-row.food-header {
    background: #f0f3ea;
    color: #667260;
    font-size: 9px;
    font-weight: 700;
}
.food-name {
    color: var(--green-deep);
    font-weight: 600;
}
.workspace-message {
    margin-bottom: 14px;
    padding: 10px 12px;
    border-radius: 4px;
    background: var(--green-pale);
    color: var(--green-deep);
    font-size: 11px;
}
.workspace-message.error {
    background: var(--soft-rust);
    color: #793b27;
}

@media (max-width: 950px) {
    .auth-screen {
        grid-template-columns: minmax(300px, 0.85fr) minmax(390px, 1.15fr);
    }
    .auth-story {
        padding-right: 32px;
        padding-left: 32px;
    }
    .workspace-sidebar {
        width: 215px;
    }
    .workspace-main {
        margin-left: 215px;
    }
    .workspace-header {
        padding-right: 27px;
        padding-left: 27px;
    }
    .workspace-content {
        padding: 32px 27px;
    }
}
@media (max-width: 720px) {
    .auth-screen {
        display: block;
        min-height: 100svh;
        background: var(--white);
    }
    .auth-story {
        display: none;
    }
    .auth-main {
        min-height: 100svh;
        padding: 22px 23px 18px;
    }
    .auth-wrap {
        width: min(100%, 410px);
        margin: auto;
        padding: 19px 0 25px;
    }
    .auth-intro h2 {
        font-size: 38px;
    }
    .auth-tabs {
        margin-top: 26px;
    }
    .auth-footer {
        font-size: 9px;
    }
    .workspace-sidebar {
        position: fixed;
        inset: auto 0 0;
        width: auto;
        height: 63px;
        flex-direction: row;
        padding: 0 8px;
        border-top: 1px solid var(--line);
        border-right: 0;
        background: rgba(251, 251, 247, 0.97);
    }
    .sidebar-label,
    .sidebar-bottom {
        display: none;
    }
    .nav-section-label {
        display: none;
    }
    .side-nav {
        display: flex;
        width: 100%;
        max-height: none;
        align-items: center;
        gap: 0;
        overflow-x: auto;
        overflow-y: hidden;
        scrollbar-width: none;
    }
    .side-nav::-webkit-scrollbar {
        display: none;
    }
    .nav-item {
        min-width: 62px;
        min-height: 55px;
        flex: 1 0 62px;
        flex-direction: column;
        justify-content: center;
        gap: 3px;
        padding: 3px 1px;
        font-size: 8px;
    }
    .nav-glyph {
        height: 19px;
        font-size: 15px;
    }
    .nav-count {
        position: absolute;
        margin: -25px 0 0 25px;
        min-width: 15px;
        height: 15px;
        font-size: 8px;
    }
    .workspace-main {
        margin-left: 0;
        padding-bottom: 63px;
    }
    .workspace-header {
        min-height: 63px;
        padding: 0 17px;
    }
    .header-context {
        display: none;
    }
    .profile-chip {
        gap: 7px;
        font-size: 10px;
    }
    .profile-avatar {
        width: 28px;
        height: 28px;
    }
    .mobile-signout {
        display: inline-flex;
        align-items: center;
    }
    .workspace-content {
        padding: 26px 17px;
    }
    .page-heading {
        align-items: flex-start;
        flex-direction: column;
        margin-bottom: 21px;
    }
    .page-heading h1 {
        font-size: 34px;
    }
    .overview-grid {
        grid-template-columns: 1fr;
        gap: 11px;
    }
    .admin-stat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }
    .admin-stat {
        min-height: 82px;
        padding: 11px;
    }
    .admin-stat strong {
        font-size: 24px;
    }
    .feature-panel {
        min-height: 225px;
        padding: 21px;
    }
    .stat-panel {
        min-height: 150px;
    }
    .quick-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    .quick-link {
        min-height: 72px;
        flex-direction: row;
        align-items: center;
    }
    .form-grid {
        grid-template-columns: 1fr;
    }
    .profile-details {
        grid-template-columns: 1fr 1fr;
    }
    .appointment-request-row {
        grid-template-columns: minmax(0, 1fr);
    }
    .client-progress-layout {
        grid-template-columns: minmax(0, 1fr);
        gap: 19px;
    }
    .progress-metrics > div {
        padding: 11px 8px 10px 0;
    }
    .form-field.full-width {
        grid-column: auto;
    }
    .content-panel {
        padding: 16px;
    }
    .food-row {
        grid-template-columns: minmax(90px, 1.5fr) repeat(2, minmax(48px, 0.7fr));
        gap: 6px;
        padding: 11px 8px;
        font-size: 9px;
    }
    .food-row > :nth-child(4),
    .food-row > :nth-child(5) {
        display: none;
    }
}
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}

/* Nutrition-practice visual refresh: warmer surfaces, clearer hierarchy and photography. */
:root {
    --paper: #f4f5ed;
    --white: #fffefa;
    --green: #4f7045;
    --green-deep: #2f4934;
    --green-pale: #e9f0e3;
    --line: #e0e6d9;
}

.workspace-content {
    max-width: 1240px;
}
.page-heading {
    padding-bottom: 5px;
}
.page-heading h1 {
    letter-spacing: -0.7px;
}
.feature-panel,
.stat-panel,
.content-panel,
.quick-link,
.dietitian-row,
.admin-stat {
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(43, 62, 39, 0.045);
}
.feature-panel {
    position: relative;
    overflow: hidden;
}
.client-home-feature {
    min-height: 300px;
    display: flex;
    align-items: center;
    background-image:
        linear-gradient(
            90deg,
            rgba(36, 62, 39, 0.97) 0%,
            rgba(36, 62, 39, 0.88) 52%,
            rgba(36, 62, 39, 0.18) 100%
        ),
        url("/static/nutrition-consultation.jpg?v=4");
    background-position:
        center,
        right 38%;
    background-size: cover, cover;
}
.client-home-feature h2,
.dietitian-home-feature h2 {
    max-width: 470px;
    font-size: clamp(30px, 3vw, 42px);
}
.client-home-feature p,
.dietitian-home-feature p {
    max-width: 490px;
    font-size: 13px;
}
.dietitian-home-feature {
    min-height: 245px;
    margin: 0 0 22px;
    display: flex;
    align-items: center;
    background-image:
        linear-gradient(
            90deg,
            rgba(36, 62, 39, 0.98) 0%,
            rgba(36, 62, 39, 0.88) 54%,
            rgba(36, 62, 39, 0.22) 100%
        ),
        url("/static/nutrition-consultation.jpg?v=4");
    background-position:
        center,
        right 38%;
    background-size: cover, cover;
}
.dietitian-home-feature .feature-panel-copy {
    position: relative;
    z-index: 1;
    max-width: 650px;
}
.nutrition-workspace-banner {
    position: relative;
    min-height: 205px;
    display: flex;
    align-items: center;
    margin: -7px 0 24px;
    padding: 28px 32px;
    overflow: hidden;
    border: 1px solid #dfe8d8;
    border-radius: 12px;
    background-image:
        linear-gradient(
            90deg,
            rgba(242, 246, 235, 0.98) 0%,
            rgba(242, 246, 235, 0.94) 54%,
            rgba(242, 246, 235, 0.25) 100%
        ),
        url("/static/nutrition-consultation.jpg?v=4");
    background-position:
        center,
        right 38%;
    background-size: cover, cover;
}
.nutrition-workspace-banner > div {
    position: relative;
    z-index: 1;
    max-width: 570px;
}
.nutrition-workspace-banner .eyebrow {
    color: var(--green);
}
.nutrition-workspace-banner h2 {
    margin: 10px 0 7px;
    color: var(--green-deep);
    font-family: var(--serif);
    font-size: clamp(27px, 3vw, 37px);
    font-weight: 500;
    line-height: 1.08;
}
.nutrition-workspace-banner p {
    max-width: 480px;
    margin: 0;
    color: #586653;
    font-size: 12px;
    line-height: 1.65;
}
.stat-panel {
    min-height: 150px;
    border-top: 3px solid #9cb785;
}
.stat-number {
    color: var(--green-deep);
}
.quick-link {
    min-height: 112px;
    transition:
        transform 0.18s ease,
        border-color 0.18s ease,
        box-shadow 0.18s ease;
}
.quick-link:hover {
    transform: translateY(-2px);
    border-color: #b6c8a8;
    box-shadow: 0 9px 24px rgba(43, 62, 39, 0.08);
}
.content-panel {
    padding: 25px;
}
.auth-main {
    background-image: radial-gradient(
        circle at 100% 0%,
        rgba(214, 228, 161, 0.18),
        transparent 33%
    );
}
.auth-form input:not([type="radio"]),
.text-input,
select,
textarea {
    border-radius: 8px;
}
.button {
    border-radius: 8px;
}
.auth-tab {
    padding-bottom: 15px;
}
.dietitian-row {
    margin-bottom: 9px;
    border: 1px solid var(--line);
    background: var(--white);
}
.admin-table-wrap {
    border: 1px solid var(--line);
    border-radius: 10px;
}
.admin-data-table th {
    background: #edf2e7;
}

@media (max-width: 720px) {
    .client-home-feature,
    .dietitian-home-feature {
        min-height: 265px;
        background-position:
            center,
            62% center;
    }
    .nutrition-workspace-banner {
        min-height: 230px;
        padding: 23px 20px;
        background-image:
            linear-gradient(
                90deg,
                rgba(242, 246, 235, 0.98) 0%,
                rgba(242, 246, 235, 0.9) 70%,
                rgba(242, 246, 235, 0.55) 100%
            ),
            url("/static/nutrition-consultation.jpg?v=4");
    }
    .content-panel {
        padding: 17px;
    }
}

/* Inclusive nutrition visual system: photography, gentle motion, and richer colour on every workspace page. */
:root {
    --peach-wash: #fbede4;
    --mint-wash: #edf4e8;
    --gold-wash: #f8f1d9;
    --shadow-soft: 0 12px 32px rgba(42, 62, 39, 0.075);
}

/* Every view heading receives a contextual photo panel; the same locally hosted asset keeps the app fast and reliable offline. */
.workspace-content .page-heading {
    position: relative;
    isolation: isolate;
    min-height: 126px;
    align-items: center;
    padding: 21px 220px 21px 24px;
    margin: 0 0 25px;
    overflow: hidden;
    border: 1px solid #e0e9d8;
    border-radius: 16px;
    background: linear-gradient(105deg, #f4f7ed 0%, #f8f5e9 66%, #f9eadf 100%);
}
.workspace-content .page-heading::after {
    position: absolute;
    z-index: -1;
    top: 0;
    right: 0;
    bottom: 0;
    width: 205px;
    content: "";
    background-image:
        linear-gradient(
            90deg,
            #f4f7ed 0%,
            rgba(244, 247, 237, 0.25) 45%,
            rgba(244, 247, 237, 0.03) 100%
        ),
        url("/static/nutrition-consultation.jpg?v=5");
    background-position:
        center,
        68% center;
    background-size: cover;
    opacity: 0.96;
    border-radius: 0 15px 15px 0;
    transition:
        width 0.35s ease,
        filter 0.35s ease;
}
.workspace-content .page-heading:hover::after {
    width: 225px;
    filter: saturate(1.08);
}
.workspace-content .page-heading h1 {
    max-width: 720px;
    font-size: clamp(29px, 3vw, 40px);
}
.workspace-content .page-heading p {
    max-width: 640px;
    line-height: 1.65;
}
.workspace-content .page-heading .eyebrow {
    letter-spacing: 1.45px;
}

/* Slightly different accent tints for each part of the workspace while retaining a consistent brand. */
.workspace-content[data-view*="health"],
.workspace-content[data-view*="client"] {
    --page-tint: #eaf3e5;
}
.workspace-content[data-view*="meal"],
.workspace-content[data-view*="food"],
.workspace-content[data-view*="recipe"] {
    --page-tint: #fbf0d9;
}
.workspace-content[data-view*="admin"],
.workspace-content[data-view*="report"],
.workspace-content[data-view*="audit"] {
    --page-tint: #f8e9df;
}
.workspace-content[data-view*="appointment"],
.workspace-content[data-view*="review"] {
    --page-tint: #e9f1f4;
}
.workspace-content[data-view] .page-heading {
    background: linear-gradient(105deg, var(--page-tint, #f1f5e9) 0%, #fbf8ef 68%, #f9e9df 100%);
}
.workspace-content[data-view] .page-heading::after {
    background-image:
        linear-gradient(
            90deg,
            var(--page-tint, #f1f5e9) 0%,
            rgba(248, 248, 239, 0.28) 48%,
            rgba(248, 248, 239, 0.02) 100%
        ),
        url("/static/nutrition-consultation.jpg?v=5");
}

/* Page entrance, cards, buttons and navigation use short, low-motion transitions. */
@keyframes workspaceFadeUp {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
@keyframes softGlow {
    0%,
    100% {
        box-shadow: 0 8px 24px rgba(49, 73, 48, 0.055);
    }
    50% {
        box-shadow: 0 12px 30px rgba(49, 73, 48, 0.095);
    }
}
.view-enter {
    animation: workspaceFadeUp 0.28s ease-out both;
}
.workspace-content .content-panel,
.workspace-content .stat-panel,
.workspace-content .admin-stat,
.workspace-content .dietitian-row,
.workspace-content .quick-link,
.workspace-content .appointment-row,
.workspace-content .goal-row,
.workspace-content .appointment-request-row,
.workspace-content .nutrition-workspace-banner {
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        border-color 0.2s ease;
}
.workspace-content .content-panel:hover,
.workspace-content .stat-panel:hover,
.workspace-content .admin-stat:hover,
.workspace-content .dietitian-row:hover,
.workspace-content .appointment-row:hover,
.workspace-content .goal-row:hover,
.workspace-content .appointment-request-row:hover {
    transform: translateY(-2px);
    border-color: #d0ddc5;
    box-shadow: var(--shadow-soft);
}
.workspace-content .button,
.workspace-content button,
.workspace-sidebar .nav-item {
    transition:
        transform 0.18s ease,
        background-color 0.18s ease,
        color 0.18s ease,
        box-shadow 0.18s ease;
}
.workspace-content .button:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 6px 15px rgba(47, 73, 52, 0.13);
}
.workspace-sidebar .nav-item {
    border-radius: 9px;
}
.workspace-sidebar .nav-item.is-current {
    box-shadow: inset 3px 0 0 #759663;
}
.workspace-header {
    backdrop-filter: blur(12px);
}
.auth-story .story-image {
    animation: storyImageSettle 1.1s ease-out both;
}
@keyframes storyImageSettle {
    from {
        transform: scale(1.06);
    }
    to {
        transform: scale(1.01);
    }
}
.auth-intro,
.auth-form,
.auth-note {
    animation: workspaceFadeUp 0.35s ease-out both;
}
.auth-form {
    animation-delay: 0.04s;
}
.auth-note {
    animation-delay: 0.08s;
}
.form-message {
    animation: workspaceFadeUp 0.2s ease-out both;
}
.admin-data-table tbody tr {
    transition: background-color 0.16s ease;
}
.admin-data-table tbody tr:hover {
    background: #f7f8f1;
}

@media (max-width: 720px) {
    .workspace-content .page-heading {
        min-height: 118px;
        padding: 18px 105px 18px 16px;
        border-radius: 12px;
    }
    .workspace-content .page-heading::after {
        width: 112px;
        opacity: 0.78;
    }
    .workspace-content .page-heading:hover::after {
        width: 125px;
    }
    .workspace-content .page-heading h1 {
        font-size: 29px;
    }
    .workspace-content .page-heading p {
        max-width: 100%;
        font-size: 11px;
    }
}
@media (prefers-reduced-motion: reduce) {
    .view-enter,
    .auth-story .story-image,
    .auth-intro,
    .auth-form,
    .auth-note,
    .form-message {
        animation: none !important;
    }
    .workspace-content *,
    .workspace-content *::before,
    .workspace-content *::after,
    .workspace-sidebar *,
    .workspace-sidebar *::before,
    .workspace-sidebar *::after {
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Phase 2: evidence inspection in the dietitian review workflow */
.review-sources {
    margin: 1rem 0;
    padding: 0.85rem 1rem;
    border: 1px solid var(--border, #cbd5e1);
    border-radius: 0.7rem;
}
.review-sources summary {
    cursor: pointer;
    font-weight: 700;
}
.review-sources li {
    margin: 0.75rem 0;
    overflow-wrap: anywhere;
}
.review-sources blockquote {
    white-space: pre-wrap;
    margin: 0.35rem 0;
    padding: 0.65rem;
    border-left: 3px solid #64748b;
    background: rgba(100, 116, 139, 0.08);
}

/* Phase 3: meal plan review */
.meal-review-options {
    display: grid;
    gap: 8px;
    max-height: 180px;
    overflow: auto;
    padding: 12px;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
}
.meal-review-option {
    display: flex;
    gap: 10px;
    align-items: center;
}
.mealReviewForm {
    display: grid;
    gap: 12px;
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid #cbd5e1;
}
.mealReviewForm textarea {
    width: 100%;
    min-height: 85px;
}

/* FR-1.1 — Accessible, mobile-friendly progressive patient registration. */
#signupForm > [hidden],
#signupForm [hidden] {
    display: none !important;
}
.signup-step {
    display: grid;
    gap: 10px;
    min-width: 0;
}
.signup-step-title {
    margin: 8px 0 0;
    color: var(--green-deep);
    font-family: var(--serif);
    font-size: 23px;
    font-weight: 500;
}
.signup-step-help {
    margin: 0 0 3px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.6;
}
.email-verification {
    display: grid;
    gap: 9px;
    margin: 12px 0;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #f8faf5;
}
.email-verification h3,
.email-verification p {
    margin: 0;
}
.email-verification h3 {
    color: var(--green-deep);
    font-size: 14px;
}
.email-verification p {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.5;
}
.signup-progress {
    display: grid;
    gap: 10px;
    margin: 9px 0 8px;
}
.signup-progress-heading {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 11px;
    font-weight: 600;
    color: var(--green-deep);
}
.signup-progress-heading span:last-child {
    color: var(--muted);
    font-weight: 400;
}
.signup-progress-track {
    height: 7px;
    border-radius: 999px;
    background: #e6ede4;
    overflow: hidden;
}
.signup-progress-track > span {
    display: block;
    width: 33.333%;
    height: 100%;
    border-radius: inherit;
    background: var(--green);
    transition: width 0.18s ease;
}
.signup-step-actions {
    display: flex;
    gap: 10px;
    justify-content: space-between;
    margin-top: 9px;
}
.signup-back {
    min-width: 100px;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--green-deep);
}
.signup-next {
    flex: 1;
}
@media (prefers-reduced-motion: reduce) {
    .signup-progress-track > span {
        transition: none;
    }
}
@media (max-width: 480px) {
    .signup-step-actions {
        flex-wrap: wrap;
    }
    .signup-next {
        min-width: 145px;
    }
}

/* FR-1.2 — Accessible, inline registration validation feedback. */
.registration-field-help {
    display: block;
    margin: 0.15rem 0 0.85rem;
    font-size: 0.78rem;
    line-height: 1.35;
    color: var(--muted, #53665b);
}
.registration-field-help.is-invalid {
    color: #ad3232;
}
.registration-field-help.is-valid {
    color: #237550;
}
#signupForm input[aria-invalid="true"] {
    border-color: #ad3232;
    outline-color: #ad3232;
}

/* FR-1.3: clear, accessible consent with an expandable privacy notice. */
.privacy-consent {
    margin-top: 17px;
    padding: 17px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #f8faf5;
}
.privacy-consent h4 {
    margin: 0 0 7px;
    color: var(--green-deep);
    font-size: 14px;
}
.privacy-consent > p {
    margin: 0 0 11px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.5;
}
.privacy-notice {
    margin: 0 0 13px;
    border: 1px solid #d9e4d4;
    border-radius: 5px;
    background: #fff;
}
.privacy-notice summary {
    padding: 12px;
    color: var(--green-deep);
    cursor: pointer;
    font-weight: 600;
    font-size: 12px;
}
.privacy-notice summary:focus-visible {
    outline: 2px solid var(--green);
    outline-offset: 2px;
}
.privacy-notice-body {
    padding: 1px 13px 12px;
    color: #505c50;
    font-size: 11px;
    line-height: 1.6;
}
.privacy-notice-body p {
    margin: 9px 0;
}
.privacy-notice-warning {
    font-weight: 600;
    color: #8b602f;
}
.privacy-consent-choice {
    display: flex;
    gap: 11px;
    align-items: flex-start;
    cursor: pointer;
    color: #344737;
    font-size: 12px;
    line-height: 1.6;
}
.privacy-consent-choice input {
    flex: 0 0 17px;
    width: 17px;
    height: 17px;
    margin: 2px 0 0;
    accent-color: var(--green);
}
.privacy-consent-choice input:focus-visible {
    outline: 2px solid var(--green);
    outline-offset: 2px;
}
#consentHelp {
    display: block;
    margin: 7px 0 0 28px;
}

/* FR-1.6–1.10: keep onboarding controls simple and accessible. */
.registration-uploads {
    margin: 1rem 0;
    padding: 1rem;
    background: #f2f7f3;
    border-radius: 0.75rem;
}
.registration-uploads h4 {
    margin: 0 0 0.35rem;
}
.registration-uploads p {
    font-size: 0.875rem;
}
.registration-uploads input[type="file"] {
    display: block;
    width: 100%;
    margin: 0.45rem 0 0.9rem;
}
.signup-draft-actions {
    margin: 1rem 0;
    border-top: 1px solid #d5ded8;
    padding-top: 0.75rem;
}
.signup-draft-actions p {
    font-size: 0.8rem;
    line-height: 1.4;
}
.signup-draft-actions .button {
    margin: 0.2rem;
    padding: 0.45rem 0.65rem;
}
#signupDraftMessage {
    display: block;
    font-size: 0.85rem;
    padding-top: 0.5rem;
}
.qr-display {
    margin-top: 1rem;
    text-align: center;
}
.qr-display img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 0.5rem auto;
    background: white;
    padding: 0.5rem;
    border: 1px solid #c5d2c9;
    border-radius: 0.75rem;
}

/* Operational feedback: never show a healthy connection just because UI loaded. */
.connection-status[data-state="checking"] .status-dot {
    background: #b3aa86;
    box-shadow: none;
}
.connection-status[data-state="degraded"] .status-dot {
    background: #d69b39;
    box-shadow: 0 0 0 3px rgba(214, 155, 57, 0.16);
}
.connection-status[data-state="offline"] .status-dot {
    background: #cd604d;
    box-shadow: 0 0 0 3px rgba(205, 96, 77, 0.16);
}

/* A consistent visible keyboard focus across interactive workspace controls. */
:where(button, a, input, select, textarea, summary):focus-visible {
    outline: 3px solid #548d68;
    outline-offset: 2px;
}
:where(button, input, select, textarea):disabled {
    cursor: not-allowed;
    opacity: 0.65;
}

/* Appointment calendar mobile layout */
@media (max-width: 720px) {
    .appointment-calendar-panel {
        padding: 12px;
    }

    .calendar-header {
        gap: 6px;
    }

    .calendar-header h2 {
        font-size: 17px;
        text-align: center;
    }

    .calendar-header .button {
        padding: 8px;
    }

    .calendar-weekdays,
    .appointment-calendar-grid {
        gap: 4px;
    }

    .calendar-day {
        min-height: 60px;
        padding: 7px 5px;
    }

    .calendar-day-count {
        font-size: 8px;
    }

    .calendar-day-empty {
        min-height: 60px;
    }

    .appointment-queue-section {
        padding: 13px;
    }
}
/* Care workflow uses the existing panel, form and button system. */
.care-workflow { margin-top: 1.5rem; }
.care-workflow h3 { margin-top: 1.75rem; }
.care-history { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; }
.care-history dt { font-weight: 600; }
.care-history dd { margin: .4rem 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.care-entry { padding: 1rem 0; border-bottom: 1px solid #dfe4da; }
.care-entry p { white-space: pre-wrap; overflow-wrap: anywhere; }
.care-workflow [data-care-message]:not(:empty) { padding: .75rem; background: #fff0e5; margin-bottom: 1rem; }
.meeting-actions, .meeting-choice { display: grid; gap: .65rem; margin-top: .85rem; }
.meeting-choice label { display: grid; gap: .4rem; }
.meeting-actions .button { justify-self: start; font-size: .875rem; min-height: 42px; }
.meeting-actions .appointment-note, .meeting-choice .appointment-note { margin: 0; }
.meeting-actions .appointment-note { font-size: .8rem; line-height: 1.5; }
.meeting-choice, .appointment-request-details { min-width: 0; }
.meeting-choice select, .meeting-choice input { min-width: 0; max-width: 100%; }
.meeting-choice [hidden] { display: none; }
@media (max-width: 720px) {
    .appointment-row { display: grid; grid-template-columns: minmax(0, 1fr); gap: .85rem; }
    .appointment-row > .button { justify-self: start; }
}
.appointment-checkin-qr {
    display: grid;
    justify-items: start;
    gap: 4px;
    margin-top: 10px;
    color: var(--muted);
    font-size: 11px;
}
.appointment-checkin-qr img {
    display: block;
    width: 132px;
    height: 132px;
    padding: 5px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: #fff;
}
.qr-checkin-panel {
    display: grid;
    gap: 1rem;
}
.qr-scanner-controls {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
}
.qr-checkin-dashboard-action {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 1rem;
}
.qr-scanner-stop {
    border: 1px solid var(--line);
    background: var(--white);
    color: var(--ink);
}
.qr-scanner-status {
    margin: 0;
    color: var(--muted);
    line-height: 1.5;
}
.qr-scanner-video {
    display: block;
    width: min(100%, 36rem);
    max-height: 65vh;
    border-radius: 12px;
    background: #171a17;
    object-fit: cover;
}
.qr-scanner-video[hidden] {
    display: none;
}
