.fast-assessment-card {
    margin-top: 0;
    padding: 1.5rem;
    background: #fff;
    border: 1px solid var(--color-gray-200);
    border-radius: 18px;
    box-shadow: 0 10px 24px rgba(17, 24, 39, 0.06);
    position: relative;
}

.fast-assessment-card::before,
.fast-assessment-card::after {
    content: '';
    position: absolute;
    top: 18px;
    width: 0;
    height: 0;
}

@media (max-width: 640px) {
    .fast-assessment-card::before,
    .fast-assessment-card::after {
        display: none;
    }
}

.fast-assessment-card::before {
    top: 37px;
    left: -14px;
    border-top: 14px solid transparent;
    border-bottom: 14px solid transparent;
    border-right: 14px solid var(--color-gray-200);
    filter: drop-shadow(-1px 1px 1px rgba(17, 24, 39, 0.08));
}

.fast-assessment-card::after {
    top: 38px;
    left: -13px;
    border-top: 13px solid transparent;
    border-bottom: 13px solid transparent;
    border-right: 13px solid #fff;
}
.fast-assessment-row {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.fast-assessment-row .fast-assessment-card {
    flex: 1 1 auto;
    max-width: 100%;
}

.fast-assessment-therapist {
    flex: 0 1 auto;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    gap: .5rem;
}

.fast-assessment-therapist__image-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.fast-assessment-therapist__image {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    margin-bottom: 1rem;
    object-fit: cover;
    border: 3px solid #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

@media (max-width: 640px) {
    .fast-assessment-therapist__image {
        width: 60px;
        height: 60px;
    }
}

/* Dashboard2 (mobile): therapist bubble = full width, avatar floats in top-left corner, hide therapist name */
@media (max-width: 640px) {
    .container.page-spacing .fast-assessment-row {
        position: relative;
        display: block;
        margin-top: 2rem;
    }

    .container.page-spacing .fast-assessment-row .fast-assessment-card {
        width: 100%;
    }

    .container.page-spacing .fast-assessment-therapist {
        position: absolute;
        top: -2.6rem;
        left: 43%;
        z-index: 5;
        gap: 0;
    }

    .container.page-spacing .fast-assessment-therapist__image-wrap {
        width: auto;
    }

    .container.page-spacing .fast-assessment-therapist__image {
        margin-bottom: 0;
    }

    .container.page-spacing .fast-assessment-therapist__name {
        display: none;
    }

    .container.page-spacing .fast-assessment-therapist .therapist-refresh-btn {
        position: absolute;
        top: 0.5rem;
        right: -5.5rem;
    }
}

.fast-assessment-therapist__name {
    font-weight: 600;
    color: #111827;
    font-size: 1.12rem;
    line-height: 1.15;
    text-align: center;
    align-self: center;
    margin-top: -10px;
}

.fast-assessment-therapist .therapist-change-btn{
    align-self: center;
    margin-top: .2rem;
    transform: translateY(-2px);

    /* button look like "Upravit" (meal-edit-btn), but as a safe standalone class */
    min-height: 34px;
    border-radius: 10px;
    border: 1px solid var(--color-gray-200);
    background: #fff;
    color: #111;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .35rem;
    padding: 0 .85rem;
    cursor: pointer;
    text-decoration: none;
    transition: background var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast);
    white-space: nowrap;

    /* remove mobile "hold" / callout */
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
    touch-action: manipulation;
}

.fast-assessment-therapist .therapist-change-btn__icon{
    width: 16px;
    height: 16px;
    display: none;
}

.fast-assessment-therapist .therapist-change-label--long{
    display: none;
}

.fast-assessment-therapist .therapist-refresh-btn{
    align-self: center;
    margin-top: .15rem;
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .2rem .6rem;
    font-size: .8rem;
    line-height: 1.1;
    color: #6b7280;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 999px;
    cursor: pointer;
    transition: background var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast);
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
    touch-action: manipulation;
}

body.state-fast_loader .fast-assessment-therapist .therapist-refresh-btn{
    display: none !important;
}

.fast-assessment-therapist .therapist-refresh-btn__icon{
    width: 14px;
    height: 14px;
}

.fast-assessment-therapist .therapist-refresh-btn:hover{
    background: var(--color-gray-100);
    border-color: var(--color-gray-200);
    color: #111827;
}

.fast-assessment-therapist .therapist-refresh-btn:focus-visible{
    outline: 2px solid rgba(17,24,39,.25);
    outline-offset: 2px;
}

.fast-assessment-therapist .therapist-refresh-btn[disabled]{
    opacity: .5;
    cursor: not-allowed;
}

.fast-assessment-therapist .therapist-change-sep{
    align-self: center;
    width: 68px;
    height: 1px;
    background: var(--color-gray-200);
    opacity: .85;
    margin: .25rem 0 .15rem;
}

.fast-assessment-therapist .therapist-change-btn span{
    font-weight: 600;
    font-size: .85rem;
}

.start-therapist-bubble--settings .therapist-change-btn{
    min-height: 40px;
    padding: 0 1rem;
}

.start-therapist-bubble--settings .therapist-change-btn span{
    font-size: .95rem;
}

@media (min-width: 769px) {
    .start-therapist-bubble--settings .therapist-change-btn{
        min-height: 48px;
        padding: 0 1.3rem;
        gap: .5rem;
    }
    .start-therapist-bubble--settings .therapist-change-btn__icon{
        display: inline-flex;
    }
    .start-therapist-bubble--settings .therapist-change-label--short{
        display: none;
    }
    .start-therapist-bubble--settings .therapist-change-label--long{
        display: inline;
    }
    .start-therapist-bubble--settings .therapist-change-btn span{
        font-size: 1rem;
    }
}

.fast-assessment-therapist .therapist-change-btn:hover{
    background: var(--color-gray-100);
}

.fast-assessment-therapist .therapist-change-btn:focus-visible{
    outline: 2px solid rgba(17,24,39,.25);
    outline-offset: 2px;
}

@media (max-width: 768px) {
    .fast-assessment-row {
        flex-direction: column;
        align-items: stretch;
    }
    .fast-assessment-therapist__name {
        font-size: 1rem;
    }
    .fast-assessment-row .fast-assessment-card {
        max-width: 100%;
        flex-basis: auto;
    }
    .fast-assessment-therapist { flex-basis: auto; }
    .fast-assessment-card::before {
        top: -1px;
        left: calc(50% - 14px);
        border: none;
        border-left: 14px solid transparent;
        border-right: 14px solid transparent;
        border-bottom: 14px solid var(--color-gray-200);
    }
    .fast-assessment-card::after {
        top: 0;
        left: calc(50% - 12px);
        border: none;
        border-left: 12px solid transparent;
        border-right: 12px solid transparent;
        border-bottom: 12px solid #fff;
    }
}

@media (max-width: 768px) {
    .state-fast .fast-assessment-row,
    .state-fast_photo .fast-assessment-row,
    .state-fast_loader .fast-assessment-row,
    .state-no_food .fast-assessment-row,
    .state-slow .fast-assessment-row,
    .state-slow_loader .fast-assessment-row,
    .state-slow_disabled .fast-assessment-row,
    .start-therapist-bubble .fast-assessment-row {
        flex-direction: row;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .state-fast .fast-assessment-card::before,
    .state-fast_photo .fast-assessment-card::before,
    .state-fast_loader .fast-assessment-card::before,
    .state-no_food .fast-assessment-card::before,
    .state-slow .fast-assessment-card::before,
    .state-slow_loader .fast-assessment-card::before,
    .state-slow_disabled .fast-assessment-card::before,
    .start-therapist-bubble .fast-assessment-card::before {
        top: 37px;
        left: -14px;
        border: none;
        border-top: 14px solid transparent;
        border-bottom: 14px solid transparent;
        border-right: 14px solid var(--color-gray-200);
    }

    .state-fast .fast-assessment-card::after,
    .state-fast_photo .fast-assessment-card::after,
    .state-fast_loader .fast-assessment-card::after,
    .state-no_food .fast-assessment-card::after,
    .state-slow .fast-assessment-card::after,
    .state-slow_loader .fast-assessment-card::after,
    .state-slow_disabled .fast-assessment-card::after,
    .start-therapist-bubble .fast-assessment-card::after {
        top: 38px;
        left: -13px;
        border: none;
        border-top: 13px solid transparent;
        border-bottom: 13px solid transparent;
        border-right: 13px solid #fff;
    }
}

/* Settings (mobile only): therapist bubble layout = avatar centered, button, then bubble with top-centered arrow */
@media (max-width: 768px) {
    body.page-settings #settings-therapist-bubble.start-therapist-bubble--settings {
        /* keep comfortable side padding on mobile, only on /settings */
        padding: 0 1rem;
    }

    body.page-settings #settings-therapist-bubble.start-therapist-bubble--settings .fast-assessment-row {
        flex-direction: column;
        align-items: center;
        gap: 0.75rem;
    }

    body.page-settings #settings-therapist-bubble.start-therapist-bubble--settings .fast-assessment-therapist {
        align-items: center;
        text-align: center;
        width: 100%;
        max-width: 100%;
        flex: 0 0 auto;
    }

    body.page-settings #settings-therapist-bubble.start-therapist-bubble--settings .fast-assessment-therapist__image-wrap {
        width: 100%;
        display: flex;
        justify-content: center;
    }

    body.page-settings #settings-therapist-bubble.start-therapist-bubble--settings .fast-assessment-therapist__image {
        width: 140px;
        height: 140px;
        margin-top: 1rem;
    }

    /* Settings mobile: hide "change therapist" button (desktop only requirement) */
    body.page-settings #settings-therapist-bubble.start-therapist-bubble--settings .fast-assessment-therapist .therapist-change-btn {
        display: none;
    }

    body.page-settings #settings-therapist-bubble.start-therapist-bubble--settings .fast-assessment-therapist__image-wrap {
        order: -2;
    }
    body.page-settings #settings-therapist-bubble.start-therapist-bubble--settings .fast-assessment-therapist__name {
        order: -1;
    }

    /* Settings mobile: remove the separator line under the name */
    body.page-settings #settings-therapist-bubble.start-therapist-bubble--settings .therapist-change-sep {
        display: none;
    }

    body.page-settings #settings-therapist-bubble.start-therapist-bubble--settings .fast-assessment-card {
        width: 100%;
        max-width: 100%;
        flex: 0 0 auto;
        margin-left: auto;
        margin-right: auto;
        /* reset settings variant that offsets the card to the left/right for 2-col layout */
        margin-right: 0;
    }

    body.page-settings #settings-therapist-bubble.start-therapist-bubble--settings .therapist-change-label--short {
        display: none;
    }
    body.page-settings #settings-therapist-bubble.start-therapist-bubble--settings .therapist-change-label--long {
        display: inline;
    }

    body.page-settings #settings-therapist-bubble.start-therapist-bubble--settings .therapist-change-btn__icon {
        display: inline-flex;
    }

    body.page-settings #settings-therapist-bubble.start-therapist-bubble--settings .fast-assessment-card.start-bubble-card {
        margin-top: 1rem;
    }

    body.page-settings #settings-therapist-bubble.start-therapist-bubble--settings .fast-assessment-card::before {
        top: -14px;
        left: calc(50% - 14px);
        border: none;
        border-left: 14px solid transparent;
        border-right: 14px solid transparent;
        border-bottom: 14px solid var(--color-gray-200);
        opacity: 0.5;
    }

    body.page-settings #settings-therapist-bubble.start-therapist-bubble--settings .fast-assessment-card::after {
        top: -11px;
        left: calc(50% - 12px);
        border: none;
        border-left: 12px solid transparent;
        border-right: 12px solid transparent;
        border-bottom: 12px solid #fff;
    }
}

/* Settings: show the bubble arrow even on very small screens (global rule hides it under 640px) */
@media (max-width: 640px) {
    body.page-settings #settings-therapist-bubble.start-therapist-bubble--settings .fast-assessment-card::before,
    body.page-settings #settings-therapist-bubble.start-therapist-bubble--settings .fast-assessment-card::after {
        display: block;
    }
}

.fast-assessment-card__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.fast-assessment-card__title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #111827;
}

.fast-assessment-card__subtitle {
    margin: .25rem 0 0;
    color: #6b7280;
    font-size: .95rem;
}


.fast-assessment-card__text {
    margin-top: 0;
    font-size: 1rem;
    line-height: 1.6;
    color: #111827;
    white-space: normal;
}

.fast-assessment-card__text p {
    margin: 0 0 1rem;
}

.fast-assessment-card__text p:last-child {
    margin-bottom: 0;
}

.fast-assessment-card__tip {
    margin-top: .5rem;
}

.fast-assessment-card__tip p {
    margin: .25rem 0 0;
    font-style: italic;
    color: #374151;
}

.fast-assessment-card__photo,
.fast-assessment-card__divider--photo {
    display: none;
}

.state-fast_photo .fast-assessment-card__photo,
.state-fast_photo .fast-assessment-card__divider--photo {
    display: block;
}

.state-fast_loader .fast-assessment-card__photo,
.state-fast_loader .fast-assessment-card__divider--photo {
    display: none !important;
}

/* Hide photo block by default unless state-fast_photo is active */
.hide_fast_photo {
    display: none !important;
}
.state-fast_photo .fast-assessment-card__photo.hide_fast_photo {
    display: flex !important;
}
.state-fast_photo .fast-assessment-card__divider.hide_fast_photo {
    display: block !important;
}

.fast-assessment-card__photo {
    margin: 0 0 1.25rem;
    display: flex;
    flex-direction: column;
    gap: .75rem;
}

.fast-assessment-card__photo-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 1.5rem;
    align-items: flex-start;
}

.fast-assessment-card__photo-col {
    min-width: 0;
}

.fast-assessment-card__photo-col--text {
    display: flex;
    flex-direction: column;
    gap: .75rem;
}

.fast-assessment-card__photo-col--image {
    display: flex;
    justify-content: flex-end;
}

.fast-assessment-card__photo-title {
    font-weight: 600;
    font-size: 1rem;
    color: #111827;
    margin-bottom: .5rem;
}

.fast-assessment-card__photo-list {
    margin: 0 0 .75rem 1.1rem;
    color: #374151;
    font-size: .95rem;
    line-height: 1.5;
    list-style-type: disc;
    padding-left: 0;
    list-style-position: inside;
}

.fast-assessment-card__photo-preview {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 240px;
    border-radius: 14px;
    border: 1px solid #e5e7eb;
    overflow: hidden;
    background: #f9fafb;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}

.fast-assessment-card__photo-preview img {
    width: 100%;
    height: 100%;
    border-radius: inherit;
    object-fit: cover;
    display: block;
}

.fast-assessment-card__photo-details {
    display: none;
    flex-direction: column;
    gap: .75rem;
}

.fast-assessment-card__photo.is-expanded .fast-assessment-card__photo-preview {
    height: auto;
    margin-bottom: .75rem;
}

.fast-assessment-card__photo.is-expanded .fast-assessment-card__photo-img {
    height: auto;
    object-fit: cover;
}

.fast-assessment-card__photo.is-expanded .fast-assessment-card__photo-details {
    display: flex;
}

.fast-assessment-card__photo-meals {
    display: flex;
    flex-direction: column;
    gap: .5rem;
}

.fast-assessment-card__photo-meals .meal-pill-row {
    width: 100%;
}

.fast-assessment-card__photo-actions-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
}

.fast-assessment-card__photo-actions-row .fast-assessment-card__photo-btn {
    padding: 0rem 0.85rem !important;
    font-size: 0.9rem !important;
}

.fast-assessment-card__photo-actions-row .fast-assessment-card__photo-btn--delete {
    margin-left: auto;
}

.fast-assessment-card__photo-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-top: 0;
    justify-content: flex-start;
}

.fast-assessment-card__photo-btn {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: 0rem 1rem !important;
    font-weight: 500;
    font-size: var(--font-size-m) !important;;
}

.fast-assessment-card__photo-btn i {
    width: 15px;
    height: 15px;
}

.fast-assessment-card__divider--photo {
    margin: 1.25rem 0;
}

@media (max-width: 720px) {
    .fast-assessment-card__photo-grid {
        grid-template-columns: 1fr;
    }
    .fast-assessment-card__photo-col--image {
        justify-content: center;
    }
    .fast-assessment-card__photo-preview {
        height: 200px;
    }
    .fast-assessment-card__photo.is-expanded .fast-assessment-card__photo-preview {
        height: auto;
    }
    .fast-assessment-card__photo-actions-row {
        flex-direction: column;
        align-items: stretch;
    }
    .fast-assessment-card__photo-actions-row .fast-assessment-card__photo-btn--delete {
        margin-left: 0;
    }
}

.fast-assessment-card__divider {
    width: 100%;
    height: 1px;
    background: var(--color-gray-200);
    margin: 1.25rem 0;
}

.fast-assessment-card__recommended {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.fast-assessment-card .macro-bars {
    border-top: none;
    margin-top: 0;
    padding-top: 0;
}

.fast-assessment-card__recommended-empty {
    margin: 0;
    text-align: center;
    color: var(--color-gray-500);
    font-size: .9rem;
}

.fast-assessment-card__cta {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .75rem;
    margin: 0;
}

.fast-assessment-card__cta .therapist-cta-button {
    width: 100%;
    max-width: 260px;
    justify-content: center;
}

.therapist-cta-note {
    margin: 0;
    font-size: .85rem;
    color: var(--color-gray-500);
    min-height: 1em;
    text-align: center;
}
/**
 * Foodlyo - Main Stylesheet
 * Minimalist design inspired by Apple, clean UI
 */

/* Google Fonts Import */
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&family=Inter:wght@300;400;500;600;700&display=swap');

/* CSS Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Root variables - Design system colors */
:root {
    --color-background: #f7f7f7;
    --color-primary: #7eab6d;
    --color-accent: #4086BF;
    --color-highlight: #BF4086;
    --color-white: #ffffff;
    --color-black: #000000;
    --color-gray-100: #f5f5f5;
    --color-gray-200: #e0e0e0;
    --color-gray-300: #cccccc;
    --color-gray-400: #999999;
    --color-gray-500: #666666;
    --color-gray-600: #333333;
    --color-meal-dot-default: #d1d5db;
    --color-meal-dot-yellow: #fde68a;
    --color-meal-dot-red: #dc2626;
    
    /* Typography */
    --font-family-heading: 'Work Sans', sans-serif;
    --font-family: 'Inter', 'Helvetica Neue', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-size-xs: 12px;
    --font-size-sm: 14px;
    --font-size-base: 16px;
    --font-size-m: var(--font-size-base);
    --font-size-lg: 18px;
    --font-size-xl: 24px;
    --font-size-2xl: 32px;
    --font-size-3xl: 56px;
    
    /* Spacing */
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-base: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;
    --spacing-2xl: 48px;
    --spacing-3xl: 64px;
    
    /* Border radius - zvětšeno pro přívětivější vzhled */
    --radius-sm: 8px;
    --radius-base: 12px;
    --radius-lg: 20px;
    --radius-xl: 24px;
    
    /* Shadows (minimalist) */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-base: 0 2px 4px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 4px 8px rgba(0, 0, 0, 0.08);
    
    /* Transitions */
    --transition-fast: 150ms ease-in-out;
    --transition-base: 250ms ease-in-out;
}

/* Base styles */
html {
    font-size: 16px;
    line-height: 1.5;
}

body {
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    color: var(--color-gray-600);
    background-color: var(--color-background);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Layout containers */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-base);
}

.container-sm {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 var(--spacing-base);
}

/* Grid system */
.grid {
    display: grid;
    gap: var(--spacing-base);
}

.grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

/* Flex utilities */
.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.items-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.justify-center {
    justify-content: center;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-family-heading);
    font-weight: 700;
    color: var(--color-gray-600);
    line-height: 1.1;
    margin-bottom: var(--spacing-base);
}

h1 {
    font-size: var(--font-size-2xl);
    letter-spacing: -0.025em;
    text-transform: uppercase;
    line-height: 1;
    font-weight: 600;
}

/* Auth pages */
.auth-container {
    max-width: 600px;
    padding-top: 2rem;
    padding-bottom: 4rem;
}

.auth-header {
    text-align: center;
}

.auth-title {
    font-size: 1.25rem;
    line-height: 1.5;
    text-transform: none;
    letter-spacing: normal;
}

.auth-title__email {
    display: block;
}

.auth-subtitle {
    color: var(--color-gray-500);
}

.auth-card {
    margin-top: 2rem;
}

.auth-form {
    margin-top: 1rem;
}

