/* Vibrant nutrition UI – presentation only. No application/API logic changes. */
:root {
    --paper: #fff8f3;
    --white: #ffffff;
    --ink: #23304b;
    --muted: #64748b;
    --line: #f1e5e6;
    --green: #11866e;
    --green-deep: #096b65;
    --green-pale: #d9f8ed;
    --lime: #e4f78b;
    --rust: #f46e75;
    --soft-rust: #ffe4d8;
    --shadow-soft: 0 14px 38px rgba(72, 48, 101, 0.12);
}
body {
    background:
        radial-gradient(circle at 96% 8%, #fbe5ff 0, transparent 30%),
        radial-gradient(circle at 5% 60%, #e0fff1 0, transparent 30%), #fff8f3;
}
.auth-story {
    background: #117e78;
}
.story-image {
    background-image:
        url("https://images.unsplash.com/photo-1490645935967-10de6ba17061?auto=format&fit=crop&w=1400&q=85"),
        url("/static/nutrition-consultation.jpg");
    background-position: center;
}
.story-shade {
    background: linear-gradient(
        165deg,
        rgba(13, 88, 88, 0.56),
        rgba(49, 32, 80, 0.15) 43%,
        rgba(29, 44, 91, 0.8)
    );
}
.auth-main {
    background:
        radial-gradient(circle at 85% 10%, #fce9f2, transparent 33%),
        radial-gradient(circle at 0% 100%, #e2fff1, transparent 35%), #fff;
}
.auth-submit,
.button-primary {
    background: linear-gradient(115deg, #00a98b, #2f80ed) !important;
    color: white !important;
    border: 0 !important;
    box-shadow: 0 9px 24px rgba(25, 142, 155, 0.23);
}
.auth-submit:hover,
.button-primary:hover {
    filter: brightness(1.06);
}
.workspace-sidebar {
    background: linear-gradient(170deg, #163f56 0%, #175e68 55%, #176d63 100%) !important;
    color: #f9ffff;
}
.workspace-sidebar .sidebar-label,
.workspace-sidebar .nav-section-label {
    color: #bce9e3 !important;
}
.workspace-sidebar .nav-item {
    color: #f1fbfb !important;
}
.workspace-sidebar .nav-item:hover,
.workspace-sidebar .nav-item.is-current {
    background: rgba(255, 255, 255, 0.19) !important;
    color: #fff !important;
    box-shadow: inset 4px 0 #f8d166 !important;
}
.workspace-main {
    background: transparent;
}
.workspace-header {
    background: rgba(255, 255, 255, 0.88) !important;
    border-bottom: 1px solid #f0e7ee;
}
.workspace-content {
    --hero-photo: url("https://images.unsplash.com/photo-1490645935967-10de6ba17061?auto=format&fit=crop&w=1100&q=80");
    --hero-tint: #fff0d8;
}
.workspace-content[data-view="overview"] {
    --hero-photo: url("https://images.unsplash.com/photo-1490645935967-10de6ba17061?auto=format&fit=crop&w=1100&q=80");
    --hero-tint: #ffe3c6;
}
.workspace-content[data-view*="appointment"],
.workspace-content[data-view="reviews"] {
    --hero-photo: url("https://images.unsplash.com/photo-1576091160399-112ba8d25d1d?auto=format&fit=crop&w=1100&q=80");
    --hero-tint: #dff6ff;
}
.workspace-content[data-view*="meal"],
.workspace-content[data-view="recipes"],
.workspace-content[data-view="foods"] {
    --hero-photo: url("https://images.unsplash.com/photo-1546069901-ba9599a7e63c?auto=format&fit=crop&w=1100&q=80");
    --hero-tint: #fff0bf;
}
.workspace-content[data-view*="health"],
.workspace-content[data-view="client-progress"],
.workspace-content[data-view="client-goals"] {
    --hero-photo: url("https://images.unsplash.com/photo-1512621776951-a57141f2eefd?auto=format&fit=crop&w=1100&q=80");
    --hero-tint: #d9f9ea;
}
.workspace-content[data-view*="admin"],
.workspace-content[data-view="admin-reports"],
.workspace-content[data-view="admin-audit-logs"] {
    --hero-photo: url("https://images.unsplash.com/photo-1556761175-b413da4baf72?auto=format&fit=crop&w=1100&q=80");
    --hero-tint: #eee2ff;
}
.workspace-content[data-view="my-profile"],
.workspace-content[data-view="verification-documents"],
.workspace-content[data-view="dietitian-branches"],
.workspace-content[data-view="clients"] {
    --hero-photo: url("https://images.unsplash.com/photo-1559839734-2b71ea197ec2?auto=format&fit=crop&w=1100&q=80");
    --hero-tint: #fce3f2;
}
.workspace-content[data-view="client-recommendations"] {
    --hero-photo: url("https://images.unsplash.com/photo-1498837167922-ddd27525d352?auto=format&fit=crop&w=1100&q=80");
    --hero-tint: #e5f6ca;
}
.workspace-content .page-heading {
    background: linear-gradient(105deg, var(--hero-tint) 0%, #fff8f2 72%, #fff0fa) !important;
    border: 1px solid rgba(244, 162, 175, 0.22);
    border-radius: 22px;
    box-shadow: 0 12px 32px rgba(109, 78, 114, 0.08);
}
.workspace-content .page-heading::after {
    background-image:
        linear-gradient(
            90deg,
            var(--hero-tint) 0%,
            rgba(255, 255, 255, 0.18) 40%,
            transparent 100%
        ),
        var(--hero-photo) !important;
    background-size: cover !important;
    background-position: center !important;
}
.workspace-content .page-heading h1 {
    color: #273459;
}
.workspace-content .content-panel,
.workspace-content .stat-panel,
.workspace-content .admin-stat,
.workspace-content .quick-link,
.workspace-content .dietitian-row {
    border-radius: 17px;
    box-shadow: 0 7px 24px rgba(57, 76, 117, 0.06);
}
.workspace-content .stat-panel:nth-of-type(4n + 1),
.workspace-content .admin-stat:nth-of-type(4n + 1) {
    background: #e4faf1;
}
.workspace-content .stat-panel:nth-of-type(4n + 2),
.workspace-content .admin-stat:nth-of-type(4n + 2) {
    background: #fff0d5;
}
.workspace-content .stat-panel:nth-of-type(4n + 3),
.workspace-content .admin-stat:nth-of-type(4n + 3) {
    background: #f3e8ff;
}
.workspace-content .stat-panel:nth-of-type(4n + 4),
.workspace-content .admin-stat:nth-of-type(4n + 4) {
    background: #ffe8eb;
}
.workspace-content .nutrition-workspace-banner {
    background-image:
        linear-gradient(90deg, #e4fff3 0%, rgba(232, 255, 241, 0.86) 52%, transparent 100%),
        url("https://images.unsplash.com/photo-1498837167922-ddd27525d352?auto=format&fit=crop&w=1200&q=80") !important;
    border-radius: 22px;
}
.workspace-content .content-panel:hover,
.workspace-content .stat-panel:hover,
.workspace-content .admin-stat:hover {
    transform: translateY(-4px);
    box-shadow: 0 17px 32px rgba(50, 76, 118, 0.14);
}
@keyframes vibrantRise {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.985);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}
@keyframes vibrantShimmer {
    from {
        background-position: 200% 0;
    }
    to {
        background-position: -200% 0;
    }
}
.workspace-content.view-enter .page-heading {
    animation: vibrantRise 0.55s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.workspace-content.view-enter .content-panel,
.workspace-content.view-enter .stat-panel,
.workspace-content.view-enter .admin-stat,
.workspace-content.view-enter .quick-link {
    animation: vibrantRise 0.48s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.workspace-content.view-enter .content-panel:nth-child(2),
.workspace-content.view-enter .stat-panel:nth-child(2) {
    animation-delay: 0.07s;
}
.workspace-content.view-enter .content-panel:nth-child(3),
.workspace-content.view-enter .stat-panel:nth-child(3) {
    animation-delay: 0.13s;
}
.workspace-content .page-heading::after {
    transition:
        transform 0.6s ease,
        filter 0.5s ease,
        width 0.5s ease;
}
.workspace-content .page-heading:hover::after {
    transform: scale(1.035);
    filter: saturate(1.22);
}
.workspace-content .button:hover:not(:disabled),
.workspace-sidebar .nav-item:hover {
    transform: translateY(-2px);
}
@media (max-width: 720px) {
    .workspace-content .page-heading {
        border-radius: 16px;
    }
    .workspace-content .page-heading::after {
        opacity: 0.55;
    }
}
@media (prefers-reduced-motion: reduce) {
    .workspace-content.view-enter .page-heading,
    .workspace-content.view-enter .content-panel,
    .workspace-content.view-enter .stat-panel,
    .workspace-content.view-enter .admin-stat,
    .workspace-content.view-enter .quick-link {
        animation: none !important;
    }
    * {
        scroll-behavior: auto !important;
    }
}

/* October 2026 polish: local professional consultation photography and readable layouts. */
.auth-story .story-image {
    background-image: url("/static/nutrition-consultation.jpg?v=6") !important;
    background-position: 53% 43%;
    background-size: cover;
}
.auth-story .story-shade {
    background: linear-gradient(
        180deg,
        rgba(10, 41, 58, 0.74) 0%,
        rgba(10, 51, 67, 0.36) 44%,
        rgba(14, 42, 64, 0.77) 100%
    );
}
.auth-story .story-copy {
    position: relative;
    z-index: 2;
}
/* Prevent the four child elements from being squeezed into horizontal columns. */
.workspace-content .client-home-feature {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    justify-content: center !important;
    gap: 12px !important;
    padding: clamp(26px, 5vw, 48px) !important;
    min-height: 290px;
    background-image:
        linear-gradient(
            90deg,
            rgba(16, 57, 68, 0.98) 0%,
            rgba(18, 72, 77, 0.94) 51%,
            rgba(17, 71, 73, 0.22) 100%
        ),
        url("/static/nutrition-consultation.jpg?v=6") !important;
    background-position:
        center,
        70% 38%;
    background-size: cover;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 22px;
}
.workspace-content .client-home-feature > * {
    flex: 0 0 auto !important;
    max-width: min(100%, 440px) !important;
    margin: 0 !important;
    position: relative;
    z-index: 1;
}
.workspace-content .client-home-feature .eyebrow {
    color: #d8f68a !important;
    letter-spacing: 1.8px;
}
.workspace-content .client-home-feature h2 {
    font-size: clamp(29px, 3.8vw, 44px);
    line-height: 1.08;
    color: #fff !important;
}
.workspace-content .client-home-feature p {
    font-size: 14px;
    line-height: 1.65;
    color: #e2f7f0 !important;
}
.workspace-content .client-home-feature .button {
    margin-top: 8px !important;
    align-self: flex-start;
}
.workspace-content .dietitian-home-feature {
    border-radius: 22px;
}
.workspace-content .page-heading {
    padding-right: min(35%, 240px);
}
.workspace-content .page-heading > div {
    position: relative;
    z-index: 1;
    min-width: 0;
}
.workspace-content .page-heading h1 {
    overflow-wrap: anywhere;
}
.workspace-content .page-heading::after {
    width: min(36%, 245px);
}
.workspace-content .page-heading:hover::after {
    width: min(38%, 260px);
}
.workspace-content .content-panel,
.workspace-content .stat-panel,
.workspace-content .quick-link {
    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease;
}
@media (max-width: 720px) {
    .workspace-content .client-home-feature {
        min-height: 320px;
        padding: 26px !important;
        background-image:
            linear-gradient(90deg, rgba(13, 54, 66, 0.97), rgba(16, 62, 73, 0.78)),
            url("/static/nutrition-consultation.jpg?v=6") !important;
    }
    .workspace-content .client-home-feature > * {
        max-width: 100% !important;
    }
    .workspace-content .page-heading {
        padding-right: 110px;
    }
    .workspace-content .page-heading::after {
        width: 105px;
    }
    .workspace-content .page-heading:hover::after {
        width: 110px;
    }
}
@media (prefers-reduced-motion: reduce) {
    .workspace-content .content-panel,
    .workspace-content .stat-panel,
    .workspace-content .quick-link {
        transition: none !important;
    }
}
/* Improve sidebar footer readability */
.sidebar-footer,
.sidebar-footer a,
.sidebar-footer button,
.sidebar-footer span,
.sidebar-footer p {
    color: #ffffff !important;
    opacity: 1 !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* Improve visibility of footer links */
.sidebar-footer a:hover,
.sidebar-footer button:hover {
    color: #d9ff85 !important;
}

/* Improve divider visibility */
.sidebar-footer hr {
    border-color: rgba(255, 255, 255, 0.5);
}

/* FIX: Sidebar footer visibility */

.workspace-sidebar .sidebar-bottom {
    background: #123b58 !important;
    border-radius: 14px;
    padding: 20px 16px !important;
    margin: 12px 8px 16px;
}

.workspace-sidebar .connection-status,
.workspace-sidebar .connection-status span,
.workspace-sidebar .signout-button,
.workspace-sidebar .signout-button .nav-glyph,
.workspace-sidebar .sidebar-docs,
.workspace-sidebar .sidebar-docs span {
    color: #ffffff !important;
    opacity: 1 !important;
    visibility: visible !important;
    text-shadow: none !important;
}

/* Bright green connection indicator */
.workspace-sidebar .status-dot {
    background: #a3ff90 !important;
    border: 2px solid #ffffff;
}

/* Sign out button */
.workspace-sidebar .signout-button {
    background: rgba(255, 255, 255, 0.12) !important;
    border-radius: 9px;
    padding: 12px !important;
    width: 100%;
    text-align: left;
    cursor: pointer;
}

.workspace-sidebar .signout-button:hover {
    background: rgba(255, 255, 255, 0.22) !important;
}

/* API documentation link */
.workspace-sidebar .sidebar-docs {
    display: inline-block;
    margin-top: 12px;
    text-decoration: none;
    font-weight: 600;
}

.workspace-sidebar .sidebar-docs:hover {
    color: #c7ff89 !important;
}

/* Ensure the sidebar status color communicates degradation, even with theme overrides. */
.workspace-sidebar .connection-status[data-state="checking"] .status-dot {
    background: #c8b274 !important;
}
.workspace-sidebar .connection-status[data-state="degraded"] .status-dot {
    background: #f4b64b !important;
}
.workspace-sidebar .connection-status[data-state="offline"] .status-dot {
    background: #f27869 !important;
}

html[data-theme="dark"] {
    color-scheme: dark;
    --paper: #24272b;
    --white: #33373c;
    --ink: #edf0f2;
    --muted: #bec3c9;
    --line: #555b62;
    --green: #c4c9cf;
    --green-deep: #f1f3f5;
    --green-pale: #44494f;
    --lime: #c9cdd2;
    --rust: #c3c7cc;
    --soft-rust: #484d53;
    --shadow-soft: 0 12px 30px rgba(0, 0, 0, 0.28);
}
html[data-theme="dark"] body {
    background: #24272b !important;
    color: #edf0f2 !important;
}
html[data-theme="dark"] #accountMenuPanel {
    background: #34383d !important;
    border-color: #555b62 !important;
}
html[data-theme="dark"] #accountMenuPanel .account-menu-heading strong,
html[data-theme="dark"] #accountMenuPanel .account-menu-heading span {
    color: #edf0f2 !important;
}
html[data-theme="dark"] #accountMenuPanel .account-menu-item {
    background: #c9cdd2 !important;
    border: 1px solid #d8dce0 !important;
    color: #24272b !important;
}
html[data-theme="dark"] #accountMenuPanel .account-menu-item:hover {
    background: #e1e4e7 !important;
}
html[data-theme="dark"] #accountMenuPanel .account-menu-signout {
    border-top-color: #555b62 !important;
}
html[data-theme="dark"] body * {
    color: #e4e7ea !important;
}
html[data-theme="dark"] .auth-main,
html[data-theme="dark"] .workspace-main,
html[data-theme="dark"] .workspace-content,
html[data-theme="dark"] .workspace-header {
    background: #292c30 !important;
    border-color: #4b5056 !important;
}
html[data-theme="dark"] .workspace-sidebar {
    background: #34383d !important;
    border-color: #4e5359 !important;
}
html[data-theme="dark"] .workspace-sidebar .sidebar-bottom {
    background: #292c30 !important;
}
html[data-theme="dark"] .workspace-sidebar .nav-item {
    background: transparent !important;
}
html[data-theme="dark"] .workspace-sidebar .nav-item:hover,
html[data-theme="dark"] .workspace-sidebar .nav-item.is-current,
html[data-theme="dark"] .workspace-sidebar .signout-button:hover {
    background: #50565d !important;
    box-shadow: inset 4px 0 #c6cbd0 !important;
}
html[data-theme="dark"] :is(
    .content-panel,
    .stat-panel,
    .admin-stat,
    .dietitian-row,
    .appointment-row,
    .goal-row,
    .appointment-request-row,
    .review-card,
    .result-item,
    .feature-panel,
    .quick-link,
    .meal-plan-row,
    .admin-approval-row,
    .document-row,
    .notice,
    .workspace-message
) {
    background: #35393e !important;
    border-color: #51575e !important;
    box-shadow: none !important;
}
html[data-theme="dark"] .workspace-content .page-heading {
    background: linear-gradient(110deg, #393d42, #303439) !important;
    border-color: #555b62 !important;
}
html[data-theme="dark"] .workspace-content .page-heading::after {
    opacity: 0.25 !important;
}
html[data-theme="dark"] .workspace-content .nutrition-workspace-banner {
    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("https://images.unsplash.com/photo-1498837167922-ddd27525d352?auto=format&fit=crop&w=1200&q=80") !important;
}
html[data-theme="dark"] .workspace-content .nutrition-workspace-banner .eyebrow,
html[data-theme="dark"] .workspace-content .nutrition-workspace-banner h2,
html[data-theme="dark"] .workspace-content .nutrition-workspace-banner p {
    color: #111 !important;
}
html[data-theme="dark"] .workspace-content [data-fixed-theme="light"] {
    background-color: #fffefa !important;
    border-color: #e5e7dc !important;
    color: #202820 !important;
}
html[data-theme="dark"] .workspace-content [data-fixed-theme="light"] * {
    color: #202820 !important;
}
html[data-theme="dark"] .workspace-content [data-fixed-theme="light"] .assistant-topic {
    background: #fffefa !important;
    border: 1px solid #e5e7dc !important;
    color: #586252 !important;
}
html[data-theme="dark"] .workspace-content [data-fixed-theme="light"] .assistant-topic.is-primary {
    background: #096b65 !important;
    border-color: #096b65 !important;
    color: #fff !important;
}
html[data-theme="dark"] .workspace-content [data-fixed-theme="light"] .assistant-topic:hover {
    background: #f0f3ea !important;
}
html[data-theme="dark"] .workspace-content [data-fixed-theme="light"] .chat-bubble {
    background: #fdfdf8 !important;
    border-color: #e5e7dc !important;
}
html[data-theme="dark"] .workspace-content [data-fixed-theme="light"] .chat-bubble.assistant {
    background: #f2f7ee !important;
    border-color: #dde7d6 !important;
}
html[data-theme="dark"] .workspace-content [data-fixed-theme="light"] .chat-form textarea {
    background: #fff !important;
    border-color: #dfe3d9 !important;
    color: #202820 !important;
}
html[data-theme="dark"] .workspace-content [data-fixed-theme="light"] .chat-form textarea::placeholder {
    color: #747c70 !important;
}
html[data-theme="dark"] .workspace-content [data-fixed-theme="light"] .chat-form .button-primary {
    background: #096b65 !important;
    border-color: #096b65 !important;
    color: #fff !important;
}
html[data-theme="dark"] body button:not(.nav-item) {
    background: #555b62 !important;
    border: 1px solid #6c737b !important;
    color: #f1f3f5 !important;
    box-shadow: none !important;
}
html[data-theme="dark"] body button:not(.nav-item):hover:not(:disabled) {
    background: #656c74 !important;
}
html[data-theme="dark"] .auth-form input:not([type="radio"]),
html[data-theme="dark"] .text-input,
html[data-theme="dark"] textarea,
html[data-theme="dark"] select {
    background: #303439 !important;
    border-color: #565c63 !important;
    color: #edf0f2 !important;
}
html[data-theme="dark"] input::placeholder,
html[data-theme="dark"] textarea::placeholder {
    color: #aeb4bb !important;
}
html[data-theme="dark"] .workspace-message.error,
html[data-theme="dark"] .form-message {
    background: #484d53 !important;
    color: #e4e7ea !important;
}