.honeypot-field {
    position: absolute;
    left: -10000px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.auth-submit {
    width: 100%;
    margin-top: 1rem;
}

.auth-otp-input {
    font-size: 2rem !important;
    text-align: center;
    letter-spacing: 0.25rem;
}

.auth-links {
    margin-top: 1rem;
    font-size: 14px;
    color: #666;
}

.auth-links a {
    color: #999;
    text-decoration: none;
    font-size: 13px;
}

.auth-link-sep {
    margin: 0 8px;
    color: #ddd;
}

h2 {
    font-size: var(--font-size-xl);
    font-weight: 700;
}

h3 {
    font-size: var(--font-size-xl);
    font-weight: 600;
}

p {
    margin-bottom: var(--spacing-base);
}

/* Placeholders - zeslabené */
::placeholder {
    color: #a1a1aa;
    opacity: 0.7;
}

::-webkit-input-placeholder {
    color: #a1a1aa;
    opacity: 0.7;
}

::-moz-placeholder {
    color: #a1a1aa;
    opacity: 0.7;
}

:-ms-input-placeholder {
    color: #a1a1aa;
    opacity: 0.7;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-base) var(--spacing-xl);
    font-size: var(--font-size-base);
    font-weight: 500;
    text-decoration: none;
    border: 1px solid transparent;
    border-radius: var(--radius-base);
    cursor: pointer;
    transition: all var(--transition-fast);
    min-height: 52px; /* Touch-friendly, větší */
    gap: var(--spacing-sm);
    position: relative;
}

.btn-primary {
    background-color: var(--color-primary);
    color: var(--color-white);
    border-color: var(--color-primary);
}

.btn-primary:hover {
    background-image: linear-gradient(rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.12));
    transform: translateY(-1px);
}

.btn-danger {
    background-color: #dc2626;
    color: var(--color-white);
    border-color: #dc2626;
}

.btn-danger:hover {
    background-color: #b91c1c;
    border-color: #b91c1c;
    transform: translateY(-1px);
}

.btn-accent {
    background-color: var(--color-accent);
    color: var(--color-white);
    border-color: var(--color-accent);
}

.btn-accent:hover {
    background-image: linear-gradient(rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.12));
    transform: translateY(-1px);
}

.btn-outline {
    color: var(--color-gray-600);
    border-color: var(--color-gray-300);
    background: transparent;
}

.btn-surface {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 46px;
    border-radius: 12px;
    font-weight: 700;
    border: 1px solid var(--color-gray-200);
    background: #ffffff;
    color: #111827;
    padding: 0.75rem 1.25rem;
    cursor: pointer;
    transition: background var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast), box-shadow var(--transition-fast);
}

.btn-surface:hover {
    background: var(--color-gray-100);
}

/* Když je prvek v aktivním stavu, hover neaplikuj */
.btn-surface.active:hover,
.btn-surface.is-active:hover,
.btn-surface[aria-pressed="true"]:hover{
    background: #ffffff;
}

.btn-surface:focus-visible {
    outline: 2px solid rgba(17, 24, 39, 0.25);
    outline-offset: 2px;
}

.btn-surface:disabled {
    opacity: 0.6;
    cursor: default;
}

.btn-surface i,
.btn-surface svg,
.btn-surface .icon {
    width: 18px;
    height: 18px;
}

/* Accent (blue) outline button variant */
.btn-outline-accent {
    color: var(--color-accent);
    border-color: var(--color-accent);
    background: transparent;
}
.btn-outline-accent:hover {
    background-color: rgba(64, 134, 191, 0.08);
    transform: translateY(-1px);
}
.btn-wrap { white-space: normal; line-height: 1.3; overflow-wrap: anywhere; word-break: break-word; display: inline-block; text-align: center; }

.btn-outline.btn-primary {
    background: var(--color-accent);
}

.btn-text {
    background-color: transparent;
    color: var(--color-gray-500);
    border: none;
    padding: var(--spacing-sm);
}

.btn-large {
    font-size: var(--font-size-lg);
    min-height: 60px;
}

.btn-small {
    padding: var(--spacing-sm) var(--spacing-lg);
    font-size: var(--font-size-sm);
    min-height: 40px;
}

/* Therapist section actions (recompute button + note) */
.therapist-actions { position: absolute; right: var(--spacing-base); bottom: var(--spacing-base); text-align: right; margin-left: var(--spacing-base); }
.therapist-actions .actions-note { font-size: var(--font-size-xs); color: var(--color-gray-400); margin-top: 4px; }
@media (max-width: 768px) {
    .therapist-actions {
        position: static; /* vypnout absolute na mobilu */
        left: auto; right: auto; bottom: auto;
        text-align: center;
        margin: var(--spacing-base) var(--spacing-base) 0 var(--spacing-base);
    }
    .therapist-actions .btn { width: 100%; }
}

/* Recommended values – grey card with sleek tabs */
.recommended-values-form { background: var(--color-gray-100); border: 1px solid var(--color-gray-200); border-radius: 0px 16px 16px 16px; padding: 1.5rem 1.5rem 1.75rem; margin-bottom: 1.25rem; }
.tabs { display: flex; gap: .35rem; margin-bottom: .75rem; border-bottom: 2px solid var(--color-gray-200); padding-left: .25rem; }
.tabs-detached { margin-bottom: 0; border-bottom: none; padding-left: 0; position: relative; z-index: 2; }
.tab-btn { appearance: none; background: transparent; border: 1px solid var(--color-gray-200); padding: 1rem 1.5rem; cursor: pointer; color: var(--color-gray-600); border-radius: 12px 12px 0 0; font-size: 1.12rem; line-height: 1; transition: all var(--transition-fast); }
.tab-btn:hover { background: #f6f7f8; color: var(--color-gray-700); }
.tab-btn.active { color: var(--color-gray-700); background: var(--color-gray-200); border-color: var(--color-gray-200); border-bottom: 1px solid var(--color-gray-100);}
.tab-btn.active:hover { background: var(--color-gray-200); color: var(--color-gray-700); }
.tabs-detached .tab-btn { background: var(--color-white); position: relative; margin-bottom: -1px; }
.tabs-detached .tab-btn.active { background: var(--color-gray-100); margin-bottom: -1px; }
.tabs-detached .tab-btn.active:hover { background: var(--color-gray-100); }
.recommended-values-form { position: relative; z-index: 1; margin-top: 0; }

/* Start4 onboarding: hide tabs + remove card styling */
.page-start4 .recommended-values-container .tabs {
  display: none;
}
.page-start4 .recommended-values-form {
  padding: 0;
  border: none;
  background: transparent;
}

@media (max-width: 640px) {
  .tab-btn { padding: .8rem 1.2rem; font-size: 1.05rem; }
}

/* Reserve space so actions nesplývají s obsahem sekce */
.therapist-section { position: relative; padding-bottom: 88px; }
@media (max-width: 768px) {
    .therapist-section { padding-bottom: 0; } /* když není absolute, není třeba rezerva */
}

/* AI Glow effect */
.btn-ai-glow {
    background: linear-gradient(45deg, var(--color-primary), var(--color-accent));
    color: var(--color-white);
    border: none;
    box-shadow: 0 0 20px rgba(134, 191, 64, 0.3);
    animation: glow-pulse 2s ease-in-out infinite alternate;
}

/* Uvnitř tlačítka zaručíme bílý text */
.btn-ai-glow .btn-text,
.btn-ai-glow .btn-loading {
    color: var(--color-white) !important;
}

@keyframes glow-pulse {
    from {
        box-shadow: 0 0 20px rgba(134, 191, 64, 0.3);
    }
    to {
        box-shadow: 0 0 30px rgba(134, 191, 64, 0.5);
    }
}

/* Disabled button styles */
.btn:disabled, .btn:disabled:hover {
    background: var(--color-gray-100) !important;
    color: var(--color-gray-300) !important;
    border-color: var(--color-gray-300) !important;
    cursor: not-allowed !important;
    opacity: 1;
    box-shadow: none !important;
    animation: none !important;
    transform: none !important;
    filter: none !important;
}

/* Form elements - větší a modernější */
.form-group {
    margin-bottom: var(--spacing-lg);
}

.form-label {
    display: block;
    margin-bottom: var(--spacing-sm);
    font-weight: 700;
    color: var(--color-gray-600);
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: var(--spacing-lg) var(--spacing-lg);
    font-size: var(--font-size-base);
    font-family: var(--font-family);
    color: var(--color-gray-600);
    background-color: var(--color-white);
    border: 1px solid var(--color-gray-300);
    border-radius: var(--radius-base);
    transition: border-color var(--transition-fast);
    min-height: 52px;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(134, 191, 64, 0.1);
}

.form-textarea {
    min-height: 140px;
    resize: vertical;
    padding-top: var(--spacing-lg);
}

.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 1rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 3rem;
}

/* Cards */
.card {
    background-color: var(--color-white);
    border: 1px solid var(--color-gray-200);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-base);
}

/* When a card has a header, reduce the card's top padding to avoid double spacing */
.card:has(> .card-header) {
    padding-top: var(--spacing-sm);
}

.card-header {
    padding: 1rem 1rem 1rem 0.5rem;
    margin-bottom: 0;
    border-bottom: 1px solid var(--color-gray-200);
    position: sticky;
    top: 0;
    background: var(--color-white);
    z-index: 6;
}

.card-header h3 {
    margin: 0;
    font-size: 1.25rem;
}

.card-title {
    font-size: var(--font-size-lg);
    font-weight: 600;
    margin-bottom: var(--spacing-sm);
}

/* Stats boxes */
.stats-box {
    background-color: var(--color-white);
    border: 1px solid var(--color-gray-200);
    border-radius: var(--radius-base);
    padding: var(--spacing-base);
    text-align: center;
}

.stats-value {
    font-size: var(--font-size-xl);
    font-weight: 600;
    color: var(--color-primary);
    margin-bottom: var(--spacing-xs);
}

.stats-label {
    font-size: var(--font-size-sm);
    color: var(--color-gray-500);
}

/* Navigation - vylepšená hlavní navigace */
.navbar {
    background-color: var(--color-background);
    padding: var(--spacing-base) 0;
    margin-bottom: 0;
    position: relative;
    min-height: 80px; /* Nastavení minimální výšky */
}


.navbar-content {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    padding: 10px 0;
    gap: 1rem;
}

.navbar-brand {
    font-size: var(--font-size-lg);
    font-weight: 700;
    color: var(--color-primary);
    text-decoration: none;
    font-family: var(--font-family-heading);
}

.navbar-slot {
    display: flex;
    align-items: center;
    min-height: 40px;
}

.navbar-slot--left {
    justify-content: flex-start;
}

.navbar-slot--right {
    justify-content: flex-end;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.navbar-center {
    text-align: center;
}

.navbar-profile-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    text-decoration: none;
    font-weight: 600;
    letter-spacing: 0.025em;
    text-transform: uppercase;
    font-size: 0.85rem;
    color: var(--color-gray-700);
    padding: 0.65rem 1rem;
    border-radius: 999px;
    border: 1px solid rgba(15, 23, 42, 0.12);
    transition: color var(--transition-fast), border-color var(--transition-fast), background var(--transition-fast);
}

.navbar-profile-link:hover,
.navbar-profile-link:focus-visible {
    color: var(--color-primary);
}

.navbar-profile-link.active {
    color: var(--color-white);
    background: var(--color-primary);
    border: none;
}

.navbar-profile-link .icon {
    width: 20px;
    height: 20px;
}

/* SVG icons (local sprite) */
.icon {
    display: inline-block;
    width: 1.25rem;
    height: 1.25rem;
    vertical-align: -0.125em;
    flex: 0 0 auto;
}

/* (no global stroke overrides on SVGs to avoid shape distortion) */

/* Floating quick add box */
.sticky-actions {
    position: sticky;
    bottom: calc(1.5rem + env(safe-area-inset-bottom, 0px));
    z-index: 40;
    pointer-events: none;
    padding: 0;
    display: flex;
    justify-content: center;
    width: 100%;
    margin-top: 4rem;
}

.quick-add-form {
    pointer-events: auto;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.85rem;
    width: 100%;
    max-width: 720px;
    margin: 0 auto;
    padding: 1.1rem;
    background: #7eab6d;
    border-radius: var(--radius-lg);
    box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.06), 0 24px 48px rgba(15, 23, 42, 0.26);
}

.quick-add-field-wrap {
    position: relative;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.quick-add-field {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
    cursor: text;
    background: #e5eee2;
    border-radius: var(--radius-base);
    padding: 0 1.1rem;
    border: 1px solid transparent;
    transition: border-color var(--transition-fast), background var(--transition-fast), box-shadow var(--transition-fast);
}

.quick-add-field.is-focused,
.quick-add-field:focus-within {
    background: var(--color-white);
    border-color: rgba(22, 101, 216, 0.4);
    box-shadow: 0 0 0 4px rgba(22, 101, 216, 0.08);
}

.quick-add-field-wrap.is-highlighted .quick-add-field,
.quick-add-field-wrap.is-highlighted .quick-add-field:focus-within {
    background: var(--color-white);
    border-color: rgba(134, 191, 64, 0.6);
    box-shadow: 0 0 0 4px rgba(134, 191, 64, 0.22);
}

/* „Všimni si quickaddu“ animace (voláno z tlačítka v jídelníčku) */
.quick-add-field-wrap.is-attention{
    animation: quick-add-attention 900ms cubic-bezier(.16, 1, .3, 1) 1;
    transform-origin: bottom center;
}

/* Zoom na celý quick-add panel (sticky wrapper) */
.sticky-actions.is-attention .quick-add-form{
    animation: quick-actions-attention 900ms cubic-bezier(.16, 1, .3, 1) 1;
    transform-origin: bottom center;
    will-change: transform;
}
.sticky-actions.is-highlighted .quick-add-form{
    box-shadow:
        0 0 0 4px rgba(134, 191, 64, 0.22),
        0 0 0 1px rgba(15, 23, 42, 0.06),
        0 24px 48px rgba(15, 23, 42, 0.26);
}

@media (prefers-reduced-motion: reduce) {
    .quick-add-field-wrap.is-attention{ animation: none; }
    .sticky-actions.is-attention .quick-add-form{ animation: none; }
}
@keyframes quick-add-attention{
    0% { transform: scale(1); }
    35% { transform: scale(1.04); }
    70% { transform: scale(1.01); }
    100% { transform: scale(1); }
}
@keyframes quick-actions-attention{
    0% { transform: translateY(0) scale(1); }
    35% { transform: translateY(-10px) scale(1.03); }
    70% { transform: translateY(-4px) scale(1.01); }
    100% { transform: translateY(0) scale(1); }
}

.quick-add-placeholder {
    position: absolute;
    left: 1.1rem;
    color: #9ca3af;
    font-weight: 400;
    font-size: calc(var(--font-size-base) * 1.05);
    pointer-events: auto;
    cursor: text;
    transition: opacity var(--transition-fast), transform var(--transition-fast);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.quick-add-field.has-text .quick-add-placeholder,
.quick-add-placeholder.is-hidden {
    opacity: 0;
    transform: translateY(-4px);
    pointer-events: none;
}

@media (max-width: 640px) {
    .quick-add-send { display: none !important; }

}

.quick-add-tips {
    position: absolute;
    left: 0;
    right: 0;
    bottom: calc(100% + 14px);
    display: flex;
    align-items: flex-end;
    gap: 10px;
    pointer-events: auto;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity var(--transition-fast), transform var(--transition-fast);
    z-index: 55;
}

.quick-add-tips.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.quick-add-tips__avatar {
    width: 44px;
    height: 44px;
    border-radius: 999px;
    overflow: hidden;
    flex: 0 0 auto;
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.18);
    border: 2px solid rgba(255, 255, 255, 0.85);
    background: rgba(255, 255, 255, 0.85);
}
.quick-add-tips__avatar img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.quick-add-tips__bubble {
    position: relative;
    flex: 1 1 auto;
    min-width: 0;
    padding: 0.75rem 0.85rem;
    background: rgba(255, 255, 255, 0.98);
    border-radius: 18px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.14);
    backdrop-filter: blur(6px);
}

.quick-add-tips__bubble::after {
    content: '';
    position: absolute;
    bottom: -7px;
    left: 22px;
    width: 14px;
    height: 14px;
    background: rgba(255, 255, 255, 0.98);
    border-left: 1px solid rgba(148, 163, 184, 0.35);
    border-bottom: 1px solid rgba(148, 163, 184, 0.35);
    transform: rotate(45deg);
}

.quick-add-tips__head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 0.35rem;
}

.quick-add-tips__title {
    font-weight: 800;
    font-size: calc(var(--font-size-base) * 0.92);
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: rgba(15, 23, 42, 0.82);
}

.quick-add-tips__text {
    font-size: calc(var(--font-size-base) * 0.98);
    color: rgba(15, 23, 42, 0.92);
    line-height: 1.4;
    white-space: normal;
}

.quick-add-tips__text::before {
    content: '„';
    color: rgba(126, 171, 109, 0.85);
    font-weight: 900;
    margin-right: 2px;
}
.quick-add-tips__text::after {
    content: '“';
    color: rgba(126, 171, 109, 0.85);
    font-weight: 900;
    margin-left: 2px;
}

.quick-add-tips:not(.is-visible) {
    pointer-events: none;
}

.quick-add-tips.is-visible {
    pointer-events: auto;
}

.quick-add-suggestions.is-visible + .quick-add-tips,
.quick-add-tips + .quick-add-suggestions.is-visible {
    /* zamez případnému překryvu při rychlém přepínání */
    margin-top: 0;
}

.quick-add-suggestions {
    position: absolute;
    left: 0;
    right: 0;
    bottom: calc(100% + 14px);
    padding: 0.65rem;
    background: rgba(255, 255, 255, 0.98);
    border-radius: 18px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    max-height: 320px;
    overflow-y: auto;
    pointer-events: auto;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity var(--transition-fast), transform var(--transition-fast);
    backdrop-filter: blur(6px);
    z-index: 60;
        -webkit-overflow-scrolling: touch;
        touch-action: pan-y;
        overscroll-behavior: contain;
}

.quick-add-suggestions.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.quick-add-suggestions::-webkit-scrollbar {
    width: 10px;
}

.quick-add-suggestions::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.45);
    border-radius: 10px;
}

.quick-add-suggestions-list {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.quick-add-suggestion {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.6rem 0.75rem;
    border-radius: 12px;
    cursor: pointer;
    background: transparent;
    border: 1px solid transparent;
    transition: background-color var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.quick-add-suggestion:hover {
    background: rgba(226, 232, 240, 0.45);
    border-color: rgba(148, 163, 184, 0.45);
}

.quick-add-suggestions:not(.is-pointer-hover) .quick-add-suggestion:hover {
    background: transparent;
    border-color: transparent;
    box-shadow: none;
}

.quick-add-suggestion.is-active {
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.25);
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.18);
}

.quick-add-suggestion-text {
    font-size: calc(var(--font-size-base) * 1.02);
    font-weight: 600;
    color: #0f172a;
    word-break: break-word;
}

.quick-add-suggestion-meta {
    font-size: calc(var(--font-size-sm, 0.85rem) * 0.95);
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.quick-add-suggestion-meta svg {
    width: 14px;
    height: 14px;
}

.quick-add-suggestions-empty,
.quick-add-suggestions-status {
    padding: 0.65rem 0.75rem;
    font-size: calc(var(--font-size-base) * 0.95);
    color: #64748b;
    text-align: center;
}

.quick-add-suggestions-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.quick-add-suggestions-spinner {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid rgba(148, 163, 184, 0.35);
    border-top-color: rgba(37, 99, 235, 0.8);
    animation: quick-add-spin 0.9s linear infinite;
}

.quick-add-input {
    width: 100%;
    min-height: 46px;
    max-height: none;
    border: none;
    background: transparent;
    resize: none;
    overflow-y: hidden;
    padding: 0.75rem 0;
    font-size: calc(var(--font-size-base) * 1.05);
    font-weight: 500;
    line-height: 1.35;
    color: var(--color-gray-900);
    outline: none;
}

.quick-add-input::placeholder {
    color: transparent;
}

.quick-add-send {
    position: absolute;
    right: 0.3rem;
    width: auto;
    min-width: 40px;
    height: 40px;
    border-radius: 13px;
    border: none;
    background: #557c46;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0 0.9rem;
    cursor: pointer;
    transition: background var(--transition-fast), transform var(--transition-fast), opacity var(--transition-fast);
}

.quick-add-send:hover {
    background: #46673a;
}

.quick-add-send:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.quick-add-send.is-submitting {
    cursor: wait;
}

.quick-add-form.is-submitting {
    opacity: 0.9;
}

.quick-add-send svg {
    width: 18px;
    height: 18px;
    margin-left: -3px;
}

.quick-add-send__label {
    font-size: 0.98rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    line-height: 1;
    white-space: nowrap;
}

.quick-add-actions {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.quick-add-send.quick-add-cta,
.quick-add-photo {
    width: 100%;
    justify-content: center;
    min-height: 56px;
    border-radius: var(--radius-base);
    border: 1px solid #557c46;
    background: #557c46;
    color: #ffffff;
    font-size: 1.05rem;
    font-weight: 600;
}

.quick-add-send.quick-add-cta {
    position: static;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0 1.2rem;
}

.quick-add-send.quick-add-cta svg {
    margin-left: 0;
}

.quick-add-photo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .6rem;
    padding: 0 1.2rem;
    min-height: 56px;
    align-self: flex-start;
    cursor: pointer;
    transition: background var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast), transform var(--transition-fast);
}

@media (min-width: 641px) {
    .quick-add-actions {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 0.85rem;
    }

    .quick-add-send.quick-add-cta,
    .quick-add-photo {
        width: auto;
    }

    .quick-add-send.quick-add-cta {
        align-self: flex-end;
    }

    .quick-add-photo {
        align-self: flex-start;
    }
}

.quick-add-photo:hover {
    background: #46673a;
    border-color: #46673a;
    transform: translateY(-2px);
}

.quick-add-photo:focus-visible,
.quick-add-send:focus-visible {
    outline: 3px solid rgba(22, 101, 216, 0.4);
    outline-offset: 2px;
}

.quick-add-hidden {
    display: none;
}

.mobile-quickadd-overlay,
.mobile-quickadd-head,
.mobile-add-bar {
    display: none;
}

.mobile-tabbar {
    display: none;
}


.mobile-quickadd-head {
    align-items: center;
    justify-content: flex-end;
}

.mobile-quickadd-close,
.popup-close {
    width: 40px;
    height: 40px;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.5);
    background: #ffffff;
    color: var(--color-gray-700);
    font-size: 1.4rem;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.mobile-quickadd-close {
    position: fixed;
    top: 1rem;
    right: 1rem;
}

.mobile-quickadd-close:hover,
.popup-close:hover {
    background: rgba(226, 232, 240, 0.6);
}

.mobile-add-bar__btn {
    border: none;
    background: transparent;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 1rem;
    font-weight: 700;
    padding: 1.5rem 0.5rem;
    cursor: pointer;
}

.mobile-add-bar__btn .icon {
    width: 20px;
    height: 20px;
}

.dashboard-quick-add-padding {
    height: 120px;
}

@media (max-width: 640px) {
    .navbar {
        display: none;
    }

    body.page-therapists .card-header {
        display: none;
    }

    body.page-therapists .settings-container {
        margin: 0;
    }

    

    .state-fast .container.page-spacing,
    .state-fast_photo .container.page-spacing,
    .state-fast_loader .container.page-spacing,
    .state-slow .container.page-spacing,
    .state-slow_loader .container.page-spacing,
    .state-slow_disabled .container.page-spacing,
    .state-no_food .container.page-spacing {
        min-height: auto !important;
    }

    body.has-mobile-tabbar {
        padding-bottom: calc(108px + min(env(safe-area-inset-bottom, 0px), 8px));
        background-color: white;
    }

    body.page-settings {
        background: var(--color-background);
    }

    .sticky-actions {
        position: fixed;
        inset: 0;
        z-index: 120;
        display: none;
        align-items: flex-end;
        justify-content: center;
        margin: 0;
        padding: 0;
        pointer-events: none;
        overscroll-behavior: contain;
        top: var(--quickadd-vv-top, 0px);
        bottom: auto;
        height: var(--quickadd-vv-height, 100dvh);
    }

    body.mobile-quickadd-open .sticky-actions {
        display: flex;
        pointer-events: auto;
    }

    body.mobile-quickadd-select .sticky-actions {
        display: flex;
        pointer-events: auto;
    }

    body.mobile-quickadd-active .card-body {
        display: none !important;
    }

    .mobile-quickadd-overlay {
        position: fixed;
        left: 0;
        right: 0;
        top: var(--quickadd-vv-top, 0px);
        height: var(--quickadd-vv-height, 100dvh);
        background: #ffffff;
        display: none;
        align-items: center;
        justify-content: center;
        padding: 1.5rem 1rem calc(1.5rem + env(safe-area-inset-bottom, 0px));
        z-index: 1;
        overscroll-behavior: contain;
    }

    .mobile-quickadd-overlay::before {
        content: "";
        position: absolute;
        left: 0;
        right: 0;
        top: calc(-1 * var(--quickadd-vv-top, 0px));
        height: var(--quickadd-vv-top, 0px);
        background: #ffffff;
    }

    body.mobile-quickadd-open .mobile-quickadd-overlay {
        display: flex;
    }

    body.mobile-quickadd-select .mobile-quickadd-overlay {
        display: flex;
    }

    body.mobile-quickadd-select .quick-add-form {
        background: transparent;
        box-shadow: none;
        padding: 0;
    }

    body.mobile-quickadd-select .quick-add-field-wrap,
    body.mobile-quickadd-select .quick-add-actions {
        display: none;
    }

    body.mobile-quickadd-open .mobile-quickadd-overlay__actions {
        display: none;
    }

    body.mobile-quickadd-open .mobile-quickadd-overlay {
        pointer-events: none;
    }

    body.mobile-quickadd-open .quick-add-form {
        z-index: 2;
        pointer-events: auto;
    }

    .mobile-quickadd-overlay__actions {
        width: min(320px, 90vw);
        display: flex;
        flex-direction: column;
        gap: 0.85rem;
        opacity: 1;
        transform: translateY(0);
        transition: opacity var(--transition-fast), transform var(--transition-fast);
    }

    .mobile-quickadd-overlay.is-actions-hidden .mobile-quickadd-overlay__actions {
        opacity: 0;
        transform: translateY(8px);
        pointer-events: none;
    }

    .mobile-quickadd-overlay__action {
        pointer-events: auto;
        width: 100%;
        min-height: 64px;
        border-radius: 999px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 0.75rem;
        text-decoration: none;
        color: rgba(15, 23, 42, 0.92);
        background: rgba(255, 255, 255, 0.75);
        border: 1px solid rgba(148, 163, 184, 0.35);
        box-shadow: 0 18px 36px rgba(15, 23, 42, 0.18);
        -webkit-backdrop-filter: blur(18px) saturate(180%);
        backdrop-filter: blur(18px) saturate(180%);
        font-weight: 700;
        font-size: 1.05rem;
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
    }

    .mobile-quickadd-overlay__action:focus-visible,
    .mobile-quickadd-overlay__action:active {
        background: rgba(255, 255, 255, 0.9);
        border-color: rgba(99, 115, 129, 0.45);
        box-shadow: 0 12px 28px rgba(15, 23, 42, 0.22);
    }

    .mobile-quickadd-overlay__action:active {
        transform: scale(0.98);
    }

    body.mobile-quickadd-open .mobile-quickadd-head {
        display: flex;
        position: fixed;
        top: 0.75rem;
        right: 0.75rem;
        margin: 0;
        z-index: 2;
        transform: translateY(var(--quickadd-vv-offset, 0px));
    }

    body.mobile-quickadd-select .mobile-quickadd-head {
        display: flex;
        position: fixed;
        top: 0.75rem;
        right: 0.75rem;
        margin: 0;
        z-index: 2;
        transform: translateY(var(--quickadd-vv-offset, 0px));
    }

    body.mobile-quickadd-open .quick-add-form {
        position: relative;
        background-color: var(--altcha-color-base);
        box-shadow: none;
        z-index: 1;
    }

    body.mobile-quickadd-open .quick-add-send {
        opacity: 1;
    }


    

    body.mobile-quickadd-open .quick-add-send {
        display: inline-flex !important;
    }

    body.mobile-quickadd-open .quick-add-photo {
        display: none;
    }

    /* iOS-style mobile tabbar (frosted glass) */
    .mobile-tabbar{
        position: fixed;
        left: 16px;
        right: 16px;
        bottom: calc(12px + min(env(safe-area-inset-bottom, 0px), 8px));
        z-index: 108; /* pod sticky-actions (120), nad obsahem */
        display: flex;
        align-items: flex-end;
        justify-content: space-between;
        pointer-events: none; /* povolí interakci jen na potomcích */
    }

    .mobile-tabbar__tabs{
        pointer-events: auto;
        display: flex;
        align-items: center;
        gap: 2px;
        padding: 8px;
        border-radius: 999px;
        background: rgba(255, 255, 255, 0.62);
        border: 1px solid rgba(148, 163, 184, 0.35);
        box-shadow: 0 24px 54px rgba(15, 23, 42, 0.22);
        -webkit-backdrop-filter: blur(16px) saturate(180%);
        backdrop-filter: blur(16px) saturate(180%);
    }

    .mobile-tabbar__item{
        pointer-events: auto;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 4px;
        min-width: 74px;
        padding: 10px 15px;
        border-radius: 999px;
        text-decoration: none;
        color: rgba(15, 23, 42, 0.6);
        font-weight: 800;
        letter-spacing: 0.01em;
        transition: background var(--transition-fast), color var(--transition-fast), transform var(--transition-fast);
        -webkit-tap-highlight-color: transparent;
    }

    .mobile-tabbar__item .icon{
        width: 22px;
        height: 22px;
    }

    .mobile-tabbar__label{
        font-size: 0.72rem;
        line-height: 1;
        white-space: nowrap;
    }

    .mobile-tabbar__item.is-active{
        background: rgba(255, 255, 255, 0.95);
        color: rgba(15, 23, 42, 0.98);
        box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.12), 0 8px 18px rgba(15, 23, 42, 0.18);
    }

    .mobile-tabbar__item:focus-visible,
    .mobile-tabbar__item:active{
        background: rgba(255, 255, 255, 0.92);
        color: rgba(15, 23, 42, 0.98);
        box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.16), 0 6px 14px rgba(15, 23, 42, 0.16);
    }

    .mobile-tabbar__item:active{
        transform: scale(0.98);
    }

    .mobile-tabbar__fab{
        pointer-events: auto;
        width: 74px;
        height: 74px;
        border-radius: 999px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        text-decoration: none;
        color: var(--color-white);
        background: var(--color-primary);
        border: 1px solid var(--color-primary);
        box-shadow: 0 18px 36px rgba(15, 23, 42, 0.18);
        -webkit-tap-highlight-color: transparent;
    }

    body.state-slow .mobile-tabbar__fab,
    body.state-slow_loader .mobile-tabbar__fab,
    body.state-slow_disabled .mobile-tabbar__fab{
        display: none;
    }

    .mobile-tabbar__fab .icon{
        width: 30px;
        height: 30px;
    }

    .mobile-tabbar__fab:focus-visible,
    .mobile-tabbar__fab:active{
        filter: brightness(0.95);
    }

    .mobile-tabbar__fab:active{
        transform: scale(0.98);
    }

    /* Tabbar otevřený quickadd modal má být vždy nad tabbarem */
    body.mobile-quickadd-open .mobile-tabbar{
        display: none;
    }


    
}

@keyframes quick-add-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Extra bottom padding in standalone PWA to avoid iOS home indicator overlap */
@media (display-mode: standalone) {
  .sticky-actions {
    bottom: calc(1.5rem + constant(safe-area-inset-bottom));
    bottom: calc(1.5rem + env(safe-area-inset-bottom));
  }
}

.btn .nav-icon {
    width: 20px;
    height: 20px;
}


/* Language switcher */
.language-switcher {
    display: flex;
    gap: var(--spacing-sm);
}

.language-flag {
    width: 24px;
    height: 18px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    opacity: 0.6;
    transition: opacity var(--transition-fast);
}

.language-flag:hover,
.language-flag.active {
    opacity: 1;
}

/* Language buttons - textové tlačítka */
.language-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-sm) var(--spacing-base);
    font-size: var(--font-size-sm);
    font-weight: 700;
    text-decoration: none;
    color: var(--color-gray-400);
    background-color: transparent;
    border: none;
    cursor: pointer;
    transition: color var(--transition-fast);
    min-width: 48px;
    min-height: 44px;
}

.language-btn:hover {
    color: var(--color-gray-500);
}

.language-btn.active {
    color: var(--color-black);
}


/* Loading overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(247, 247, 247, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-content {
    background-color: var(--color-white);
    padding: var(--spacing-xl);
    border-radius: var(--radius-lg);
    text-align: center;
}

/* Loader - therapist photo */
.loading-therapist {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 1rem;
    position: relative;
    border: 5px solid #fff;
    box-shadow: 0 0 0 0 rgba(64, 134, 191, 0.0);
    animation: blueGlow 2.0s ease-in-out infinite;
}

/* Pulsující modrý glow (bez zelené) */
@keyframes blueGlow {
  0% {
    box-shadow: 0 0 0 0 rgba(64, 134, 191, 0.25);
    filter: drop-shadow(0 0 0 rgba(64, 134, 191, 0.0));
  }
  50% {
    box-shadow: 0 0 24px 12px rgba(64, 134, 191, 0.45);
    filter: drop-shadow(0 0 10px rgba(64, 134, 191, 0.35));
  }
  100% {
    box-shadow: 0 0 0 0 rgba(64, 134, 191, 0.0);
    filter: drop-shadow(0 0 0 rgba(64, 134, 191, 0.0));
  }
}

/* Loader message + fade */
.loading-message {
    font-size: 1.25rem;
    font-weight: 600;
    opacity: 1;
    transition: opacity 0.5s ease;
}

.loading-microcopy {
    font-size: 0.875rem;
    color: var(--color-gray-500);
    margin-top: 1rem;
}

.fade-out {
    opacity: 0;
}

.fade-in {
    opacity: 1;
}

/* Partial loader - for card sections */
.partial-loader {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.95);
    display: flex;
    justify-content: center;
    z-index: 50;
    border-radius: inherit;
}

.partial-loader .loading-content {
    padding: var(--spacing-lg);
}

/* Ensure card body has relative positioning for partial loader */
.card-body {
    position: relative;
}

@media (max-width: 640px) {
    .card-body {
        padding: 1.5rem 0rem !important;
    }
}

/* Hide obsah card-body při slow loadingu, kromě stats a loader */
.card-body.loading-active > *:not(.stats-card):not(.partial-loader):not(#partialLoadingOverlay) {
    display: none !important;
}

/* Ensure loader area has reasonable height */
.card-body.loading-active {
    min-height: 400px;
}

/* Cancel button for slow analysis */
.cancel-analysis-btn {
    margin-top: 1rem;
    padding: 0.5rem 1rem;
    background: transparent;
    border: 1px solid var(--color-gray-300);
    color: var(--color-gray-500);
    font-size: 0.8rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.cancel-analysis-btn:hover {
    background: var(--color-gray-100);
    color: var(--color-gray-600);
    border-color: var(--color-gray-400);
}

.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid var(--color-gray-300);
    border-radius: 50%;
    border-top-color: var(--color-primary);
    animation: spin 1s ease-in-out infinite;
}

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

/* Footer - vizuálně utlumený */
footer {
    opacity: 0.5;
    transition: opacity var(--transition-base);
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 0 var(--spacing-sm);
    }
    
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }
    
    .btn {
        min-height: 48px; /* Larger touch targets on mobile */
    }
    
    h1 {
        font-size: var(--font-size-2xl);
    }
    
    h2 {
        font-size: var(--font-size-xl);
    }
    
    .navbar-content {
        grid-template-columns: auto 1fr auto;
    }
    
    .navbar-slot--left {
        display: flex;
    }
    
    .navbar-slot--right {
        justify-content: flex-end;
    }

    .navbar-brand {
        margin-left: 16px;
    }

    .navbar-profile-link {
        margin-right: 16px;
    }
}

/* Utility classes */
.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.text-primary {
    color: var(--color-primary);
}

.text-accent {
    color: var(--color-accent);
}

.text-gray {
    color: var(--color-gray-500);
}

.text-small {
    font-size: var(--font-size-sm);
}

.mb-0 {
    margin-bottom: 0;
}

.mb-sm {
    margin-bottom: var(--spacing-sm);
}

.mb-base {
    margin-bottom: var(--spacing-base);
}

.mb-lg {
    margin-bottom: var(--spacing-lg);
}

.mt-lg {
    margin-top: var(--spacing-lg);
}

.hidden {
    display: none;
}

.block {
    display: block;
}

.inline-block {
    display: inline-block;
} 

.navbar-logo-img {
    max-height: 30px;
    width: auto;
    vertical-align: middle;
} 

/* Home2 split layout */
.home2-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: calc(100vh - 0px);
}

.home2-left {
    background: var(--color-white);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.home2-left-inner {
    width: 100%;
    max-width: 520px;
    padding: 48px 32px;
}

.home2-logo {
    height: 38px;
    margin-bottom: 60px;
}

.home2-slogan {
    font-size: 25px;
    line-height: 1.05;
    color: var(--color-gray-500);
    margin-bottom: 20px;
    letter-spacing: -0.02em;
}

.home2-subtitle {
    font-size: 16px;
    color: var(--color-gray-500);
    margin-bottom: 20px;
}

.home2-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 8px;
}

.home2-input {
    height: 54px;
    border-radius: var(--radius-base);
    padding: 0 16px;
    font-size: 16px;
}

.home2-submit {
    height: 54px;
    font-weight: 600;
}

.home2-terms {
    font-size: 12px;
    color: var(--color-gray-400);
    margin-top: 8px;
}

.home2-terms-link {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.home2-footer {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: 24px;
    width: 100%;
    max-width: 520px;
    padding: 0 32px;
    font-size: 12px;
    color: var(--color-gray-400);
}

.home2-footer a { color: var(--color-gray-400); }

/* Hide global footer on homepage-like pages */
.homepage-fix footer {
    display: none;
}

.home2-right {
    background: #f3f4f6;
    display: flex;
    flex-direction: column;
}

.home2-right-header {
    display: flex;
    justify-content: flex-end;
    padding: 16px 24px;
}

.language-switcher-inline .language-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 36px;
    border-radius: 999px;
    border: 1px solid #e5e7eb;
    color: #374151;
    text-decoration: none;
    margin-left: 8px;
    font-weight: 600;
}

.language-switcher-inline .language-btn.active {
    background: var(--color-white);
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.home2-carousel {
    flex: 1;
    display: grid;
    place-items: center;
    position: relative;
    overflow: hidden;
}

.home2-slide {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    opacity: 0;
    transform: translateX(20px) scale(0.98);
    transition: all 400ms ease;
}

.home2-slide.active {
    opacity: 1;
    transform: translateX(0) scale(1);
}

.home2-therapist {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background: transparent;
    box-shadow: none;
    padding: 0;
    max-width: 560px;
}

.home2-therapist-img {
    width: 400px;
    height: 400px;
    max-width: 80vw;
    max-height: 80vw;
    border-radius: 20px;
    object-fit: cover;
}

.home2-bubble {
    position: relative;
    margin-top: 28px;
    background: var(--color-white);
    border-radius: 18px;
    padding: 18px 22px;
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.12);
    max-width: 520px;
}

.home2-bubble::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-bottom: 10px solid var(--color-white);
}

.home2-quote {
    font-size: 1.1rem;
    color: #111827;
    margin-bottom: 8px;
}

.home2-name {
    font-size: 14px;
    color: #6b7280;
}

.home2-dots {
    position: absolute;
    bottom: 24px;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.home2-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    border: none;
    background: #d1d5db;
    cursor: pointer;
}

.home2-dot.active {
    background: var(--color-primary);
}

.home2-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 56px;
    height: 56px;
    border-radius: 999px;
    border: 1px solid #e5e7eb;
    background: var(--color-white);
    color: #111827;
    font-size: 28px;
    line-height: 54px;
    text-align: center;
    cursor: pointer;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.12);
}

.home2-arrow-left { left: 16px; }
.home2-arrow-right { right: 16px; }

@media (max-width: 900px) {
    .home2-split {
        grid-template-columns: 1fr;
    }
    .home2-right-header {
        justify-content: flex-start;
        position: absolute;
        top: 8px;
        right: 8px;
        padding: 6px 10px;
        z-index: 1001;
        background: transparent;
    }
    /* Mobilní layout: menší horní mezera a přirozená výška karuselu podle obsahu */
    .home2-right { padding-top: 5px; min-height: auto; }
    .home2-carousel { min-height: auto; padding: 12px 16px 40px; }
    .home2-logo {margin-top: 40px;}
    /* Karuselové slidy nechť na mobilu určují výšku kontejneru */
    .home2-slide { position: relative; inset: auto; opacity: 1; transform: none; transition: none; display: none; }
    .home2-slide.active { display: grid; }
    /* Tečky pod karuselem do běžného toku stránky */
    .home2-dots { position: static; margin-top: 20px; }
    /* Menší šipky na mobilu */
    .home2-arrow { width: 40px; height: 40px; font-size: 20px; line-height: 38px; }
    /* Mobile: použij globální footer dole, lokální footer skryj */
    .home2-footer { display: none; }
    .homepage-fix footer { display: block; text-align: center;}
}

/* Homepage specific fixes */
.homepage-fix .navbar {
    margin-bottom: 0;
    border-bottom: none;
}
.homepage-fix .mb-lg {
    padding-top: 2em;
}
.homepage-fix .mb-sm {
    padding-top: 1em;
} 

.settings-container {
    max-width: 800px;
    margin: 2rem auto;
    padding: 0;
    background-color: transparent;
    border: none;
}

.start-therapist-bubble {
    max-width: 960px;
    margin: 0 auto 2.5rem;
    padding: 0 1rem;
}

.start-therapist-bubble .fast-assessment-row {
    margin-top: 0;
    width: 100%;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.start-therapist-bubble--inside-card {
    margin: 0 auto 1.5rem;
    padding: 0;
}

.start-therapist-bubble--page {
    margin-top: 3rem;
}

.start-therapist-bubble--settings {
    margin-top: 1.5rem;
    margin-bottom: 2rem;
    padding: 0;
}

.start-therapist-bubble--settings .fast-assessment-row {
    max-width: 760px;
}

.start-therapist-bubble--settings .fast-assessment-card {
    max-width: 720px;
}

.start-therapist-bubble--settings .fast-assessment-therapist__image {
    width: 150px;
    height: 150px;
}

.start-therapist-bubble--settings .fast-assessment-card {
    margin-right: 1.5rem;
}

.start-therapist-bubble--inside-card .fast-assessment-row {
    max-width: 900px;
}

.start-therapist-bubble .fast-assessment-therapist {
    align-items: center;
    text-align: center;
}

.start-therapist-bubble .fast-assessment-card {
    max-width: 640px;
}

.start-therapist-bubble .fast-assessment-card__text p:first-child {
    font-weight: 700;
}

.start-bubble-card {
    padding: 1.5rem 1.75rem;
}

.start-goal-divider {
    width: 100%;
    height: 1px;
    background: var(--color-gray-200);
    opacity: 0.9;
    margin: 1.25rem 0 1.25rem;
}

.start-progress {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.45rem;
    margin: 0.5rem auto 1.25rem;
    width: 33%;
    min-width: 220px;
}

.start-progress__segment {
    height: 10px;
    border-radius: 999px;
    background: var(--color-gray-200);
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.06);
}

.start-progress__segment.is-active {
    background: var(--color-primary);
    box-shadow: 0 1px 4px rgba(16, 185, 129, 0.25);
}

.start-only-goals {
    margin-top: 1rem;
}

.start-only-goals .card:first-of-type {
    margin-top: 1.5rem;
}

.start-therapist-bubble + .card {
    margin-top: 0;
}

.start-actions-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 1.5rem;
}

.start-actions-row--end {
    justify-content: flex-end;
}

.start5-benefits {
    margin: 0.25rem 0 1.25rem;
}

.start5-benefits .settings-stats-value,
.start5-benefits .settings-stats-label {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.2;
    color: #111827;
    margin: 0;
}

.payment-pricing-section {
    margin: 4rem 0 4rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.9rem;
    text-align: center;
}

.payment-price-display .price-value {
    font-size: 2.1rem;
    font-weight: 800;
    line-height: 1.1;
    color: #111827;
}

.payment-price-display .price-period {
    margin-left: 0.35rem;
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-gray-500);
}

.payment-billing-toggle {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--color-gray-200);
    background: #fff;
    border-radius: 999px;
    padding: 0.25rem;
    gap: 0.25rem;
    box-shadow: 0 10px 24px rgba(17, 24, 39, 0.06);
}

.payment-billing-toggle input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.payment-billing-toggle label {
    padding: 0.5rem 1rem;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--color-gray-500);
    cursor: pointer;
    user-select: none;
    transition: background var(--transition-fast), color var(--transition-fast), box-shadow var(--transition-fast);
}

.payment-billing-toggle input:checked + label {
    background: var(--color-primary);
    color: #fff;
    box-shadow: 0 10px 22px rgba(16, 185, 129, 0.25);
}

.start5-actions {
    margin-top: 1.75rem;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 1rem;
}

.start5-actions--single {
    grid-template-columns: 1fr;
    justify-items: center;
}

.start5-back-link {
    justify-self: start;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: var(--color-gray-300);
    font-weight: 600;
    text-decoration: none;
}

.start5-back-icon {
    width: 18px;
    height: 18px;
    transform: rotate(180deg);
}

.start5-subscribe-btn {
    justify-self: center;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 1.05rem 2.2rem;
    font-size: 1.05rem;
    font-weight: 700;
}

.start5-subscribe-icon {
    width: 18px;
    height: 18px;
}

.start5-actions--single .start5-subscribe-btn {
    justify-self: center;
}

@media (max-width: 768px) {
    .start5-actions {
        grid-template-columns: 1fr;
        justify-items: center;
        gap: 1rem;
    }
    .start5-back-link {
        justify-self: center;
    }
    .start5-subscribe-btn {
        width: 100%;
        justify-content: center;
        padding-left: 1.6rem;
        padding-right: 1.6rem;
    }
}

@media (max-width: 640px) {
    body.page-start1,
    body.page-start2,
    body.page-start3,
    body.page-start4,
    body.page-start5 {
        --color-background: #ffffff;
        background-color: var(--color-background);
        padding-bottom: calc(1rem + env(safe-area-inset-bottom));
    }

    body.page-start1 .card-body,
    body.page-start2 .card-body,
    body.page-start3 .card-body,
    body.page-start4 .card-body,
    body.page-start5 .card-body {
        padding: 1rem 0rem 0rem 0rem !important;
    }

    body.page-start1 .card-body {
        padding: 0rem 0rem 0rem 0rem !important;
    }

    .start-therapist-bubble--settings .fast-assessment-therapist__image {
        width: 90px;
        height: 90px;
    }

    body.page-start2 .start-therapist-bubble--page,
    body.page-start3 .start-therapist-bubble--page,
    body.page-start4 .start-therapist-bubble--page {
        width: 100vw;
        max-width: none;
        margin-left: calc(50% - 50vw);
        margin-right: calc(50% - 50vw);
        padding-left: 0;
        padding-right: 0;
        margin-top: 5rem;
    }

    body.page-start2 .start-therapist-bubble--page .fast-assessment-row,
    body.page-start3 .start-therapist-bubble--page .fast-assessment-row,
    body.page-start4 .start-therapist-bubble--page .fast-assessment-row {
        position: relative;
        display: block;
        margin-top: 2rem;
        width: 100%;
        max-width: none;
    }

    body.page-start2 .start-therapist-bubble--page .fast-assessment-card,
    body.page-start3 .start-therapist-bubble--page .fast-assessment-card,
    body.page-start4 .start-therapist-bubble--page .fast-assessment-card {
        width: auto;
        max-width: none;
        margin-left: 1rem;
        margin-right: 1rem;
        margin-top:1rem;
    }

    body.page-start2 .start-therapist-bubble--page .fast-assessment-therapist,
    body.page-start3 .start-therapist-bubble--page .fast-assessment-therapist,
    body.page-start4 .start-therapist-bubble--page .fast-assessment-therapist {
        position: absolute;
        top: -2.6rem;
        left: 50%;
        transform: translateX(-50%);
        z-index: 5;
        gap: 0;
        align-items: center;
        text-align: center;
    }

    body.page-start2 .start-therapist-bubble--page .fast-assessment-therapist__image-wrap,
    body.page-start3 .start-therapist-bubble--page .fast-assessment-therapist__image-wrap,
    body.page-start4 .start-therapist-bubble--page .fast-assessment-therapist__image-wrap {
        width: auto;
    }

    body.page-start2 .start-therapist-bubble--page .fast-assessment-therapist__image,
    body.page-start3 .start-therapist-bubble--page .fast-assessment-therapist__image,
    body.page-start4 .start-therapist-bubble--page .fast-assessment-therapist__image {
        margin-bottom: 0;
    }

    body.page-start2 .start-therapist-bubble--page .fast-assessment-therapist__name,
    body.page-start3 .start-therapist-bubble--page .fast-assessment-therapist__name,
    body.page-start4 .start-therapist-bubble--page .fast-assessment-therapist__name {
        display: none;
    }




    body.page-start2 .card-header, body.page-start3 .card-header {
        display: none;
    } 
    
    body.page-start2 .start-therapist-bubble--page, body.page-start3 .start-therapist-bubble--page, body.page-start4 .start-therapist-bubble--page {
        margin-bottom: 0;
    } 
    
    body.page-start2 .start-fixed-next, body.page-start3 .start-fixed-next, body.page-start4 .start-fixed-next {
        padding-bottom: calc(1rem + env(safe-area-inset-bottom))
    }  
}

.start-back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: none;
    border: none;
    color: var(--color-gray-300);
    font-weight: 600;
    cursor: pointer;
    padding: 0;
    font-size: 1rem;
}

.start-back-icon {
    width: 18px;
    height: 18px;
    transform: rotate(180deg);
}

.start-next-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.95rem 1.6rem;
    font-size: 1rem;
    font-weight: 600;
}

.start-next-btn .icon {
    width: 18px;
    height: 18px;
}

@media (max-width: 768px) {
    .start-therapist-bubble {
        padding: 0 0.5rem;
    }
    .start-therapist-bubble .fast-assessment-card {
        width: 100%;
    }
    .start-therapist-bubble--settings .fast-assessment-therapist {
        flex: 0 0 25%;
        max-width: 25%;
    }
    .start-therapist-bubble--settings .fast-assessment-card {
        flex: 0 0 75%;
        max-width: 75%;
    }
    .start-therapist-bubble--settings .fast-assessment-row {
        gap: 0rem;
    }
    .start-therapist-bubble--settings .fast-assessment-card {
        margin-right: 0.75rem;
    }
    .start-actions-row {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    .start-back-link {
        justify-content: flex-start;
    }
    .start-next-btn {
        justify-content: center;
    }

    .start-fixed-next {
        padding-bottom: calc(5.5rem + env(safe-area-inset-bottom));
    }

    .start-fixed-next .start-next-btn {
        position: fixed;
        left: 1rem;
        right: 1rem;
        bottom: calc(1rem + env(safe-area-inset-bottom));
        width: auto;
        z-index: 50;
    }

    .settings-stats-grid.start5-benefits {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.settings-container h2 {
    margin-bottom: 2rem;
    text-align: left;
}

.settings-container .card {
    background-color: #fff;
    border: 1px solid var(--color-gray-200);
    border-radius: var(--radius-lg);
    margin-bottom: 2rem;
    overflow: hidden;
}



.settings-container .card-body {
    padding: 1.5rem;
}

.settings-stats-card .card-body {
    padding: 1.75rem;
}

.settings-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
}

.settings-stats-box {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 1.35rem;
    border: 1px solid var(--color-gray-200);
    border-radius: var(--radius-lg);
    background: var(--color-gray-100);
    box-shadow: none;
}

.settings-stats-icon {
    width: 52px;
    height: 52px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    color: #0f172a;
    background: rgba(15, 23, 42, 0.08);
}

.settings-stats-icon svg,
.settings-stats-icon i {
    width: 24px;
    height: 24px;
}

.settings-stats-icon--calories {
    background: rgba(249, 115, 22, 0.18);
    color: #ea580c;
}

.settings-stats-icon--grade {
    background: rgba(34, 197, 94, 0.18);
    color: #15803d;
}

.settings-stats-icon--carbs {
    background: rgba(59, 130, 246, 0.18);
    color: #1d4ed8;
}

.settings-stats-icon--proteins {
    background: rgba(168, 85, 247, 0.18);
    color: #7e22ce;
}

.settings-stats-icon--fats {
    background: rgba(20, 184, 166, 0.18);
    color: #0f766e;
}

.rv-primary-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem;
}

.rv-secondary-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem;
    margin-top: 1rem;
}

.settings-stats-icon--micro {
    background: rgba(15, 23, 42, 0.08);
    color: #0f172a;
}

@media (max-width: 640px) {
    .rv-primary-grid { grid-template-columns: 1fr; }
    .rv-secondary-grid { grid-template-columns: 1fr; }
    .settings-container .rv-primary-grid,
    .settings-container .rv-secondary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .settings-container .recommended-values-form .rv-primary-grid,
    .settings-container .recommended-values-form .rv-secondary-grid {
        grid-template-columns: 1fr;
    }
}

.settings-stats-value {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.1;
    color: #111827;
}

.settings-stats-unit {
    font-size: 1rem;
    color: #6b7280;
    margin-left: 0.35rem;
    font-weight: 500;
}

.settings-stats-label {
    font-size: 0.95rem;
    color: #6b7280;
    font-weight: 600;
    margin-top: 0.25rem;
}

.settings-stats-footer {
    margin-top: 1.25rem;
}

.settings-stats-link {
    width: 100%;
    justify-content: center;
    gap: 0.4rem;
}

@media (max-width: 640px) {
    /* Start5: benefity jsou v úzké 3-sloupcové mřížce, proto je necháme skládat do sloupce. */
    .settings-stats-grid.start5-benefits .settings-stats-box {
        flex-direction: column;
        align-items: flex-start;
    }

    .settings-stats-link {
        width: 100%;
    }
}



/* Checkbox styling */
.settings-container .form-checkbox {
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-base);
}

.settings-container .form-checkbox input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin: 0;
    margin-top: 2px;
    border: 2px solid var(--color-gray-300);
    border-radius: var(--radius-sm);
    background-color: var(--color-white);
    cursor: pointer;
    appearance: none;
    position: relative;
    flex-shrink: 0;
}

.settings-container .form-checkbox input[type="checkbox"]:checked {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
}

.settings-container .form-checkbox input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.settings-container .form-checkbox label {
    cursor: pointer;
    font-weight: 500;
    margin-bottom: var(--spacing-xs);
}

.settings-container .form-checkbox .text-muted {
    font-size: var(--font-size-sm);
    color: var(--color-gray-500);
    margin: 0;
}


/* Therapist Selection */
.therapist-selection-container {
    margin-bottom: 2rem;
    text-align: center;
}

.therapist-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

@media (max-width: 640px) {
    .therapist-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1rem;
    }
}

.therapist-card {
    background-color: #f9f9f9;
    border: 2px solid transparent;
    border-radius: var(--radius-lg);
    padding: 1.5rem 0.5rem 0.5rem 0.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: visible;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.therapist-card.selected {
    border-color: var(--color-primary);
    background-color: #f0f9f0;
    box-shadow: 0 6px 20px rgba(134, 191, 64, 0.2);
    /* držet kartu stejně "vysoko" jako při hoveru (ať po výběru nespadne) */
    transform: translateY(-2px);
}

/* Hover efekt – jemné nadzvednutí (zachovat sjednocený styl s activity-card) */
.therapist-card:not(.selected):hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,.06);
}

/* Vybraný terapeut: bez změny výšky při hoveru (stabilní) */
.therapist-card.selected:hover {
    transform: translateY(-2px);
}

.therapist-card img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    margin-bottom: 1rem;
    object-fit: cover;
    border: 3px solid #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Overlay zámku na kartě */
.avatar-wrap{position:relative;display:inline-grid;place-items:center}
.avatar-wrap img{display:block}
.avatar-wrap .card-lock {position:absolute;box-shadow:0 2px 6px rgba(0,0,0,.08);color:#FFF;}
.avatar-wrap .card-lock svg {width:35px;height:35px;margin-top: -10px;margin-left: 2px;}

.avatar-wrap .card-lock i{width:16px;height:16px;color:#64748b}

.therapists-page .therapists-header-row{
    display:flex;
    align-items:center;
    gap:1rem;
    flex-wrap:wrap;
    justify-content:center;
}
.therapists-page .therapists-header-row h3{
    margin:0;
    flex:1 1 auto;
    text-align:center;
}
.therapists-page .therapists-actions{
    margin-top: 1.5rem;
    display: flex;
    justify-content: center;
}
.therapists-page .therapists-actions .btn{
    min-width: 160px;
}
.therapists-page .therapists-back-btn{
    min-width:120px;
    font-weight:600;
    display:inline-flex;
    align-items:center;
    gap:0.35rem;
    margin-right:auto;
}
.therapists-page .therapists-back-btn__icon{
    font-size:1.1rem;
    line-height:1;
    display:inline-block;
}
.therapists-page .therapists-header-spacer{
    display:inline-block;
    min-width:120px;
    height:1px;
    margin-left:auto;
    visibility:hidden;
}

/* /therapists varianta: malé plovoucí "?" tlačítko pro detail terapeuta */
.therapists-page .avatar-wrap .therapist-info-btn{
    position:absolute;
    right:-12px; /* pravá strana od hlavy */
    left:auto;
    top:4px;
    width:40px;
    height:40px;
    padding:0;
    box-sizing:border-box;
    -webkit-appearance:none;
    appearance:none;
    border-radius:999px;
    border:1px solid var(--color-gray-200);
    background:#ffffff;
    box-shadow:none;
    color:#111;
    font-size:23.4px;
    font-weight:700;
    font-family:"Times New Roman","Georgia","Times",serif;
    font-style:italic;
    line-height:1;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    cursor:pointer;
    z-index:12;
    transition: background var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast), box-shadow var(--transition-fast);
}
.therapists-page .avatar-wrap .therapist-info-btn:hover{
    background: var(--color-gray-100);
    color:#111;
}
.therapists-page .avatar-wrap .therapist-info-btn:active{
    background: var(--color-gray-100);
}
.therapists-page .avatar-wrap .therapist-info-btn:focus-visible{
    outline:2px solid var(--color-primary);
    outline-offset:2px;
}

/* /therapists varianta: tlačítko "Vybrat" jako zelený outline */
.therapists-page .therapist-card .btn-select.btn-outline{
    border-width:1px;
    border-color:var(--color-gray-200);
    color:#111;
    background-color:#ffffff;
    font-weight:700;
    transition: background var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast), box-shadow var(--transition-fast);
}
.therapists-page .therapist-card .btn-select.btn-outline:hover{
    /* bez hover efektu */
    background-color:#ffffff;
    transform:none;
    border-color:var(--color-gray-200);
    color:#111;
}
.therapists-page .therapist-card .btn-select.btn-outline:active{
    /* bez hover/active efektu */
    background-color:#ffffff;
    transform:none;
    border-color:var(--color-gray-200);
    color:#111;
}

/* /therapists varianta: aktivní (vybraný) stav tlačítka "Vybráno" */
.therapists-page .therapist-card.selected .btn-select{
    background-color:var(--color-primary);
    border-color:var(--color-primary);
    color:#ffffff;
}
.therapists-page .therapist-card.selected .btn-select:hover{
    /* bez hover efektu */
    background-color:var(--color-primary);
    border-color:var(--color-primary);
    color:#ffffff;
    transform:none;
}
.therapists-page .therapist-card.selected .btn-select:active{
    /* bez hover/active efektu */
    background-color:var(--color-primary);
    border-color:var(--color-primary);
    color:#ffffff;
    transform:none;
}

/* /therapists: sjednocení výšky tlačítka mezi stavy (ikona nesmí tlačítko "zvětšit") */
.therapists-page .therapist-card .btn-select{
    line-height:1;
    min-height:3rem;
}
.therapists-page .therapist-card .btn-select i,
.therapists-page .therapist-card .btn-select svg{
    width:1em;
    height:1em;
    flex-shrink:0;
    display:block;
}

.therapist-card h4 {
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
    color: var(--color-gray-600);
}

.therapist-card p {
    font-size: 0.9rem;
    color: var(--color-gray-500);
    margin-bottom: 1rem;
    flex: 1 1 auto;
    width:6rem;
    text-align: center;
}

.therapist-card .btn-select {
    width: 100%;
    max-width: 200px;
    margin-top: 0.8rem;
    padding: 0.8rem 0rem;
    font-size: 0.9rem;
    font-weight: 600;
    min-height: unset;
    border-radius: 12px;
    color: #232323;
}

.therapist-card .btn-select.btn-outline {
    background-color: #ffffff;
    color: #232323;
    border-color: #dfdfdf;
}

.therapist-card .btn-select.btn-primary {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
    color: #ffffff;
}

.therapist-card .btn-select.btn-primary:disabled {
    background-color: var(--color-primary) !important;
    border-color: var(--color-primary) !important;
    color: #ffffff !important;
    opacity: 1 !important;
    cursor: pointer !important;
}

.therapist-emoji {
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    transition: all 0.3s ease;
    z-index: 10;

}

.therapist-card.selected .therapist-emoji {
    border-color: var(--color-primary);
    transform: translateX(-50%) scale(1.1);
}

.therapist-card:hover .therapist-emoji {
    transform: translateX(-50%) scale(1.05);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* Personal Info Form */
.personal-info-form .form-group {
    margin-bottom: 1.5rem;
}

.personal-info-form .form-row {
    display: flex;
    gap: 1.5rem;
}

.personal-info-form .form-row .form-group {
    flex: 1;
}

@media (max-width: 768px) {
    .personal-info-form .form-row {
        flex-direction: column;
        gap: 0;
    }

    .personal-info-form .form-row .form-group {
        width: 100%;
    }
}

/* Activity level cards */
.activity-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1rem; }
.activity-option { position: relative; display: flex; }
.activity-radio { position: absolute; opacity: 0; pointer-events: none; }
.activity-card { background: #f9f9f9; border: 2px solid transparent; border-radius: var(--radius-lg); padding: 1rem; display: flex; flex-direction: column; align-items: center; gap: .25rem; cursor: pointer; transition: all .2s ease; text-align: center; min-height: 140px; height: 100%; }
.activity-card:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,.06); }
.activity-card.selected, .activity-radio:checked + .activity-card { border-color: var(--color-primary); background: #f0f9f0; box-shadow: 0 6px 18px rgba(134,191,64,.18); }
.activity-icon { font-size: 28px; line-height: 1; margin-bottom: .25rem; display: inline-flex; align-items: center; justify-content: center; }
.activity-icon svg { width: 28px; height: 28px; }
.activity-title { font-size: 1.05rem; margin: .15rem 0 .1rem; color: var(--color-gray-600); }
.activity-desc { font-size: .85rem; color: var(--color-gray-500); }

@media (min-width: 768px) {
  /* Desktop: 5 možností v jedné řadě */
  .activity-cards { grid-template-columns: repeat(5, 1fr); }
}

@media (max-width: 640px) {
  .activity-cards { grid-template-columns: 1fr; }
  .activity-option { width: 100%; }
  .activity-card {
    width: 100%;
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
    align-items: center;
    text-align: left;
    gap: 0.2rem 0.75rem;
    min-height: auto;
    padding: 0.9rem 1rem;
  }
  .activity-icon { grid-row: 1 / span 2; margin-bottom: 0; }
  .activity-title { margin: 0; font-size: 1rem; }
  .activity-desc { margin: 0; }
  .activity-title,
  .activity-desc { grid-column: 2; }
}

/* Alert komponenty */
.alert {
    padding: var(--spacing-lg) var(--spacing-xl);
    border-radius: var(--radius-lg);
    border: none;
    margin-bottom: var(--spacing-lg);
    font-weight: 500;
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-sm);
    box-shadow: var(--shadow-base);
    position: relative;
    overflow: hidden;
}

.alert::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    border-radius: 2px 0 0 2px;
}

/* Success alert - zelená */
.alert-success {
    background-color: #f0f9f0;
    color: #2d5a2d;
    border-left: 4px solid var(--color-primary);
}

.alert-success::before {
    background-color: var(--color-primary);
}

/* Error alert - růžová */
.alert-error,
.alert-danger {
    background-color: #fdf0f5;
    color: #6b2344;
    border-left: 4px solid var(--color-highlight);
}

.alert-error::before,
.alert-danger::before {
    background-color: var(--color-highlight);
}

/* Warning alert - oranžová */
.alert-warning {
    background-color: #fef8f0;
    color: #8b4513;
    border-left: 4px solid #ff8c00;
}

.alert-warning::before {
    background-color: #ff8c00;
}

/* Info alert - modrá */
.alert-info {
    background-color: #f0f6ff;
    color: #1e3a5f;
    border-left: 4px solid var(--color-accent);
}

.alert-info::before {
    background-color: var(--color-accent);
}

/* Alert ikony */
.alert-icon {
    flex-shrink: 0;
    margin-top: 2px;
    font-size: 18px;
}

.alert-success .alert-icon {
    color: var(--color-primary);
}

.alert-error .alert-icon,
.alert-danger .alert-icon {
    color: var(--color-highlight);
}

.alert-warning .alert-icon {
    color: #ff8c00;
}

.alert-info .alert-icon {
    color: var(--color-accent);
}

/* Alert content */
.alert-content {
    flex: 1;
}

.alert-title {
    font-weight: 600;
    margin-bottom: var(--spacing-xs);
    font-size: var(--font-size-base);
}

.alert-message {
    margin: 0;
    line-height: 1.5;
}

/* Dismissible alerts */
.alert-dismissible {
    padding-right: 3rem;
}

.alert-close {
    position: absolute;
    top: var(--spacing-sm);
    right: var(--spacing-sm);
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    opacity: 0.5;
    transition: opacity var(--transition-fast);
    padding: var(--spacing-xs);
    border-radius: var(--radius-sm);
}

.alert-close:hover {
    opacity: 1;
    background-color: rgba(0, 0, 0, 0.1);
}

/* Day state badge next to date heading on dashboard */
.d2-title .d2-day-state-badge {
	display: inline-block;
	margin-left: .5rem;
	padding: .15rem .5rem;
	font-size: .75rem;
	font-weight: 600;
	border-radius: 999px;
	background: var(--color-gray-100);
	color: var(--color-gray-500);
	border: 1px solid var(--color-gray-200);
	vertical-align: middle;
	text-transform: none;
	letter-spacing: 0;
}
/* Compact alert variant */
.alert-compact {
    padding: var(--spacing-sm) var(--spacing-base);
    font-size: var(--font-size-sm);
}

.alert-compact .alert-icon {
    font-size: 16px;
}

/* Fixed Action Button */
.fixed-action-button-container {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(255,255,255,1) 70%, rgba(255,255,255,0));
    padding: 2rem;
    text-align: center;
    z-index: 100;
}

/* Animated Hero Background */
.hero-animated {
    background: linear-gradient(-45deg, #86BF40, #4086BF);
    background-size: 400% 400%;
    animation: gradient-flow 15s ease infinite;
    position: relative;
    overflow: hidden;
    will-change: background-position;
}

.hero-animated::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, 
        rgba(134, 191, 64, 0.1) 0%, 
        rgba(64, 134, 191, 0.1) 50%,
        rgba(134, 191, 64, 0.1) 100%);
    background-size: 200% 200%;
    animation: shimmer 20s ease-in-out infinite alternate;
    pointer-events: none;
}

@keyframes gradient-flow {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

@keyframes shimmer {
    0% {
        background-position: 0% 0%;
        opacity: 0.3;
    }
    50% {
        background-position: 100% 100%;
        opacity: 0.6;
    }
    100% {
        background-position: 0% 0%;
        opacity: 0.3;
    }
}

/* Hero floating particles */
.hero-particles {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
}

.hero-particles::before,
.hero-particles::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    animation: float 25s infinite linear;
}

.hero-particles::before {
    top: 20%;
    left: 20%;
    animation-delay: -5s;
    animation-duration: 20s;
}

.hero-particles::after {
    top: 60%;
    right: 20%;
    animation-delay: -15s;
    animation-duration: 30s;
    width: 30px;
    height: 30px;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
        opacity: 0;
    }
    10%, 90% {
        opacity: 1;
    }
    50% {
        transform: translateY(-100px) rotate(180deg);
    }
}

/* Animace tlačítka Přihlášení synchronizovaná s hero */
.homepage-fix .btn-primary {
    background: linear-gradient(-45deg, #86BF40, #4086BF);
    background-size: 400% 400%;
    animation: gradient-flow 15s ease infinite;
    border: none;
    position: relative;
    overflow: hidden;
}

.homepage-fix .btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.1);
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: inherit;
}

.homepage-fix .btn-primary:hover::before {
    opacity: 1;
}

.homepage-fix .btn-primary:hover {
    filter: none;
    transform: translateY(-1px);
}

/* Animované CTA tlačítko v hero sekci */
.hero-cta-animated {
    background-color: white !important;
    background-image: none !important;
    border: none !important;
    font-weight: 700;
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.hero-cta-animated .btn-text {
    background: linear-gradient(-45deg, #86BF40, #4086BF);
    background-size: 400% 400%;
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    animation: gradient-flow 15s ease infinite;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 1.1em;
    letter-spacing: 0.5px;
}

.hero-cta-animated .btn-arrow {
    background: linear-gradient(-45deg, #86BF40, #4086BF);
    background-size: 400% 400%;
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    animation: gradient-flow 15s ease infinite;
    font-size: 18px;
    display: inline-block;
    transition: transform 0.3s ease;
    font-weight: 700;
}

.hero-cta-animated:hover .btn-arrow {
    transform: translateX(3px);
}

.hero-cta-animated:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}



/* Respektování předvoleb redukovaných animací */
@media (prefers-reduced-motion: reduce) {
    .hero-animated {
        animation: none;
        background: linear-gradient(-45deg, #86BF40, #4086BF);
    }
    
    .hero-animated::before {
        animation: none;
        opacity: 0.2;
    }
    
    .hero-particles::before,
    .hero-particles::after {
        animation: none;
        opacity: 0;
    }
    
    .homepage-fix .btn-primary {
        animation: none;
        background: var(--color-primary);
    }
    
    .hero-cta-animated .btn-text,
    .hero-cta-animated .btn-arrow {
        animation: none !important;
        background: #86BF40;
        background-clip: text;
        -webkit-background-clip: text;
        color: transparent;
    }
} 

:root {
    --altcha-border-radius: 10px;
    --altcha-color-base: #FFF;
    --altcha-color-border: #dfdfdf;
    --altcha-max-width: 260px;
  }

/* Therapist section redesign */
.therapist-section{display:grid;grid-template-columns:1fr 2fr;gap:2rem;align-items:flex-start;background:var(--color-white);padding:1.5rem;border-radius:12px;margin-bottom:0;} 
.therapist-col1{display:flex;flex-direction:column;align-items:flex-start;text-align:left;} 
.therapist-col2{display:flex;flex-direction:column;} 
.pros-cons-grid{display:grid;grid-template-columns:1fr 1fr;gap:1rem;} 
.therapist-photo-lg{width:180px;height:180px;border-radius:50%;object-fit:cover;border:3px solid #fff;box-shadow:0 2px 4px rgba(0,0,0,0.1);display:block;margin:0 auto;}
.speech-bubble{position:relative;background:var(--color-white);border-radius:14px;padding:1rem 1.25rem 4rem;border:1px solid #e5e7eb;box-shadow:0 6px 18px rgba(15,23,42,0.06);width:100%;max-width:none;margin-top:1rem;margin-bottom:1rem;text-align:left;} 
.bubble-centered{margin-left:0;margin-right:0;width:100%;}
.speech-bubble::before{content:'';position:absolute;top:-13px;left:50%;transform:translateX(-50%);width:0;height:0;border-left:13px solid transparent;border-right:13px solid transparent;border-bottom:13px solid #e5e7eb;}
.speech-bubble::after{content:'';position:absolute;top:-12px;left:50%;transform:translateX(-50%);width:0;height:0;border-left:12px solid transparent;border-right:12px solid transparent;border-bottom:12px solid var(--color-white);} 
.grade-display{background:var(--color-primary);color:var(--color-white);border:3px solid var(--color-white);border-radius:50%;width:80px;height:80px;display:flex;align-items:center;justify-content:center;font-weight:700;font-size:1.75rem;box-shadow:0 4px 12px rgba(0,0,0,.25);} 
.pros-box,.cons-box{padding:1rem 1.25rem;border-radius:8px;}
.pros-box{background:rgba(134,191,64,0.12);border-left:4px solid var(--color-primary);}
.cons-box{background:rgba(191,64,134,0.12);border-left:4px solid var(--color-highlight);}
.pros-list li,.cons-list li{margin-bottom:0.35rem;list-style:none;color:var(--color-gray-600);} 
.pros-list li::before{content:'➕ ';color:var(--color-primary);} 
.cons-list li::before{content:'➖ ';color:var(--color-highlight);} 
.interesting-fact{background:#f0f8ff;padding:1rem 1.25rem;border-left:4px solid var(--color-accent);border-radius:8px;color:var(--color-accent);} 
.bubble-grade{text-align:center;margin-top:1rem;position:relative;} 
.grade-label{display:block;margin-bottom:0.5rem;} 
.grade-badge{width:80px;height:80px;font-size:1.75rem;position:absolute;left:50%;transform:translateX(-50%);bottom:-36px;}
.grade-badge{background-color: var(--color-gray-400);color:var(--color-white);border-radius:50%;width:80px;height:80px;display:inline-flex;align-items:center;justify-content:center;font-size:2rem;font-weight: 800;box-shadow:0 4px 12px rgba(0,0,0,.25);top:40px;}

/* Dynamické barvy známky podle hodnoty 1.0–5.0 (stejné spektrum jako v /reports) */
.grade-badge{ --gbg:#ecfdf0; --gfg:#166534; background-color: var(--gbg); color: var(--gfg); }
/* .grade-badge[data-grade] fallback intentionally omitted to keep subtle palette */

/* Subtilní paleta přesně podle /reports (interpolace 1→5 mezi #27ae60 a #7e22ce,
   pozadí = 10% opacity převedená na pevné hex) */
.grade-badge[data-grade^="1"]{ --gfg:#27ae60; --gbg:#e9f6ee; }
.grade-badge[data-grade^="2"]{ --gfg:#3d8b7c; --gbg:#ecf3f2; }
.grade-badge[data-grade^="3"]{ --gfg:#7d59a6; --gbg:#f1eaf7; }
.grade-badge[data-grade^="4"]{ --gfg:#6e3bbd; --gbg:#efe6f9; }
.grade-badge[data-grade^="5"]{ --gfg:#7e22ce; --gbg:#f3e8fa; }
.gauge{position:relative;border-radius:50%;background:var(--color-gray-200);display:flex;align-items:center;justify-content:center;color:var(--color-black);} .gauge > div{pointer-events:none;} 
.gauge-ring{
    position:relative;
    border-radius:50%;
    display:flex;
    align-items:center;
    justify-content:center;
    font-family:var(--font-family-heading);
    color:var(--color-gray-600);
    margin-top:-1rem;
    --fill: var(--color-gray-400);
    --percent: 0%;
    background: conic-gradient(var(--fill) var(--percent), var(--color-gray-200) 0);
}

/* Uzavřený den – zelená vizualizace */
.day-closed .gauge-ring {
    --fill: var(--color-primary);
}

.day-closed .card {
    box-shadow: 0 0 10px rgba(0, 160, 0, 0.7);
    border-color: var(--color-success-500);
}

.gauge-ring::after{content:'';position:absolute;inset:12%;border-radius:50%;background:var(--color-white);} 
.gauge-content{position:relative;z-index:1;text-align:center;line-height:1.1;} 
.gauge-current{font-weight:700;} 
.gauge-ideal{font-size:0.7rem;color:var(--color-gray-500);} 
.gauge-label{position:absolute;bottom:-2.5rem;font-size:0.75rem;color:var(--color-gray-600);white-space:nowrap;width:100%;text-align:center;font-weight:700;text-transform:uppercase;padding:0.3rem 0;color:var(--color-gray-500);} 
.stats-gauges-row{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;width:100%;gap:1rem;} 
.gauge-big{margin-top:0;} 
.gauge-big-box{background:var(--color-gray-100);padding:1.5rem 1.5rem 3rem 1.5rem;border-radius:20px;display:flex;align-items:center;justify-content:center;} 
.stats-card{padding:1.5rem;border:none;border-bottom:1px solid var(--color-gray-200);margin-top:0;border-radius:0;}
.stats-gauges-row{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;width:100%;gap:1rem;} 

.meal-table tbody tr{border-bottom:none;}
.meal-table tbody tr.meal-sep {border-bottom:none;} 
.meal-table thead th{padding:1rem 1.5rem 2rem 1.5rem;text-align:left;border-bottom:none;font-weight:600;background:var(--color-gray-100);} 
.meal-table td{padding:0rem 1.5rem 1rem 1.5rem;}
/* Zvýšené horní odsazení pouze pro oddělovací řádky */
.meal-table tbody tr.meal-sep td{padding:1rem 1.5rem 1rem 1.5rem;}
.meal-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--color-gray-100);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: none;
}

/* Menší ikona v hlavičce jídelní tabulky, zarovnaná k textu */
.meal-table thead th .lucide,
.meal-table thead th .icon {
    width: 1em;
    height: 1em;
    vertical-align: text-bottom;
    margin-right: .35rem;
}

#addFoodModal .modal-card .modal-actions,
#editFoodLineModal .modal-card .modal-actions{
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
  background: #fff;
  width: 100%;
}

#addFoodModal .modal-card .modal-delete-day,
#editFoodLineModal .modal-card .modal-delete-day{
  background: none;
  border: none;
  padding: 0;
  color: #7b7b7b;
  font-size: 0.875rem;
  line-height: 1.4;
  cursor: pointer;
  justify-self: start;
  grid-column: 1 / 2;
}

#addFoodModal .modal-card .modal-delete-day:hover,
#addFoodModal .modal-card .modal-delete-day:focus,
#editFoodLineModal .modal-card .modal-delete-day:hover,
#editFoodLineModal .modal-card .modal-delete-day:focus{
  color: #5c5c5c;
  text-decoration: underline;
  outline: none;
}

#addFoodModal .modal-card .modal-save,
#editFoodLineModal .modal-card .modal-save{
  grid-column: 2 / 3;
  justify-self: center;
  min-width: 320px;
}

#editFoodLineModal{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 1000;
}
#editFoodLineModal .modal-card{
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #fff;
  padding: 2rem;
  border-radius: 12px;
  width: 90%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
}
#editFoodLineModal .edit-line-modal__head{
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-bottom: 1.25rem;
}
#editFoodLineModal .edit-line-modal__title{
  margin: 0;
}
#editFoodLineModal .edit-line-modal__close{
  appearance: none;
  border: none;
}

@media (max-width: 600px){
  /* Add/Edit Food modal: tighter spacing on mobile */
  #addFoodModal .modal-card .form-group,
  #editFoodLineModal .modal-card .form-group{
    margin-bottom: 1rem;
  }
  /* Utility: hide on small screens */
  .mobile-hide{display:none !important;}
  
  /* Therapist detail: stack boxes vertically on mobile */
  .therapist-section{grid-template-columns:1fr;}
  .therapist-col2{margin-top:1rem;}
  .pros-cons-grid{grid-template-columns:1fr;}
  .speech-bubble{max-width:100%;}
  
  /* Add/Edit Food modal – fullscreen and keyboard-safe on mobile */
  #addFoodModal .modal-card{
    position: fixed !important;
    inset: 0 !important;
    transform: none !important;
    width: 100% !important;
    height: 100dvh;
    max-width: none !important;
    max-height: none !important;
    border-radius: 0 !important;
    padding: 16px 16px max(16px, env(safe-area-inset-bottom));
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }
  #addFoodModal .modal-card > form{
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1 1 auto;
    min-height: 0;
  }
  #addFoodModal .modal-card .form-group{
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
  }
  #addFoodModal .modal-card .form-textarea{
    flex: 1 1 auto;
    min-height: 220px;
  }
  #addFoodModal .modal-card .modal-actions{
    position: sticky;
    bottom: 0;
    background: #fff;
    padding-top: 12px;
    padding-bottom: max(12px, env(safe-area-inset-bottom));
    box-shadow: none;
  }
  #addFoodModal .modal-card .modal-save,
  #editFoodLineModal .modal-card .modal-save{
    min-width: auto;
  }

  /* Day actions: center and stack */
  .day-actions{flex-direction:column; align-items:center !important;}
  .day-actions .actions-row{justify-content:center;}
  .day-actions .day-time-meta{margin-left:0 !important; text-align:center;}

  /* Dashboard2: hide meal action buttons under meal list on mobile */
  .meal-bottom-actions{display:none !important;}

  /* Dashboard2: hide "Jídelníček" heading on empty day (mobile) */
  .state-no_food .meal-table.meal-open thead{display:none;}
  
  /* Mobile card/layout tweaks */
  .card{border-radius:0 !important; border:none !important; box-shadow:none !important; padding: var(--spacing-base) !important; }
  body.page-dashboard .card-header{padding-top: 3px !important; padding-bottom: 2px !important; padding-left: 0rem !important; padding-right: 0rem !important; margin-bottom: 0 !important; }
  body.page-dashboard .card {padding-top: 0rem !important; }
  
  body.page-dashboard .settings-stats-card{ padding-top: 0 !important; margin-top: 0 !important; }
  body:not(.page-dashboard) .settings-stats-card{ padding-top: var(--spacing-base) !important; margin-top: var(--spacing-base) !important; }
  .page-spacing{ padding: 0 !important; }
  .container{ padding: 0 !important; }
  
  /* Auth pages (mobile) */
  body.page-login .auth-container,
  body.page-register .auth-container,
  body.page-email-sent .auth-container{ margin-top: 20% !important; }
  body.page-login .auth-container h3,
  body.page-register .auth-container h3,
  body.page-email-sent .auth-container h3{ text-align:center; }
  body.page-login .auth-links,
  body.page-register .auth-links,
  body.page-email-sent .auth-links{ text-align:center; }
  body.page-login .card,
  body.page-register .card,
  body.page-email-sent .card{
    border-radius: var(--radius-lg) !important;
    border: 1px solid var(--color-gray-200) !important;
    box-shadow: none !important;
    padding: var(--spacing-lg) !important;
    margin: 1rem !important;
  }
  /* Utility: hide on small screens */
  .mobile-hide{display:none !important;}
  
  /* Therapist detail: stack boxes vertically on mobile */
  .therapist-section{grid-template-columns:1fr;}
  .therapist-col2{margin-top:1rem;}
  .pros-cons-grid{grid-template-columns:1fr;}
  .speech-bubble{max-width:100%;}
  .navbar{
    min-height: auto;
  }
  .navbar-content{
    grid-template-columns: auto 1fr auto;
    gap:0.75rem;
    padding: 0;
  }
  .navbar-logo-img{
    max-height: 25px;
  }
  .navbar-slot--left{
    display:flex;
  }
  .navbar-slot--right{
    justify-content:flex-end;
  }
  .navbar-brand{
    margin-left:16px;
  }
  .navbar-profile-link{
    margin-right:16px;
  }
  .navbar-profile-link{
    font-size:0.75rem;
    padding:0.55rem 0.85rem;
  }

  .quick-add-placeholder{
    left: 1rem;
    right: 1rem;
  }

  /* Mobile: show only ~3 suggestion rows */
  .quick-add-suggestions{
    max-height: calc((3 * 3.25rem) + (2 * 0.35rem) + (2 * 0.65rem));
  }

  /* Gauge row horizontal scroll */
  .stats-gauges-row{flex-wrap:nowrap !important;overflow-x:auto;-webkit-overflow-scrolling:touch;}
  .stats-gauges-row>*{flex:0 0 auto;}
  .stats-card{overflow-x:hidden;}
} 

/* Generic Modal component (overlay + card) */
.modal-overlay{position:fixed;inset:0;background:rgba(0,0,0,.5);display:none;align-items:center;justify-content:center;z-index:1000;padding:16px;}
.modal{background:#fff;border-radius:16px;max-width:1300px;width:100%;max-height:90vh;overflow:auto;box-shadow:0 10px 30px rgba(0,0,0,.15);}
.modal-header{display:flex;justify-content:space-between;align-items:center;gap:.75rem;padding:2rem 2rem 1.5rem;border-bottom:1px solid #e5e7eb;position:sticky;top:0;background:#fff;z-index:2;}
.modal-header{justify-content:space-between;}
.modal-header .modal-headings{display:flex;flex-direction:column;gap:.25rem}
.modal-header .modal-title{font-size:2rem;font-weight:800;text-transform:uppercase;letter-spacing:-0.04em;margin:0;line-height:1;color:#111;}
.modal-header .modal-subtitle{font-size:0.9rem;color:#9ca3af;font-weight:400;line-height:1.3;}
.icon-btn{appearance:none;background:transparent;border:none;width:36px;height:36px;border-radius:8px;display:grid;place-items:center;color:var(--color-gray-600);cursor:pointer}
.icon-btn:hover{background:transparent;color:#111}

/* Therapist modal layout: left (carousel) – center (text) – right (boxes) */
.therapist-modal-grid{display:grid;grid-template-columns:350px 1fr 350px;gap:2rem;padding:2rem 2rem 1.5rem;align-items:start;}
.lock-center{display:flex;flex-direction:column;align-items:center;gap:1.25rem;padding:2rem 0}
.grid-span-all{grid-column:1 / -1}
.therapists-title{margin-bottom:1.5rem}
.therapist-modal-left{position:sticky;top:64px;}
.therapist-modal-center{display:flex;flex-direction:column;gap:1rem;padding-right:0;}
.therapist-modal-right{display:flex;flex-direction:column;gap:1rem;}

.modal-footer{position:sticky;bottom:0;background:#fff;border-top:1px solid #e5e7eb;padding:1.25rem 2rem;display:grid;grid-template-columns:60px 1fr 60px;align-items:center;gap:1rem;}
.modal-footer .btn{min-width:200px;padding:0.9rem 1.75rem;font-size:0.95rem;font-weight:600;border-radius:8px;justify-self:center;grid-column:2;}
.modal-footer .btn.btn-outline{background:#fff;color:#232323;border:1px solid #dfdfdf;}
.modal-footer .btn.btn-primary{background:var(--color-primary);color:#fff;border:1px solid var(--color-primary);}
.modal-footer .btn.btn-primary:disabled{background:var(--color-primary) !important;color:#fff !important;border-color:var(--color-primary) !important;opacity:1 !important;cursor:default !important;}

/* Footer nav arrows – use same button style as dashboard */
.modal-footer .modal-nav{display:inline-flex;align-items:center;justify-content:center;min-width:60px;height:60px;padding:0 .9rem;border-radius:8px;}
.modal-footer .modal-nav i{width:20px;height:20px;}
.modal-footer #therapistModalPrev{grid-column:1;}
.modal-footer #therapistModalNext{grid-column:3;}
/* Skrytí šipek na krajích (vypnout ikonu i interakci) */
.modal-footer .modal-nav.is-hidden, .modal-footer .modal-nav.is-hidden svg {visibility:hidden;pointer-events:none;}

/* Carousel */
.carousel{position:relative;border-radius:16px;overflow:hidden;background:#00000008;border:1px solid #e5e7eb;}
.carousel-viewport{aspect-ratio:2/3;display:grid;place-items:center;background:#f9fafb;}
.carousel-image{width:100%;height:100%;object-fit:cover;}
.carousel-arrow{position:absolute;top:50%;transform:translateY(-50%);background:rgba(255,255,255,.92);color:#111;border:1px solid rgba(17,24,39,.18);border-radius:12px;width:50px;height:50px;display:grid;place-items:center;opacity:1;transition:background var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast), transform var(--transition-fast);cursor:pointer;box-shadow:0 10px 22px rgba(0,0,0,.18);}
.carousel-arrow:hover{background:#fff;box-shadow:0 12px 26px rgba(0,0,0,.22);transform:translateY(-50%) translateY(-1px);}
.carousel .prev{left:8px;}
.carousel .next{right:8px;}

/* Lock modal: progress ring with visible segments */
.progress-ring{display:grid;place-items:center;padding:2rem 0;position:relative}
.progress-ring .ring-outer{
  position:relative;
  width:210px;
  height:210px;
  border-radius:999px;
  background:repeating-conic-gradient(
    from 0deg,
    #e5e7eb 0deg calc((360deg / var(--segments)) - 3.5deg),
    transparent calc((360deg / var(--segments)) - 3.5deg) calc(360deg / var(--segments))
  );
  display:grid;
  place-items:center;
}
.progress-ring .ring-outer::before{
  content:'';
  position:absolute;
  inset:0;
  border-radius:999px;
  background:repeating-conic-gradient(
    from 0deg,
    var(--color-primary) 0deg calc((360deg / var(--segments)) - 3.5deg),
    transparent calc((360deg / var(--segments)) - 3.5deg) calc(360deg / var(--segments))
  );
  -webkit-mask-image:conic-gradient(#000 0deg calc((360deg / var(--segments)) * var(--done)), transparent calc((360deg / var(--segments)) * var(--done)));
  mask-image:conic-gradient(#000 0deg calc((360deg / var(--segments)) * var(--done)), transparent calc((360deg / var(--segments)) * var(--done)));
}
.progress-ring .ring-inner{width:182px;height:182px;border-radius:999px;background:#fff;display:grid;place-items:center;position:relative;z-index:2}
.progress-ring .ring-avatar{width:160px;height:160px;border-radius:999px;object-fit:cover;position:relative}
.progress-ring .ring-lock{position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);background:transparent;border:none;width:100px;height:100px;display:grid;place-items:center;z-index:20;box-shadow:none}
.progress-ring .ring-lock svg{width:50px;height:50px;color:#fff;filter:drop-shadow(0 2px 4px rgba(0,0,0,0.4))}

/* Lock modal: text styling */
.therapist-modal-locked .unlock-description{font-size:1.08rem;color:#2d3748;line-height:1.65;max-width:420px;margin:1rem auto;text-align:center;font-weight:500}
.unlock-desc{text-align:center;max-width:500px;margin:0 auto;color:#2d3748;line-height:1.6}
.therapist-modal-locked .unlock-progress-text{font-size:0.92rem;color:#9ca3af;font-weight:500}

/* Labels */
.labels-row{display:flex;flex-wrap:wrap;gap:.35rem;margin:.25rem 0 .5rem;}
.label{display:inline-flex;align-items:center;gap:.25rem;padding:.2rem .5rem;border-radius:999px;font-size:.8rem;line-height:1;border:1px solid transparent;}
.label-yellow{background:#fff8d6;border-color:#fde68a;color:#8a6d1a;}

/* Modal: Delší popisek (původně yellow labels) */
#therapistModal .labels-yellow{display:block;gap:0;margin:0 0 1rem;}
#therapistModal .labels-yellow p{margin:0 0 0.65rem 0;color:#374151;line-height:1.65;font-size:0.95rem;}
#therapistModal .labels-yellow p:last-child{margin-bottom:0;}

/* Boxes grid in right column */
.boxes-grid{display:flex;flex-direction:column;gap:1rem;}

/* Superpower box as blue info */
.superpower-box{background:#eff6ff;border-left:4px solid #60a5fa;border-radius:14px;padding:1.5rem 1.75rem;color:#1e3a8a;display:flex;flex-direction:column;gap:0.5rem;}
.superpower-box .box-title{font-weight:700;font-size:1.05rem;margin:0;color:#1e40af;}
.superpower-box .box-content{font-size:0.95rem;line-height:1.6;color:#1e3a8a;margin:0;}

/* Pros/Cons boxes */
.pros-box,.cons-box{border-radius:14px;padding:1.5rem 1.75rem;display:flex;flex-direction:column;gap:0.85rem;}
.pros-box{background:#f0fdf4;border-left:4px solid var(--color-primary);}
.cons-box{background:#fdf2f8;border-left:4px solid#f472b6;}
.pros-box h4,.cons-box h4{margin:0;font-size:1.05rem;font-weight:700;line-height:1.2;}
.pros-box h4{color:var(--color-primary);}
.cons-box h4{color:#be185d;}
.pros-list,.cons-list{list-style:none;padding:0;margin:0;display:flex;flex-direction:column;gap:0.6rem;}
.pros-list li,.cons-list li{font-size:0.95rem;line-height:1.5;padding-left:0;display:flex;align-items:flex-start;gap:0.5rem;}
.pros-list li{color:var(--color-primary);}
.cons-list li{color:#be185d;}
.pros-list li::before{content:"✓";font-weight:700;flex-shrink:0;}
.cons-list li::before{content:"✗";font-weight:700;flex-shrink:0;}

@media (max-width: 1024px){
  .therapist-modal-grid{grid-template-columns:360px 1fr;}
  .therapist-modal-right{grid-column:1 / -1;}
}
@media (max-width: 640px){
  .modal-overlay{padding:0;}
  .modal{border-radius:0;max-height:100vh;width:100%;height:100%;max-width:none;}
  .therapist-modal-grid{grid-template-columns:1fr;}
  .therapist-modal-left{position:static;}
}

/* Dashboard2 – stavový přepínač přes body třídy */
.page-spacing { padding-top: 0; padding-bottom: 4rem; }

/* Dashboard: protažení hlavní karty až dolů + bez spodní mezery/patičky */
.state-fast .page-spacing,
.state-fast_photo .page-spacing,
.state-fast_loader .page-spacing,
.state-slow .page-spacing,
.state-slow_loader .page-spacing,
.state-slow_disabled .page-spacing,
.state-no_food .page-spacing { padding-bottom: 0; }

.state-fast .container.page-spacing,
.state-fast_photo .container.page-spacing,
.state-fast_loader .container.page-spacing,
.state-slow .container.page-spacing,
.state-slow_loader .container.page-spacing,
.state-slow_disabled .container.page-spacing,
.state-no_food .container.page-spacing {
    display: flex;
    flex-direction: column;
    /* Keep in sync with .navbar min-height (80px). Old 112px caused ~32px gap at bottom. */
    min-height: calc(100vh - 80px);
}

.state-fast .container.page-spacing > .card,
.state-fast_photo .container.page-spacing > .card,
.state-fast_loader .container.page-spacing > .card,
.state-slow .container.page-spacing > .card,
.state-slow_loader .container.page-spacing > .card,
.state-slow_disabled .container.page-spacing > .card,
.state-no_food .container.page-spacing > .card {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-height: 100%;
    margin-bottom: 0;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

.state-fast .container.page-spacing > .card > .card-body,
.state-fast_photo .container.page-spacing > .card > .card-body,
.state-fast_loader .container.page-spacing > .card > .card-body,
.state-slow .container.page-spacing > .card > .card-body,
.state-slow_loader .container.page-spacing > .card > .card-body,
.state-slow_disabled .container.page-spacing > .card > .card-body,
.state-no_food .container.page-spacing > .card > .card-body {
    flex: 1 1 auto;
}

/* Testovací navigace */
.test-nav { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.test-nav__form { display: inline-flex; align-items: center; margin: 0; }
.test-nav__form .btn { white-space: normal; line-height: 1.3; text-align: center; }

/* Dev tools (superadmin toggle) */
body:not([data-dev-tools="1"]) .dev-tools { display: none !important; }
body:not([data-dev-tools="1"]) .fast-assessment-card__tags { display: none !important; }

/* Dev tools panel */
.dev-tools-panel {
  position: fixed;
  left: calc(16px + env(safe-area-inset-left, 0px));
  bottom: calc(16px + 56px + 12px + env(safe-area-inset-bottom, 0px));
  z-index: 1295;
  width: min(320px, calc(100vw - 32px));
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 14px;
  padding: 12px;
  box-shadow: 0 18px 35px rgba(15, 23, 42, 0.12);
  backdrop-filter: blur(8px);
}

.dev-tools-panel__title {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  color: rgba(15, 23, 42, 0.6);
  margin-bottom: 10px;
}

.dev-tools-panel__admin-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 16px;
}

.dev-tools-panel__admin-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 12px;
  border-radius: 12px;
}

.dev-tools-panel__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.dev-tools-panel__btn {
  padding: 10px 12px;
  border-radius: 12px;
}

.dev-tools-panel__section {
  margin-top: 12px;
}

.dev-tools-panel__section:first-of-type {
  margin-top: 0;
}

.dev-tools-panel__section-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: rgba(15, 23, 42, 0.7);
  margin-bottom: 6px;
}

.dev-tools-panel__kv {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 0;
}

.dev-tools-panel__kv--stacked {
  flex-direction: column;
  gap: 4px;
}

.dev-tools-panel__kv-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: rgba(15, 23, 42, 0.65);
}

.dev-tools-panel__kv-value {
  font-size: 0.85rem;
  color: rgba(15, 23, 42, 0.95);
  word-break: break-word;
  flex: 1;
}

.dev-tools-panel__muted {
  color: rgba(15, 23, 42, 0.5);
  font-size: 0.8rem;
}

.dev-tools-panel__list {
  margin: 0;
  padding-left: 1rem;
  font-size: 0.82rem;
  max-height: 150px;
  overflow-y: auto;
}

.dev-tools-panel__list li {
  margin: 0;
  padding: 0;
}

.dev-tools-panel__select {
  width: 100%;
  border-radius: 10px;
  border: 1px solid rgba(15, 23, 42, 0.15);
  padding: 8px 10px;
  font-size: 0.9rem;
}

.dev-tools-panel__select:focus {
  outline: 2px solid rgba(59, 130, 246, 0.4);
  outline-offset: 1px;
}

.dev-tools-panel__actions--stacked {
  flex-direction: column;
  width: 100%;
}

.dev-tools-panel__actions--stacked .dev-tools-panel__btn {
  width: 100%;
  text-align: center;
}

/* Settings: account actions row + divider */
.settings-account-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    align-items: center;
}

.settings-account-action-icon {
    vertical-align: middle;
    margin-right: 0.4rem;
}

.settings-divider {
    height: 1px;
    width: 100%;
    background: rgba(148, 163, 184, 0.5);
    margin: 1rem 0;
}

/* Dashboard2 dev debug card */
.d2-dev-debug-card { margin-bottom: 1.25rem; border: 1px dashed #c2410c; background: #fff7ed; }
.d2-dev-debug-card__body { padding: 1rem 1.25rem; }

/* Slow loader box (analýza běží) */
.slow-loader { display: none; margin: 2rem 0; }
.slow-loader-inner { display: flex; flex-direction: column; align-items: center; gap: .75rem; padding: 1.5rem; border: 1px solid var(--color-gray-200); border-radius: 12px; background: var(--color-white); }
.slow-loader-text { color: var(--color-gray-600); font-weight: 600; }

/* Výsledek terapeuta (po uzavření dne) */
.therapist-result { display: none; }

/* Sekce jídelníčku */
.meal-section { margin-bottom: 1.5rem; }

/* Spodní CTA v jídelníčku (pod jídly) */
.meal-bottom-actions{
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .75rem;
    margin-top: 1rem;
}
.meal-bottom-actions__btn{
    width: 100%;
    padding: 0 .9rem;
}
.meal-bottom-actions__btn span{
    font-size: .95rem;
}
.meal-bottom-actions__btn i,
.meal-bottom-actions__btn .icon{
    width: 18px;
    height: 18px;
}
@media (max-width: 520px) {
    .meal-bottom-actions{
        grid-template-columns: 1fr;
    }
}

/* Stavy – zobrazování/skrývání bloků */
.state-fast .therapist-result,
.state-fast_photo .therapist-result { display: none; }
.state-fast .slow-loader,
.state-fast_photo .slow-loader { display: none; }
.state-fast .meal-section,
.state-fast_photo .meal-section { display: block; }

.state-fast_loader .therapist-result { display: none; }
.state-fast_loader .slow-loader { display: none; }
.state-fast_loader .meal-section { display: block; }

.state-slow .therapist-result { display: block; }
.state-slow .slow-loader { display: none; }
.state-slow .meal-section { display: block; }

.state-slow_loader .therapist-result { display: none; }
.state-slow_loader .slow-loader { display: block; }
/* Výchozí: žádná sekce jídelníčku není vidět, povolí se dle stavu */
.meal-section-open, .meal-section-closed { display: none; }
.state-slow_loader .meal-section-open, .state-slow_loader .meal-section-closed { display: none; }
.state-slow_loader .stats-card { display: none; }

/* Jídelníček: dvě tabulky .meal-open (fast) a .meal-closed (slow), sdílený vzhled */
.meal-open, .meal-closed { display: none; width: 100%; }

/* fast → zobraz pouze meal-open */
.state-fast .meal-open,
.state-fast_photo .meal-open,
.state-no_food .meal-open { display: table; }
.state-fast .meal-closed,
.state-fast_photo .meal-closed,
.state-no_food .meal-closed { display: none; }

/* fast_loader → zobraz meal-open (kruhy nahoře zůstanou šedé) */
.state-fast_loader .meal-open { display: table; }
.state-fast_loader .meal-closed { display: none; }

/* FAST jídelníček: bubliny + mazání řádku */
.state-fast .meal-table.meal-open,
.state-fast_photo .meal-table.meal-open,
.state-no_food .meal-table.meal-open,
.state-fast_loader .meal-table.meal-open{
  background: transparent;
  border-radius: 0;
  overflow: visible;
  border-collapse: separate;
  border-spacing: 0 10px;
}
.state-fast .meal-table.meal-open thead th,
.state-fast_photo .meal-table.meal-open thead th,
.state-no_food .meal-table.meal-open thead th,
.state-fast_loader .meal-table.meal-open thead th{
  background: transparent;
  padding: 0 0 .85rem 0;
  border-bottom: none;
  font-size: 1.2rem;
  font-weight: 800;
  color: #111;
}
.state-fast .meal-table.meal-open thead th .meal-open-title,
.state-fast_photo .meal-table.meal-open thead th .meal-open-title,
.state-no_food .meal-table.meal-open thead th .meal-open-title,
.state-fast_loader .meal-table.meal-open thead th .meal-open-title{
  letter-spacing: -0.02em;
  text-transform: uppercase;
}

.meal-table.meal-closed thead th:first-child span{
  font-size: 1.5rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -0.02em;
}
.state-fast .meal-table.meal-open td,
.state-fast_photo .meal-table.meal-open td,
.state-fast_loader .meal-table.meal-open td{
  padding: 0;
}
.state-fast .meal-table.meal-open tbody tr.meal-sep td,
.state-fast_photo .meal-table.meal-open tbody tr.meal-sep td,
.state-fast_loader .meal-table.meal-open tbody tr.meal-sep td{
  padding-top: 20px;
}
.state-fast .meal-section > div,
.state-fast_photo .meal-section > div,
.state-no_food .meal-section > div,
.state-fast_loader .meal-section > div{
  /* "hotová" karta okolo jídelníčku (působí víc jako součást UI než tabulka) */
  background: #fff;
  border: none;
  border-radius: 0;
  padding: 0px 0rem .95rem;
  box-shadow: none;
}
.state-fast .meal-table.meal-open thead th,
.state-fast_photo .meal-table.meal-open thead th,
.state-fast_loader .meal-table.meal-open thead th{
  /* uvnitř karty nechceme "tvrdý" okraj */
  padding-left: .2rem;
  padding-right: .2rem;
}
.meal-open-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:.75rem;
}
.meal-open-head__title{
  display:flex;
  align-items:center;
  gap:.4rem;
}
.meal-edit-btn{
  min-height:36px;
  border-radius:10px;
  border:1px solid var(--color-gray-200);
  background:#fff;
  color:#111;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:.35rem;
  padding:0 .85rem;
  cursor:pointer;
  transition:background var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast);
}
.meal-edit-btn i{
  width:18px;
  height:18px;
}
.meal-edit-btn span{
  font-weight:600;
  font-size:.9rem;
}
.meal-edit-btn:hover{
  background:var(--color-gray-100);
}
.meal-edit-btn:focus{
  outline:2px solid rgba(17,24,39,.25);
  outline-offset:2px;
}
.state-fast .meal-table.meal-open tbody tr,
.state-fast_photo .meal-table.meal-open tbody tr,
.state-fast_loader .meal-table.meal-open tbody tr{
  /* drobná „hravost“ přes jemný hover; necháme animaci na wrapperu */
  background: transparent;
}
.meal-pill-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:.6rem;
  padding:.62rem 1.2rem;
  /* jemně šedé pozadí (bez "modrého" nádechu) */
  background: var(--color-gray-100);
  /* bez rámečku */
  border: none;
  border-radius: 999px;
  position: relative;
  /* bez hover animací / zvětšování */
  transition: none;
  box-shadow: none;
  --meal-dot-color: var(--color-meal-dot-default);
}
.meal-pill-row::before{
  content:'';
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: var(--meal-dot-color);
  opacity: .85;
  flex: 0 0 auto;
}
.meal-pill-row[data-mark="1"],
.meal-pill-row[data-mark="2"],
.meal-pill-row[data-mark="3"]{
  --meal-dot-color: var(--color-primary);
}
.meal-pill-row[data-mark="4"]{
  --meal-dot-color: var(--color-meal-dot-yellow);
}
.meal-pill-row[data-mark="5"]{
  --meal-dot-color: var(--color-meal-dot-red);
}
.meal-name-dot{
  display:inline-flex;
  align-items:center;
  gap:.45rem;
  --meal-dot-color: var(--color-meal-dot-default);
}
.meal-name-dot::before{
  content:'';
  width:10px;
  height:10px;
  border-radius:999px;
  background: var(--meal-dot-color);
  flex:0 0 auto;
}
.meal-name-dot[data-mark="1"],
.meal-name-dot[data-mark="2"],
.meal-name-dot[data-mark="3"]{
  --meal-dot-color: var(--color-primary);
}
.meal-name-dot[data-mark="4"]{
  --meal-dot-color: var(--color-meal-dot-yellow);
}
.meal-name-dot[data-mark="5"]{
  --meal-dot-color: var(--color-meal-dot-red);
}

@keyframes mealDotPulse {
  0% { opacity: .55; transform: scale(0.92); }
  50% { opacity: .95; transform: scale(1.06); }
  100% { opacity: .55; transform: scale(0.92); }
}

/* Loading state: pulse only the default (grey) dots (no data-mark) */
.state-fast_loader .meal-pill-row:not([data-mark])::before,
.state-slow_loader .meal-pill-row:not([data-mark])::before,
.state-fast_loader .meal-name-dot:not([data-mark])::before,
.state-slow_loader .meal-name-dot:not([data-mark])::before{
  animation: mealDotPulse 1.1s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce){
  .state-fast_loader .meal-pill-row:not([data-mark])::before,
  .state-slow_loader .meal-pill-row:not([data-mark])::before,
  .state-fast_loader .meal-name-dot:not([data-mark])::before,
  .state-slow_loader .meal-name-dot:not([data-mark])::before{
    animation: none;
  }
}
.meal-pill-text{
  flex:1 1 auto;
  min-width:0;
  color:#111;
  line-height:1.35;
  overflow-wrap:anywhere;
  font-weight: 600;
  letter-spacing: -0.01em;
  font-size: 0.98rem;
}
.meal-pill-actions{
  flex:0 0 auto;
  display:flex;
  align-items:center;
  gap:.35rem;
}
.meal-pill-actions .lucide,
.meal-pill-actions .icon{
  width:16px;
  height:16px;
}
.meal-pill-edit{
  flex:0 0 auto;
  width:28px;
  height:28px;
  border-radius:999px;
  border:1px solid #e5e7eb;
  background:#fff;
  color:#6b7280;
  cursor:pointer;
  display:grid;
  place-items:center;
  font-size:16px;
  line-height:1;
  padding:0;
  transition: background var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast);
}
.meal-pill-edit:hover{
  background:#e0f2fe;
  border-color:#bae6fd;
  color:#0369a1;
}
.meal-pill-edit:focus{outline:2px solid rgba(17, 24, 39, .25); outline-offset:2px;}
.meal-pill-edit[disabled]{opacity:.55;cursor:default;}
.meal-pill-debug{
  flex:0 0 auto;
  width:28px;
  height:28px;
  border-radius:999px;
  border:1px solid #e5e7eb;
  background:#fff;
  color:#6b7280;
  cursor:pointer;
  display:none; /* pouze v dev režimu */
  place-items:center;
  font-size:15px;
  line-height:1;
  padding:0;
  font-weight:800;
  transition: background var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast);
}
body[data-dev-tools="1"] .meal-pill-debug{
  display:grid;
}
.meal-pill-debug:hover{
  background:#f3e8ff;
  border-color:#e9d5ff;
  color:#6d28d9;
}
.meal-pill-debug:focus{outline:2px solid rgba(17, 24, 39, .25); outline-offset:2px;}
.meal-pill-debug[disabled]{opacity:.55;cursor:default;}
.meal-pill-delete{
  flex:0 0 auto;
  width:28px;
  height:28px;
  border-radius:999px;
  border:1px solid #e5e7eb;
  background:#fff;
  color:#6b7280;
  cursor:pointer;
  display:grid;
  place-items:center;
  font-size:18px;
  line-height:1;
  padding:0;
  transition: background var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast);
}
.meal-pill-delete:hover{
  background:#fee2e2;
  border-color:#fecaca;
  color:#b91c1c;
}
.meal-pill-delete:focus{outline:2px solid rgba(17, 24, 39, .25); outline-offset:2px;}
.meal-pill-delete[disabled]{opacity:.55;cursor:default;}

/* Dev popup: info o jídle */
.dev-food-debug-modal{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.52);
  z-index:1205;
  display:none;
  align-items:center;
  justify-content:center;
  padding:1rem;
}
.dev-food-debug-modal.is-open{
  display:flex;
}
.dev-food-debug-modal__card{
  width:min(560px, 94vw);
  max-height:85vh;
  overflow:auto;
  background:#fff;
  border-radius:14px;
  box-shadow:0 20px 70px rgba(0,0,0,.25);
  padding:1rem 1.15rem;
}
.dev-food-debug-modal__head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:.75rem;
}
.dev-food-debug-modal__title{
  font-weight:800;
  font-size:1.05rem;
}
.dev-food-debug-modal__close{
  border:none;
  background:transparent;
  cursor:pointer;
  font-size:1.6rem;
  line-height:1;
  color:#6b7280;
  padding:.1rem .35rem;
  border-radius:10px;
}
.dev-food-debug-modal__close:hover{
  background:rgba(17,24,39,.06);
  color:#111827;
}
.dev-food-debug-modal__subtitle{
  margin-top:.35rem;
  font-size:.92rem;
  color:#6b7280;
  overflow-wrap:anywhere;
}
.dev-food-debug-modal__body{
  margin-top:.9rem;
}
.dev-food-debug-modal__grid{
  display:flex;
  flex-direction:column;
  gap:.4rem;
}
.dev-food-debug-modal__row{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:1rem;
  padding:.55rem .65rem;
  background:var(--color-gray-100);
  border-radius:12px;
}
.dev-food-debug-modal__label{
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size:.8rem;
  color:#6b7280;
}
.dev-food-debug-modal__value{
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size:.9rem;
  color:#111827;
  text-align:right;
  overflow-wrap:anywhere;
}

/* slow režimy → rychlá bublina se nezobrazuje */
.state-slow .fast-assessment-row,
.state-slow_loader .fast-assessment-row,
.state-slow_disabled .fast-assessment-row {
    display: none !important;
}

/* slow → zobraz meal-closed */
.state-slow .meal-closed { display: table; }
.state-slow .meal-open { display: none; }

/* slow_loader → nic + skryj akce */
.state-slow_loader .meal-open, .state-slow_loader .meal-closed { display: none !important; }
.state-slow_loader .meal-actions, .state-slow_loader .sticky-actions { display: none !important; }
.state-slow_loader .meal-section { display: none !important; }

/* Slow loader overlay visibility: only on slow_loader state */
.partial-loader { display: none; margin-top: 3rem; }
.state-slow_loader .partial-loader { display: flex; position: relative; }

/* slow_disabled → zobraz meal-closed */

/* Barva kroužků podle stavu */
.state-slow .gauge-ring { --fill: var(--color-gray-600); }

/* Settings: make delete account link look like regular link (no purple visited) */
#delete-account-link { color: var(--color-accent); text-decoration: underline; }
#delete-account-link:visited { color: var(--color-accent); }
#delete-account-link:hover { text-decoration: underline; opacity: .9; }
.state-fast .gauge-ring,
.state-fast_photo .gauge-ring,
.state-fast_loader .gauge-ring { --fill: var(--color-gray-400); }

/* Plné vyplnění kroužků ve stavu slow; v ostatních ponecháme prázdné */
/* Nevnucuj procenta z CSS – hodnoty přijdou inline přes style="--percent:X%" jako na dashboardu */

/* Orientační výpočet – zobraz pouze ve fast a slow */
.fast-disclaimer { display: none; text-align: right; font-size: 0.8rem; color: var(--color-gray-300); position: absolute; top: 1rem; right: 1rem; }

/* Mobile override for fast disclaimer */
@media (max-width: 600px) {
  .fast-disclaimer {
    position: relative;
    top: auto;
    right: auto;
    left: auto;
    text-align: center;
    padding: .25rem .5rem;
    border: 1px dotted var(--color-gray-200);
    border-radius: var(--radius-sm);
    width: 7rem;
  }
}

/* Stav: no food – den je prázdný (uživatel přidává přes Quick Add + tipy) */
.no-food-box { display: none; }
.state-no_food .no-food-box { display: block; }
.state-no_food .stats-card,
.state-no_food .partial-loader,
.state-no_food .therapist-result,
.state-no_food .meal-actions,
.state-no_food #fastAssessmentSection { display: none !important; }
.state-no_food .no-food-bubble-row { margin-top: 0; }
.state-no_food .no-food-bubble-row { cursor: pointer; }
.no-food-bubble .fast-assessment-card__text p { margin: 0; }
.no-food-text {
    margin: 0;
    color: #111827;
}

@media (max-width: 768px) {
    .state-no_food .no-food-bubble-row { margin-top: 1.5rem; }
}

/* Sticky actions viditelnost podle stavů:
   - fast, empty: viditelné
   - slow: skryté
   - fast_loader, slow_loader: skryté
*/
.state-slow .sticky-actions { display: none; }

/* Tlačítko Odemknout (uvnitř card, zarovnání doprostřed) */
.slow-unlock {
    display: flex;
    justify-content: center;
    margin: 1.5rem 0 0;
}
.unlock-day-btn {
    background: transparent;
    border: 1px solid var(--color-gray-200);
    color: var(--color-gray-500);
    font-size: .85rem;
    font-weight: 600;
    padding: .4rem .65rem;
    border-radius: 10px;
    cursor: pointer;
    transition: background var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast);
}
.unlock-day-btn:hover {
    background: transparent;
}
.unlock-day-btn:focus {
    outline: 2px solid rgba(17, 24, 39, .25);
    outline-offset: 2px;
}

/* FAST loader: skeleton v terapeutické bublině (textové pole) */
.fast-assessment-card__text--skeleton {
    display: none;
    padding: .25rem 0;
}
.fast-assessment-card__text--skeleton .text-skeleton-line {
    height: 14px;
    margin-bottom: 10px;
    border-radius: 8px;
    background: linear-gradient(90deg, #f4f4f4 25%, #eaeaea 37%, #f4f4f4 63%);
    background-size: 400% 100%;
    animation: text-skeleton-shimmer 1.4s ease-in-out infinite;
}
.text-skeleton-line--lg { width: 85%; }
.text-skeleton-line--md { width: 70%; }
.text-skeleton-line--sm { width: 55%; margin-bottom: 0; }
@keyframes text-skeleton-shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: 0 0; }
}
/* Zobraz skeleton a skryj ostatní obsah fast-assessment karty ve fast_loader */
.state-fast_loader #fastAssessmentText { display: none !important; }
.state-fast_loader .fast-assessment-card__text--skeleton { display: block !important; }
.state-fast_loader .fast-assessment-card__divider,
.state-fast_loader .fast-assessment-card__recommended,
.state-fast_loader .fast-assessment-card__cta { display: none !important; }

/* Settings/onboarding: show therapist bubble skeleton while ideal values load */
.start-therapist-bubble--settings.loading-ideal #settings-therapist-bubble-text,
.start-therapist-bubble.loading-ideal #settings-therapist-bubble-text { display: none !important; }
.start-therapist-bubble--settings.loading-ideal .fast-assessment-card__text--skeleton,
.start-therapist-bubble.loading-ideal .fast-assessment-card__text--skeleton { display: block !important; }

/* Hide stats in fast loading states the same way as bubble content */
.state-fast_loader .stats-card,
.fast_loader .stats-card { display: none !important; }

.empty-day {
  display: flex;
  justify-content: center;
  padding: 3.75rem 1.75rem 2.5rem;
}

.empty-day__card {
  position: relative;
  width: min(620px, 100%);
  padding: 3rem 2.75rem;
  text-align: center;
  background: linear-gradient(145deg, rgba(134, 191, 64, 0.12) 0%, rgba(255, 255, 255, 0.96) 65%);
  border: 1px solid rgba(134, 191, 64, 0.22);
  border-radius: 28px;
  box-shadow: 0 24px 68px rgba(61, 94, 33, 0.16);
  overflow: visible;
}

.empty-day__card::before {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -26px;
  width: 70px;
  height: 36px;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(134, 191, 64, 0.22);
  border-top: none;
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  z-index: 0;
  transform: translateX(-50%);
}

.empty-day__card::after {
  content: '';
  position: absolute;
  inset: 14px;
  border-radius: 22px;
  pointer-events: none;
  background: radial-gradient(circle at top right, rgba(134, 191, 64, 0.14), transparent 55%);
  opacity: 0.85;
}

.empty-day__card > * {
  position: relative;
  z-index: 1;
}

.empty-day__avatar {
  width: 96px;
  height: 96px;
  margin: 0 auto 1.75rem;
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 18px 36px rgba(51, 82, 48, 0.2);
  background: rgba(134, 191, 64, 0.18);
}

.empty-day__avatar img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.empty-day__avatar--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(134, 191, 64, 0.2), rgba(64, 134, 191, 0.2));
}

.empty-day__avatar--placeholder svg {
  width: 46px;
  height: 46px;
  color: rgba(51, 82, 48, 0.9);
}

.empty-day__title {
  margin: 0 0 0.9rem;
  font-size: clamp(1.9rem, 2.5vw, 2.35rem);
  font-weight: 600;
  color: #1f2937;
  font-family: var(--font-family-heading);
}

.empty-day__description {
  margin: 0 auto;
  max-width: 520px;
  font-size: 1.05rem;
  line-height: 1.6;
  color: #4b5563;
}

.empty-day__highlights {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
  list-style: none;
  padding: 0;
  margin: 2rem 0 0;
}

.empty-day__highlight {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 1rem 1.1rem;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(134, 191, 64, 0.18);
  border-radius: var(--radius-lg);
  text-align: left;
  color: #1f2937;
  line-height: 1.5;
}

.empty-day__highlight svg {
  width: 26px;
  height: 26px;
  color: var(--color-primary);
  flex-shrink: 0;
}

.empty-day__highlight span {
  display: inline-block;
  font-size: 0.98rem;
  font-weight: 500;
}

@media (max-width: 920px) {
  .empty-day__card {
    padding: 2.5rem 2.1rem;
  }
  .empty-day__highlights {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .empty-day {
    padding: 2.75rem 1.25rem 2rem;
  }
  .empty-day__card {
    padding: 2.25rem 1.75rem;
    border-radius: 22px;
  }
  .empty-day__avatar {
    width: 82px;
    height: 82px;
    margin-bottom: 1.25rem;
  }
  .empty-day__highlights {
    grid-template-columns: 1fr;
  }
}

/* Dashboard2 header layout */
.d2-header { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 1rem; width: 100%; }
.d2-nav-desktop { display: flex; align-items: center; gap: .5rem; justify-self: start; }
.d2-nav-desktop .btn,
.d2-nav-mobile .btn {
  border-color: transparent;
  font-weight: 700;
  color: var(--color-black);
  padding: var(--spacing-xs) var(--spacing-lg);
  min-height: 0;
}
.d2-nav-desktop .btn svg,
.d2-nav-mobile .btn svg {
  width: 25px;
  height: 25px;
}
.d2-therapist-btn,
.therapist-cta-button { display: inline-flex; align-items: center; gap: .5rem; box-shadow: none; border-radius: var(--radius-base); font-weight: 600; white-space: nowrap; }
.d2-therapist-btn svg,
.therapist-cta-button svg { flex-shrink: 0; }
.d2-title { margin: 0; text-align: right; justify-self: end; grid-column: 2; font-size: 1.5rem; }
.d2-title-day { display: inline; }
.d2-title-day-short { display: none; }
.d2-title-day-full { display: inline; }
.d2-title-rest { display: inline; }
.d2-sep { display: inline-block; width: 1px; height: 24px; background: var(--color-gray-200); margin: 0 .5rem; }
.d2-nav-mobile { display: none; }

@media (max-width: 640px) {
  .d2-header { display: grid !important; grid-template-columns: auto 1fr; align-items: center; gap: .75rem; }
  .d2-title { text-align: right !important; margin-bottom: 0 !important; font-size: 1.2rem; justify-self: end; }
  .d2-nav-desktop { display: flex !important; flex-wrap: nowrap; }
  .d2-therapist-btn,
  .therapist-cta-button { width: 100%; justify-content: center; }
  .d2-nav-mobile { display: none !important; }
  .d2-sep { display: inline-block !important; }
  .d2-title-day-short { display: inline; }
  .d2-title-day-full { display: none; }

  .d2-nav-desktop .prev-link,
  .d2-nav-desktop .next-link,
  .d2-nav-desktop .today-link {
    padding: 0.5rem 0.2rem !important;
  }
} 

.d2-nav-desktop .btn:first-child,
.d2-nav-mobile .btn:first-child {
  padding-left: 0 !important;
}

/* Therapist advice bubble */

/* New skeleton inside grey box */
#values-skeleton { display: block; margin-top: 1rem; }
/* removed header row for skeleton */
#values-skeleton .skeleton-grid { display: grid; grid-template-columns: repeat(4, minmax(150px, 1fr)); gap: 1rem; }
#values-skeleton .skeleton-cell { display: flex; flex-direction: column; gap: .5rem; }
#values-skeleton .skeleton-label { height: 14px; width: 60%; background: linear-gradient(90deg, #f4f4f4 25%, #e9e9e9 50%, #f4f4f4 75%); background-size: 200% 100%; animation: loading 1.4s infinite; border-radius: 3px; }
#values-skeleton .skeleton-input { height: 48px; width: 100%; background: linear-gradient(90deg, #f8f8f8 25%, #ececec 50%, #f8f8f8 75%); background-size: 200% 100%; animation: loading 1.4s infinite; border-radius: 6px; border: 1px solid var(--color-gray-200); }
@media (max-width: 992px) { #values-skeleton .skeleton-grid { grid-template-columns: repeat(2, minmax(150px, 1fr)); } }
@media (max-width: 640px) { #values-skeleton .skeleton-grid { grid-template-columns: 1fr; } }

/* Loading behavior for values form (ideal) */
#values-form.loading-ideal #values-skeleton { display: block !important; }
#values-form.loading-ideal #tab-ai-content { display: none !important; }
#values-form:not(.loading-ideal) #values-skeleton { display: none !important; }
#values-form:not(.loading-ideal) #tab-ai-content { display: block !important; }


/* User Detail Grid */
.user-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.user-detail-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.user-detail-item strong {
  font-size: 0.85rem;
  color: #666;
  font-weight: 600;
}

.user-detail-item span {
  font-size: 1rem;
}

@media (max-width: 768px) {
  .user-detail-grid {
    grid-template-columns: 1fr;
  }
}

/* AI Mode Selection */
.ai-mode-option {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.ai-mode-option:hover {
  border-color: #3498db;
  background: #f8f9fa;
}

.ai-mode-option.active {
  border-color: #3498db;
  background: #e8f4fd;
}

.ai-mode-option input[type="radio"] {
  margin: 0;
  flex-shrink: 0;
}

.ai-mode-label {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.ai-mode-label strong {
  font-size: 1rem;
  color: #333;
}

.ai-mode-label small {
  font-size: 0.85rem;
  color: #666;
}

/* Achievements Table */
.achievements-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
}

.achievements-table thead {
  background: #f8f9fa;
  border-bottom: 2px solid #e0e0e0;
}

.achievements-table th {
  padding: 0.75rem 1rem;
  text-align: left;
  font-weight: 600;
  font-size: 0.9rem;
  color: #555;
}

.achievements-table td {
  padding: 1rem;
  border-bottom: 1px solid #f0f0f0;
  vertical-align: middle;
}

.achievements-table tbody tr:hover {
  background: #f8f9fa;
}

.achievements-table tbody tr:last-child td {
  border-bottom: none;
}

.quick-add-send[disabled] {
    display: none;
}

/* Dashboard2: Desktop layout – therapist bubble (left) + meal (right) */
@media (min-width: 1024px) {
  /* Omezíme pouze na kartu s dashboard2 titulkem */
  .card:has(.d2-title) > .card-body {
    display: grid;
    grid-template-columns: minmax(320px, 6fr) minmax(320px, 4fr);
    column-gap: 2rem;
    padding: 0 5px;
  }
  /* Default: ostatní bloky přes celou šířku */
  .card:has(.d2-title) > .card-body > * { grid-column: 1 / -1; }

  /* FAST stav: rychlá terapeutická bublina vlevo, jídelníček vpravo */
  .state-fast .card:has(.d2-title) > .card-body > .fast-assessment-row,
  .state-fast_photo .card:has(.d2-title) > .card-body > .fast-assessment-row { grid-column: 1; margin-top: 2.5rem; }
  .state-fast .card:has(.d2-title) > .card-body > .meal-section,
  .state-fast_photo .card:has(.d2-title) > .card-body > .meal-section { grid-column: 2; margin-top: 2.5rem; }

  /* FAST loader stav: stejný layout jako FAST */
  .state-fast_loader .card:has(.d2-title) > .card-body > .fast-assessment-row { grid-column: 1; margin-top: 2.5rem; }
  .state-fast_loader .card:has(.d2-title) > .card-body > .meal-section { grid-column: 2; margin-top: 2.5rem; }
  /* NO FOOD stav: jednoduchá bublina vlevo, jídelníček vpravo (bez jídel) */
  .state-no_food .card:has(.d2-title) > .card-body > .no-food-box { grid-column: 1; margin-top: 2.5rem; }
  .state-no_food .card:has(.d2-title) > .card-body > .meal-section { grid-column: 2; margin-top: 2.5rem; }

  /* SLOW stav: hlavní (slow) terapeutická sekce vlevo, jídelníček vpravo;
     rychlá bublina (pokud je vidět) zůstává nad nimi přes celou šířku */
  .state-slow .card:has(.d2-title) > .card-body > .fast-assessment-row { grid-column: 1 / -1; margin-top: 2.5rem; }
  .state-slow .card:has(.d2-title) > .card-body > .therapist-result { grid-column: 1 / -1; margin-top: 0; }
  .state-slow .card:has(.d2-title) > .card-body > .meal-section { grid-column: 1 / -1; margin-top: 2.5rem; }
}

.gauge-content{position:relative;z-index:1;text-align:center;line-height:1.1;} 
.gauge-current{font-weight:700;} 
.gauge-ideal{font-size:0.7rem;color:var(--color-gray-500);} 
.gauge-label{position:absolute;bottom:-2.5rem;font-size:0.75rem;color:var(--color-gray-600);white-space:nowrap;width:100%;text-align:center;font-weight:700;text-transform:uppercase;padding:0.3rem 0;color:var(--color-gray-500);} 
.stats-gauges-row{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;width:100%;gap:1rem;} 
.gauge-big{margin-top:0;} 
.gauge-big-box{background:var(--color-gray-100);padding:1.5rem 1.5rem 3rem 1.5rem;border-radius:20px;display:flex;align-items:center;justify-content:center;}
.macro-bars{margin-top:1.75rem;padding-top:1.25rem;display:flex;flex-direction:column;gap:1.1rem;color:var(--color-gray-700);border-top:1px solid var(--color-gray-200);} 
.macro-bars__title{font-size:0.75rem;font-weight:600;letter-spacing:0.08em;text-transform:uppercase;color:var(--color-gray-500);} 
.macro-bar{display:flex;flex-direction:column;gap:0.6rem;} 
.macro-bar__head{display:flex;justify-content:space-between;align-items:center;gap:0.75rem;} 
.macro-bar__label{display:flex;align-items:center;gap:0.4rem;font-size:0.95rem;font-weight:600;color:var(--color-gray-600);} 
.macro-bar__icon{width:14px;height:14px;stroke-width:2;color:var(--color-gray-500);} 
.macro-bar{
  --macro-seg-active: var(--color-primary);
  --macro-seg-last-warn: var(--color-meal-dot-red);
  --macro-seg-inactive: rgba(15, 23, 42, 0.26);
  --macro-track-bg: rgba(15, 23, 42, 0.12);
  --macro-seg-gap: 4px;
}
.macro-bar__value{display:none;} 
.macro-bar__track{position:relative;height:8px;width:100%;background:transparent;border-radius:999px;overflow:hidden;} 
.macro-bar--energy .macro-bar__track{
  height:8px;
  overflow:visible;
} 
/* Energy: 100% marker between 4th and 5th segment */
/* Calculation: 4 segments (80%) + 3.5 gaps (0.3 of a gap past 80%) => left: 80% + 1.2px (with gap=4px) */
.macro-bar--energy .macro-bar__track::after{
  content:'';
  position:absolute;
  left:calc(80% + 1px);
  top:-7px;
  width:2px;
  height:7px;
  background:var(--color-gray-300);
  transform:translateX(-50%);
}
.macro-bar--energy .macro-bar__track::before{
  content:'100 %';
  position:absolute;
  left:calc(80% + 5.2px);
  bottom:calc(100% + 10px);
  transform:translateX(-50%);
  font-size:0.7rem;
  font-weight:600;
  color:var(--color-gray-400);
  line-height:1;
  white-space:nowrap;
}
.macro-bar__fill{position:absolute;inset:0;width:var(--macro-fill,0%);max-width:100%;background:var(--color-gray-600);border-radius:inherit;transition:width 0.3s ease, background-color 0.3s ease;} 
.macro-bar--energy .macro-bar__fill{background:var(--color-gray-600);} 
.macro-bar__segments{
  position:absolute;
  inset:0;
  display:flex;
  align-items:stretch;
  gap:var(--macro-seg-gap);
  padding:0;
}
.macro-bar__seg{
  flex:1 1 0;
  display:block;
  height:100%;
  border-radius:999px;
  background:var(--macro-seg-inactive);
  position:relative;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.06);
  transition: background-color 120ms ease-out;
  will-change: background-color;
}
.macro-bar__seg.is-active{
  background:var(--macro-seg-active);
}
.macro-bar__seg.is-last-active{
  background:var(--macro-seg-last-warn);
}
.macro-bar__seg.is-active::after{
  content:'';
  position:absolute;
  inset:0;
  border-radius:inherit;
  background:linear-gradient(90deg,rgba(255,255,255,0.06),rgba(255,255,255,0));
  opacity:0.7;
  pointer-events:none;
}
/* Left-to-right cascade; last segment completes at 300ms (180ms delay + 120ms duration) */
.macro-bar__seg:nth-child(1){ transition-delay: 0ms; }
.macro-bar__seg:nth-child(2){ transition-delay: 45ms; }
.macro-bar__seg:nth-child(3){ transition-delay: 90ms; }
.macro-bar__seg:nth-child(4){ transition-delay: 135ms; }
.macro-bar__seg:nth-child(5){ transition-delay: 180ms; }

@media (prefers-reduced-motion: reduce){
  .macro-bar__seg{ transition: none; }
  .macro-bar__seg:nth-child(1),
  .macro-bar__seg:nth-child(2),
  .macro-bar__seg:nth-child(3),
  .macro-bar__seg:nth-child(4),
  .macro-bar__seg:nth-child(5){ transition-delay: 0ms; }
}
.macro-bar__marker{position:absolute;top:50%;left:var(--macro-marker,0%);transform:translate(-50%,-50%);width:24px;height:24px;border-radius:50%;background:var(--color-gray-50);border:1px solid var(--color-gray-300);display:flex;align-items:center;justify-content:center;pointer-events:none;box-shadow:0 2px 6px rgba(15,23,42,0.08);} 
.macro-bar__marker::after{content:'';position:absolute;inset:-3px;border-radius:inherit;border:1px solid rgba(107,114,128,0.2);} 
.macro-bar__percent{position:relative;z-index:1;font-size:0.7rem;font-weight:700;color:var(--color-gray-700);} 
.macro-bars[hidden]{display:none !important;} 
.macro-bar__fill::after{content:'';position:absolute;inset:0;background:linear-gradient(90deg,rgba(255,255,255,0.05),rgba(255,255,255,0));opacity:0.6;} 

/* Bug report floating action button + modal */
.dev-tools-fab {
  position: fixed;
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  left: calc(16px + env(safe-area-inset-left, 0px));
  width: calc(56px * 0.7);
  height: calc(56px * 0.7);
  border-radius: 999px;
  border: none;
  background: #e5e7eb;
  color: #111827;
  box-shadow: 0 15px 30px rgba(148, 163, 184, 0.35);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 1300;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  opacity: 0.5;
}

.dev-tools-fab.is-active {
  background: #d1d5db;
  box-shadow: 0 15px 30px rgba(100, 116, 139, 0.35);
}

.dev-tools-fab:hover,
.dev-tools-fab:focus-visible {
  transform: translateY(-2px);
  outline: none;
}

.dev-tools-fab:hover {
  box-shadow: 0 18px 35px rgba(100, 116, 139, 0.28);
}

.dev-tools-fab i {
  width: calc(24px * 0.7);
  height: calc(24px * 0.7);
  color: #111827;
}

.bug-report-fab {
  position: fixed;
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  right: calc(16px + env(safe-area-inset-right, 0px));
  width: calc(56px * 0.7);
  height: calc(56px * 0.7);
  border-radius: 999px;
  border: none;
  background: #374151;
  color: #fff;
  box-shadow: 0 15px 30px rgba(55, 65, 81, 0.35);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 1300;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  opacity: 0.5;
}

.bug-report-fab:hover,
.bug-report-fab:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 18px 35px rgba(55, 65, 81, 0.45);
  outline: none;
}

.bug-report-fab i {
  width: calc(24px * 0.7);
  height: calc(24px * 0.7);
  color: #fff;
}

.bug-report-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 0px;
  z-index: 1400;
}

.bug-report-overlay.is-visible {
  display: flex;
}

.bug-report-modal {
  background: #fff;
  border-radius: 16px;
  width: 100%;
  max-width: 500px;
  box-shadow: 0 25px 45px rgba(15, 23, 42, 0.25);
  padding: 1.75rem;
}

.bug-report-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.bug-report-header h2 {
  margin: 0;
  font-size: 1.5rem;
}

.bug-report-label {
  margin: 0;
  font-size: 0.85rem;
  text-transform: uppercase;
  font-weight: 600;
  color: #9ca3af;
  letter-spacing: 0.08em;
}

.bug-report-close {
  border: none;
  background: #f3f4f6;
  border-radius: 999px;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.bug-report-close i {
  width: 20px;
  height: 20px;
}

.bug-report-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.bug-report-field span {
  display: block;
  font-size: 0.85rem;
  color: #6b7280;
  margin-bottom: 0.35rem;
}

.bug-report-field input,
.bug-report-field textarea {
  width: 100%;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 0.75rem 1rem;
  font-size: 0.95rem;
  background: #f9fafb;
}

.bug-report-field input[readonly] {
  color: #6b7280;
}

.bug-report-field textarea {
  min-height: 140px;
  resize: vertical;
  background: #fff;
}

.bug-report-actions {
  display: flex;
  justify-content: flex-end;
}

.bug-report-actions .btn {
  min-width: 140px;
}

.settings-admin-cta {
  display: flex;
  justify-content: center;
  margin: 0 0 0.75rem;
}

@media (max-width: 600px) {
  .dev-tools-panel__btn--mobile-hidden {
    display: none !important;
  }

  .bug-report-modal {
    padding: 1.25rem;
    border-radius: 12px;
  }

  .bug-report-modal {
    width: 100%;
    height: 100%;
    max-width: none;
    border-radius: 0;
    display: flex;
    flex-direction: column;
  }

  .bug-report-form {
    flex: 1;
  }

  .bug-report-field textarea {
    flex: 1;
    min-height: 200px;
  }

  .dev-tools-panel {
    width: calc(100vw - 32px);
  }

  .dev-tools-fab {
    width: calc(52px * 0.7);
    height: calc(52px * 0.7);
  }

  .bug-report-fab {
    width: calc(52px * 0.7);
    height: calc(52px * 0.7);
  }

  .dev-tools-fab,
  .bug-report-fab {
    bottom: 50%;
  }

  .dev-tools-fab,
  .dev-tools-panel {
    display: none !important;
  }
}

/* Admin bug detail modal */
.bug-detail-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 1500;
}

.bug-detail-modal .bug-detail-card {
  background: #fff;
  border-radius: 12px;
  width: 100%;
  max-width: 900px;
  max-height: 90vh;
  overflow: auto;
  box-shadow: 0 25px 45px rgba(0, 0, 0, 0.25);
}

.bug-detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid #e5e7eb;
}

.bug-detail-content {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  font-size: 0.95rem;
}

.bug-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.bug-detail-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #9ca3af;
  font-weight: 600;
  margin-bottom: 0.25rem;
  display: block;
}

.bug-detail-section h4 {
  margin: 0 0 0.35rem;
  font-size: 1rem;
}

.bug-detail-section pre {
  background: #0f172a;
  color: #f8fafc;
  padding: 1rem;
  border-radius: 8px;
  font-size: 0.85rem;
  overflow: auto;
  max-height: 240px;
}

/* Superadmin > Servis > Bugy */
.bug-page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin: 0.25rem 0 1rem;
}

.bug-page-header__title h1 {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 700;
  color: #111827;
  letter-spacing: -0.01em;
}

.bug-page-header__subtitle {
  margin-top: 0.25rem;
  color: #6b7280;
  font-size: 0.95rem;
}

.bug-table {
  table-layout: fixed;
  width: 100%;
}

.bug-table td,
.bug-table th {
  vertical-align: top;
}

.bug-url-cell,
.bug-desc-cell {
  white-space: normal;
  overflow-wrap: anywhere;
}

.bug-desc-cell {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  line-height: 1.35;
}

.bug-url-link {
  display: inline-flex;
  flex-direction: column;
  gap: 0.1rem;
  max-width: 100%;
  text-decoration: none;
}

.bug-url-link:hover .bug-url-host,
.bug-url-link:focus-visible .bug-url-host {
  text-decoration: underline;
}

.bug-url-host {
  font-weight: 600;
  color: #111827;
  line-height: 1.2;
}

.bug-url-path {
  color: #6b7280;
  font-size: 0.9rem;
  line-height: 1.2;
}

.bug-status-cell {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
}

.bug-status-select {
  width: 130px;
  max-width: 100%;
  padding: 0.35rem 0.6rem;
  border-radius: 10px;
  border: 1px solid #d1d5db;
  background: #fff;
  color: #111827;
  font-size: 0.9rem;
  line-height: 1.2;
}

.bug-status-select:disabled {
  opacity: 0.6;
}

/* Stav = podbarvení řádku */
.bug-table tbody tr {
  transition: background-color 0.15s ease;
}

.bug-table tbody tr[data-bug-status="new"] {
  background-color: #f3f6ff;
}

.bug-table tbody tr[data-bug-status="test"] {
  background-color: #fff7e6;
}

.bug-table tbody tr[data-bug-status="resolved"] {
  background-color: #eafaf2;
}

.bug-table tbody tr[data-bug-status="new"]:hover {
  background-color: #e9eeff;
}

.bug-table tbody tr[data-bug-status="test"]:hover {
  background-color: #fff1d1;
}

.bug-table tbody tr[data-bug-status="resolved"]:hover {
  background-color: #def7ea;
}

.bug-time-cell {
  white-space: nowrap;
}

.bug-time-date,
.bug-time-time {
  display: block;
  font-variant-numeric: tabular-nums;
}

.bug-time-time {
  color: #6b7280;
  font-size: 0.9rem;
}

.bug-only-new-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.6rem;
  border-radius: 999px;
  border: 1px solid #e5e7eb;
  background: #fff;
  color: #374151;
  font-size: 0.9rem;
  cursor: pointer;
  user-select: none;
}

.bug-only-new-toggle input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: #111827;
}

.bug-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.35rem;
  flex-wrap: nowrap;
  width: 100%;
}

.bug-actions-col {
  text-align: right;
  white-space: nowrap;
}

.bug-status-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  flex-wrap: nowrap;
}

.bug-status-chip {
  border: 1px solid #d1d5db;
  background: #fff;
  color: #374151;
  border-radius: 999px;
  font-size: 0.8rem;
  padding: 0.18rem 0.65rem;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}

.bug-status-chip.is-active {
  color: #fff;
  border-color: transparent;
}

.bug-status-chip--new.is-active {
  background: #4f46e5;
}

.bug-status-chip--test.is-active {
  background: #d97706;
}

.bug-status-chip--resolved.is-active {
  background: #059669;
}

.bug-delete-btn {
  margin-left: 0.25rem;
}

.bug-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  border: 1px solid transparent;
  white-space: nowrap;
}

.bug-status--new {
  background: #eef2ff;
  color: #3730a3;
  border-color: #c7d2fe;
}

.bug-status--test {
  background: #fffbeb;
  color: #92400e;
  border-color: #fde68a;
}

.bug-status--resolved {
  background: #ecfdf5;
  color: #065f46;
  border-color: #a7f3d0;
}

.bug-status--deleted {
  background: #f3f4f6;
  color: #6b7280;
  border-color: #e5e7eb;
}
 

/* Dashboard Photo Zoom Feature */
.fast-assessment-card__photo-img {
    cursor: pointer;
    transition: transform 0.2s ease;
}

/* Expanded state for the preview container */
.fast-assessment-card__photo-preview.is-expanded {
    width: 100%;
    height: auto;
    max-width: 100%;
    border-radius: 12px;
}

/* Force single column layout when image is expanded */
.fast-assessment-card__photo-grid.has-expanded-image {
    grid-template-columns: 1fr;
}

/* Ensure image column takes full width when expanded */
.fast-assessment-card__photo-grid.has-expanded-image .fast-assessment-card__photo-col--image {
    width: 100%;
    justify-content: center;
    order: 1;
    margin-bottom: 1rem;
}
